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

Feature: Add Windows installer using NSIS #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AnonymerNiklasistanonym
Copy link
Contributor

@AnonymerNiklasistanonym AnonymerNiklasistanonym commented Nov 4, 2024

To make the program even more accessible to someone I created a simple Windows installer based on an old NSIS template I made and backported this change to the current master of this repository.

This pull requests:

  • Adds a NSIS script that:
    • Installs application to %LocalAppData%/SimpleTwitchEmoteSounds and a program data directory in %AppData%/SimpleTwitchEmoteSounds
      • Meaning the installer does only need user level privileges
    • Creates Windows start menu shortcuts to:
      • Start the binary executable
      • Open the Settings directory
      • Uninstall the application (Remove all files, optionally remove settings via a dialog)
    • Registers Windows registry keys to:
      • List it as installed application
      • List uninstall option to installed application
      • Recognize existing previous installations and automatically uninstall them before installing the current (new) version
    • Optionally adds a binary executable desktop shortcut if user checks box
    • After a successful install it starts the program automatically
  • Merges the GitHub Actions tag.yml and push.yml file into one single .yml that supports the same functionality (Example run: https://github.com/AnonymerNiklasistanonym/SimpleTwitchEmoteSounds/actions/runs/11663241021)
    • Additionally it removes duplicated dotnet publish steps and instead shares them via artifacts to the release job
    • It also adds a second compilation of the program with one minor change being that the Settings (and Logs) directory is changed from a local relative location to a global default application directory so that the install directory is isolated from this data
      • This makes uninstalling and updating very easy while keeping the application data separate
  • The installer also compresses the binary which makes the download file at the moment almost one third of the size (31MB -> 12MB)

Open TODOs:

  • There is currently no License text that is normally added to an installer (it's a single line)
  • Any directory locations/paths are nothing final but hopefully sane defaults
  • To not need admin privileges while missing out on features like the previous uninstaller detection the installation directory cannot be something like %ProgramFiles% which requires such privileges which is why the %AppData% was chosen which is user specific

I'm open to change anything on request, feel free to close it if you do not want this.

@AnonymerNiklasistanonym AnonymerNiklasistanonym force-pushed the feature-windows-installer-nsis branch 2 times, most recently from 198d44c to d9f278a Compare November 5, 2024 03:58
@Ganom
Copy link
Owner

Ganom commented Nov 9, 2024

Apologies for the delay in looking at this PR, this seems really interesting and something I'm definitely going to look into. I've previously looked into Velopack, but this might be a better solution.

@AnonymerNiklasistanonym AnonymerNiklasistanonym force-pushed the feature-windows-installer-nsis branch from bcc4022 to 8e63d3d Compare January 26, 2025 15:56
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

Successfully merging this pull request may close these issues.

2 participants