2017-03-16 02:58:02 +00:00
|
|
|
; Script generated by the HM NIS Edit Script Wizard.
|
|
|
|
|
|
|
|
; HM NIS Edit Wizard helper defines
|
|
|
|
!define PRODUCT_NAME "VisualBoyAdvance-M"
|
2018-10-29 22:33:20 +00:00
|
|
|
!define PRODUCT_VERSION "2.1.0"
|
2017-03-16 02:58:02 +00:00
|
|
|
!define PRODUCT_PUBLISHER "visualboyadvance"
|
2018-10-29 22:33:20 +00:00
|
|
|
!define PRODUCT_WEB_SITE "https://vba-m.com"
|
2017-03-16 02:58:02 +00:00
|
|
|
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\visualboyadvance-m.exe"
|
|
|
|
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
|
|
|
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
2018-10-29 22:33:20 +00:00
|
|
|
#If you're building this, point it to your mingw installation folder
|
|
|
|
!define MINGW32_ROOT "D:\Development\msys64\mingw32\bin"
|
|
|
|
!define MINGW64_ROOT "D:\Development\msys64\mingw64\bin"
|
|
|
|
#This is where you installed vba-m with make install.
|
|
|
|
!define VBAM_INSTALL_ROOT "D:\Development\msys64\opt\vbam"
|
2018-11-04 14:24:23 +00:00
|
|
|
#comment this out if not building with msys2
|
|
|
|
!define MSYS2
|
2017-03-16 02:58:02 +00:00
|
|
|
|
2018-10-29 22:33:20 +00:00
|
|
|
!ifdef MSYS2
|
2018-11-04 14:24:23 +00:00
|
|
|
OutFile "vba-m-${PRODUCT_VERSION}-msys2.exe"
|
2018-10-29 22:33:20 +00:00
|
|
|
!else
|
2018-11-04 14:24:23 +00:00
|
|
|
OutFile "vba-m-${PRODUCT_VERSION}.exe
|
2018-10-29 22:33:20 +00:00
|
|
|
!endif
|
2017-03-16 23:23:12 +00:00
|
|
|
SetCompressor /SOLID lzma
|
2018-10-29 22:33:20 +00:00
|
|
|
ShowInstDetails show
|
|
|
|
ShowUninstDetails show
|
2017-03-16 23:23:12 +00:00
|
|
|
XPStyle on
|
|
|
|
|
|
|
|
!packhdr tmpexe.tmp "upx --lzma -9 --compress-icons=0 tmpexe.tmp"
|
|
|
|
|
2018-10-29 22:33:20 +00:00
|
|
|
BrandingText "VisualBoyAdvance-M Version ${PRODUCT_VERSION}"
|
2017-03-16 02:58:02 +00:00
|
|
|
|
|
|
|
; MUI 1.67 compatible ------
|
|
|
|
!include "MUI.nsh"
|
2018-10-29 22:33:20 +00:00
|
|
|
!include "Sections.nsh"
|
2017-03-16 02:58:02 +00:00
|
|
|
!include "x64.nsh"
|
|
|
|
|
|
|
|
; MUI Settings
|
|
|
|
!define MUI_ABORTWARNING
|
|
|
|
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
|
|
|
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
|
|
|
|
2018-10-29 22:33:20 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Version resource
|
2018-11-04 14:24:23 +00:00
|
|
|
VIProductVersion "${PRODUCT_VERSION}.0"
|
2018-10-29 22:33:20 +00:00
|
|
|
VIAddVersionKey "ProductName" "visualboyadvance-m"
|
|
|
|
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}"
|
|
|
|
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
|
|
|
|
VIAddVersionKey "LegalCopyright" ""
|
|
|
|
!ifdef MSYS2
|
|
|
|
VIAddVersionKey "FileDescription" "visualboyadvance-m GBA Emulator (built with msys2)"
|
|
|
|
!else
|
|
|
|
VIAddVersionKey "FileDescription" "visualboyadvance-m GBA Emulator"
|
|
|
|
!endif
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Reserve files used in .onInit
|
|
|
|
;for faster start-up
|
2018-11-04 14:24:23 +00:00
|
|
|
ReserveFile "${NSISDIR}\Plugins\unicode\System.dll"
|
2018-10-29 22:33:20 +00:00
|
|
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
|
|
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
|
|
|
2017-03-16 02:58:02 +00:00
|
|
|
; Welcome page
|
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
|
|
; License page
|
|
|
|
!insertmacro MUI_PAGE_LICENSE ".\doc\gpl.txt"
|
|
|
|
; Directory page
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
; Instfiles page
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
; Finish page
|
|
|
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\visualboyadvance-m.exe"
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
|
|
|
; Uninstaller pages
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
; Language files
|
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
|
|
|
|
; Reserve files
|
|
|
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
|
|
|
|
|
|
|
; MUI end ------
|
|
|
|
|
|
|
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
|
|
|
OutFile "vba-m_${PRODUCT_VERSION}_setup.exe"
|
|
|
|
InstallDir "$PROGRAMFILES64\VisualBoyAdvance-M"
|
|
|
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
|
|
|
ShowInstDetails show
|
|
|
|
ShowUnInstDetails show
|
|
|
|
|
2018-11-04 14:24:23 +00:00
|
|
|
Function .onInit
|
2018-10-29 22:33:20 +00:00
|
|
|
Aero::Apply
|
|
|
|
FunctionEnd
|
|
|
|
|
2017-03-16 02:58:02 +00:00
|
|
|
Section "MainSection" SEC01
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
SetOverwrite ifnewer
|
2018-11-04 14:24:23 +00:00
|
|
|
!ifdef MSYS2
|
|
|
|
File "${VBAM_INSTALL_ROOT}\bin\visualboyadvance-m.exe"
|
|
|
|
File "${MINGW64_ROOT}\libwinpthread-1.dll"
|
|
|
|
File "${MINGW64_ROOT}\libpng16-16.dll"
|
|
|
|
File "${MINGW64_ROOT}\libintl-8.dll"
|
|
|
|
File "${MINGW64_ROOT}\SDL2.dll"
|
|
|
|
File "${MINGW64_ROOT}\libsfml-network-2.dll"
|
|
|
|
File "${MINGW64_ROOT}\libsfml-system-2.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxbase30u_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxbase30u_net_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxbase30u_xml_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxmsw30u_adv_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxmsw30u_core_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxmsw30u_html_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxmsw30u_gl_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\wxmsw30u_xrc_gcc_custom.dll"
|
|
|
|
File "${MINGW64_ROOT}\zlib1.dll"
|
|
|
|
File "${MINGW64_ROOT}\libiconv-2.dll"
|
|
|
|
File "${MINGW64_ROOT}\libgcc_s_seh-1.dll"
|
|
|
|
File "${MINGW64_ROOT}\libstdc++-6.dll"
|
|
|
|
File "${MINGW64_ROOT}\libjpeg-8.dll"
|
|
|
|
File "${MINGW64_ROOT}\libtiff-5.dll"
|
|
|
|
File "${MINGW64_ROOT}\libexpat-1.dll"
|
|
|
|
File "${MINGW64_ROOT}\liblzma-5.dll"
|
|
|
|
!else
|
|
|
|
File "${VBAM_INSTALL_ROOT}\bin\visualboyadvance-m.exe"
|
|
|
|
!endif
|
2017-03-16 02:58:02 +00:00
|
|
|
CreateDirectory "$SMPROGRAMS\VisualBoyAdvance-M"
|
|
|
|
CreateShortCut "$SMPROGRAMS\VisualBoyAdvance-M\VisualBoyAdvance.lnk" "$INSTDIR\visualboyadvance-m.exe"
|
|
|
|
CreateShortCut "$DESKTOP\VisualBoyAdvance.lnk" "$INSTDIR\visualboyadvance-m.exe"
|
2018-11-04 14:24:23 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section "Localization"
|
|
|
|
SetOutPath "$INSTDIR\locale"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ar\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\br\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\bs\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ca\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ca_ES\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\cs\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\da\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\da_DK\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\de\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\de_DE\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\el\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\el_GR\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\en\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\en_GB\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\en_US\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_419\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_AR\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_CL\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_CO\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_ES\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_MX\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_PR\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\es_US\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\fil\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\fr\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\fr_CA\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\fr_FR\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\gl\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\haw\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\he\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\he_IL\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\hr\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\hu\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\hu_HU\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\id\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\id_ID\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\it\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\it_IT\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ja\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ja_JP\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\jv\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ko\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ko_KR\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ms_MY\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\nb\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\nl\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\nl_NL\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\no\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\pl\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\pl_PL\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\pt\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\pt_PT\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\pt_BR\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ru\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\ru_RU\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\sk\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\sk_SK\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\sr\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\su\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\sv\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\tk\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\tr\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh_CN\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh_CN.GB2312\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh_HK\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh_TW\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh_TW.Big5\LC_MESSAGES\wxvbam.mo"
|
|
|
|
File "${VBAM_INSTALL_ROOT}\share\locale\zh-Hans\LC_MESSAGES\wxvbam.mo"
|
2017-03-16 02:58:02 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -AdditionalIcons
|
|
|
|
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
|
|
|
CreateShortCut "$SMPROGRAMS\VisualBoyAdvance-M\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
|
|
|
|
CreateShortCut "$SMPROGRAMS\VisualBoyAdvance-M\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -Post
|
|
|
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
|
|
|
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\visualboyadvance-m.exe"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\visualboyadvance-m.exe"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
|
|
Function un.onUninstSuccess
|
|
|
|
HideWindow
|
|
|
|
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function un.onInit
|
|
|
|
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
|
|
|
Abort
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Section Uninstall
|
|
|
|
Delete "$INSTDIR\${PRODUCT_NAME}.url"
|
|
|
|
Delete "$INSTDIR\uninst.exe"
|
|
|
|
Delete "$INSTDIR\vbam.exe"
|
|
|
|
Delete "$INSTDIR\visualboyadvance-m.exe"
|
|
|
|
|
|
|
|
Delete "$SMPROGRAMS\VisualBoyAdvance-M\Uninstall.lnk"
|
|
|
|
Delete "$SMPROGRAMS\VisualBoyAdvance-M\Website.lnk"
|
|
|
|
Delete "$DESKTOP\VisualBoyAdvance.lnk"
|
|
|
|
Delete "$SMPROGRAMS\VisualBoyAdvance-M\VisualBoyAdvance.lnk"
|
|
|
|
|
|
|
|
RMDir "$SMPROGRAMS\VisualBoyAdvance-M"
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
|
|
|
|
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
|
|
|
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
|
|
|
SetAutoClose true
|
|
|
|
SectionEnd
|