|
1 |
| -<?php |
2 |
| - /** |
3 |
| - * +----------------------------------------------------------------------+ |
4 |
| - * | PHP Version 5 | |
5 |
| - * +----------------------------------------------------------------------+ |
6 |
| - * | Copyright (c) 1997-2013 The PHP Group | |
7 |
| - * +----------------------------------------------------------------------+ |
8 |
| - * | This source file is subject to version 3.01 of the PHP license, | |
9 |
| - * | that is bundled with this package in the file LICENSE, and is | |
10 |
| - * | available through the world-wide-web at the following url: | |
11 |
| - * | http://www.php.net/license/3_01.txt. | |
12 |
| - * | If you did not receive a copy of the PHP license and are unable to | |
13 |
| - * | obtain it through the world-wide-web, please send a note to | |
14 |
| - * | [email protected] so we can mail you a copy immediately. | |
15 |
| - * +----------------------------------------------------------------------+ |
16 |
| - * | Authors: Kalle Sommer Nielsen <[email protected]> | |
17 |
| - * +----------------------------------------------------------------------+ |
18 |
| - * |
19 |
| - * $Id: build-chms.php 329603 2013-02-28 19:55:56Z kalle $ |
20 |
| - */ |
21 |
| - |
22 |
| - |
23 |
| - /** |
24 |
| - * Configuration |
25 |
| - * |
26 |
| - * Extended - Generates the 'enhancedchm' version along the regular ones |
27 |
| - * Debug - If enabled, output directories are not pruned |
28 |
| - * PhD Beta - If enabled, then PhD is treated as an svn checkout rather than a pear package |
29 |
| - */ |
30 |
| - define('PATH_PHP', 'E:\software\php\php.exe'); |
31 |
| - define('PATH_WGET', 'E:\servicesfiles\path\wget.exe'); |
32 |
| - define('PATH_CHM', 'E:\www\hosted\php.tuxxedo.net\www\chm'); |
33 |
| - define('PATH_LOG', 'E:\www\hosted\php.tuxxedo.net\www\chm\logs'); |
34 |
| - define('PATH_DOC', 'E:\chm\doc-all'); |
35 |
| - define('PATH_SVN', 'E:\chm\software\SlikSVN\bin\svn.exe'); |
36 |
| - define('PATH_HHC', 'E:\chm\software\HTML Help Workshop\hhc.exe'); |
37 |
| - define('PATH_PHD', 'E:\chm\software\phd\phd.bat'); |
38 |
| - // Tools to build multibyte search enabled chm |
39 |
| - define('PATH_DBCSFIX', 'C:\Program Files (x86)\Sandcastle\ProductionTools\DBCSFix.exe'); |
40 |
| - define('PATH_APPLOCALE','C:\Program Files (x86)\Sandcastle\ProductionTools\SBAppLocale.exe'); |
41 |
| - |
42 |
| - /** |
43 |
| - * Only if PHD_BETA is set to on (Tuxxedo does not have Pear installed) |
44 |
| - */ |
45 |
| - define('PATH_PEAR', ''); |
46 |
| - |
47 |
| - define('EXTENDED', true); |
48 |
| - define('DEBUG', true); |
49 |
| - define('PHD_BETA', false); |
50 |
| - define('MULTIBYTE_SEARCH', true); |
51 |
| - |
52 |
| - /** |
53 |
| - * Fallback to a set of known languages in the event of a failure to retrieve online list. |
54 |
| - */ |
55 |
| - $ACTIVE_ONLINE_LANGUAGES = Array( |
56 |
| - 'en' => 'English', |
57 |
| - 'de' => 'German', |
58 |
| - 'es' => 'Spanish', |
59 |
| - 'fr' => 'French', |
60 |
| - 'it' => 'Italian', |
61 |
| - 'ja' => 'Japanese', |
62 |
| - 'pt_BR' => 'Brazilian Portuguese', |
63 |
| - 'ro' => 'Romanian', |
64 |
| - 'ru' => 'Russian', |
65 |
| - 'tr' => 'Turkish', |
66 |
| - 'zh' => 'Chinese (Simplified)', |
67 |
| - ); |
68 |
| - |
69 |
| - |
70 |
| - /** |
71 |
| - * CHM full text search does not work without compiling |
72 |
| - * with Windows Language Code Identifier(LCID). |
73 |
| - * |
74 |
| - * http://msdn.microsoft.com/en-us/library/cc233965.aspx |
75 |
| - * http://msdn.microsoft.com/ja-jp/library/cc392381.aspx |
76 |
| - */ |
77 |
| - $CHM_FULLTEXT_SEARCH_LCID = array( |
78 |
| - 'en' => 1033, |
79 |
| - 'ar' => 14337, |
80 |
| - 'bg' => 1026, |
81 |
| - 'pt_BR' => 1046, |
82 |
| - 'zh' => 2052, |
83 |
| - 'hk' => 3076, |
84 |
| - 'tw' => 1028, |
85 |
| - 'ca' => 1027, |
86 |
| - 'cs' => 1029, |
87 |
| - 'da' => 1030, |
88 |
| - 'nl' => 1043, |
89 |
| - 'fi' => 1035, |
90 |
| - 'fr' => 1036, |
91 |
| - 'de' => 1031, |
92 |
| - 'el' => 1032, |
93 |
| - 'he' => 1037, |
94 |
| - 'hu' => 1038, |
95 |
| - 'id' => 1057, |
96 |
| - 'it' => 1040, |
97 |
| - 'ja' => 1041, |
98 |
| - 'kr' => 1042, |
99 |
| - 'lt' => 1063, |
100 |
| - 'no' => 1044, |
101 |
| - 'pl' => 1045, |
102 |
| - 'pt' => 2070, |
103 |
| - 'ro' => 1048, |
104 |
| - 'ru' => 1049, |
105 |
| - 'fa' => 1065, |
106 |
| - 'sr' => 3098, |
107 |
| - 'sk' => 1051, |
108 |
| - 'sl' => 1060, |
109 |
| - 'es' => 1034, |
110 |
| - 'sv' => 1053, |
111 |
| - 'tr' => 1055, |
112 |
| - ); |
113 |
| - |
114 |
| - /** |
115 |
| - * Helper function for execution a program (used by build-chm-history.php too) |
116 |
| - * |
117 |
| - * @param string Path to the program to execute |
118 |
| - * @param string (optional) Parameters to pass the this call |
119 |
| - * @param string (optional) Log output to a specific file defined here |
120 |
| - * @return void No value is returned |
121 |
| - */ |
122 |
| - function execute_task($title, $program, $parameters, $log) |
123 |
| - { |
124 |
| - echo(date('r') . ' ' . $title . '...' . PHP_EOL); |
125 |
| - |
126 |
| - if(empty($program)) |
127 |
| - { |
128 |
| - return; |
129 |
| - } |
130 |
| - |
131 |
| - $cmd = sprintf('"%s"%s%s', $program, (!$parameters ?: ' ' . $parameters), (!$log ? '' : ' > ' . PATH_LOG . '\\' . $log . '.log 2<&1')); |
132 |
| - |
133 |
| - echo $cmd; |
134 |
| - |
135 |
| - @popen($cmd, 'r'); |
136 |
| - } |
137 |
| -?> |
| 1 | +<?php |
| 2 | + /** |
| 3 | + * +----------------------------------------------------------------------+ |
| 4 | + * | PHP Version 5 | |
| 5 | + * +----------------------------------------------------------------------+ |
| 6 | + * | Copyright (c) 1997-2013 The PHP Group | |
| 7 | + * +----------------------------------------------------------------------+ |
| 8 | + * | This source file is subject to version 3.01 of the PHP license, | |
| 9 | + * | that is bundled with this package in the file LICENSE, and is | |
| 10 | + * | available through the world-wide-web at the following url: | |
| 11 | + * | http://www.php.net/license/3_01.txt. | |
| 12 | + * | If you did not receive a copy of the PHP license and are unable to | |
| 13 | + * | obtain it through the world-wide-web, please send a note to | |
| 14 | + * | [email protected] so we can mail you a copy immediately. | |
| 15 | + * +----------------------------------------------------------------------+ |
| 16 | + * | Authors: Kalle Sommer Nielsen <[email protected]> | |
| 17 | + * +----------------------------------------------------------------------+ |
| 18 | + * |
| 19 | + * $Id: build-chms.php 329603 2013-02-28 19:55:56Z kalle $ |
| 20 | + */ |
| 21 | + |
| 22 | + |
| 23 | + /** |
| 24 | + * Configuration |
| 25 | + * |
| 26 | + * Extended - Generates the 'enhancedchm' version along the regular ones |
| 27 | + * Debug - If enabled, output directories are not pruned |
| 28 | + * PhD Beta - If enabled, then PhD is treated as an svn checkout rather than a pear package |
| 29 | + */ |
| 30 | + define('PATH_PHP', 'C:\Software\PHP7.2.6\php.exe'); |
| 31 | + define('PATH_WGET', 'C:\Software\wget\bin\wget.exe'); |
| 32 | + define('PATH_CHM', 'C:\Dropbox\Dropbox\Public\chm'); |
| 33 | + define('PATH_LOG', 'C:\phpdoc\logs'); |
| 34 | + define('PATH_DOC', 'C:\phpdoc'); |
| 35 | + define('PATH_SVN', 'C:\Software\Subversion Client\svn.exe'); |
| 36 | + define('PATH_HHC', 'C:\Program Files (x86)\HTML Help Workshop\hhc.exe'); |
| 37 | + define('PATH_PHD', 'C:\Software\PHP7.2.6\phd.bat'); |
| 38 | + // Tools to build multibyte search enabled chm |
| 39 | + define('PATH_DBCSFIX', 'C:\Program Files (x86)\Sandcastle\ProductionTools\DBCSFix.exe'); |
| 40 | + define('PATH_APPLOCALE','C:\Program Files (x86)\Sandcastle\ProductionTools\SBAppLocale.exe'); |
| 41 | + |
| 42 | + /** |
| 43 | + * Only if PHD_BETA is set to on (Tuxxedo does not have Pear installed) |
| 44 | + */ |
| 45 | + define('PATH_PEAR', ''); |
| 46 | + |
| 47 | + define('EXTENDED', true); |
| 48 | + define('DEBUG', true); |
| 49 | + define('PHD_BETA', false); |
| 50 | + define('MULTIBYTE_SEARCH', true); |
| 51 | + |
| 52 | + /** |
| 53 | + * Fallback to a set of known languages in the event of a failure to retrieve online list. |
| 54 | + */ |
| 55 | + $ACTIVE_ONLINE_LANGUAGES = Array( |
| 56 | + 'en' => 'English', |
| 57 | + 'de' => 'German', |
| 58 | + 'es' => 'Spanish', |
| 59 | + 'fr' => 'French', |
| 60 | + 'it' => 'Italian', |
| 61 | + 'ja' => 'Japanese', |
| 62 | + 'pt_BR' => 'Brazilian Portuguese', |
| 63 | + 'ro' => 'Romanian', |
| 64 | + 'ru' => 'Russian', |
| 65 | + 'tr' => 'Turkish', |
| 66 | + 'kr' => 'Korean', |
| 67 | + 'zh' => 'Chinese (Simplified)', |
| 68 | + ); |
| 69 | + |
| 70 | + |
| 71 | + /** |
| 72 | + * CHM full text search does not work without compiling |
| 73 | + * with Windows Language Code Identifier(LCID). |
| 74 | + * |
| 75 | + * http://msdn.microsoft.com/en-us/library/cc233965.aspx |
| 76 | + * http://msdn.microsoft.com/ja-jp/library/cc392381.aspx |
| 77 | + */ |
| 78 | + $CHM_FULLTEXT_SEARCH_LCID = array( |
| 79 | + 'en' => 1033, |
| 80 | + 'ar' => 14337, |
| 81 | + 'bg' => 1026, |
| 82 | + 'pt_BR' => 1046, |
| 83 | + 'zh' => 2052, |
| 84 | + 'hk' => 3076, |
| 85 | + 'tw' => 1028, |
| 86 | + 'ca' => 1027, |
| 87 | + 'cs' => 1029, |
| 88 | + 'da' => 1030, |
| 89 | + 'nl' => 1043, |
| 90 | + 'fi' => 1035, |
| 91 | + 'fr' => 1036, |
| 92 | + 'de' => 1031, |
| 93 | + 'el' => 1032, |
| 94 | + 'he' => 1037, |
| 95 | + 'hu' => 1038, |
| 96 | + 'id' => 1057, |
| 97 | + 'it' => 1040, |
| 98 | + 'ja' => 1041, |
| 99 | + 'kr' => 1042, |
| 100 | + 'lt' => 1063, |
| 101 | + 'no' => 1044, |
| 102 | + 'pl' => 1045, |
| 103 | + 'pt' => 2070, |
| 104 | + 'ro' => 1048, |
| 105 | + 'ru' => 1049, |
| 106 | + 'fa' => 1065, |
| 107 | + 'sr' => 3098, |
| 108 | + 'sk' => 1051, |
| 109 | + 'sl' => 1060, |
| 110 | + 'es' => 1034, |
| 111 | + 'sv' => 1053, |
| 112 | + 'tr' => 1055, |
| 113 | + ); |
| 114 | + |
| 115 | + /** |
| 116 | + * Helper function for execution a program (used by build-chm-history.php too) |
| 117 | + * |
| 118 | + * @param string Path to the program to execute |
| 119 | + * @param string (optional) Parameters to pass the this call |
| 120 | + * @param string (optional) Log output to a specific file defined here |
| 121 | + * @return void No value is returned |
| 122 | + */ |
| 123 | + function execute_task($title, $program, $parameters, $log) |
| 124 | + { |
| 125 | + echo(date('r') . ' ' . $title . '...' . PHP_EOL); |
| 126 | + |
| 127 | + if(empty($program)) |
| 128 | + { |
| 129 | + return; |
| 130 | + } |
| 131 | + |
| 132 | + $cmd = sprintf('"%s"%s%s', $program, (!$parameters ?: ' ' . $parameters), (!$log ? '' : ' > ' . PATH_LOG . '\\' . $log . '.log 2<&1')); |
| 133 | + |
| 134 | + echo $cmd; |
| 135 | + |
| 136 | + @popen($cmd, 'r'); |
| 137 | + } |
| 138 | +?> |
0 commit comments