How can I distribute my OSX command line Apps in my site? - macos

I'm building OSX commandline apps. it's almost complete.
source code is open'd in my github.
but I want to distribute its "binary(Execute file)" as free ware but I can't understand the method.
simply should I extract execute file and place my blog?
I'm sorry because my english is poor.

Make sure you are building a release version of your app as described here How to deploy a Mac Command Line Tool
Then you can place the binary on your blog or on any other page. Make sure you are not using any libraries that may be missing from other people Macs.
Note it is always helpful if you add a description what your app does, how it needs to be called (arguments, ...) and maybe give some screenshots or in case of a command line app textual version of outputs.

Related

How do I build Flutter application locally?

I have developed (on a Mac) a small Flutter app to learn the technology. Now, I would like to build it and use it on Mac, Linux and Android. The few packages I have used claim compatibility with all systems.
So the first thing I did was to run flutter build macos. I indeed obtain an application under build/macos/Build/Products/Release/nameofmyapp.app. It seems this runs correctly, but it fails, for instance, loading data from a DB, which is the first thing it should do.
I have a few questions:
are there any other steps that I should take? I see a long guide about the release process, but to be frank I don't need or want any of that: I only want to use the app myself. Is there something else to do other than flutter build macos?
am I looking for the built app in the right place?
if I did everything correctly, could it be that I need to authorize the app to access to the file in some way? Should I manage this workflow myself, or is there a standard way to perform this action in Flutter?
Sorry for asking more than one question, but I am not sure whether what I am doing wrong is
the build process
where to look for the built app, or
(not) handling the app permissions.
EDIT
Following a suggestion by Madhavam, I tried flutter run --release. The result is identical to running the built application: nothing is loaded from the database, and no errors appear in the console.
To be clear, these are the libraries that are not working:
sqflite should load data from a database (in my Documents folder) but does not show anything
file picker cross should allow me to load data from a JSON file, but when I try this interaction, I an not shown any dialog to load a file
shared preferences should read some settings, but they all appear as null
In short, anything that has to do with interacting with external files or storage does not seem to work
Yup, you have to manage it yourself. Take a look at this package
:https://pub.dev/packages/permission_handler
If you're using Firebase then you probably need to add the release keys.
One thing too, if you face an error only in the release build then I recommend running the app with flutter run --release so that you can see the errors that are being thrown.
So it seems that this is related to the default being an app that runs in sandbox. Since I do not want to distribute the app, it was fine for me to disable this setting. Details are in this answer

Is it a sandbox issue? how to fix it? (I am implementing a plugin of apple mail)

Maybe this tutorial is out of date( it was written in 2009),but I cannot find a better one. While following it step by step, I was stuck at Loading a Plugin section. Apple mail failed to load the plugin.
here is a screenshot of Console's information.
Has anybody else tried to follow this tutorial on OS X 10.9 recently?
////////////////////update/////////////////////////
It seems "~/Library/Mail/Bundles/MyPlugin.mailbundle/Contents/Frameworks/Python.framework/Versions/2.7/python" needs code signing.
Yes, this is a sandbox problem: Python Mail plug-ins (and I think all plug-ins) cannot read files outside of their container (the Plugin.mailbundle directory).
If you followed the instructions on the tutorial page you mention, you are probably building an alias build of the plug-in (using python setup.py py2app -A), which means that the plug-in will try and access files from the original source location, which is almost always outside of the sandbox (in your case, it's /Users/greedyint/Desktop).
Try running without -A to make a full build.

Compile Assembly OSX (10.6.8)

I've decided to learn some assembly, however I haven't been able to figure out how to actually assemble it. I'm running OSX 10.6.8 with developer tools installed. I'm running Xcode 3.13, there's no downloads tab in the preferences in the version that I see and the download for command line tools from Apple's site doesn't run on anything less than 10.7.
I've seen some online sources saying that I should use the "as" "gas" or "gcc" commands, however terminal tells me that none of those commands exist. (to test, I simply opened a new terminal window and entered the command name with no parameters. I assume that would work but I could be mistaken.) I can't find any concrete documentation about whether or not this stuff is installed with developer tools/how to check if it is installed/where to install it.
Asking this question here was my last resort, however I'm sure the information was already out there and I just couldn't find it so if anyone could:
Explain why these commands don't work/what I should install if I want to assemble some basic assembly
Tell me how I could have figured this out on my own
I'd be really grateful. Thanks in advance.
[EDIT]There is a file named "as" in the Developer/usr/bin/ folder so I'm not sure why the command is not found. Do I have to do more than just navigate to the directory of the file I'm assembling and type "as filename"?
You wanted to check "UNIX development" when you installed Xcode. (How were you supposed to know this at the time?)
You can re-install Xcode, making sure to check that magic box.
However, the command-line drivers are actually present, they're just not in your path (they're in /Developer/usr/bin, if I remember right, though it's been a long time since I've tinkered around with Xcode 3.x). So you should be able to add that to $PATH and use them.
As a third alternative, you can always download a distribution of either gcc or clang.
Make sure that you have the Xcode "Command Line Tools" additional download installed. It's available in the Downloads tab of the Xcode preferences window.

Text editor or a standalone tool for Mac OS with ability to compress JavaScript code

Here is the task: I would like my JavaScript code from different files to be compressed and concatenated into one file that is going to be used on a web page. The problem is that I'm pretty lazy :) and using some command line tools like, for instance, Apache Ant + YUICompressor each time I add a new line of code doesn't look attractive too me. Replacing uncompressed versions with a compressed final script before release is not a great option as well.
I know that such IDE as Eclipse allow to build project automatically after each update so it is possible to use already mentioned Apache Ant and YUICompressor in a build scenario to reach my goal. However Eclipse is too geeky for me, it's not that I can't figure out how to use it, I just don't feel comfortable using it. Maybe someone knows a good alternative (for Mac OS)?
PS. I hope I don't sound too capricious :) , after all having convenient tools is rather important for a programmer.
You can get a bundle for TextMate called JavaScript Tools that contain two built-in text compressors, available at http://andrewdupont.net/2006/10/01/javascript-tools-textmate-bundle/ . TextMate is available at http://macromates.com/ .

Is OS X Installer package postflight localization supported?

I've created an OS X installer package that includes localized resources (License.html, Readme.html, etc.) In particular, it includes a localized postflight script, since some of the post-install actions differ from language to language; opening a per-language file after the install completes, for example. The package is created as part of an automated build, not through Package Maker.
Originally I used the 'full' locale name as the localized Resource folder name; for example, English.lproj. Everything worked fine. Recently, I switched to the ISO name, i.e. en.lproj, since I discovered that was what Package Maker was using, and this question indicates that form is preferred. Everything worked exactly the same, except that the postflight script is no longer executed.
I did some more testing, and noticed that, even when it works (using the full language name as the name of the folder), it logs this message to the console:
Localized installer script postflight found in the <name> package. Using compatibility mode.
I can find barely any mention of Installer localization in Apple's developer docs, much less anything specific about scripts. Does anyone have experience with this? Is it a bug for it not to work with en.lproj, or was it a bug for it to have worked before?
Things that I don't understand:
If you're not creating these packages with PackageMaker, what are you creating them with?
Why would a postflight script ever need to be localized when conditional logic would almost surely suffice?
It turns out that, no, this is not supported anymore.

Resources