ensemble-engine / ensemble

A rules-based AI framework for social simulation
Other
50 stars 11 forks source link

Warn the user if building authoring tool on MacOS without Wine #107

Open mkremins opened 4 years ago

mkremins commented 4 years ago

The current build process will silently fail to produce a Windows version of the authoring tool if building on MacOS without Wine installed. This is confusing if you're not expecting it. We've documented this behavior here, but it'd also be useful to make the build scripts themselves tip the user off as to what's going on.

mkremins commented 4 years ago

Weird alternative: there's apparently a workaround that allows you to build a Windows app on MacOS even if Wine isn't installed! Turns out electron-packager only uses Wine to run node-rcedit, which doesn't do anything besides update the icon and other metadata on the built Windows .exe. If you're OK with skipping this part of the process, you can use a package called electron-packager-dummy-wine to convince electron-packager that Wine is installed even when it isn't. This should enable you to produce Windows builds (albeit with slightly wonky metadata) even without Wine installed.

Alternatively, we can manually do something similar to what electron-packager-dummy-wine is doing internally, as per this thread, if we detect for ourselves that Wine isn't installed. Then we can issue a warning if we do.