| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | /* | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * ***************************************************************************** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * Contributions to this work were made on behalf of the GÉANT project, a  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * project that has received funding from the European Union’s Framework  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * Programme 7 under Grant Agreements No. 238875 (GN3) and No. 605243 (GN3plus), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * Horizon 2020 research and innovation programme under Grant Agreements No.  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  * 691567 (GN4-1) and No. 731122 (GN4-2). | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  * On behalf of the aforementioned projects, GEANT Association is the sole owner | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  * of the copyright in all material which was developed by a member of the GÉANT | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  * project. GÉANT Vereniging (Association) is registered with the Chamber of  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  * Commerce in Amsterdam with registration number 40535155 and operates in the  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * UK as a branch of GÉANT Vereniging. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  * Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands.  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |  * UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  * License: see the web/copyright.inc.php file in the file structure or | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  *          <base_url>/copyright.php after deploying the software | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  * This file contains common functions needed by all Windows installers | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  * @author Tomasz Wolniewicz <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  * @package ModuleWriting | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  | namespace devices\ms; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  | use \Exception; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  * This class defines common functions needed by all Windows installers | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |  * @author Tomasz Wolniewicz <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |  * @package ModuleWriting | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  | abstract class WindowsCommon extends \core\DeviceConfig { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |      * copies various common files into temp dir for inclusion into installers | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |      * @throws Exception | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |     public function copyBasicFiles() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |         if (!($this->copyFile('wlan_test.exe') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |                 $this->copyFile('check_wired.cmd') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |                 $this->copyFile('install_wired.cmd') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |                 $this->copyFile('cat_bg.bmp') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |                 $this->copyFile('base64.nsh'))) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |             throw new Exception("Copying needed files (part 1) failed for at least one file!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |         if (!($this->copyFile('cat32.ico') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |                 $this->copyFile('cat_150.bmp') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |                 $this->copyFile('WLANSetEAPUserData/WLANSetEAPUserData32.exe', 'WLANSetEAPUserDatax86.exe') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |                 $this->copyFile('WLANSetEAPUserData/WLANSetEAPUserData64.exe', 'WLANSetEAPUserDatax64.exe'))) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |             throw new Exception("Copying needed files (part 2) failed for at least one file!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |         if (!$this->translateFile('common.inc', 'common.nsh', $this->codePage)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |             throw new Exception("Translating needed file common.inc failed!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |         return; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |      *  Copy a file from the module location to the temporary directory aplying transcoding. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  |      * Transcoding is only required for Windows installers, and no Unicode support | 
            
                                                                                                            
                            
            
                                    
            
            
                | 73 |  |  |      * in NSIS (NSIS version below 3) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 74 |  |  |      * Trancoding is only applied if the third optional parameter is set and nonzero | 
            
                                                                                                            
                            
            
                                    
            
            
                | 75 |  |  |      * If CONFIG['NSIS']_VERSION is set to 3 or more, no transcoding will be applied | 
            
                                                                                                            
                            
            
                                    
            
            
                | 76 |  |  |      * regardless of the third parameter value. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 77 |  |  |      * If the second argument is provided and is not equal to 0, then the file will be | 
            
                                                                                                            
                            
            
                                    
            
            
                | 78 |  |  |      * saved under the name taken from this argument. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 79 |  |  |      * If only one parameter is given or the second is equal to 0, source and destination | 
            
                                                                                                            
                            
            
                                    
            
            
                | 80 |  |  |      * filenames are the same. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 81 |  |  |      * The third optional parameter, if nonzero, should be the character set understood by iconv | 
            
                                                                                                            
                            
            
                                    
            
            
                | 82 |  |  |      * This is required by the Windows installer and is expected to go away in the future. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 83 |  |  |      * Source file can be located either in the Files subdirectory or in the sibdirectory of Files | 
            
                                                                                                            
                            
            
                                    
            
            
                | 84 |  |  |      * named the same as device_id. The second option takes precedence. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 85 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 86 |  |  |      * @param string $source_name The source file name | 
            
                                                                                                            
                            
            
                                    
            
            
                | 87 |  |  |      * @param string $output_name The destination file name | 
            
                                                                                                            
                            
            
                                    
            
            
                | 88 |  |  |      * @param int    $encoding    Set Windows charset if non-zero | 
            
                                                                                                            
                            
            
                                    
            
            
                | 89 |  |  |      * @return boolean | 
            
                                                                                                            
                            
            
                                    
            
            
                | 90 |  |  |      * @final not to be redefined | 
            
                                                                                                            
                            
            
                                    
            
            
                | 91 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 92 |  |  |     final protected function translateFile($source_name, $output_name = NULL, $encoding = 0) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 93 |  |  |         // there is no explicit gettext() call in this function, but catalogues | 
            
                                                                                                            
                            
            
                                    
            
            
                | 94 |  |  |         // and translations occur in the varios ".inc" files - so make sure we | 
            
                                                                                                            
                            
            
                                    
            
            
                | 95 |  |  |         // operate in the correct catalogue | 
            
                                                                                                            
                            
            
                                    
            
            
                | 96 |  |  |         \core\common\Entity::intoThePotatoes(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 97 |  |  |         if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 98 |  |  |             $encoding = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 99 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 100 |  |  |         if ($output_name === NULL) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 101 |  |  |             $output_name = $source_name; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 102 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 103 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 104 |  |  |         $this->loggerInstance->debug(5, "translateFile($source_name, $output_name, $encoding)\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 105 |  |  |         ob_start(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 106 |  |  |         $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 107 |  |  |         $source = $this->findSourceFile($source_name); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 108 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 109 |  |  |         if ($source !== FALSE) { // if there is no file found, don't attempt to include an uninitialised variable | 
            
                                                                                                            
                            
            
                                    
            
            
                | 110 |  |  |             include $source; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 111 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 112 |  |  |         $output = ob_get_clean(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 113 |  |  |         if ($encoding) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 114 |  |  |             $outputClean = iconv('UTF-8', $encoding . '//TRANSLIT', $output); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 115 |  |  |             if ($outputClean) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 116 |  |  |                 $output = $outputClean; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 117 |  |  |             } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 118 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 119 |  |  |         $fileHandle = fopen("$output_name", "w"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 120 |  |  |         if ($fileHandle === FALSE) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 121 |  |  |             $this->loggerInstance->debug(2, "translateFile($source, $output_name, $encoding) failed\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 122 |  |  |             \core\common\Entity::outOfThePotatoes(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 123 |  |  |             return FALSE; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 124 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 125 |  |  |         fwrite($fileHandle, $output); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 126 |  |  |         fclose($fileHandle); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 127 |  |  |         $this->loggerInstance->debug(5, "translateFile($source, $output_name, $encoding) end\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 128 |  |  |         \core\common\Entity::outOfThePotatoes(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 129 |  |  |         return TRUE; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 130 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 131 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 132 |  |  |         /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 133 |  |  |      * Transcode a string adding double quotes escaping | 
            
                                                                                                            
                            
            
                                    
            
            
                | 134 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 135 |  |  |      * Transcoding is only required for Windows installers, and no Unicode support | 
            
                                                                                                            
                            
            
                                    
            
            
                | 136 |  |  |      * in NSIS (NSIS version below 3) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 137 |  |  |      * Trancoding is only applied if the third optional parameter is set and nonzero | 
            
                                                                                                            
                            
            
                                    
            
            
                | 138 |  |  |      * If CONFIG['NSIS']_VERSION is set to 3 or more, no transcoding will be applied | 
            
                                                                                                            
                            
            
                                    
            
            
                | 139 |  |  |      * regardless of the second parameter value. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 140 |  |  |      * The second optional parameter, if nonzero, should be the character set understood by iconv | 
            
                                                                                                            
                            
            
                                    
            
            
                | 141 |  |  |      * This is required by the Windows installer and is expected to go away in the future. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 142 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 143 |  |  |      * @param string $source_string The source string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 144 |  |  |      * @param int    $encoding      Set Windows charset if non-zero | 
            
                                                                                                            
                            
            
                                    
            
            
                | 145 |  |  |      * @return string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 146 |  |  |      * @final not to be redefined | 
            
                                                                                                            
                            
            
                                    
            
            
                | 147 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 148 |  |  |     final protected function translateString($source_string, $encoding = 0) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 149 |  |  |         $this->loggerInstance->debug(5, "translateString input: \"$source_string\"\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 150 |  |  |         if (empty($source_string)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 151 |  |  |             return $source_string; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 152 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 153 |  |  |         if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 154 |  |  |             $encoding = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 155 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 156 |  |  |         if ($encoding) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 157 |  |  |             $output_c = iconv('UTF-8', $encoding . '//TRANSLIT', $source_string); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 158 |  |  |         } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 159 |  |  |             $output_c = $source_string; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 160 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 161 |  |  |         if ($output_c) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 162 |  |  |             $source_string = str_replace('"', '$\\"', $output_c); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 163 |  |  |         } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 164 |  |  |             $this->loggerInstance->debug(2, "Failed to convert string \"$source_string\"\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 165 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 166 |  |  |         return $source_string; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 167 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 168 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 169 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 170 |  |  |      * copies files relevant for EAP-pwd into installer temp directory for later inclusion into installers | 
            
                                                                                                            
                            
            
                                    
            
            
                | 171 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 172 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 173 |  |  |      * @throws Exception | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 174 |  |  |      */ | 
            
                                                                        
                            
            
                                    
            
            
                | 175 |  |  |     public function copyPwdFiles() { | 
            
                                                                        
                            
            
                                    
            
            
                | 176 |  |  |         if (!($this->copyFile('Aruba_Networks_EAP-pwd_x32.msi') && | 
            
                                                                        
                            
            
                                    
            
            
                | 177 |  |  |                 $this->copyFile('Aruba_Networks_EAP-pwd_x64.msi'))) { | 
            
                                                                        
                            
            
                                    
            
            
                | 178 |  |  |             throw new Exception("Copying needed files (EAP-pwd) failed for at least one file!"); | 
            
                                                                        
                            
            
                                    
            
            
                | 179 |  |  |         } | 
            
                                                                        
                            
            
                                    
            
            
                | 180 |  |  |         if (!$this->translateFile('pwd.inc', 'cat.NSI', $this->codePage)) { | 
            
                                                                        
                            
            
                                    
            
            
                | 181 |  |  |             throw new Exception("Translating needed file pwd.inc failed!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 182 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 183 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 184 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 185 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 186 |  |  |      * copies GEANTlink files into temp dir for later inclusion into installers | 
            
                                                                                                            
                            
            
                                    
            
            
                | 187 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 188 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 189 |  |  |      * @throws Exception | 
            
                                                                                                            
                            
            
                                    
            
            
                | 190 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 191 |  |  |     public function copyGeantLinkFiles() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 192 |  |  |         if (!($this->copyFile('GEANTLink/GEANTLink-x86.msi', 'GEANTLink-x86.msi') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 193 |  |  |                 $this->copyFile('GEANTLink/GEANTLink-x64.msi', 'GEANTLink-x64.msi') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 194 |  |  |                 $this->copyFile('GEANTLink/GEANTLink-ARM64.msi', 'GEANTLink-ARM64.msi') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 195 |  |  |                 $this->copyFile('GEANTLink/CredWrite.exe', 'CredWrite.exe') && | 
            
                                                                                                            
                            
            
                                    
            
            
                | 196 |  |  |                 $this->copyFile('GEANTLink/MsiUseFeature.exe', 'MsiUseFeature.exe'))) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 197 |  |  |             throw new Exception("Copying needed files (GEANTLink) failed for at least one file!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 198 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 199 |  |  |         if (!$this->translateFile('geant_link.inc', 'cat.NSI', $this->codePage)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 200 |  |  |             throw new Exception("Translating needed file geant_link.inc failed!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 201 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 202 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 203 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 204 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 205 |  |  |      * function to escape double quotes in a special NSI-compatible way | 
            
                                                                                                            
                            
            
                                    
            
            
                | 206 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 207 |  |  |      * @param string $in input string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 208 |  |  |      * @return string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 209 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 210 |  |  |     public static function echo_nsi($in) { | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 211 |  |  |         echo preg_replace('/"/', '$\"', $in); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 212 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 213 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 214 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 215 |  |  |      * @param string $input input string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 216 |  |  |      * @return string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 217 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 218 |  |  |     public static function sprint_nsi($input) { | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 219 |  |  |         return preg_replace('/"/', '$\"', $input); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 220 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 221 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 222 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 223 |  |  |      * determine Windows codepage and language settings based on requested installer language | 
            
                                                                                                            
                            
            
                                    
            
            
                | 224 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 225 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 226 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 227 |  |  |     protected function prepareInstallerLang() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 228 |  |  |         if (isset($this->LANGS[$this->languageInstance->getLang()])) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 229 |  |  |             $language = $this->LANGS[$this->languageInstance->getLang()]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 230 |  |  |             $this->lang = $language['nsis']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 231 |  |  |             $this->codePage = 'cp' . $language['cp']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 232 |  |  |         } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 233 |  |  |             $this->lang = 'English'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 234 |  |  |             $this->codePage = 'cp1252'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 235 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 236 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 237 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 238 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 239 |  |  |      * creates HTML code which will be displayed when the "info" button is pressed | 
            
                                                                                                            
                            
            
                                    
            
            
                | 240 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 241 |  |  |      * @return string the HTML code | 
            
                                                                                                            
                            
            
                                    
            
            
                | 242 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 243 |  |  |     public function writeDeviceInfo() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 244 |  |  |         $ssids = $this->getAttribute('internal:SSID') ?? []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 245 |  |  |         $ssidCount = count($ssids); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 246 |  |  |         $configList = CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'] ?? []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 247 |  |  |         $configCount = count($configList); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 248 |  |  |         $out = "<p>"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 249 |  |  |         $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']); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 250 |  |  |         $out .= "<p>"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 251 |  |  |         if ($ssidCount > $configCount) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 252 |  |  |             $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:", $ssidCount - $configCount), implode(', ', $configList)) . " "; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 253 |  |  |             $out .= '<strong>' . join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)) . '</strong>'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 254 |  |  |             $out .= "<p>"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 255 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 256 |  |  | // TODO - change this below | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 257 |  |  |         if ($this->selectedEapObject->isClientCertRequired()) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 258 |  |  |             $out .= _("In order to connect to the network you will need an a personal certificate in the form of a p12 file. You should obtain this certificate from your organisation. Consult the support page to find out how this certificate can be obtained. Such certificate files are password protected. You should have both the file and the password available during the installation process."); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 259 |  |  |             return $out; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 260 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 261 |  |  |         // not EAP-TLS | 
            
                                                                                                            
                            
            
                                    
            
            
                | 262 |  |  |         $out .= _("In order to connect to the network you will need an account from your organisation. You should consult the support page to find out how this account can be obtained. It is very likely that your account is already activated."); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 263 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 264 |  |  |         if (!$this->useGeantLink && $this->selectedEap['OUTER'] == \core\common\EAP::TTLS) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 265 |  |  |             $out .= "<p>"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 266 |  |  |             $out .= _("When you are connecting to the network for the first time, Windows will pop up a login box, where you should enter your user name and password. This information will be saved so that you will reconnect to the network automatically each time you are in the range."); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 267 |  |  |             if ($ssidCount > 1) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 268 |  |  |                 $out .= "<p>"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 269 |  |  |                 $out .= _("You will be required to enter the same credentials for each of the configured networks:") . " "; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 270 |  |  |                 $out .= '<strong>' . join('</strong>, <strong>', array_keys($ssids)) . '</strong>'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 271 |  |  |             } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 272 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 273 |  |  |         return $out; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 274 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 275 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 276 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 277 |  |  |      * scales a logo to the desired size | 
            
                                                                                                            
                            
            
                                    
            
            
                | 278 |  |  |      * @param string $imagePath path to the image | 
            
                                                                                                            
                            
            
                                    
            
            
                | 279 |  |  |      * @param int    $maxSize   maximum size of output image (larger axis counts) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 280 |  |  |      * @return \IMagick IMagick image object | 
            
                                                                                                            
                            
            
                                    
            
            
                | 281 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 282 |  |  |     private function scaleLogo($imagePath, $maxSize) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 283 |  |  |         $imageObject = new \Imagick($imagePath); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 284 |  |  |         $imageSize = $imageObject->getImageGeometry(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 285 |  |  |         $imageMax = max($imageSize); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 286 |  |  |         $this->loggerInstance->debug(5, "Logo size: "); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 287 |  |  |         $this->loggerInstance->debug(5, $imageSize); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 288 |  |  |         $this->loggerInstance->debug(5, "max=$imageMax\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 289 |  |  | // resize logo if necessary | 
            
                                                                                                            
                            
            
                                    
            
            
                | 290 |  |  |         if ($imageMax > $maxSize) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 291 |  |  |             if ($imageMax == $imageSize['width']) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 292 |  |  |                 $imageObject->scaleImage($maxSize, 0); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 293 |  |  |             } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 294 |  |  |                 $imageObject->scaleImage(0, $maxSize); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 295 |  |  |             } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 296 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 297 |  |  |         $imageSize = $imageObject->getImageGeometry(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 298 |  |  |         $this->background['freeHeight'] -= $imageSize['height']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 299 |  |  |         return($imageObject); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 300 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 301 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 302 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 303 |  |  |      * combines the inst and federation logo into one image and writes to file | 
            
                                                                                                            
                            
            
                                    
            
            
                | 304 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 305 |  |  |      * @param array $logos   inst logo meta info | 
            
                                                                                                            
                            
            
                                    
            
            
                | 306 |  |  |      * @param array $fedLogo fed logo meta info | 
            
                                                                                                            
                            
            
                                    
            
            
                | 307 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 308 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 309 |  |  |     protected function combineLogo($logos = NULL, $fedLogo = NULL) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 310 |  |  |         // maximum size to which we want to resize the logos | 
            
                                                                                                            
                            
            
                                    
            
            
                | 311 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 312 |  |  |         $maxSize = 120; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 313 |  |  |         // $freeTop is set to how much vertical space we need to leave at the top | 
            
                                                                                                            
                            
            
                                    
            
            
                | 314 |  |  |         // this will depend on the design of the background | 
            
                                                                                                            
                            
            
                                    
            
            
                | 315 |  |  |         $freeTop = 70; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 316 |  |  |         // $freeBottom is set to how much vertical space we need to leave at the bottom | 
            
                                                                                                            
                            
            
                                    
            
            
                | 317 |  |  |         // this will depend on the design of the background | 
            
                                                                                                            
                            
            
                                    
            
            
                | 318 |  |  |         $freeBottom = 30; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 319 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 320 |  |  |         $bgImage = new \Imagick('cat_bg.bmp'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 321 |  |  |         $bgImage->setFormat('BMP3'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 322 |  |  |         $bgImageSize = $bgImage->getImageGeometry(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 323 |  |  |         $logosToPlace = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 324 |  |  |         $this->background = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 325 |  |  |         $this->background['freeHeight'] = $bgImageSize['height'] - $freeTop - $freeBottom; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 326 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 327 |  |  |         if ($this->getAttribute('fed:include_logo_installers') === NULL) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 328 |  |  |             $fedLogo = NULL; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 329 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 330 |  |  |         if ($fedLogo != NULL) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 331 |  |  |             $logosToPlace[] = $this->scaleLogo($fedLogo[0]['name'], $maxSize); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 332 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 333 |  |  |         if ($logos != NULL) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 334 |  |  |             $logosToPlace[] = $this->scaleLogo($logos[0]['name'], $maxSize); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 335 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 336 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 337 |  |  |         $logoCount = count($logosToPlace); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 338 |  |  |         if ($logoCount > 0) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 339 |  |  |             $voffset = $freeTop; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 340 |  |  |             $freeSpace = (int) round($this->background['freeHeight'] / ($logoCount + 1)); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 341 |  |  |             foreach ($logosToPlace as $logo) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 342 |  |  |                 $voffset += $freeSpace; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 343 |  |  |                 $logoSize = $logo->getImageGeometry(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 344 |  |  |                 $hoffset = (int) round(($bgImageSize['width'] - $logoSize['width']) / 2); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 345 |  |  |                 $bgImage->compositeImage($logo, $logo->getImageCompose(), $hoffset, $voffset); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 346 |  |  |                 $voffset += $logoSize['height']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 347 |  |  |             } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 348 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 349 |  |  | //new image is saved as the background | 
            
                                                                                                            
                            
            
                                    
            
            
                | 350 |  |  |         $bgImage->writeImage('BMP3:cat_bg.bmp'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 351 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 352 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 353 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 354 |  |  |      * adds a digital signature to the installer, and returns path to file | 
            
                                                                                                            
                            
            
                                    
            
            
                | 355 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 356 |  |  |      * @return string path to signed installer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 357 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 358 |  |  |     protected function signInstaller() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 359 |  |  |         $fileName = $this->installerBasename . '.exe'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 360 |  |  |         if (!$this->sign) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 361 |  |  |             rename("installer.exe", $fileName); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 362 |  |  |             return $fileName; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 363 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 364 |  |  |         // are actually signing | 
            
                                                                                                            
                            
            
                                    
            
            
                | 365 |  |  |         $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 366 |  |  |         if ($outputFromSigning === FALSE) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 367 |  |  |             $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 368 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 369 |  |  |         return $fileName; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 370 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 371 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 372 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 373 |  |  |      * creates one single installer .exe out of the NSH inputs and other files | 
            
                                                                                                            
                            
            
                                    
            
            
                | 374 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 375 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 376 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 377 |  |  |     protected function compileNSIS() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 378 |  |  |         if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 379 |  |  |             $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis'] . " -INPUTCHARSET UTF8"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 380 |  |  |         } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 381 |  |  |             $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 382 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 383 |  |  |         $lcAll = getenv("LC_ALL"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 384 |  |  |         putenv("LC_ALL=en_US.UTF-8"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 385 |  |  |         $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 386 |  |  |         system($command); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 387 |  |  |         putenv("LC_ALL=" . $lcAll); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 388 |  |  |         $this->loggerInstance->debug(4, "compileNSIS:$command\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 389 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 390 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 391 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 392 |  |  |      * find out where the user can get support | 
            
                                                                                                            
                            
            
                                    
            
            
                | 393 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 394 |  |  |      * @param array  $attr list of profile attributes | 
            
                                                                                                            
                            
            
                                    
            
            
                | 395 |  |  |      * @param string $type which type of support resource to we want | 
            
                                                                                                            
                            
            
                                    
            
            
                | 396 |  |  |      * @return string NSH line with the resulting !define | 
            
                                                                                                            
                            
            
                                    
            
            
                | 397 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 398 |  |  |     private function getSupport($attr, $type) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 399 |  |  |         $supportString = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 400 |  |  |             'email' => 'SUPPORT', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 401 |  |  |             'url' => 'URL', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 402 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 403 |  |  |         $s = "support_" . $type . "_substitute"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 404 |  |  |         $substitute = $this->translateString($this->$s, $this->codePage); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 405 |  |  |         $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 406 |  |  |         return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 407 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 408 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 409 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 410 |  |  |      * returns various NSH !define statements for later inclusion into master file | 
            
                                                                                                            
                            
            
                                    
            
            
                | 411 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 412 |  |  |      * @param array $attr profile attributes | 
            
                                                                                                            
                            
            
                                    
            
            
                | 413 |  |  |      * @return string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 414 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 415 |  |  |     protected function writeNsisDefines($attr) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 416 |  |  |         $fcontents = "\n" . '!define NSIS_MAJOR_VERSION ' . CONFIG_CONFASSISTANT['NSIS_VERSION']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 417 |  |  |         if ($attr['internal:profile_count'][0] > 1) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 418 |  |  |             $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 419 |  |  | '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 420 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 421 |  |  |         $fcontents .= ' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 422 |  |  | Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 423 |  |  | !define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 424 |  |  | !define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 425 |  |  | !define INSTALLER_NAME "installer.exe" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 426 |  |  | !define LANG "' . $this->lang . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 427 |  |  | !define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']) . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 428 |  |  | ;-------------------------------- | 
            
                                                                                                            
                            
            
                                    
            
            
                | 429 |  |  | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 430 |  |  | '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 431 |  |  |         $fcontents .= $this->getSupport($attr, 'email'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 432 |  |  |         $fcontents .= $this->getSupport($attr, 'url'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 433 |  |  |         if (\core\common\Entity::getAttributeValue($attr, 'media:wired', 0) == 'on') { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 434 |  |  |             $fcontents .= '!define WIRED | 
            
                                                                                                            
                            
            
                                    
            
            
                | 435 |  |  |         '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 436 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 437 |  |  |         $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 438 |  |  | '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 439 |  |  |         if (!empty($attr['internal:realm'][0])) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 440 |  |  |             $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 441 |  |  | '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 442 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 443 |  |  |         if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 444 |  |  |             $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 445 |  |  | '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 446 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 447 |  |  |         if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 448 |  |  |             $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" | 
            
                                                                                                            
                            
            
                                    
            
            
                | 449 |  |  | '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 450 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 451 |  |  |         $fcontents .= $this->msInfoFile($attr); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 452 |  |  |         return $fcontents; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 453 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 454 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 455 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 456 |  |  |      * includes NSH commands displaying terms of use file into installer, if any | 
            
                                                                                                            
                            
            
                                    
            
            
                | 457 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 458 |  |  |      * @param array $attr profile attributes | 
            
                                                                                                            
                            
            
                                    
            
            
                | 459 |  |  |      * @return string NSH commands | 
            
                                                                                                            
                            
            
                                    
            
            
                | 460 |  |  |      * @throws Exception | 
            
                                                                                                            
                            
            
                                    
            
            
                | 461 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 462 |  |  |     protected function msInfoFile($attr) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 463 |  |  |         $out = ''; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 464 |  |  |         if (isset($attr['support:info_file'])) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 465 |  |  |             $out .= '!define EXTERNAL_INFO "'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 466 |  |  | //  $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 467 |  |  |             if ($attr['internal:info_file'][0]['mime'] == 'rtf') { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 468 |  |  |                 $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 469 |  |  |             } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 470 |  |  |                 $infoFile = file_get_contents($attr['internal:info_file'][0]['name']); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 471 |  |  |                 if ($infoFile === FALSE) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 472 |  |  |                     throw new Exception("We were told this file exists. Failing to read it is not really possible."); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 473 |  |  |                 } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 474 |  |  |                 if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 475 |  |  |                     $infoFileConverted = $infoFile; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 476 |  |  |                 } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 477 |  |  |                     $infoFileConverted = iconv('UTF-8', $this->codePage . '//TRANSLIT', $infoFile); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 478 |  |  |                 } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 479 |  |  |                 if ($infoFileConverted !== FALSE && strlen($infoFileConverted) > 0) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 480 |  |  |                     file_put_contents('info_f.txt', $infoFileConverted); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 481 |  |  |                     $out = '!define LICENSE_FILE " info_f.txt'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 482 |  |  |                 } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 483 |  |  |             } else { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 484 |  |  |                 $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 485 |  |  |             } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 486 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 487 |  |  |             $out .= "\"\n"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 488 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 489 |  |  |         $this->loggerInstance->debug(4, "Info file returned: $out"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 490 |  |  |         return $out; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 491 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 492 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 493 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 494 |  |  |      * writes commands to delete SSIDs, if any, into a file | 
            
                                                                                                            
                            
            
                                    
            
            
                | 495 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 496 |  |  |      * @param array $profiles WLAN profiles to delete | 
            
                                                                                                            
                            
            
                                    
            
            
                | 497 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 498 |  |  |      * @throws Exception | 
            
                                                                                                            
                            
            
                                    
            
            
                | 499 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 500 |  |  |     protected function writeAdditionalDeletes($profiles) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 501 |  |  |         if (count($profiles) == 0) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 502 |  |  |             return; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 503 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 504 |  |  |         $fileHandle = fopen('profiles.nsh', 'a'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 505 |  |  |         if ($fileHandle === FALSE) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 506 |  |  |             throw new Exception("Unable to open possibly pre-existing profiles.nsh to append additional deletes."); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 507 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 508 |  |  |         fwrite($fileHandle, "!define AdditionalDeletes\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 509 |  |  |         foreach ($profiles as $profile) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 510 |  |  |             fwrite($fileHandle, "!insertmacro define_delete_profile \"$profile\"\n"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 511 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 512 |  |  |         fclose($fileHandle); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 513 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 514 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 515 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 516 |  |  |      * writes client certificate into file | 
            
                                                                                                            
                            
            
                                    
            
            
                | 517 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 518 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 519 |  |  |      * @throws Exception | 
            
                                                                                                            
                            
            
                                    
            
            
                | 520 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 521 |  |  |     protected function writeClientP12File() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 522 |  |  |         if (!is_array($this->clientCert)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 523 |  |  |             throw new Exception("the client block was called but there is no client certificate!"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 524 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 525 |  |  |         file_put_contents('SB_cert.p12', $this->clientCert["certdata"]); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 526 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 527 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 528 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 529 |  |  |      * nothing special to be done here | 
            
                                                                                                            
                            
            
                                    
            
            
                | 530 |  |  |      *  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 531 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 532 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 533 |  |  |     protected function writeTlsUserProfile() { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 534 |  |  |          | 
            
                                                                                                            
                            
            
                                    
            
            
                | 535 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 536 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 537 |  |  |     public $LANGS = [ | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 538 |  |  |         'fr' => ['nsis' => "French", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 539 |  |  |         'de' => ['nsis' => "German", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 540 |  |  |         'es' => ['nsis' => "SpanishInternational", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 541 |  |  |         'it' => ['nsis' => "Italian", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 542 |  |  |         'nl' => ['nsis' => "Dutch", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 543 |  |  |         'sv' => ['nsis' => "Swedish", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 544 |  |  |         'fi' => ['nsis' => "Finnish", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 545 |  |  |         'pl' => ['nsis' => "Polish", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 546 |  |  |         'ca' => ['nsis' => "Catalan", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 547 |  |  |         'sr' => ['nsis' => "SerbianLatin", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 548 |  |  |         'hr' => ['nsis' => "Croatian", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 549 |  |  |         'sl' => ['nsis' => "Slovenian", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 550 |  |  |         'da' => ['nsis' => "Danish", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 551 |  |  |         'nb' => ['nsis' => "Norwegian", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 552 |  |  |         'nn' => ['nsis' => "NorwegianNynorsk", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 553 |  |  |         'el' => ['nsis' => "Greek", 'cp' => '1253'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 554 |  |  |         'ru' => ['nsis' => "Russian", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 555 |  |  |         'pt' => ['nsis' => "Portuguese", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 556 |  |  |         'uk' => ['nsis' => "Ukrainian", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 557 |  |  |         'cs' => ['nsis' => "Czech", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 558 |  |  |         'sk' => ['nsis' => "Slovak", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 559 |  |  |         'bg' => ['nsis' => "Bulgarian", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 560 |  |  |         'hu' => ['nsis' => "Hungarian", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 561 |  |  |         'ro' => ['nsis' => "Romanian", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 562 |  |  |         'lv' => ['nsis' => "Latvian", 'cp' => '1257'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 563 |  |  |         'mk' => ['nsis' => "Macedonian", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 564 |  |  |         'et' => ['nsis' => "Estonian", 'cp' => '1257'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 565 |  |  |         'tr' => ['nsis' => "Turkish", 'cp' => '1254'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 566 |  |  |         'lt' => ['nsis' => "Lithuanian", 'cp' => '1257'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 567 |  |  |         'ar' => ['nsis' => "Arabic", 'cp' => '1256'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 568 |  |  |         'he' => ['nsis' => "Hebrew", 'cp' => '1255'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 569 |  |  |         'id' => ['nsis' => "Indonesian", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 570 |  |  |         'mn' => ['nsis' => "Mongolian", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 571 |  |  |         'sq' => ['nsis' => "Albanian", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 572 |  |  |         'br' => ['nsis' => "Breton", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 573 |  |  |         'be' => ['nsis' => "Belarusian", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 574 |  |  |         'is' => ['nsis' => "Icelandic", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 575 |  |  |         'ms' => ['nsis' => "Malay", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 576 |  |  |         'bs' => ['nsis' => "Bosnian", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 577 |  |  |         'ga' => ['nsis' => "Irish", 'cp' => '1250'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 578 |  |  |         'uz' => ['nsis' => "Uzbek", 'cp' => '1251'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 579 |  |  |         'gl' => ['nsis' => "Galician", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 580 |  |  |         'af' => ['nsis' => "Afrikaans", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 581 |  |  |         'ast' => ['nsis' => "Asturian", 'cp' => '1252'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 582 |  |  |     ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 583 |  |  |     public $codePage; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 584 |  |  |     public $lang; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 585 |  |  |     public $useGeantLink = FALSE; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 586 |  |  |     private $background; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 587 |  |  |  | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 588 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 589 |  |  |  |