From 6753c9f11b4a73e40d139daadc4a1d9b30c5937d Mon Sep 17 00:00:00 2001 From: Michael Steenbeek <1478678+Gymnasiast@users.noreply.github.com> Date: Sun, 25 May 2025 00:08:51 +0200 Subject: [PATCH] Translate NSIS installer --- distribution/changelog.txt | 1 + distribution/windows/install.nsi | 47 +++++++++---------- distribution/windows/language/install_en.nsi | 23 +++++++++ distribution/windows/language/install_nl.nsi | Bin 0 -> 5972 bytes 4 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 distribution/windows/language/install_en.nsi create mode 100644 distribution/windows/language/install_nl.nsi diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 07cbc76287..2cad08f413 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -2,6 +2,7 @@ ------------------------------------------------------------------------ - Feature: [#22476] “Time since last inspection” statistic is available in the rides window. - Feature: [#24313] [Plugin] Add API for setting a ride vehicle’s sprite to a smoke plume. +- Improved: [#24362, #24491] The Windows installer is now translated as well. - Improved: [#24364] Improve the fallback vehicle sprites for Zero G Rolls, and allow small ones to be built without cheats if the fallbacks are available. - Improved: [#24368] Clicking the in-game update notication now leads to a more user-friendly download page. - Improved: [#24400] Ride list in preservation window is now sorted alphabetically. diff --git a/distribution/windows/install.nsi b/distribution/windows/install.nsi index 4217cd8e4b..9b438f92da 100644 --- a/distribution/windows/install.nsi +++ b/distribution/windows/install.nsi @@ -1,3 +1,4 @@ +Unicode True !define APPNAME "OpenRCT2" !define APPVERSION "${APPV_MAIN}${APPV_EXTRA}" !define APPVERSIONINTERNAL "${APPV_MAIN}.0" @@ -18,7 +19,7 @@ InstallDir "$PROGRAMFILES64\OpenRCT2\" !endif -!define SUPPORTED_OS "Windows 7 and later" +!define SUPPORTED_OS "$(lsSupportedOS)" ; Define root variable relative to installer !define PATH_ROOT "..\..\" @@ -30,21 +31,17 @@ !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "top.bmp" -BrandingText "OpenRCT2 Installer" +BrandingText "$(lsBrandingText)" SetCompressor LZMA ; Version Info VIProductVersion "${APPVERSIONINTERNAL}" -VIAddVersionKey "ProductName" "OpenRCT2 ${PLATFORM} Installer for ${SUPPORTED_OS}" -VIAddVersionKey "Comments" "Installs ${APPNAMEANDVERSION}" -VIAddVersionKey "CompanyName" "OpenRCT2 Developers" -VIAddVersionKey "FileDescription" "Installs ${APPNAMEANDVERSION}" VIAddVersionKey "ProductVersion" "${APPVERSION}" VIAddVersionKey "InternalName" "InstOpenRCT2-${APPARCH}" VIAddVersionKey "FileVersion" "${APPVERSION}-${APPARCH}" VIAddVersionKey "LegalCopyright" " " ; Main Install settings -Name "${APPNAMEANDVERSION} ${PLATFORM} for ${SUPPORTED_OS}" +Name "$(lsInstallerName)" ; NOTE: Keep trailing backslash! InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenRCT2" "Install Folder" @@ -92,10 +89,10 @@ ManifestDPIAware true !insertmacro MUI_PAGE_INSTFILES !define MUI_FINISHPAGE_TITLE_3LINES -!define MUI_FINISHPAGE_RUN_TEXT "Run ${APPNAMEANDVERSION} now!" +!define MUI_FINISHPAGE_RUN_TEXT "$(lsRunNow)" !define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun -!define MUI_FINISHPAGE_LINK "Visit the OpenRCT2 site for more information" +!define MUI_FINISHPAGE_LINK "$(lsFinishPageLink)" !define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}" !define MUI_FINISHPAGE_NOREBOOTSUPPORT !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt" @@ -103,7 +100,7 @@ ManifestDPIAware true !define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBack !insertmacro MUI_PAGE_FINISH -!define MUI_PAGE_HEADER_TEXT "Uninstall ${APPNAMEANDVERSION}" +!define MUI_PAGE_HEADER_TEXT "$(lsUninstall)" !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES @@ -136,6 +133,9 @@ ManifestDPIAware true !insertmacro MUI_LANGUAGE "TradChinese" !insertmacro MUI_RESERVEFILE_LANGDLL +!include "language\install_en.nsi" +!include "language\install_nl.nsi" + !macro Init thing uac_tryagain: !insertmacro UAC_RunElevated @@ -144,17 +144,17 @@ ${Case} 0 ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done ${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user - MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "This ${thing} requires admin privileges, try again" /SD IDNO IDYES uac_tryagain IDNO 0 + MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "$(lsUACRequiresElevation)" /SD IDNO IDYES uac_tryagain IDNO 0 ${EndIf} ;fall-through and die ${Case} 1223 - MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "This ${thing} requires admin privileges, aborting!" + MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "$(lsUACError1223)" Quit ${Case} 1062 - MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Logon service not running, aborting!" + MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "$(lsUACError1062)" Quit ${Default} - MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0" + MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "$(lsUACErrorDefault)" Quit ${EndSwitch} @@ -246,7 +246,7 @@ SectionEnd ; Modern install component descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${Section1} "Minimal OpenRCT2 installation. You must have RollerCoaster Tycoon 2 installed." + !insertmacro MUI_DESCRIPTION_TEXT ${Section1} "$(lsComponentDescription)" !insertmacro MUI_FUNCTION_DESCRIPTION_END ;----------------------------------------------- @@ -324,10 +324,10 @@ Function CheckProcessorArchitecture ClearErrors ${If} ${RunningX64} IntCmp ${APPBITS} 64 Done 0 - MessageBox MB_YESNO|MB_ICONINFORMATION "You are trying to install the 32-bit OpenRCT2 on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort + MessageBox MB_YESNO|MB_ICONINFORMATION "$(ls32bitVersionOn64bitOS)" IDYES Done IDNO Abort ${Else} IntCmp ${APPBITS} 64 0 Done - MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the 64-bit OpenRCT2 on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort + MessageBox MB_YESNO|MB_ICONSTOP "$(ls64bitVersionOn32bitOS)" IDYES Done IDNO Abort ${EndIf} GoTo Done Abort: @@ -343,12 +343,12 @@ Function CheckWindowsVersion StrCmp $R0 "win9x" 0 WinNT ClearErrors StrCmp ${APPARCH} "win9x" Done 0 - MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the Windows XP SP3, Vista, 7 and 8.1 version on Windows 95, 98, ME, 2000 and XP without SP3. This is will not work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort + MessageBox MB_YESNO|MB_ICONSTOP "$(lsNewWindowsVersionOnOldWindows)" IDYES Done IDNO Abort GoTo Done WinNT: ClearErrors StrCmp ${APPARCH} "win9x" 0 Done - MessageBox MB_YESNO|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98, 2000 and XP without SP3 version on Windows XP SP3, Vista, 7 and 8.1. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort + MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(lsOldWindowsVersionOnNewWindows)" IDYES Done IDNO Abort Abort: Quit Done: @@ -366,7 +366,7 @@ Retry: Delete "$INSTDIR\${OPENRCT2_EXE}" IfErrors 0 Done ClearErrors - MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "OpenRCT2 is running. Please close it and retry." IDRETRY Retry + MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "$(lsOpenRCT2IsRunning)" IDRETRY Retry Abort Done: FunctionEnd @@ -540,8 +540,7 @@ WelcomeToSetup: ; An older version was found. Let's let the user know there's an upgrade that will take place. ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenRCT2" "DisplayVersion" ; Gets the older version then displays it in a message box - MessageBox MB_OK|MB_ICONINFORMATION \ - "Welcome to ${APPNAMEANDVERSION} Setup.$\nThis will allow you to upgrade from version $OLDVERSION." + MessageBox MB_OK|MB_ICONINFORMATION "$(lsUpgradeNotice)" Goto FinishCallback FinishCallback: @@ -557,12 +556,12 @@ FunctionEnd Function DoNotInstallInRCT2Folder IfFileExists "$INSTDIR\Data\g1.dat" datag1exists datag1notexists datag1exists: - MessageBox MB_OK|MB_ICONSTOP `You cannot install OpenRCT2 to the same directory as RollerCoaster Tycoon 2.` + MessageBox MB_OK|MB_ICONSTOP "$(lsCannotInstallToRCT2Dir)" Abort datag1notexists: IfFileExists "$INSTDIR\Assets\g1.dat" assetsg1exists assetsg1notexists assetsg1exists: - MessageBox MB_OK|MB_ICONSTOP `You cannot install OpenRCT2 to the same directory as RollerCoaster Tycoon Classic.` + MessageBox MB_OK|MB_ICONSTOP "$(lsCannotInstallToRCTClassicDir)" Abort assetsg1notexists: FunctionEnd diff --git a/distribution/windows/language/install_en.nsi b/distribution/windows/language/install_en.nsi new file mode 100644 index 0000000000..5a9789f91f --- /dev/null +++ b/distribution/windows/language/install_en.nsi @@ -0,0 +1,23 @@ +LangString ls32bitVersionOn64bitOS ${LANG_ENGLISH} "You are trying to install the 32-bit OpenRCT2 on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" +LangString ls64bitVersionOn32bitOS ${LANG_ENGLISH} "You are trying to install the 64-bit OpenRCT2 on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" +LangString lsBrandingText ${LANG_ENGLISH} "OpenRCT2 Installer" +LangString lsCannotInstallToRCT2Dir ${LANG_ENGLISH} "You cannot install OpenRCT2 to the same directory as RollerCoaster Tycoon 2." +LangString lsCannotInstallToRCTClassicDir ${LANG_ENGLISH} "You cannot install OpenRCT2 to the same directory as RollerCoaster Tycoon Classic." +LangString lsComponentDescription ${LANG_ENGLISH} "Minimal OpenRCT2 installation. You must have RollerCoaster Tycoon 2 or Classic installed." +LangString lsFinishPageLink ${LANG_ENGLISH} "Visit the OpenRCT2 site for more information" +LangString lsInstallerName ${LANG_ENGLISH} "${APPNAMEANDVERSION} ${PLATFORM} for ${SUPPORTED_OS}" +LangString lsNewWindowsVersionOnOldWindows ${LANG_ENGLISH} "You are trying to install the Windows XP SP3, Vista and newer version on Windows 95, 98, ME, 2000 or XP without SP3. This is will not work. Please download the correct version. Do you really want to continue?" +LangString lsOldWindowsVersionOnNewWindows ${LANG_ENGLISH} "You are trying to install the Windows 95, 98, 2000 and XP without SP3 version on Windows XP SP3, Vista or newer. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" +LangString lsOpenRCT2IsRunning ${LANG_ENGLISH} "OpenRCT2 is running. Please close it and retry." +LangString lsRunNow ${LANG_ENGLISH} "Run ${APPNAMEANDVERSION} now!" +LangString lsSupportedOS ${LANG_ENGLISH} "Windows 7 and later" +LangString lsUACErrorDefault ${LANG_ENGLISH} "Unable to elevate, error $0" +LangString lsUACError1062 ${LANG_ENGLISH} "Logon service not running, aborting!" +LangString lsUACError1223 ${LANG_ENGLISH} "This ${thing} requires admin privileges, aborting!" +LangString lsUACRequiresElevation ${LANG_ENGLISH} "This ${thing} requires admin privileges, try again" +LangString lsUninstall ${LANG_ENGLISH} "Uninstall ${APPNAMEANDVERSION}" +LangString lsUpgradeNotice ${LANG_ENGLISH} "Welcome to ${APPNAMEANDVERSION} Setup.$\nThis will allow you to upgrade from version $OLDVERSION." +VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "Installs ${APPNAMEANDVERSION}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "OpenRCT2 Developers" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Installs ${APPNAMEANDVERSION}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "OpenRCT2 ${PLATFORM} Installer for ${SUPPORTED_OS}" diff --git a/distribution/windows/language/install_nl.nsi b/distribution/windows/language/install_nl.nsi new file mode 100644 index 0000000000000000000000000000000000000000..f6fa68718e10513010af5aea0071b53bc002633f GIT binary patch literal 5972 zcmdUz?QR=o5QXPASFu9<0TL~3fI^WFN|TnBx=EBcfgec7jh&CivEA5CXi%@YcL1Dc z#&6cUj&~hmp`gg|`u&`bGiPS@@4p(>vYs8$Yo6TeBDTL35wl&)T2aKxg!|tK+AQG{RF) z-`sS6a^6tC&wT~=vG3d^%yjR-*Kh0OrgmhKtgrvbJk)bbQg?l4oZ8p={0=0Zz5_Yf zHNMh%sNe5>47pD2fp)LE{+V6)xhGm5&t3aMPp7)GrTvWc_1*UQmL15RSgfUyB+IFu zTRzWBE>}_4Bo*g!S9@ZEW672Isc1FQD0g@DJ=6`H*w*~Hq(F|${gZ2pCckKHSKn{7 zIxM$uM|x^c_8jUwknp4Y^@)5r4;8uRXHk(OW*Mj`d#q@w<)EUByk!5yP;u!#2)~4% z6HfSr@5|`KtAT3#2wFoc)-TgbPaS>85E0$fO@BC|sw4GfA(nD!=UKZND{GFTo)9*& z;>k^or8p+Wz-+Z-v(bOzr)QEFixMs93Zgr9sZUpN7(O6Y-~u9sINH|ji7VFh+?qr^ zQZ&T@`x=AkGG`fL`D4K@dBml-5C7fX8f%gZY2dznXP>)jnWCf-1Iw{eU)(lu`(xFS ztN>H*3nRx9?hD^kF&ovVKonoC|BgK0)UY<`h z7>cL2gbHxj@Uat}Sgrk2t-X{q9b;`o0o?S)ku}m&RbI{W$f;IFz9O~`bmEz3o?x+R z`HK{B^uL)7u>XB z5B)FG`5-+$b! zP=&NW06YQWA{&n<6*Gt{V(R{sJe~h_jeRpshfA&R%GJ`428*CnyO?HQ!b%0=vF_U)CGa!UjUPsb_sPIYeGRYqJB7oX{m zoJ@^$AfJupB{ah#^ZW5vT1l*u86s+rqO{iy@Snx{@C zV}0*8KD?pKkCZ_kdxc#sZ9}&l>eEyIPPcm|2BA8RY(_mFwnXn~)RL!WdxUboTZhB4 zr5{P+73JGH8>7=mRwQE|PHK|ybX0#t3mw^YHeaUX+q&nSM=pLH3Nz7lMsK%BC4E~> zmcs|T?&aw>J&Sl?u__V_f7JQ2Z;|Sva3J5N_dIYFj2XzR#&oKPqAy4c3086$QuiJ9 zi+fJJ`YzYEi)i^koba2@e<2CMVN~`+2w5Y&7lNZN6h*KiR$(UkqhNT(c<)7z#w^T9 zr(M-mVpJyrLsy1QMfv|s6-_uBjA6|enJ!*X=?*em3OQF#|x z?n2qOVgtB}89W#}Ku*?I-^MjT;LX literal 0 HcmV?d00001