Skip to content

Commit

Permalink
Update Windows build system
Browse files Browse the repository at this point in the history
Automate estimated size and fix Author and Version fields
  • Loading branch information
zevlee committed May 18, 2022
1 parent b62abe5 commit 5e0fa3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions windows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cd dist/$APP
zip -r $APP.zip *
mv $APP.zip ../..
cd ../..
echo $(du -sk dist/$APP | cut -f 1) > INSTALLSIZE

echo "Running makensis..."

Expand All @@ -34,6 +35,7 @@ echo "Cleaning up..."
deactivate
mv $APP*.exe* ../..
rm $APP.zip
rm INSTALLSIZE
rm -r build
rm -r dist/*/*
rm -r dist
Expand Down
6 changes: 3 additions & 3 deletions windows/hello-world-gtk.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
!define FILENAME "hello-world-gtk"
!define AUTHOR "Author Name"
!define DESCRIPTION "Hello World GTK"
!define INSTALLSIZE 109976

Unicode True

!define /file VERSION "..\VERSION"
!define /file INSTALLSIZE "INSTALLSIZE"

InstallDir "$PROGRAMFILES\${APPNAME}"

Expand Down Expand Up @@ -56,8 +56,8 @@ section "install"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "InstallLocation" "$\"$INSTDIR$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$\"$INSTDIR\${FILENAME}.ico$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "$\"${AUTHOR}$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "$\"Version ${VERSION}$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${AUTHOR}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${VERSION}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "EstimatedSize" ${INSTALLSIZE}
Expand Down

0 comments on commit 5e0fa3c

Please sign in to comment.