Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace NSIS with Inno Setup.
Browse files Browse the repository at this point in the history
fnando committed Nov 13, 2024

Verified

This commit was signed with the committer’s verified signature.
fnando Nando Vieira
1 parent 20bd8df commit 1586d59
Showing 7 changed files with 50 additions and 98 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
@@ -104,19 +104,18 @@ jobs:
installer:
needs: build
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: sudo apt-get update && sudo apt-get -y install nsis wget

- name: Setup vars
run: |
version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "stellar-cli") | .version')"
installer_basename="stellar-cli-installer-${version}-x86_64-pc-windows-msvc"
echo "VERSION=${version}" >> $GITHUB_ENV
echo "STELLAR_CLI_INSTALLER=stellar-cli-installer-${version}-x86_64-pc-windows-msvc.exe" >> $GITHUB_ENV
echo "STELLAR_CLI_INSTALLER_BASENAME=${installer_basename}" >> $GITHUB_ENV
echo "STELLAR_CLI_INSTALLER=${installer_basename}.exe" >> $GITHUB_ENV
echo "ARTIFACT_NAME=stellar-cli-${version}-x86_64-pc-windows-msvc.tar.gz" >> $GITHUB_ENV
- name: Download Artifact
@@ -127,9 +126,13 @@ jobs:
- name: Uncompress Artifact
run: tar xvf ${{ env.ARTIFACT_NAME }}

- name: Install Inno Setup
run: winget install --id JRSoftware.InnoSetup

- name: Build Installer
run: |
makensis -V4 -DSTELLAR_CLI_INSTALLER="${{ env.STELLAR_CLI_INSTALLER }}" -DSTELLAR_CLI_VERSION="${{ env.VERSION }}" installer.nsi
$Env:Path += ";C:\Users\$Env:UserName\AppData\Local\Programs\Inno Setup 6"
ISCC.exe installer.iss /F${{ env.STELLAR_CLI_INSTALLER_BASENAME }}
- name: Build provenance for attestation (release only)
if: github.event_name == 'release'
2 changes: 0 additions & 2 deletions NOTICE.txt

This file was deleted.

41 changes: 41 additions & 0 deletions installer.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#define STELLAR_CLI_VERSION GetEnv("STELLAR_CLI_VERSION")
#define STELLAR_CLI_INSTALLER GetEnv("STELLAR_CLI_INSTALLER")

[Setup]
AppName=Stellar CLI
AppVersion={#STELLAR_CLI_VERSION}
DefaultDirName={commonpf}\Stellar CLI
DefaultGroupName=Stellar CLI
OutputBaseFilename=stellar-installer
PrivilegesRequired=admin
LicenseFile=License.txt
UninstallDisplayIcon={app}\stellar.ico
Compression=lzma
SolidCompression=yes

[Files]
Source: "stellar.exe"; DestDir: "{app}"
Source: "stellar.ico"; DestDir: "{app}"
Source: "License.txt"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
; Windows optimizes start menu, and removes the uninstall entry. Unless we
; specify it twice. 🫠
Name: "{group}\Uninstall Stellar CLI"; Filename: "{uninstallexe}"
Name: "{group}\Uninstall Stellar CLI"; Filename: "{uninstallexe}"
Name: "{group}\Stellar Docs"; Filename: "https://stellar.org/docs"

[Registry]
; Add install directory to the system PATH
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Flags: preservestringtype uninsdeletevalue

[UninstallDelete]
; Remove the Start Menu group
Type: filesandordirs; Name: "{group}"

; Remove installed files and directory
Type: files; Name: "{app}\stellar.exe"
Type: files; Name: "{app}\unins000.exe"
Type: files; Name: "{app}\stellar.ico"
Type: dirifempty; Name: "{app}"
71 changes: 0 additions & 71 deletions installer.nsi

This file was deleted.

Binary file removed nsis/EnVar.dll
Binary file not shown.
18 changes: 0 additions & 18 deletions nsis/EnVar_LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion nsis/EnVar_README.txt

This file was deleted.

0 comments on commit 1586d59

Please sign in to comment.