@@ -146,10 +146,10 @@ discard block |
||
| 146 | 146 | !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp" |
| 147 | 147 | !define MUI_COMPONENTSPAGE_SMALLDESC |
| 148 | 148 | |
| 149 | -!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")),\config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
| 150 | -!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis( _("Installation complete"))?>" |
|
| 151 | -!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Your system is ready."))?>" |
|
| 152 | -!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Please contact \${SUPPORT}."))?>" |
|
| 149 | +!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")), \config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
| 150 | +!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis(_("Installation complete"))?>" |
|
| 151 | +!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Your system is ready."))?>" |
|
| 152 | +!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Please contact \${SUPPORT}."))?>" |
|
| 153 | 153 | ;-------------------------------- |
| 154 | 154 | ;Languages |
| 155 | 155 | !insertmacro MUI_LANGUAGE "${LANG}" |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | ;-------------------------------- |
| 158 | 158 | ; Licence file |
| 159 | 159 | !ifdef LICENSE_FILE |
| 160 | -LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis( _("Accept"))?>" |
|
| 160 | +LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis(_("Accept"))?>" |
|
| 161 | 161 | LicenseText "<?php WindowsCommon::echoNsis(_("If you accept the conditions then select Accept and then click Install to continue."))?>" |
| 162 | 162 | LicenseData ${LICENSE_FILE} |
| 163 | 163 | !endif |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | VIAddVersionKey "CompanyName" "GÉANT" |
| 171 | 171 | VIAddVersionKey "ProductVersion" "${VERSION}" |
| 172 | 172 | |
| 173 | -MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis( _("Finish"))?>" |
|
| 173 | +MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis(_("Finish"))?>" |
|
| 174 | 174 | ;---------------------------------- |
| 175 | 175 | ; FUNCTIONS |
| 176 | 176 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | !macro install_ca_cert ca_file ca_fingerprint level |
| 206 | 206 | !insertmacro debug_cat 2 "locating certificate SHA=${ca_fingerprint} Level=${level}" |
| 207 | - DetailPrint "<?php WindowsCommon::echoNsis( _("searching for certificate"))?> ${ca_file}" |
|
| 207 | + DetailPrint "<?php WindowsCommon::echoNsis(_("searching for certificate"))?> ${ca_file}" |
|
| 208 | 208 | File "${ca_file}" |
| 209 | 209 | nsArray::Set Delete_files "${ca_file}" |
| 210 | 210 | !insertmacro debug_cat 2 "Testing machine store root" |
@@ -266,13 +266,13 @@ discard block |
||
| 266 | 266 | ${EndIf} |
| 267 | 267 | !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}" |
| 268 | 268 | !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}" |
| 269 | - DetailPrint "<?php WindowsCommon::echoNsis( _("installing certificate"))?> ${ca_file}" |
|
| 269 | + DetailPrint "<?php WindowsCommon::echoNsis(_("installing certificate"))?> ${ca_file}" |
|
| 270 | 270 | nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}' |
| 271 | 271 | Pop $0 |
| 272 | 272 | !insertmacro debug_cat 3 "certutil returned $0" |
| 273 | 273 | ${If} $0 != 0 |
| 274 | 274 | IfSilent +2 |
| 275 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("could not install certificate"))?> ${ca_file}" |
|
| 275 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("could not install certificate"))?> ${ca_file}" |
|
| 276 | 276 | !insertmacro debug_cat 1 "could not install certificate ${ca_file}" |
| 277 | 277 | ${EndIf} |
| 278 | 278 | no_install_${ca_file}: |
@@ -479,26 +479,26 @@ discard block |
||
| 479 | 479 | pop $R0 |
| 480 | 480 | ${If} $tkip_count > 0 |
| 481 | 481 | ${If} $aes_count > 1 |
| 482 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
| 482 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
| 483 | 483 | ${Else} |
| 484 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
| 484 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
| 485 | 485 | ${EndIf} |
| 486 | 486 | ${Else} |
| 487 | 487 | StrCpy $R1 "" |
| 488 | 488 | ${EndIf} |
| 489 | 489 | ${If} $profile_count > 0 |
| 490 | - StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 491 | -<?php WindowsCommon::echoNsis( _("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
| 490 | + StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 491 | +<?php WindowsCommon::echoNsis(_("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
| 492 | 492 | $R0.\ |
| 493 | 493 | $R1$\r$\n$\n\ |
| 494 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
| 494 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
| 495 | 495 | EMAIL: ${SUPPORT}$\r$\n\ |
| 496 | 496 | WWW: ${URL}" |
| 497 | 497 | ${Else} |
| 498 | -StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 499 | -<?php WindowsCommon::echoNsis( _("The installer will create the wireless profile:"))?> $R0.\ |
|
| 498 | +StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 499 | +<?php WindowsCommon::echoNsis(_("The installer will create the wireless profile:"))?> $R0.\ |
|
| 500 | 500 | $R1$\r$\n$\n\ |
| 501 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
| 501 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
| 502 | 502 | EMAIL: ${SUPPORT}$\r$\n\ |
| 503 | 503 | WWW: ${URL}" |
| 504 | 504 | ${EndIf} |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0 |
| 525 | 525 | ;TRANSLATION |
| 526 | 526 | nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\ |
| 527 | -$\r$\n$\r$\n<?php WindowsCommon::echoNsis( _("Installer created with software from the GEANT project."))?>" |
|
| 527 | +$\r$\n$\r$\n<?php WindowsCommon::echoNsis(_("Installer created with software from the GEANT project."))?>" |
|
| 528 | 528 | Pop $TEXT |
| 529 | 529 | |
| 530 | 530 | SetCtlColors $DIALOG "" 0xffffff |
@@ -661,18 +661,18 @@ discard block |
||
| 661 | 661 | ${If} $wireless_result == 1 |
| 662 | 662 | !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service" |
| 663 | 663 | IfSilent +2 |
| 664 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
| 664 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
| 665 | 665 | Call Cleanup |
| 666 | 666 | ${EndIf} |
| 667 | 667 | ${If} $wireless_result == 2 |
| 668 | 668 | IfSilent +2 |
| 669 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. The installer cannot continue."))?>" |
|
| 669 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. The installer cannot continue."))?>" |
|
| 670 | 670 | Call Cleanup |
| 671 | 671 | ${EndIf} |
| 672 | 672 | ${Else} |
| 673 | 673 | ${If} $wireless_result > 0 |
| 674 | 674 | IfSilent +3 |
| 675 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
| 675 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
| 676 | 676 | Call Cleanup |
| 677 | 677 | wired_yes: |
| 678 | 678 | Push 1 |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | ${If} $wired == 1 |
| 689 | 689 | ${If} $force_wired == 0 |
| 690 | 690 | IfSilent wired |
| 691 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
| 691 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
| 692 | 692 | Push 0 |
| 693 | 693 | Pop $wired |
| 694 | 694 | wired: |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | ;================================ |
| 730 | 730 | |
| 731 | 731 | Function ShowInstfiles |
| 732 | - !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Profiles installation"))?>" " " |
|
| 732 | + !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Profiles installation"))?>" " " |
|
| 733 | 733 | FunctionEnd |
| 734 | 734 | ;================================ |
| 735 | 735 | ; Check if a wireless profile exist and put it on delete list |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | |
| 749 | 749 | Function FindProfile |
| 750 | 750 | Pop $R8 |
| 751 | - DetailPrint "<?php WindowsCommon::echoNsis( _("Checking for profile \$R8"))?>" |
|
| 751 | + DetailPrint "<?php WindowsCommon::echoNsis(_("Checking for profile \$R8"))?>" |
|
| 752 | 752 | !insertmacro debug_cat 2 "Checking for profile $R8" |
| 753 | 753 | !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8" |
| 754 | 754 | nsExec::Exec '"$Netsh" wlan show profiles "$R8"' |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | !insertmacro debug_cat 4 "netsh returned $0" |
| 757 | 757 | ${If} $0 == 0 |
| 758 | 758 | !insertmacro debug_cat 1 "found profile $R8" |
| 759 | - DetailPrint "<?php WindowsCommon::echoNsis( _("found profile \$R8"))?>" |
|
| 759 | + DetailPrint "<?php WindowsCommon::echoNsis(_("found profile \$R8"))?>" |
|
| 760 | 760 | Push 0 |
| 761 | 761 | ${Else} |
| 762 | 762 | !insertmacro debug_cat 1 "profile $R8 not found" |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | ${If} $Symantec_installed != 0 |
| 854 | 854 | !insertmacro debug_cat 3 "Symantec problem" |
| 855 | 855 | IfSilent +2 |
| 856 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")),\config\ConfAssistant::CONSORTIUM['display_name']) ?>" |
|
| 856 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")), \config\ConfAssistant::CONSORTIUM['display_name']) ?>" |
|
| 857 | 857 | Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"' |
| 858 | 858 | Quit |
| 859 | 859 | |
@@ -1186,7 +1186,7 @@ discard block |
||
| 1186 | 1186 | Function PFXCertificateSelect |
| 1187 | 1187 | !ifndef SILVERBULLET |
| 1188 | 1188 | ;TRANSLATION |
| 1189 | -!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")),\config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
| 1189 | +!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")), \config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
| 1190 | 1190 | ;TRANSLATION |
| 1191 | 1191 | IfSilent +2 |
| 1192 | 1192 | MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echoNsis(_("Click OK to continue"))?> " |
@@ -1202,7 +1202,7 @@ discard block |
||
| 1202 | 1202 | $certPasswordLength = strlen($certPasswordLabel); |
| 1203 | 1203 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
| 1204 | 1204 | $certUsernameLength = strlen($certUsernameLabel); |
| 1205 | - $labelLength = max($certPasswordLength,$certUsernameLength); |
|
| 1205 | + $labelLength = max($certPasswordLength, $certUsernameLength); |
|
| 1206 | 1206 | ?> |
| 1207 | 1207 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
| 1208 | 1208 | !else |
@@ -1219,11 +1219,11 @@ discard block |
||
| 1219 | 1219 | !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP"; |
| 1220 | 1220 | ${If} $VistaNoSP == 0 |
| 1221 | 1221 | !ifdef PFX_USERNAME |
| 1222 | - !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u" |
|
| 1223 | - !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u" |
|
| 1222 | + !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u" |
|
| 1223 | + !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u" |
|
| 1224 | 1224 | !else |
| 1225 | - !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u" |
|
| 1226 | - !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u" |
|
| 1225 | + !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u" |
|
| 1226 | + !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u" |
|
| 1227 | 1227 | !endif |
| 1228 | 1228 | ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>" |
| 1229 | 1229 | ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u "" |
@@ -1595,7 +1595,7 @@ discard block |
||
| 1595 | 1595 | Section "-start" |
| 1596 | 1596 | SectionIn RO |
| 1597 | 1597 | |
| 1598 | -!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Installation"))?>" "<?php WindowsCommon::echoNsis( _("Checking for existing wireless profiles"))?>" |
|
| 1598 | +!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Installation"))?>" "<?php WindowsCommon::echoNsis(_("Checking for existing wireless profiles"))?>" |
|
| 1599 | 1599 | !ifndef PWD |
| 1600 | 1600 | !include "certs.nsh" |
| 1601 | 1601 | !endif |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $this->loggerInstance->debug(5, "translateFile($source_name, $output_name)\n"); |
| 105 | 105 | ob_start(); |
| 106 | - $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n"); |
|
| 106 | + $this->loggerInstance->debug(5, $this->module_path.'/Files/'.$this->device_id.'/'.$source_name."\n"); |
|
| 107 | 107 | $source = $this->findSourceFile($source_name); |
| 108 | 108 | |
| 109 | 109 | if ($source !== false) { // if there is no file found, don't attempt to include an uninitialised variable |
@@ -230,8 +230,8 @@ discard block |
||
| 230 | 230 | $out .= sprintf(_("%s installer will be in the form of an EXE file. It will configure %s on your device, by creating wireless network profiles.<p>When you click the download button, the installer will be saved by your browser. Copy it to the machine you want to configure and execute."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
| 231 | 231 | $out .= "<p>"; |
| 232 | 232 | if ($networksCount > $configCount) { |
| 233 | - $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $networksCount - $configCount), implode(', ', $configNetworkList)) . " "; |
|
| 234 | - $out .= '<strong>' . join('</strong>, <strong>', array_diff($networkList, $configNetworkList)) . '</strong>'; |
|
| 233 | + $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $networksCount - $configCount), implode(', ', $configNetworkList))." "; |
|
| 234 | + $out .= '<strong>'.join('</strong>, <strong>', array_diff($networkList, $configNetworkList)).'</strong>'; |
|
| 235 | 235 | $out .= "<p>"; |
| 236 | 236 | } |
| 237 | 237 | // TODO - change this below |
@@ -340,14 +340,14 @@ discard block |
||
| 340 | 340 | */ |
| 341 | 341 | protected function signInstaller() |
| 342 | 342 | { |
| 343 | - $fileName = $this->installerBasename . '.exe'; |
|
| 343 | + $fileName = $this->installerBasename.'.exe'; |
|
| 344 | 344 | if (!$this->sign) { |
| 345 | 345 | rename("installer.exe", $fileName); |
| 346 | 346 | return $fileName; |
| 347 | 347 | } |
| 348 | 348 | $retval = 0; |
| 349 | 349 | // are actually signing |
| 350 | - $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null", $retval); |
|
| 350 | + $outputFromSigning = system($this->sign." installer.exe '$fileName' > /dev/null", $retval); |
|
| 351 | 351 | $this->loggerInstance->debug(4, $retval, "Output from Windows signing:", "==\n"); |
| 352 | 352 | if ($retval !== 0 || $outputFromSigning === false) { |
| 353 | 353 | $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n"); |
@@ -365,12 +365,12 @@ discard block |
||
| 365 | 365 | */ |
| 366 | 366 | protected function compileNSIS() |
| 367 | 367 | { |
| 368 | - $makensis = \config\ConfAssistant::PATHS['makensis'] . " -INPUTCHARSET UTF8"; |
|
| 368 | + $makensis = \config\ConfAssistant::PATHS['makensis']." -INPUTCHARSET UTF8"; |
|
| 369 | 369 | $lcAll = getenv("LC_ALL"); |
| 370 | 370 | putenv("LC_ALL=en_US.UTF-8"); |
| 371 | - $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1'; |
|
| 371 | + $command = $makensis.' -V4 cat.NSI > nsis.log 2>&1'; |
|
| 372 | 372 | system($command); |
| 373 | - putenv("LC_ALL=" . $lcAll); |
|
| 373 | + putenv("LC_ALL=".$lcAll); |
|
| 374 | 374 | $this->loggerInstance->debug(4, "compileNSIS:$command\n"); |
| 375 | 375 | } |
| 376 | 376 | |
@@ -387,10 +387,10 @@ discard block |
||
| 387 | 387 | 'email' => 'SUPPORT', |
| 388 | 388 | 'url' => 'URL', |
| 389 | 389 | ]; |
| 390 | - $s = "support_" . $type . "_substitute"; |
|
| 390 | + $s = "support_".$type."_substitute"; |
|
| 391 | 391 | $substitute = $this->translateString($this->$s); |
| 392 | - $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
| 393 | - return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"; |
|
| 392 | + $returnValue = !empty($attr['support:'.$type][0]) ? $attr['support:'.$type][0] : $substitute; |
|
| 393 | + return '!define '.$supportString[$type].' "'.$returnValue.'"'."\n"; |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | /** |
@@ -403,18 +403,18 @@ discard block |
||
| 403 | 403 | { |
| 404 | 404 | $fcontents = ''; |
| 405 | 405 | if ($attr['internal:profile_count'][0] > 1) { |
| 406 | - $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])) . '" |
|
| 406 | + $fcontents .= "\n".'!define USER_GROUP "'.$this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])).'" |
|
| 407 | 407 | '; |
| 408 | 408 | } |
| 409 | 409 | $fcontents .= ' |
| 410 | -Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])) . '" |
|
| 411 | -!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])) . '" |
|
| 412 | -!define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '.' . \core\CAT::VERSION_PATCH . '" |
|
| 410 | +Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])).'" |
|
| 411 | +!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])).'" |
|
| 412 | +!define VERSION "' . \core\CAT::VERSION_MAJOR.'.'.\core\CAT::VERSION_MINOR.'.'.\core\CAT::VERSION_PATCH.'" |
|
| 413 | 413 | !define INSTALLER_NAME "installer.exe" |
| 414 | -!define LANG "' . $this->lang . '" |
|
| 415 | -!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']) . '" |
|
| 414 | +!define LANG "' . $this->lang.'" |
|
| 415 | +!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']).'" |
|
| 416 | 416 | ;-------------------------------- |
| 417 | -!define ORGANISATION "' . $this->translateString($attr['general:instname'][0]) . '" |
|
| 417 | +!define ORGANISATION "' . $this->translateString($attr['general:instname'][0]).'" |
|
| 418 | 418 | '; |
| 419 | 419 | $fcontents .= $this->getSupport($attr, 'email'); |
| 420 | 420 | $fcontents .= $this->getSupport($attr, 'url'); |
@@ -422,18 +422,18 @@ discard block |
||
| 422 | 422 | $fcontents .= '!define WIRED |
| 423 | 423 | '; |
| 424 | 424 | } |
| 425 | - $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '" |
|
| 425 | + $fcontents .= '!define PROVIDERID "urn:UUID:'.$this->deviceUUID.'" |
|
| 426 | 426 | '; |
| 427 | 427 | if (!empty($attr['internal:realm'][0])) { |
| 428 | - $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
|
| 428 | + $fcontents .= '!define REALM "'.$attr['internal:realm'][0].'" |
|
| 429 | 429 | '; |
| 430 | 430 | } |
| 431 | 431 | if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
| 432 | - $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
|
| 432 | + $fcontents .= '!define HINT_USER_INPUT "'.$attr['internal:hint_userinput_suffix'][0].'" |
|
| 433 | 433 | '; |
| 434 | 434 | } |
| 435 | 435 | if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
| 436 | - $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
|
| 436 | + $fcontents .= '!define VERIFY_USER_REALM_INPUT "'.$attr['internal:verify_userinput_suffix'][0].'" |
|
| 437 | 437 | '; |
| 438 | 438 | } |
| 439 | 439 | $fcontents .= $this->msInfoFile($attr); |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $out .= '!define EXTERNAL_INFO "'; |
| 455 | 455 | // $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n"); |
| 456 | 456 | if ($attr['internal:info_file'][0]['mime'] == 'rtf') { |
| 457 | - $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name']; |
|
| 457 | + $out = '!define LICENSE_FILE "'.$attr['internal:info_file'][0]['name']; |
|
| 458 | 458 | } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') { |
| 459 | 459 | $infoFile = file_get_contents($attr['internal:info_file'][0]['name']); |
| 460 | 460 | if ($infoFile === false) { |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | $out = '!define LICENSE_FILE " info_f.txt'; |
| 468 | 468 | } |
| 469 | 469 | } else { |
| 470 | - $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name']; |
|
| 470 | + $out = '!define EXTERNAL_INFO "'.$attr['internal:info_file'][0]['name']; |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | $out .= "\"\n"; |