branchseer / DeskGap

A cross-platform desktop app framework based on Node.js and the system webview
https://deskgap.com/
MIT License
1.83k stars 73 forks source link

Need an app packaging solution #5

Open eveningkid opened 5 years ago

eveningkid commented 5 years ago

Hi,

This project looks really good! I would love to give it a try but I can't seem to find any information related to releasing a DeskGap project?

Any hints?

Thank you. :)

branchseer commented 5 years ago

I am working on this.

Now I have a simple script that packages the Pym app but it's nonconfigurable. Will release it when it's ready.

It turns out packaging apps are much more complicated than I thought, especially on Windows and Linux.

Lots of efforts have been put in https://github.com/electron-userland/electron-builder. Before reinventing the wheel I'm going to look into this project and see if it's doable to add DeskGap support to it.

This could take a while but I think it will be worth it in the end.

For now, to package an app, just replace the DeskGap/resource/app folder (for macOS it's DeskGap.app/Contents/Resources/app) with your own app package and do the code-signing manually. pym-packaging-scripts could help.

austinbillings commented 5 years ago

Would also love/appreciate this tooling. Thanks for the awesome work!

andymans commented 5 years ago

See pkg

andymans commented 5 years ago

What I see is that the problem falls into 2 parts:

  1. "Build" - e.g. on MacOS we want to produce a MyApp.app package (with Contents/Resources etc)
  2. "Distribute" - e.g. for Mac Users we'd want to be able to produce a friendly DMG

For the 2nd part, I have been using DMG Canvas - it's mainly a manual process, but allows the owner of the app to precisely design how the installer should look. It also takes care of code signing, and so on. Once designed, the DMG canvas step can also be integrated in the build.

See here for details.

NB I've only included MacOS specific ideas at this point. For simplicity, I'd recommend dealing with one platform at a time, otherwise things get complex quite quickly.

ghost commented 4 years ago

Under Windows, 7zip and SFX could be used

m4heshd commented 4 years ago

+1 to this. Will really be useful.

For now, to package an app, just replace the DeskGap/resource/app folder (for macOS it's DeskGap.app/Contents/Resources/app) with your own app package and do the code-signing manually. pym-packaging-scripts could help.

But how do we include the third party node modules?

remorses commented 4 years ago

A good packaging solution and some good documentation would make this project an awesome alternative to Electron. I hope @patr0nus find a way to monetize this project and invest the time this project deserves

m4heshd commented 4 years ago

@remorses agreed. 👍🏼

ken0x0a commented 4 years ago

@e-id @m4heshd @remorses Could you write some example code and/or configuration to build for Windows?

I want to understand how to create .appx.

https://github.com/ken0x0a/deskgap-packaging-scripts

Mac version is working okay (still need work though). Could you help me?

There is no appxmanifest.xml in pym-packaging-scripts

Plz share code! Thank you!

probablykasper commented 4 years ago

I built Embler which lets you package binaries into .app, .dmg, .zip and .tar.gz for macOS. There's a usage example for using it together with pkg. If this is something that makes the process simpler, feel free to add it to the docs :)

If anyone decides to try packaging a DeskGap app with it, please let me know how it goes!

danielo515 commented 3 years ago

Providing at least one example of how to use pkg to build a deskgap application will be very helpful. All my attemtps ends with an "cannot find module deksgap" message when I run the binary

dirkk0 commented 3 years ago

What works for me: a) download the binaries for your platform(s) here: https://github.com/patr0nus/DeskGap#api-demos b) put your own markup/code/style in app.html and app.css c) zip it and distribute.

If you are worried about people being able to look into your code, you cannot really prevent that (which also applies to Electron).

danielo515 commented 3 years ago

What works for me: a) download the binaries for your platform(s) here: https://github.com/patr0nus/DeskGap#api-demos b) put your own markup/code/style in app.html and app.css c) zip it and distribute.

If you are worried about people being able to look into your code, you cannot really prevent that (which also applies to Electron).

I am more worried about people being confused by a zip file that expands into 3 files vs a single executable rather than my code being exposed

dirkk0 commented 3 years ago

With what I described above, you'll have one executable and one folder, which should be communicable. But yes, it's more than one file.