How to make installer set up of Cocoa project? - cocoa

I have make one application Cocoa using XCode. Now I want to make setup file of project. So other user can install this project directly in his system.

In short, the polite way is to build your app with the Release Configuration, put it into a Disk image with Disk Utility or zip it up, then put it on a server and have people download it.
If you want a longer and more detailed answer, read Apple's Software Distribution Guide.

Related

How to change install location of msix bundle?

I have a WPF app that I am planning on deploying with the Windows Application Packaging Project in Visual Studio that makes the MSIX bundle for installations and future updates. The installer automatically installs the app in C:\Program Files\WindowsApps. This is fine until the program needs to cache some data or it needs to modify the appsettings file since the app does not have permission to get to these resources.
Is there a setting I can change in the packaging properties/manifest so it can install somewhere else so I can avoid these problems?
Indeed, only the Windows can write in %ProgramFiles%\WindowsApps when installing the msix package (by design). If your app is writing log files or other data inside the installation folder it will crash.
You need to either update your code to write to %AppData% or, if you don’t have access to the code, use the Package Support Framework to fix it. You can read more about here:
Package Support Framework (aka PSF)
The PSF brings support for API redirection and hooking. Thus, you can fix an app that failed to write a file in the installation folder (this is no longer allowed) and redirects it to a recommended location, or maybe simply update the app’s working directory.
As mentioned above, you cannot write in the install location of an MSIX package - this is by design.
For apps that are no longer under active developer indeed using the Packafe Support Framework is the only way to fix them. However, from what I see you are preparing to launch the app, so you have access to its code.
In this scenario, it is recommended you save all your app settings in the AppData\Roaming folder. For apps deployed as MSIX Windows will automatically redirect it under the Packages folder, but that is handled automatically by the OS, so you don't need to worry about it. More details below.
How to save data under AppData\Roaming instead of AppData\Local\Packages

How can I include an Apple Help Book when building my app for OSX

I have developed a Firemonkey app for Windows and OSX. I have also developed an Apple Help Book containing the help for my application when it is run on OSX. (I have a different help system when running in Windows.) Apple's recommended location for the help bundle is in the app's Contents/Resources folder. I can copy the help bundle there manually but it gets deleted every time I run my app in the IDE or deploy my app.
I thought about trying to use the deployment manager but this only allows files to be deployed, not bundles. The help bundle contains a large number of files spread amongst various folders and it would be tedious to set each file up individually in the deployment manager. Moreover, I would have to change the setup every time I added or deleted a page from help since each page is a separate HTML file in the bundle.
So for now, I am manually pasting the help bundle into Contents/Resources. Does anyone know of a more efficient method to incorporate the help bundle?
After much research, I came to the conclusion that the only reasonable way to incorporate an Apple helpbook is to paste its bundle into the app bundle at the location Contents/Resources. I thought about locating it elsewhere but Contents/Resources is where Apple recommends it should go. This is inconvenient because it gets erased whenever I redeploy the app or run it from the IDE. But until Firemonkey is enhanced to make provision for helpbooks, this seems to be the only acceptable way to do it. The program 'Packages' http://s.sudre.free.fr/Software/Packages/about.html is then a great way to package the app for issue to customers.

How can I add a file to an existing Mac OS X .app bundle?

I'm writing a modification for Arduino that turns an Arduino board into a game controller.
In order to add my board-specific files to the programming environment, right now, the user needs to open up the Arduino.app package, and then add a few different files into a various folders in the Arduino.app package. It is hardly user friendly. How can I make an installer which automatically moves my files into the appropriate locations within Arduino.app, or is that impossible?
You can download PackageMaker (available here, in the Auxiliary Tools for Xcode download).
You will then be able to make a .pkg that the user will be able to install simply by double clicking. You can also make a script that will check if Arduino is already installed and stop the installation if it's not. You get the idea.
Normally, especially in today's code-signed MacOS app approach (where any modifications to the app or its resources/files would break the app & make it not-launchable), I would say "you're out of luck".
But Arduino is one of the rare OPEN SOURCE apps.
You can fetch the source code from this page:
http://arduino.cc/en/Main/Software
And make your modifications to the project and then build a fresh, customized copy for yourself.
I figured out how to do it using the magic of scripting!
You can take a look at my solution here:
http://code.google.com/p/unojoy/source/browse/#hg%2FLeoJoy%2FLeoJoy%20Installer.app%2FContents%2FMacOS
The folder structure it's in makes it show up as an app on OSX, and the two scripts (LeoJoy Installer and LeoJoyInstaller.command) copy the files. There's two scripts there because I wanted to have a console window pop up to show the user progress, and that's the only way I could figure out how to do that. But, if you run this app in the same directory as the Arduino app, it copies files from the installer app into the Arduino.app package, updating the Arduino app so I don't have to distribute a whole separate version of Arduino.

How do I Include a file in a release package that is not part of the project

I need to create a release / install package. There is a drop down box in VS that lets me create a release version for the project. So I hit the publish button and choose the CD option. Sure enough it publishes the a setup I need. I installed the application everything goes fine though I have no idea where on the target machine where the application ended up??? Trouble is my application has signed XML file that stores the public keys my application uses to enable features depending on what a customer is licensed to do. I would like the key file to be part of the package that is installed so I don't have to send it seperately. I have to send the license file but I was hoping to avoid confusion by only requiring the user to only have copy the license file to the local directory. Which brings up another question were is application installed I did a search and found nothing with my application name???? But thereis an icon onthe star menu and the applicaton seems to run just file
You probably deployed your application as a "ClickOnce" Application. It installs the program to an obfuscated folder in your users folder. On Windows 7 it winds up in something like "c:\users\username\AppData\Local\Apps\2.0\somefoldername\somefoldername". If you need more control of the installation, the free InstallSheild LE that comes free with VS2010 is not a bad choice. It will let you add additional files as well.

Some generic and working Xcode project settings which lead to successful Mac App store submission?

I built a simple app that I'd like to submit to the Apple store, but I am not sure whether my project Release settings are set correctly. I adjust a few things, based on what I could find online, but I might've created more problems than I solved.
I would very much appreciate if somebody could provide a copy of working Release settings which would sure work for my project. I don't store/read any files, the application just runs a few commands. Basically, I just need it to run and install in that /Applications folder so the user could trigger a launch.
Basically use default settings, move your source code to a new project, read up the guidelines and see if anything is told to change, otherwise it's just fine. Cheers.

Resources