From ae0551652fa132bb512638433189c1290933164e Mon Sep 17 00:00:00 2001 From: Ray Hogenson Date: Tue, 10 Jan 2012 15:15:55 -0900 Subject: wrong directory --- os/windows/install.nsi | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 os/windows/install.nsi (limited to 'os/windows/install.nsi') diff --git a/os/windows/install.nsi b/os/windows/install.nsi new file mode 100644 index 0000000..a53078e --- /dev/null +++ b/os/windows/install.nsi @@ -0,0 +1,97 @@ +; example2.nsi +; +; This script is based on example1.nsi, but it remember the directory, +; has uninstall support and (optionally) installs start menu shortcuts. +; +; It will install example2.nsi into a directory that the user selects, + +;-------------------------------- + +; The name of the installer +Name "YetiHack Installer" + +; The file to write +OutFile "YetiHack_installer.exe" + +; The default installation directory +InstallDir $PROGRAMFILES\YetiHack + +; Registry key to check for directory (so if you install again, it will +; overwrite the old one automatically) +InstallDirRegKey HKLM "Software\YetiHack" "Install_Dir" + +; Request application privileges for Windows Vista +RequestExecutionLevel admin + +;-------------------------------- + +; Pages + +Page components +Page directory +Page instfiles + +UninstPage uninstConfirm +UninstPage instfiles + +;-------------------------------- + +; The stuff to install +Section "YetiHack" + + SectionIn RO + + SetOutPath $INSTDIR + File "/home/ray/Documents/programming/YetiHack/windows/yetihack.exe" + File "/usr/i586-mingw32msvc/bin/pdcurses.dll" + + ; Write the installation path into the registry + WriteRegStr HKLM SOFTWARE\YetiHack "Install_Dir" "$INSTDIR" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YetiHack" "YetiHack Uninstaller" "YetiHack" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YetiHack" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YetiHack" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YetiHack" "NoRepair" 1 + WriteUninstaller "uninstall.exe" + +SectionEnd + +; Optional section (can be disabled by the user) +Section "Start Menu Shortcuts" + + CreateDirectory "$SMPROGRAMS\YetiHack" + CreateShortCut "$SMPROGRAMS\YetiHack\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\YetiHack\YetiHack.lnk" "$INSTDIR\YetiHack.exe" "" "$INSTDIR\YetiHack.exe" 0 + +SectionEnd + +Section "Desktop Shortcut" + + CreateShortCut "$DESKTOP\YetiHack.lnk" "$INSTDIR\YetiHack.exe" "" "$INSTDIR\YetiHack.exe" 0 + +SectionEnd + +;-------------------------------- + +; Uninstaller + +Section "Uninstall" + + ; Remove registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YetiHack" + DeleteRegKey HKLM SOFTWARE\YetiHack + + ; Remove files and uninstaller + Delete $INSTDIR\* + Delete $INSTDIR\uninstall.exe + + ; Remove shortcuts, if any + Delete "$SMPROGRAMS\YetiHack\*.*" + Delete "$DESKTOP\YetiHack.lnk" + + ; Remove directories used + RMDir "$SMPROGRAMS\YetiHack" + RMDir "$INSTDIR" + +SectionEnd -- cgit v1.3.1