EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

Windows Installer

Open JonathanILevi opened this issue 4 years ago • 16 comments

Some users find it difficult or confusing to use an app from a zip folder. It also comes off unprofessional or different which can give some users concern of the legitimacy or safety of the app. It can also be annoying for users unsure where to put the extracted folder. These are particularly problems for users not comfortable with folder structures, which are more common since the spread of smartphones.

@daid would you be open if I setup a system, that fits into your current build process, to create an .msi installer for the releases to replace (or reside along size) the current .zip download on the website? It shouldn't be too complicated to create an msi, and without using some junky freeware.

JonathanILevi avatar Aug 04 '20 05:08 JonathanILevi

It shouldn't be too complicated to create an msi

Automated? From linux?

daid avatar Aug 04 '20 14:08 daid

I didn't remember how you built EE, so that was one of my questions.

I think it should be automatable on Linux, I think it is just a zip file with specific datafiles.

JonathanILevi avatar Aug 04 '20 17:08 JonathanILevi

That, or maybe create an executable which downloads and installs the latest version from the website.

JonathanILevi avatar Aug 04 '20 17:08 JonathanILevi

Perhaps just create a self-extracting archive (SFX) with 7-zip. The 32-bit Windows installer 7-zip provides is just a SFX itself so it should be extractable on Linux. Then use the Windows binary 7z.sfx with the Linux 7z command.

7z a -mhe=on -p -sfx7z.sfx EmptyEpsilonInstaller.exe EmptyEpsilonFolder

NinjaSpectre avatar Aug 06 '20 00:08 NinjaSpectre

That does sound like an option @NinjaSpectre. Can self-extracting archives install into the Program Files folder? (An uninstall would also be advantageous)

I found this Stack Overflow question: https://stackoverflow.com/a/55089464/2521261

There might be a better way, as the meta-data does not need to be changed. Several other places on the subject used Wine.

I'll fiddle with it and see what I can figure out. I'll probably create an Msi on Windows first and then either replicate the process on Linux, or modify the Msi on Linux.

JonathanILevi avatar Aug 10 '20 15:08 JonathanILevi

I'd tried to massage NSIS to create an installer package since NSIS is already supported in cmake and cpacker, but I've run into a lot of snags with it so not sure how viable it would be overall but would need someone with more knowledge than me in cpacker to get it going.

gwaland avatar Aug 10 '20 21:08 gwaland

The archive will extract to whatever path the user enters. The simple method I gave above only does that though... there are no "extras" (uninstaller, registry keys, start menu entries, etc.). It is simply an archive extractor. These "extras" are possible but that would require writing code that takes advantage of a SDK. If that is what is desired I would just use NSIS instead (or WiX Toolset).

NinjaSpectre avatar Aug 11 '20 00:08 NinjaSpectre

@gwaland well, I am not that person. I know just about nothing about CMake. If you figure anything out, please share.

JonathanILevi avatar Aug 11 '20 15:08 JonathanILevi

I got NSIS to create an exe installer through their GUI with Wine on Linux. It should be easy enough to translate the process to commands and config files. Stay tuned.

JonathanILevi avatar Aug 11 '20 15:08 JonathanILevi

I knew there had to be Linux tools for creating Windows Installers. We are not the first ones to use Linux to build Windows Applications. This is what we are looking for:

msitools one thing it includes is a (partial) implementation of xml format used by WiX, a common tool used on Windows for making installers.

msi-packager is a simpler option, which simply creates a bare-bones, no UI installer, with a single command. msi-packager <source> <output> -n EmptyEpsilon -v EE-2021.03.31 -m <manufacturer> -a x86 -u f8a0882c-8113-47eb-9d83-01002de53f81 -i logo.ico -e EmptyEpsilon.exe

JonathanILevi avatar May 18 '21 15:05 JonathanILevi

The -u option is a guid for the app, which I generated.

What would you make the manufacturer? Daid or EmptyEpsilon?

JonathanILevi avatar May 18 '21 15:05 JonathanILevi

This should install EmptyEpsilon version 2021.03.31. With a Start Menu entry and native uninstall, etc.

(Note, if you have your manual install of EE in system ProgramFiles folder, then it might mess up the installer.)

https://drive.google.com/file/d/12i0oLII37MP0PqoJcEG7f3QvXn8ECqQT/view?usp=sharing

This is the exact command I used, assuming "./EmptyEpsilon" is the build output folder, and the "logo.ico" is in the local folder. I installed msi-packager locally with npm so I used npx to run it.

npx msi-packager $PWD/EmptyEpsilon Win32_EmptyEpsilon_EE-2021.03.31.msi -n EmptyEpsilon -v 2021.03.31 -m Daid -u f8a0882c-8113-47eb-9d83-01002de53f81 -i $PWD/logo.ico -e EmptyEpsilon.exe

JonathanILevi avatar May 18 '21 16:05 JonathanILevi

@daid does this solution work for your build environment?

JonathanILevi avatar May 20 '21 14:05 JonathanILevi

I haven't tried yet which tools I ran run on linux.

daid avatar May 22 '21 17:05 daid

Okay. I tested on my NixOS (Linux distro) rig (without needing Wine). What distro is your build environment? Debian or Ubuntu?

JonathanILevi avatar May 22 '21 22:05 JonathanILevi

Debian. Ubuntu just keeps breaking cross compilers so I keep away from it.

daid avatar May 26 '21 14:05 daid