Skip to content

Commit

Permalink
updated build script
Browse files Browse the repository at this point in the history
  • Loading branch information
acrilique committed Dec 19, 2023
1 parent 7e327b1 commit 3d97545
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions build_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def main():
# write script.nsi file with version
with open("script.nsi", "w") as f:
f.write(
f"""
f"""
; The name of the installer
Name "AutoMarker"
Expand All @@ -33,16 +33,23 @@ def main():
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\\NSIS_Example2\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\AutoMarker" "Install_Dir"
; Import modern ui
!include "MUI2.nsh"
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
!define MUI_ICON "icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "icon.bmp"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_PAGE_HEADER_TEXT "Welcome to AutoMarker"
!define MUI_PAGE_HEADER_SUBTEXT "This wizard will guide you through the installation process."
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
UninstPage uninstConfirm
UninstPage instfiles
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
Expand All @@ -65,7 +72,7 @@ def main():
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\AutoMarker" \\
"UninstallString" "$\\"$INSTDIR\\uninstall.exe$\\""
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\AutoMarker" \\
"DisplayIcon" "$INSTDIR\\_internal\\your_icon.ico"
"DisplayIcon" "$INSTDIR\\_internal\\icon.ico"
SectionEnd
Expand All @@ -76,6 +83,9 @@ def main():
SectionEnd
;--------------------------------
;--------------------------------
; Uninstaller
Expand Down
Binary file added icon.bmp
Binary file not shown.

0 comments on commit 3d97545

Please sign in to comment.