Skip to content

Commit e7dc295

Browse files
author
Yoshinari Takaoka
committed
added chm update scripts for AWS envirionment and Windows Server 2016.
git-svn-id: https://svn.php.net/repository/phpdoc/doc-base/trunk@352269 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 19f991a commit e7dc295

4 files changed

+169
-142
lines changed

build.chms.bat

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
@ECHO OFF
22

3-
SET PHP_DOC_BASE_DIR=%~dp0
4-
5-
CALL svn update scripts/build-chms-config.php > nul
6-
CALL svn update scripts/build-chms.php > nul
7-
CALL "E:\software\php\php.exe" -d memory_limit=-1 "%PHP_DOC_BASE_DIR%\scripts\build-chms.php" %*
3+
CALL "php.exe" -d memory_limit=-1 "C:\phpdoc\doc-base\scripts\build-chms.php" %*
4+
CALL "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "C:\Dropbox\Dropbox\Public\chm" > C:\Log.txt
5+
if "%ERRORLEVEL%" == "0" (
6+
echo "no chm malware detected" >> C:\Log.txt
7+
CALL aws s3 sync "C:\Dropbox\Dropbox\Public\chm" s3://phpmanualchm/
8+
)
9+
CALL "C:\Windows\System32\shutdown.exe" -s -t 120 -f -c "force shutdown after building chm"

build.setup_phpdoc_dir.bat

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cd "C:\"
2+
mkdir phpdoc
3+
cd phpdoc
4+
mkdir logs
5+
svn checkout https://svn.php.net/repository/phpdoc/doc-base/trunk doc-base
6+
svn checkout https://svn.php.net/repository/phpdoc/en/trunk en
7+
svn checkout https://svn.php.net/repository/phpdoc/de/trunk de
8+
svn checkout https://svn.php.net/repository/phpdoc/es/trunk es
9+
svn checkout https://svn.php.net/repository/phpdoc/fr/trunk fr
10+
svn checkout https://svn.php.net/repository/phpdoc/it/trunk it
11+
svn checkout https://svn.php.net/repository/phpdoc/ja/trunk ja
12+
svn checkout https://svn.php.net/repository/phpdoc/pt_BR/trunk pt_BR
13+
svn checkout https://svn.php.net/repository/phpdoc/ro/trunk ro
14+
svn checkout https://svn.php.net/repository/phpdoc/ru/trunk ru
15+
svn checkout https://svn.php.net/repository/phpdoc/tr/trunk tr
16+
svn checkout https://svn.php.net/repository/phpdoc/kr/trunk kr
17+
svn checkout https://svn.php.net/repository/phpdoc/zh/trunk zh
18+
19+
mkdir "C:\Dropbox\Dropbox\Public\chm"
20+
mkdir "C:\Software\"

build.update_phd.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cd C:\Software\phd
2+
git pull
3+
call "C:\Software\PHP7.2.6\pear.bat" uninstall doc.php.net/PhD doc.php.net/PhD_Generic doc.php.net/PhD_PHP
4+
call "C:\Software\PHP7.2.6\pear.bat" install "C:\Software\phd\package.xml" "C:\Software\phd\package_generic.xml" "C:\Software\phd\package_php.xml"

scripts/build-chms-config.php

+138-137
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,138 @@
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

Comments
 (0)