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

TheProtonApp.zip file structure #24

Open
distributev opened this issue Feb 10, 2017 · 6 comments
Open

TheProtonApp.zip file structure #24

distributev opened this issue Feb 10, 2017 · 6 comments
Assignees

Comments

@distributev
Copy link
Owner

When opening the zip file the user should not see any file/folder which is not directly related with the
TheProtonApp.exe functionality (all the electron/node runtime files / folders / resources i.e. node.dll should be moved under the _internal folder)

package-zip

@luismanuel001
Copy link
Contributor

luismanuel001 commented Feb 10, 2017

I'm not sure this is possible, I searched the electron-builder documentation and issues and I did not find that option, or anybody talking to something related to that.

I made an issue asking directly if it is even possible on the electron-builder repo.

But in the meantime I guess we have to keep it like it is.

@luismanuel001
Copy link
Contributor

OK I got a response to the issue, and they said that this is not supported yet, but they where going to work on this in the near future since it is an easy implementation and others have asked for this feature already.

@luismanuel001
Copy link
Contributor

OK so for now I added the batch file (TheProtonApp.cmd) workaround so the file structure currently looks like this:

release/TheProtonApp-0.0.1-win-ia32
├── TheProtonApp.cmd     <------------------------- batch file shortcut
└── _internal          <----------------------------- _internal folder
    ├── LICENSE
    ├── LICENSES.chromium.html
    ├── TheProtonApp.exe     <------------------------EXE
    ├── blink_image_resources_200_percent.pak
    ├── content_resources_200_percent.pak
    ├── content_shell.pak
    ├── d3dcompiler_47.dll
    ├── ffmpeg.dll
    ├── icudtl.dat
    ├── libEGL.dll
    ├── libGLESv2.dll
    ├── natives_blob.bin
    ├── node.dll
    ├── resources
    │   ├── app       <-------------------- app folder with all the app files already built 
    │   │   ├── 3dbd5b2a8e8d3d0dbede22acf0ffe03c.jpg
    │   │   ├── 448c34a56d699c29117adc64c43affeb.woff2
    │   │   ├── 674f50d287a8c48dc19ba404d20fe713.eot
    │   │   ├── 7799dece2c79854f63f09e7dfa528b88.jpg
    │   │   ├── 89889688147bd7575d6327160d64e760.svg
    │   │   ├── 912ec66d7572ff821749319396470bde.svg
    │   │   ├── af7ae505a9eed503f8b8e6982036873e.woff2
    │   │   ├── app.ecab8d0be0a40943b745.js
    │   │   ├── app.ecab8d0be0a40943b745.js.map
    │   │   ├── b06871f281fee6b241d60582ae9369b9.ttf
    │   │   ├── background.js
    │   │   ├── background.js.map
    │   │   ├── e18bbf611f2a2e43afc071aa2f4e1512.ttf
    │   │   ├── env.json
    │   │   ├── f4769f9bdb7466be65088239c12046d1.eot
    │   │   ├── fa2772327f55d8198301fdb8bcfc8158.woff
    │   │   ├── favicon.ico
    │   │   ├── fee66e712a8a08eef5805a46892932ad.woff
    │   │   ├── index.html
    │   │   ├── package.json
    │   │   ├── polyfills.ecab8d0be0a40943b745.js
    │   │   ├── polyfills.ecab8d0be0a40943b745.js.map
    │   │   ├── robots.txt
    │   │   ├── vendor.ecab8d0be0a40943b745.js
    │   │   └── vendor.ecab8d0be0a40943b745.js.map
    │   └── electron.asar
    ├── snapshot_blob.bin
    ├── ui_resources_200_percent.pak
    ├── views_resources_200_percent.pak
    └── xinput1_3.dll

So the rest of the folders from the screenshot you provided at the top (config, logs, templates, etc), need to be put on the app directory in order for the app files to access their data, so one workaround I'm thinking I want to try, is to add a gulp task that will create symlinks to those folders so the final structure looks exactly like the one you provided, just that those folders on the root will actually be symlinks to the app folder. If this works, the end user could modify the files on lets say on /TheProtonApp-0.0.1-win-ia32/config and the changes will reflect on the /TheProtonApp-0.0.1-win-ia32/_internal/Resources/app/config folder and viceversa.

Please let me know what do you think of this approach.

@distributev
Copy link
Owner Author

Does the symlinks work on Windows?
I think symlinks are Linux stuff.

@luismanuel001
Copy link
Contributor

I think they do: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365680(v=vs.85).aspx

I still need to implement and test to make sure it behaves as expected

@distributev
Copy link
Owner Author

Why not have ./config (and all other folders from the screenshot) like I put in screenshot and then in the APP code you'll point to these folders with relative paths similar with ../../.. (how many .. parent relatives are necessary).

And of course you'll not hard code in JS code ../../.. you'll have some kind of configuration CONFIG FOLDER which will come from a development.js / production.js where you'll configure all paths (you did something similar in the-app)

check here -

https://github.com/distributev/the-app/blob/master/theapp-template/TheApp/_internal/app/server/config/environment/production.js

theapp-template

Also check the theapp-template/TheApp from here https://github.com/distributev/the-app - you implemented this and it's good. theapp-template/TheApp structure keeps a "template" with all the files / folders which are "static" (not the built code) and this is like a boiler-plate for the package-application.

Do you remember theapp-template/TheApp packaging idea? Do the same now.

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

2 participants