add NSIS script for gta5view Installer
This commit is contained in:
parent
d1a2b03353
commit
10b6222ae8
5 changed files with 273 additions and 0 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -15,6 +15,7 @@
|
|||
|
||||
# Windows development files
|
||||
*.rc text eol=crlf
|
||||
*.nsi text eol=crlf
|
||||
*.exe.manifest text eol=crlf
|
||||
|
||||
# Binary files
|
||||
|
|
|
@ -26,6 +26,9 @@ matrix:
|
|||
- BUILD_SCRIPT=windows_travis.sh
|
||||
- QT_SELECT=qt5-x86_64-w64-mingw32
|
||||
- EXECUTABLE_ARCH=_x64
|
||||
- env:
|
||||
- BUILD_SCRIPT=wininstall_travis.sh
|
||||
- QT_SELECT=qt5-x86_64-w64-mingw32
|
||||
- os: osx
|
||||
env: BUILD_SCRIPT=osx_travis.sh
|
||||
|
||||
|
|
241
.travis/gta5view.nsi
Normal file
241
.travis/gta5view.nsi
Normal file
|
@ -0,0 +1,241 @@
|
|||
######################################################################
|
||||
|
||||
!define APP_NAME "gta5view"
|
||||
!define COMP_NAME "Syping"
|
||||
!define WEB_SITE "https://gta5view.syping.de/"
|
||||
!define VERSION "1.5.0.0"
|
||||
!define COPYRIGHT "Copyright © 2016-2018 Syping"
|
||||
!define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor"
|
||||
!define INSTALLER_NAME "gta5view_setup.exe"
|
||||
!define MAIN_APP_EXE "gta5view.exe"
|
||||
!define INSTALL_TYPE "SetShellVarContext all"
|
||||
!define REG_ROOT "HKLM"
|
||||
!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
|
||||
!define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
||||
|
||||
######################################################################
|
||||
|
||||
VIProductVersion "${VERSION}"
|
||||
VIAddVersionKey "ProductName" "${APP_NAME}"
|
||||
VIAddVersionKey "ProductVersion" "${VERSION}"
|
||||
VIAddVersionKey "CompanyName" "${COMP_NAME}"
|
||||
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
|
||||
VIAddVersionKey "FileDescription" "${DESCRIPTION}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
|
||||
######################################################################
|
||||
|
||||
!include "x64.nsh"
|
||||
SetCompressor LZMA
|
||||
Name "${APP_NAME}"
|
||||
Caption "${APP_NAME}"
|
||||
OutFile "${INSTALLER_NAME}"
|
||||
#BrandingText "${APP_NAME}"
|
||||
XPStyle on
|
||||
InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
|
||||
InstallDir "$PROGRAMFILES64\Syping\gta5view"
|
||||
|
||||
######################################################################
|
||||
|
||||
!include "MUI2.nsh"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_UNABORTWARNING
|
||||
|
||||
!define MUI_LANGDLL_REGISTRY_ROOT "${REG_ROOT}"
|
||||
!define MUI_LANGDLL_REGISTRY_KEY "${UNINSTALL_PATH}"
|
||||
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
!ifdef LICENSE_TXT
|
||||
!insertmacro MUI_PAGE_LICENSE "${LICENSE_TXT}"
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
!ifdef REG_START_MENU
|
||||
!define MUI_STARTMENUPAGE_NODISABLE
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "gta5view"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MAIN_APP_EXE}"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "TradChinese"
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
|
||||
######################################################################
|
||||
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
!ifdef WIN32
|
||||
MessageBox MB_OK|MB_ICONSTOP "Can't install the 64bit version on a 32bit system, please download the 32bit version!"
|
||||
Quit
|
||||
!endif
|
||||
SetRegView 64
|
||||
FunctionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Section -MainProgram
|
||||
${INSTALL_TYPE}
|
||||
SetOverwrite ifnewer
|
||||
SetOutPath "$INSTDIR"
|
||||
File "../build/release/gta5view.exe"
|
||||
File "/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/libgcc_s_seh-1.dll"
|
||||
File "/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/libstdc++-6.dll"
|
||||
File "/opt/windev/libressl-latest_qt64d/bin/libcrypto-42.dll"
|
||||
File "/opt/windev/libressl-latest_qt64d/bin/libssl-44.dll"
|
||||
File "/opt/windev/libjpeg-turbo-latest_qt64d/bin/libjpeg-62.dll"
|
||||
File "/opt/windev/qt64d-latest/bin/Qt5Core.dll"
|
||||
File "/opt/windev/qt64d-latest/bin/Qt5Gui.dll"
|
||||
File "/opt/windev/qt64d-latest/bin/Qt5Network.dll"
|
||||
File "/opt/windev/qt64d-latest/bin/Qt5Widgets.dll"
|
||||
File "/opt/windev/qt64d-latest/bin/Qt5WinExtras.dll"
|
||||
SetOutPath "$INSTDIR\lang"
|
||||
File "../res/gta5sync_en_US.qm"
|
||||
File "../res/gta5sync_de.qm"
|
||||
File "../res/gta5sync_fr.qm"
|
||||
File "../res/gta5sync_ru.qm"
|
||||
File "../res/gta5sync_zh_TW.qm"
|
||||
File "../res/qtbase_en_GB.qm"
|
||||
File "../res/qtbase_de.qm"
|
||||
File "../res/qtbase_fr.qm"
|
||||
File "../res/qtbase_ru.qm"
|
||||
File "../res/qtbase_zh_TW.qm"
|
||||
SetOutPath "$INSTDIR\platforms"
|
||||
File "/opt/windev/qt64d-latest/plugins/platforms/qwindows.dll"
|
||||
SetOutPath "$INSTDIR\imageformats"
|
||||
File "/opt/windev/qt64d-latest/plugins/imageformats/qjpeg.dll"
|
||||
SectionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Section -Icons_Reg
|
||||
SetOutPath "$INSTDIR"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
||||
!ifdef REG_START_MENU
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
CreateDirectory "$SMPROGRAMS\$SM_Folder"
|
||||
CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
CreateShortCut "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
|
||||
|
||||
!ifdef WEB_SITE
|
||||
WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\$SM_Folder\gta5view Website.lnk" "$INSTDIR\${APP_NAME} website.url"
|
||||
!endif
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
!endif
|
||||
|
||||
!ifndef REG_START_MENU
|
||||
CreateDirectory "$SMPROGRAMS\gta5view"
|
||||
CreateShortCut "$SMPROGRAMS\gta5view\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
CreateShortCut "$SMPROGRAMS\gta5view\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
|
||||
|
||||
!ifdef WEB_SITE
|
||||
WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\gta5view\gta5view Website.lnk" "$INSTDIR\${APP_NAME} website.url"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
WriteRegStr ${REG_ROOT} "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "${APP_NAME}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "${COMP_NAME}"
|
||||
|
||||
!ifdef WEB_SITE
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "${WEB_SITE}"
|
||||
!endif
|
||||
SectionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Section Uninstall
|
||||
${INSTALL_TYPE}
|
||||
Delete "$INSTDIR\gta5view.exe"
|
||||
Delete "$INSTDIR\libgcc_s_seh-1.dll"
|
||||
Delete "$INSTDIR\libstdc++-6.dll"
|
||||
Delete "$INSTDIR\libcrypto-42.dll"
|
||||
Delete "$INSTDIR\libssl-44.dll"
|
||||
Delete "$INSTDIR\libjpeg-62.dll"
|
||||
Delete "$INSTDIR\Qt5Core.dll"
|
||||
Delete "$INSTDIR\Qt5Gui.dll"
|
||||
Delete "$INSTDIR\Qt5Network.dll"
|
||||
Delete "$INSTDIR\Qt5Widgets.dll"
|
||||
Delete "$INSTDIR\Qt5WinExtras.dll"
|
||||
Delete "$INSTDIR\lang\gta5sync_en_US.qm"
|
||||
Delete "$INSTDIR\lang\gta5sync_de.qm"
|
||||
Delete "$INSTDIR\lang\gta5sync_fr.qm"
|
||||
Delete "$INSTDIR\lang\gta5sync_ru.qm"
|
||||
Delete "$INSTDIR\lang\gta5sync_zh_TW.qm"
|
||||
Delete "$INSTDIR\lang\qtbase_en_GB.qm"
|
||||
Delete "$INSTDIR\lang\qtbase_de.qm"
|
||||
Delete "$INSTDIR\lang\qtbase_fr.qm"
|
||||
Delete "$INSTDIR\lang\qtbase_ru.qm"
|
||||
Delete "$INSTDIR\lang\qtbase_zh_TW.qm"
|
||||
Delete "$INSTDIR\platforms\qwindows.dll"
|
||||
Delete "$INSTDIR\imageformats\qjpeg.dll"
|
||||
|
||||
RmDir "$INSTDIR\lang"
|
||||
RmDir "$INSTDIR\platforms"
|
||||
RmDir "$INSTDIR\imageformats"
|
||||
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
!ifdef WEB_SITE
|
||||
Delete "$INSTDIR\${APP_NAME} website.url"
|
||||
!endif
|
||||
|
||||
RmDir "$INSTDIR"
|
||||
|
||||
!ifdef REG_START_MENU
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $SM_Folder
|
||||
Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk"
|
||||
Delete "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk"
|
||||
!ifdef WEB_SITE
|
||||
Delete "$SMPROGRAMS\$SM_Folder\gta5view Website.lnk"
|
||||
!endif
|
||||
RmDir "$SMPROGRAMS\$SM_Folder"
|
||||
!endif
|
||||
|
||||
!ifndef REG_START_MENU
|
||||
Delete "$SMPROGRAMS\gta5view\${APP_NAME}.lnk"
|
||||
Delete "$SMPROGRAMS\gta5view\Uninstall ${APP_NAME}.lnk"
|
||||
!ifdef WEB_SITE
|
||||
Delete "$SMPROGRAMS\gta5view\gta5view Website.lnk"
|
||||
!endif
|
||||
RmDir "$SMPROGRAMS\gta5view"
|
||||
!endif
|
||||
|
||||
DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
|
||||
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
||||
SectionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Function un.onInit
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
SetRegView 64
|
||||
FunctionEnd
|
||||
|
||||
######################################################################
|
16
.travis/wininstall_build.sh
Executable file
16
.travis/wininstall_build.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt-get update && apt-get install -y nsis && \
|
||||
|
||||
# Creating folders
|
||||
cd ${PROJECT_DIR} && \
|
||||
echo "gta5view build version is ${APPLICATION_VERSION}" && \
|
||||
mkdir -p build && \
|
||||
mkdir -p assets && \
|
||||
|
||||
# Starting build
|
||||
cd build && \
|
||||
qmake ${QMAKE_FLAGS} DEFINES+=GTA5SYNC_BUILDTYPE_REL "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' ../gta5view.pro && \
|
||||
make -j 4 && \
|
||||
cd ${PROJECT_DIR}/assets && \
|
||||
makensis -NOCD ${PROJECT_DIR}/.travis/gta5view.nsi
|
12
.travis/wininstall_travis.sh
Executable file
12
.travis/wininstall_travis.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
QT_VERSION=5.6.3
|
||||
DOCKER_IMAGE=syping/qt5-shared-mingw:${QT_VERSION}
|
||||
PROJECT_DIR_DOCKER=/gta5view
|
||||
|
||||
cd ${PROJECT_DIR} && \
|
||||
docker pull ${DOCKER_IMAGE} && \
|
||||
docker run --rm \
|
||||
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
|
||||
${DOCKER_IMAGE} \
|
||||
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/wininstall_build.sh"
|
Loading…
Reference in a new issue