Skip to content

Instantly share code, notes, and snippets.

@genotrance
Last active April 30, 2018 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genotrance/534e3a49138eec2894299881f5e60105 to your computer and use it in GitHub Desktop.
Save genotrance/534e3a49138eec2894299881f5e60105 to your computer and use it in GitHub Desktop.
Nim installer idea
Nim GUI installer for Windows
Figure out C/C++ compiler
- Detect compiler presence
- Detect compiler arch
- User chooses correct compiler if multiple detected
- No compiler detected
- User chooses existing compiler location
- Detect compiler arch
- No compiler present
- Detect system arch
- User chooses x86 vs x64 if x64 system
- Else autopick x86
- User chooses VC++ vs. MinGW vs Clang
- User chooses directory to install if possible
- User chooses portable install if possible
- Silent install of compiler from official installer
- Verify if compiler in path
- If not, offer to add compiler to path
- If declined, inform user how to get Nim working
Figure out Nim version
- Arch determined from compiler choice
- User chooses official release vs. devel
- If release, list all Nim versions available to install
- Get versions from Git tags
- User chooses Nim version(s)
- If devel
- Verify Git available
- If not, inform user and install Git from official installer
- If doesn't want Git, go back to release install
- Allow install of release and devel
Install Nim
- User chooses directory to install Nim to
- Release install
- Download binary ZIP based on arch and version
- Extract to directory picked by user
- Devel install
- git clone / csources based install
- Add Nim to path
- Add nimble folder to path
- Generate documentation for Nim
- Ask user if they want to open link (to bookmark)
Upgrade scenario
- Check if Nim already installed
- If user installed devel and picks upgrade
- git pull / rebuild
- Allow install of multiple versions
Features
- GUI wizard
- Command line / silent install support
- Single click upgrades for devel
Dependencies
- Use choosenim for backend logic
- Handle arch detection
- Allow binary install
- Allow git clone install for devel
- Allow git pull upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment