Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packing own app for Mac? #23

Open
imperator-maximus opened this issue Nov 10, 2013 · 5 comments
Open

Packing own app for Mac? #23

imperator-maximus opened this issue Nov 10, 2013 · 5 comments

Comments

@imperator-maximus
Copy link

I was not able to make my own app with the instruction and this is what I found out so far:

$ cp Deskshell.app MyFatApp.app
$ mkdir MyFatApp.app/Contents/Applications

This should be "Application" without s

$ mv Path/to/my/app-folder/* MyFatApp.app/Contents/Applications

same

$ rm MyFatApp.app/Contents/MacOS/deskshell
$ rm -Rv MyFatApp.app/Contents/Resources/Scripts

there is a "script" in there, no "Scripts" I removed it because it started the wrapper.

$ nano MyFatApp.app/Contents/MacOS/deskshell

#!/bin/bash
ME=$(dirname '$0')
"$ME/desk_parse" "$ME/../Application/app.desk"

This was not working for me on command line with "./deskshell" so I added php:
$ME/php "$ME/desk_parse" "$ME/../Application/app.desk"

I also made a chmod +x on deskshell and with "./deskshell" the app starts fine. But after clicking the icon I am getting only a

10.11.13 02:03:25,153 com.apple.launchd.peruser.501[281]: (com.appjs.deskshell.146640[32193]) Exited with code: 127

on console. Any ideas?

@sihorton
Copy link
Owner

Take a look at this cool code in the bin/mac directory:- https://github.com/sihorton/appjs-deskshell/tree/master/bin/mac/Mini%20Bundle.app

What this should demonstrate is running a deskshell application from a mac bundle. What the bundle should do is find the installed deskshell application and then launch itself with deskshell (see MacOS/exe). This leads to a lightweight packaging for mac os. Our plan is to create a little deskshell application that will take an application and then package it up into these mini-bundles, like we have an exe compiler for windows but that has not been implemented yet.

If you copy / paste / rename the Mini Bundle.app and then copy in your deskshell app to Contents/Resources folder then hopefully that will work for you. Alternatively try just running Mini Bundle app and then make changes to it until it becomes your application.

We also have a cross platform packaging solution that appends all application files into a single .appfs file, this is working but the mac port does not yet have the latest code with support for this feature (but it is coming soon).

We have an open wiki: https://github.com/sihorton/appjs-deskshell/wiki please feel free to note down how you went about working with your application, the problems you found as well as solutions. If you note this down in a page we can improve it step by step and turn it into the main application documentation in the future!

@imperator-maximus
Copy link
Author

thanks for fast answer! In my case I will prefer to have all in one single file not to be dependent on a runtime like Adobe Air. I think I prefer to wait for the cross platform packaging solution.

@sihorton
Copy link
Owner

You could include deskshell in your application but it will add 60Meg+ to the application (node is around 5 meg and the rest is chromium). This is why we prefer to install deskshell once and then share it among all of the applications.

@sihorton
Copy link
Owner

If you really want to package everything up into a single application then take deskshell and rename it and then replace the default application (sys-apps/demo-docs) with your code, when the application is launched it will then run your application and have all dependancies etc in one folder.

@IngwiePhoenix
Copy link
Contributor

I am going to be outlining the description - i just roughly put together what I used to create the Mini Bundle. Im back on my developer desk, so to say. Except a lot of updates and a few pr’s to simon soon. Sorry for my slowness on Mac :). But with the takeover of AppJS, my plans on updating it and merging it with Deskshell, drag0n which is the yet biggest Deskshell app, and other stuff just kept me distracted for the smaller stuff. But, I’ll be updating stuff ASAP.
Regards!
Am 10.11.2013 um 13:05 schrieb sihorton notifications@github.com:

If you really want to package everything up into a single application then take deskshell and rename it and then replace the default application (sys-apps/demo-docs) with your code, when the application is launched it will then run your application and have all dependancies etc in one folder.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants