Skip to content

Commit

Permalink
feat: init windows installer
Browse files Browse the repository at this point in the history
  • Loading branch information
mul14 committed Apr 17, 2024
1 parent 4b6811a commit f88126d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- feat/*
tags:
- v*

Expand All @@ -13,7 +14,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
goos: [linux, darwin]
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
Expand All @@ -33,6 +34,10 @@ jobs:
cd build
if [[ $GOOS == 'darwin' ]]; then
cp raiden raiden-macos-"$GOARCH"
elif [[ $GOOS == 'windows' ]]; then
mv raiden raiden.exe
sudo apt-get install -y nsis
makensis -NOCD -DARCH="$GOARCH" ${GITHUB_WORKSPACE}/scripts/windows.nsi
else
cp raiden raiden-"$GOOS"-"$GOARCH"
fi
Expand Down
29 changes: 29 additions & 0 deletions scripts/windows.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
!include "MUI2.nsh"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

!define NAME "Raiden"
!define APPFILE "raiden.exe"

Name "${NAME}"
Outfile "raiden-windows-${ARCH}-setup.exe"
InstallDir $WINDIR
ShowInstDetails show
RequestExecutionLevel admin

Section
SetOutPath $INSTDIR
File raiden.exe
WriteUninstaller $INSTDIR\raiden-uninstall.exe
SectionEnd

Section "Uninstall"
Delete $INSTDIR\raiden.exe
Delete $INSTDIR\raiden-uninstall.exe
RMDir $INSTDIR
SectionEnd

0 comments on commit f88126d

Please sign in to comment.