Electron-builder: Change win-ia32-unpacked file structure

Created on 10 Feb 2017  Â·  12Comments  Â·  Source: electron-userland/electron-builder

  • Version: 8.6.0

  • Target: win32

This is more a question than an issue, sorry if it was answered before, but I couldn't find anything related on the current issues.

When creating the package for windows, is there a way to move all the generated library files and directories (i.e. *.dlls, *.pak, /locales, /resources, etc.) to a sub-folder (i.e. /_internal) of the root, and leave the *.exe file by itself?

└─win-ia32-unpacked
       │ MyApp.exe
       └─_internal
              content_resources_200_percent.pak
              content_shell.pak
              d3dcompiler_47.dll
              ffmpeg.dll
              icudtl.dat
              libEGL.dll
              libGLESv2.dll
              LICENSE
              LICENSES.chromium.html
              natives_blob.bin
              node.dll
              snapshot_blob.bin
              ui_resources_200_percent.pak
              version
              xinput1_3.dll
duplicate

Most helpful comment

some activity on this in the near future?

Yes, this feature is very easy to implement and probably will be released soon.

All 12 comments

Don't use dir target, but default. Default target for windows is nsis and one exe is produced. Or do you want a portable (without installer)?

Yes, my target is zip, because I want a portable self-contained app, so I want the unzipped folder structure to mimic the above, is that even possible?

Duplicates #1157

Thanks for the prompt response. I saw you reopened #1157 so should I expect some activity on this in the near future?

some activity on this in the near future?

Yes, this feature is very easy to implement and probably will be released soon.

Perfect, thanks

@luismanuel001 was this ever solved? I'd like to change the win file layout as well but I can't find any details on how to do that.

@chrisregnier #1157 portable implemented.

@develar thanks, I've played with the portable option but I've found the executable takes far too long to startup due to the unpacking temp files each time. I'm ok with just copying the zip around and running the executable directly, but I was hoping to change the layout of the directory, which is what the original issue was asking for, and portable doesn't do that.

Is there any way to move files like dlls into a lib folder instead of the root?

@chrisregnier If you want blazing fast start-up — https://github.com/electron-userland/electron-builder/issues/2548#issuecomment-371240270

The changes to portable look promising thanks for the update.
Although, the original question still stands but since it's continually being evaded I'm going to assume it's not possible. Thanks anyways.

I hope this can be revisited. I'm currently using portable and the load speed is pretty terrible compared to running the exe in the unpacked directory. If I can clean up that directory, it would be shippable unpacked as per the feature request above. It would load faster and I would be able to load something that sits next to the .exe. I'm writing a dicom viewer and the dicom files sit right next to the exe. Since the portable option unpacks into some AppData folder, the viewer can't see the dicom files. If we were to have the proposed file structure, this functionality would work.

Was this page helpful?
0 / 5 - 0 ratings