Move GPatch to separate repo.

This commit is contained in:
Nick Blakely 2020-11-30 17:39:52 -08:00
parent 6ecadc90c0
commit 1377f51276
6 changed files with 0 additions and 349 deletions

View File

@ -1,19 +0,0 @@
xcopy "%GIANTS_PATH%\gg_dx7r.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\gg_dx9r.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\gg_null.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\dedicated.exe" "Files\" /Y
xcopy "%GIANTS_PATH%\Giants.exe" "Files\" /Y
xcopy "%GIANTS_PATH%\GiantsMain.exe" "Files\" /Y
xcopy "%GIANTS_PATH%\GiantsDedicated.exe" "Files\" /Y
xcopy "%GIANTS_PATH%\gs_ds.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\Giants.WebApi.Clients.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\fmt.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\crashrpt_lang.ini" "Files\" /Y
xcopy "%GIANTS_PATH%\CrashRpt1403.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\CrashSender1403.exe" "Files\" /Y
xcopy "%GIANTS_PATH%\dbghelp.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\cpprest_2_10.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\Newtonsoft.Json.dll" "Files\" /Y
xcopy "%GIANTS_PATH%\zlib1.dll" "Files\" /Y
pause

View File

@ -1,127 +0,0 @@
!macro CheckNetFramework FrameworkVersion
Var /GLOBAL dotNetUrl${FrameworkVersion}
Var /GLOBAL dotNetReadableVersion${FrameworkVersion}
!ifndef DOTNET472_URL
!define DOTNET472_URL "https://go.microsoft.com/fwlink/?LinkId=863265"
!define DOTNET471_URL "https://go.microsoft.com/fwlink/?LinkId=852104"
!define DOTNET47_URL "https://go.microsoft.com/fwlink/?LinkId=825302"
!define DOTNET462_URL "https://go.microsoft.com/fwlink/?LinkId=780600"
!define DOTNET461_URL "https://go.microsoft.com/fwlink/?LinkId=671743"
!define DOTNET46_URL "https://go.microsoft.com/fwlink/?LinkId=528232"
!define DOTNET452_URL "https://go.microsoft.com/fwlink/?LinkId=397708"
!define DOTNET451_URL "https://go.microsoft.com/fwlink/?LinkId=322116"
!define DOTNET45_URL "https://go.microsoft.com/fwlink/?LinkId=225702"
!define DOTNET40Full_URL "https://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=0a391abd-25c1-4fc0-919f-b21f31ab88b7&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f9%2f5%2fA%2f95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE%2fdotNetFx40_Full_x86_x64.exe"
!define DOTNET40Client_URL "https://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=e5ad0459-cbcc-4b4f-97b6-fb17111cf544&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f2%2f562A10F9-C9F4-4313-A044-9C94E0A8FAC8%2fdotNetFx40_Client_x86_x64.exe"
!define DOTNET35_URL "https://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe"
!define DOTNET30_URL "https://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe"
!define DOTNET20_URL "https://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f7%2f567758a3-759e-473e-bf8f-52154438565a%2fdotnetfx.exe"
!define DOTNET11_URL "https://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=262d25e3-f589-4842-8157-034d1e7cf3a3&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fa%2fa%2fc%2faac39226-8825-44ce-90e3-bf8203e74006%2fdotnetfx.exe"
!define DOTNET10_URL "https://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=262d25e3-f589-4842-8157-034d1e7cf3a3&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fa%2fa%2fc%2faac39226-8825-44ce-90e3-bf8203e74006%2fdotnetfx.exe"
!endif
${If} ${FrameworkVersion} == "472"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET472_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.7.2"
${ElseIf} ${FrameworkVersion} == "471"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET471_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.7.1"
${ElseIf} ${FrameworkVersion} == "47"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET47_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.7"
${ElseIf} ${FrameworkVersion} == "462"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET462_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.6.2"
${ElseIf} ${FrameworkVersion} == "461"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET461_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.6.1"
${ElseIf} ${FrameworkVersion} == "46"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET46_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.6"
${ElseIf} ${FrameworkVersion} == "452"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET452_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.52"
${ElseIf} ${FrameworkVersion} == "451"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET451_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.51"
${ElseIf} ${FrameworkVersion} == "45"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET45_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.5"
${ElseIf} ${FrameworkVersion} == "40Full"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET40Full_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.0 Full"
${ElseIf} ${FrameworkVersion} == "40Client"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET40Client_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "4.0 Client"
${ElseIf} ${FrameworkVersion} == "35"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET35_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "3.5"
${ElseIf} ${FrameworkVersion} == "30"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET30_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "3.0"
${ElseIf} ${FrameworkVersion} == "20"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET20_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "2.0"
${ElseIf} ${FrameworkVersion} == "11"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET11_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "1.1"
${ElseIf} ${FrameworkVersion} == "10"
StrCpy $dotNetUrl${FrameworkVersion} ${DOTNET10_URL}
StrCpy $dotNetReadableVersion${FrameworkVersion} "1.0"
${EndIf}
DetailPrint "Checking .NET Framework version..."
Push $0
Push $1
Push $2
Push $3
Push $4
Push $5
Push $6
Push $7
DotNetChecker::IsDotNet${FrameworkVersion}Installed
Pop $0
${If} $0 == "false"
${OrIf} $0 == "f" ; if script is compiled in ANSI mode then we get only an "f" https://github.com/ReVolly/NsisDotNetChecker/issues/4
DetailPrint ".NET Framework $dotNetReadableVersion${FrameworkVersion} not found, download is required for program to run."
Goto NoDotNET${FrameworkVersion}
${Else}
DetailPrint ".NET Framework $dotNetReadableVersion${FrameworkVersion} found, no need to install."
Goto NewDotNET${FrameworkVersion}
${EndIf}
NoDotNET${FrameworkVersion}:
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \
".NET Framework not installed. Required version: $dotNetReadableVersion${FrameworkVersion}.$\nInstall now?" \
/SD IDYES IDYES InstallDotNET${FrameworkVersion} IDNO NewDotNET${FrameworkVersion}
goto GiveUpDotNET${FrameworkVersion} ;IDCANCEL
InstallDotNET${FrameworkVersion}:
DetailPrint "Starting Microsoft .NET Framework v${NETVersion} Setup..."
ExecWait "$TEMP\${NETInstallerFileName}"
DetailPrint "Completed .NET Framework install/update. Removing .NET Framework installer."
Delete "$TEMP\${NETInstallerFileName}"
DetailPrint ".NET Framework installer removed."
goto NewDotNet${FrameworkVersion}
GiveUpDotNET${FrameworkVersion}:
Abort "Installation canceled by user."
NewDotNET${FrameworkVersion}:
DetailPrint "Proceeding with remainder of installation."
Pop $7
Pop $6
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Pop $0
!macroend

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,128 +0,0 @@
Unicode True
SetCompressor /SOLID zlib ; LZMA compresses about 20% better but is more likely to trigger AV false positives
!define PRODUCT_NAME "Giants: Citizen Kabuto"
!define PRODUCT_VERSION "1.499"
; MUI 1.67 compatible ------
!include "MUI2.nsh"
!include "DotNetChecker.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "GPatch.ico"
; Welcome page
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
;!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!insertmacro MUI_PAGE_FINISH
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\PlanetMoon\Giants"
!define MUI_LANGDLL_REGISTRY_VALUENAME "SetupLanguage"
; Language files
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Spanish"
; Language selection settings
!define MUI_LANGDLL_WINDOWTITLE "Setup Language"
!include LogicLib.nsh
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Output\GPatch1_499_1_0.exe"
InstallDir "$PROGRAMFILES\Giants\"
InstallDirRegKey HKCU "SOFTWARE\PlanetMoon\Giants" "DestDir"
ShowInstDetails hide
;Request application privileges for Windows Vista+
RequestExecutionLevel admin
Section
SetDetailsView hide
SectionIn RO
SetOverwrite on
nsExec::Exec "taskkill /F /IM Giants.exe"
nsExec::Exec "taskkill /F /IM GiantsMain.exe"
; Install DX redist for DX9 renderer
SetOutPath "$INSTDIR\Redist"
File /r "Files\Redist\*.*"
ExecWait "$INSTDIR\Redist\dxsetup.exe /silent" $0
${If} $0 != 0
MessageBox MB_OK "Setup failed to update DirectX ($0). Please visit www.microsoft.com and download the latest version of the DirectX end user redistributable."
${EndIf}
ExecWait "$INSTDIR\Redist\VC_redist.x86.exe /install /quiet /norestart /log $\"$Temp\GPatch_VCRedist.txt$\"" $0
${If} $0 != 0
${AndIf} $0 != 1638 ;0x666 - Newer version installed
MessageBox MB_OK "Setup failed to install the Visual C++ Runtime. Please visit www.microsoft.com and download the latest version of the Visual C++ 2019 redistributable."
${EndIf}
RMDir /r "$INSTDIR\Redist" ; Delete temporary files
; Delete old files
Delete $INSTDIR\bin\Shaders\*.*
Delete $INSTDIR\gg_dx7r.dll
Delete $INSTDIR\gg_dx8r.dll
Delete $INSTDIR\gg_dx9r.dll
Delete $INSTDIR\gg_null.dll
Delete $INSTDIR\Giants.exe
Delete $INSTDIR\BugTrap.dll
Delete $INSTDIR\GiantsMain.exe
Delete $INSTDIR\*.vso
Delete $INSTDIR\*.pso
SetOutPath "$INSTDIR"
File /r "Files\*.*"
; remove old mods (may have compatibility issues)
Delete $INSTDIR\bin\worldlist2.bin
Delete $INSTDIR\bin\worldlist3.bin
Delete $INSTDIR\bin\worldlist4.bin
Delete $INSTDIR\bin\worldlist5.bin
Delete $INSTDIR\bin\mappack1.gzp
Delete $INSTDIR\bin\A-GRM1.gzp
SectionEnd
!define NETVersion "4.7.2"
!define NETInstallerFileName "NDP472-KB4054531-Web.exe"
!define NETInstallerPath "Files\Redist\NDP472-KB4054531-Web.exe"
Section "MS .NET Framework v${NETVersion}" SecFramework
IfFileExists "$WINDIR\Microsoft.NET\Framework\v${NETVersion}" NETFrameworkInstalled 0
File /oname=$TEMP\${NETInstallerFileName} "${NETInstallerPath}"
!insertmacro CheckNetFramework 472
Return
NETFrameworkInstalled:
DetailPrint "Microsoft .NET Framework is already installed!"
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
;--------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,75 +0,0 @@
SetCompressor /SOLID lzma
!define PRODUCT_NAME "Giants Launcher"
!define PRODUCT_VERSION "1.0.0.2"
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "GPatch.ico"
; Welcome page
;!insertmacro MUI_PAGE_WELCOME
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\PlanetMoon\Giants"
!define MUI_LANGDLL_REGISTRY_VALUENAME "SetupLanguage"
; Language files
!insertmacro MUI_LANGUAGE "English"
; MUI end ------
Name "Giants Launcher Update"
OutFile "LauncherUpdate_1002.exe"
InstallDir "C:\Program Files\Giants"
InstallDirRegKey HKCU "SOFTWARE\PlanetMoon\Giants" "DestDir"
ShowInstDetails hide
;Request application privileges for Windows Vista
RequestExecutionLevel admin
Section
SetDetailsView hide
SectionIn RO
SetOverwrite on
SetOutPath "$INSTDIR"
File /r "Giants.exe"
SectionEnd
Function .onInit
Processes::KillProcess "Giants.exe"
Processes::FindProcess "Giants.exe"
${If} $R0 == 1
MessageBox MB_OK "Please close the Giants launcher before installing this update."
Abort
${EndIf}
ClearErrors
FileOpen $R0 "$INSTDIR\Giants.exe" w
${If} ${Errors}
MessageBox MB_OK "Could not write to Giants.exe. Please ensure the Giants launcher is closed."
Abort
${Else}
FileClose $R0
${EndIf}
FunctionEnd
Function .onInstFailed
MessageBox MB_OK "Update failed. Please visit www.giantswd.org and download the latest version manually."
FunctionEnd
Function .onInstSuccess
MessageBox MB_OK "Update complete!"
Exec "$INSTDIR\Giants.exe"
FunctionEnd