#592

[Windows] A way to customize the build folder layout and the extractor default path

Openpetersvpopened 6d ago

I would like a Windows build that users can extract to a directory of their choice and run in place, or have a way to configure where the self-extractor installs the application. I really dislike anything that silently installs itself under %LOCALAPPDATA%.

In addition, the folder structure of a deployment is really weird for a windows application package. Root/bin + Root/Resources, and launcher.exe referencing ../Resources - this is really weird behaviour, and it might have been my bad, bit I didn't found a way to configure these things.

I checked the distribution wrapper source code. Currently, it extracts the app to a managed location. The inner app places launcher.exe in bin/ and loads files from ../Resources/, so moving the launcher to the app folder’s root is not a viable workaround. This layout makes a simple folder deployment really awkward for Windows app.

Could Electrobun support a portable or more / better configurable Windows output with:

  • A branded application EXE at the root of the output folder, with all required files contained in that folder.
  • No installation or extraction to AppData when that EXE runs.
  • A way to rename launcher.exe to something else.
  • An option to omit bspatch.exe and zig-zstd.exe when the app does not use Electrobun updates. The existing self-extracting distribution could remain available for projects that want it. My use case is a folder I can package or distribute directly, with installation location controlled by the user. I as a user expect something like: C:\Program Files\SomeApp\SomeApp.exe and C:\Program Files\SomeApp\Resources being there. Or, as any normal power user, that never installs utilities in C... D:\Apps\SomeApp\SomeApp.exe

Also, is this launcher.exe-to-bun.exe even necessary? This is the cause for #514. It's extremely hard to implement taskbar pinning when a launcher loads another exe that creates a window. It's better the launcher to load bun.exe as a DLL, and directly call into its __declspec(dllexport)-ed functions. This is possible on Windows, but you need to define some things from bun.exe as exported (Yes, Windows EXEs can export functions). The launcher.exe must lead to the creation of that window, so Windows shell knows who owns it.

Activity

0

No activity yet.