mirror of
https://github.com/php/doc-base.git
synced 2026-03-23 23:02:13 +01:00
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
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET PHP_DOC_BASE_DIR=%~dp0
|
||||
|
||||
CALL svn update scripts/build-chms-config.php > nul
|
||||
CALL svn update scripts/build-chms.php > nul
|
||||
CALL "E:\software\php\php.exe" -d memory_limit=-1 "%PHP_DOC_BASE_DIR%\scripts\build-chms.php" %*
|
||||
CALL "php.exe" -d memory_limit=-1 "C:\phpdoc\doc-base\scripts\build-chms.php" %*
|
||||
CALL "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "C:\Dropbox\Dropbox\Public\chm" > C:\Log.txt
|
||||
if "%ERRORLEVEL%" == "0" (
|
||||
echo "no chm malware detected" >> C:\Log.txt
|
||||
CALL aws s3 sync "C:\Dropbox\Dropbox\Public\chm" s3://phpmanualchm/
|
||||
)
|
||||
CALL "C:\Windows\System32\shutdown.exe" -s -t 120 -f -c "force shutdown after building chm"
|
||||
|
||||
20
build.setup_phpdoc_dir.bat
Normal file
20
build.setup_phpdoc_dir.bat
Normal file
@@ -0,0 +1,20 @@
|
||||
cd "C:\"
|
||||
mkdir phpdoc
|
||||
cd phpdoc
|
||||
mkdir logs
|
||||
svn checkout https://svn.php.net/repository/phpdoc/doc-base/trunk doc-base
|
||||
svn checkout https://svn.php.net/repository/phpdoc/en/trunk en
|
||||
svn checkout https://svn.php.net/repository/phpdoc/de/trunk de
|
||||
svn checkout https://svn.php.net/repository/phpdoc/es/trunk es
|
||||
svn checkout https://svn.php.net/repository/phpdoc/fr/trunk fr
|
||||
svn checkout https://svn.php.net/repository/phpdoc/it/trunk it
|
||||
svn checkout https://svn.php.net/repository/phpdoc/ja/trunk ja
|
||||
svn checkout https://svn.php.net/repository/phpdoc/pt_BR/trunk pt_BR
|
||||
svn checkout https://svn.php.net/repository/phpdoc/ro/trunk ro
|
||||
svn checkout https://svn.php.net/repository/phpdoc/ru/trunk ru
|
||||
svn checkout https://svn.php.net/repository/phpdoc/tr/trunk tr
|
||||
svn checkout https://svn.php.net/repository/phpdoc/kr/trunk kr
|
||||
svn checkout https://svn.php.net/repository/phpdoc/zh/trunk zh
|
||||
|
||||
mkdir "C:\Dropbox\Dropbox\Public\chm"
|
||||
mkdir "C:\Software\"
|
||||
4
build.update_phd.bat
Normal file
4
build.update_phd.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
cd C:\Software\phd
|
||||
git pull
|
||||
call "C:\Software\PHP7.2.6\pear.bat" uninstall doc.php.net/PhD doc.php.net/PhD_Generic doc.php.net/PhD_PHP
|
||||
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"
|
||||
@@ -1,137 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* +----------------------------------------------------------------------+
|
||||
* | PHP Version 5 |
|
||||
* +----------------------------------------------------------------------+
|
||||
* | Copyright (c) 1997-2013 The PHP Group |
|
||||
* +----------------------------------------------------------------------+
|
||||
* | This source file is subject to version 3.01 of the PHP license, |
|
||||
* | that is bundled with this package in the file LICENSE, and is |
|
||||
* | available through the world-wide-web at the following url: |
|
||||
* | http://www.php.net/license/3_01.txt. |
|
||||
* | If you did not receive a copy of the PHP license and are unable to |
|
||||
* | obtain it through the world-wide-web, please send a note to |
|
||||
* | license@php.net so we can mail you a copy immediately. |
|
||||
* +----------------------------------------------------------------------+
|
||||
* | Authors: Kalle Sommer Nielsen <kalle@php.net> |
|
||||
* +----------------------------------------------------------------------+
|
||||
*
|
||||
* $Id: build-chms.php 329603 2013-02-28 19:55:56Z kalle $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Configuration
|
||||
*
|
||||
* Extended - Generates the 'enhancedchm' version along the regular ones
|
||||
* Debug - If enabled, output directories are not pruned
|
||||
* PhD Beta - If enabled, then PhD is treated as an svn checkout rather than a pear package
|
||||
*/
|
||||
define('PATH_PHP', 'E:\software\php\php.exe');
|
||||
define('PATH_WGET', 'E:\servicesfiles\path\wget.exe');
|
||||
define('PATH_CHM', 'E:\www\hosted\php.tuxxedo.net\www\chm');
|
||||
define('PATH_LOG', 'E:\www\hosted\php.tuxxedo.net\www\chm\logs');
|
||||
define('PATH_DOC', 'E:\chm\doc-all');
|
||||
define('PATH_SVN', 'E:\chm\software\SlikSVN\bin\svn.exe');
|
||||
define('PATH_HHC', 'E:\chm\software\HTML Help Workshop\hhc.exe');
|
||||
define('PATH_PHD', 'E:\chm\software\phd\phd.bat');
|
||||
// Tools to build multibyte search enabled chm
|
||||
define('PATH_DBCSFIX', 'C:\Program Files (x86)\Sandcastle\ProductionTools\DBCSFix.exe');
|
||||
define('PATH_APPLOCALE','C:\Program Files (x86)\Sandcastle\ProductionTools\SBAppLocale.exe');
|
||||
|
||||
/**
|
||||
* Only if PHD_BETA is set to on (Tuxxedo does not have Pear installed)
|
||||
*/
|
||||
define('PATH_PEAR', '');
|
||||
|
||||
define('EXTENDED', true);
|
||||
define('DEBUG', true);
|
||||
define('PHD_BETA', false);
|
||||
define('MULTIBYTE_SEARCH', true);
|
||||
|
||||
/**
|
||||
* Fallback to a set of known languages in the event of a failure to retrieve online list.
|
||||
*/
|
||||
$ACTIVE_ONLINE_LANGUAGES = Array(
|
||||
'en' => 'English',
|
||||
'de' => 'German',
|
||||
'es' => 'Spanish',
|
||||
'fr' => 'French',
|
||||
'it' => 'Italian',
|
||||
'ja' => 'Japanese',
|
||||
'pt_BR' => 'Brazilian Portuguese',
|
||||
'ro' => 'Romanian',
|
||||
'ru' => 'Russian',
|
||||
'tr' => 'Turkish',
|
||||
'zh' => 'Chinese (Simplified)',
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* CHM full text search does not work without compiling
|
||||
* with Windows Language Code Identifier(LCID).
|
||||
*
|
||||
* http://msdn.microsoft.com/en-us/library/cc233965.aspx
|
||||
* http://msdn.microsoft.com/ja-jp/library/cc392381.aspx
|
||||
*/
|
||||
$CHM_FULLTEXT_SEARCH_LCID = array(
|
||||
'en' => 1033,
|
||||
'ar' => 14337,
|
||||
'bg' => 1026,
|
||||
'pt_BR' => 1046,
|
||||
'zh' => 2052,
|
||||
'hk' => 3076,
|
||||
'tw' => 1028,
|
||||
'ca' => 1027,
|
||||
'cs' => 1029,
|
||||
'da' => 1030,
|
||||
'nl' => 1043,
|
||||
'fi' => 1035,
|
||||
'fr' => 1036,
|
||||
'de' => 1031,
|
||||
'el' => 1032,
|
||||
'he' => 1037,
|
||||
'hu' => 1038,
|
||||
'id' => 1057,
|
||||
'it' => 1040,
|
||||
'ja' => 1041,
|
||||
'kr' => 1042,
|
||||
'lt' => 1063,
|
||||
'no' => 1044,
|
||||
'pl' => 1045,
|
||||
'pt' => 2070,
|
||||
'ro' => 1048,
|
||||
'ru' => 1049,
|
||||
'fa' => 1065,
|
||||
'sr' => 3098,
|
||||
'sk' => 1051,
|
||||
'sl' => 1060,
|
||||
'es' => 1034,
|
||||
'sv' => 1053,
|
||||
'tr' => 1055,
|
||||
);
|
||||
|
||||
/**
|
||||
* Helper function for execution a program (used by build-chm-history.php too)
|
||||
*
|
||||
* @param string Path to the program to execute
|
||||
* @param string (optional) Parameters to pass the this call
|
||||
* @param string (optional) Log output to a specific file defined here
|
||||
* @return void No value is returned
|
||||
*/
|
||||
function execute_task($title, $program, $parameters, $log)
|
||||
{
|
||||
echo(date('r') . ' ' . $title . '...' . PHP_EOL);
|
||||
|
||||
if(empty($program))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$cmd = sprintf('"%s"%s%s', $program, (!$parameters ?: ' ' . $parameters), (!$log ? '' : ' > ' . PATH_LOG . '\\' . $log . '.log 2<&1'));
|
||||
|
||||
echo $cmd;
|
||||
|
||||
@popen($cmd, 'r');
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* +----------------------------------------------------------------------+
|
||||
* | PHP Version 5 |
|
||||
* +----------------------------------------------------------------------+
|
||||
* | Copyright (c) 1997-2013 The PHP Group |
|
||||
* +----------------------------------------------------------------------+
|
||||
* | This source file is subject to version 3.01 of the PHP license, |
|
||||
* | that is bundled with this package in the file LICENSE, and is |
|
||||
* | available through the world-wide-web at the following url: |
|
||||
* | http://www.php.net/license/3_01.txt. |
|
||||
* | If you did not receive a copy of the PHP license and are unable to |
|
||||
* | obtain it through the world-wide-web, please send a note to |
|
||||
* | license@php.net so we can mail you a copy immediately. |
|
||||
* +----------------------------------------------------------------------+
|
||||
* | Authors: Kalle Sommer Nielsen <kalle@php.net> |
|
||||
* +----------------------------------------------------------------------+
|
||||
*
|
||||
* $Id: build-chms.php 329603 2013-02-28 19:55:56Z kalle $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Configuration
|
||||
*
|
||||
* Extended - Generates the 'enhancedchm' version along the regular ones
|
||||
* Debug - If enabled, output directories are not pruned
|
||||
* PhD Beta - If enabled, then PhD is treated as an svn checkout rather than a pear package
|
||||
*/
|
||||
define('PATH_PHP', 'C:\Software\PHP7.2.6\php.exe');
|
||||
define('PATH_WGET', 'C:\Software\wget\bin\wget.exe');
|
||||
define('PATH_CHM', 'C:\Dropbox\Dropbox\Public\chm');
|
||||
define('PATH_LOG', 'C:\phpdoc\logs');
|
||||
define('PATH_DOC', 'C:\phpdoc');
|
||||
define('PATH_SVN', 'C:\Software\Subversion Client\svn.exe');
|
||||
define('PATH_HHC', 'C:\Program Files (x86)\HTML Help Workshop\hhc.exe');
|
||||
define('PATH_PHD', 'C:\Software\PHP7.2.6\phd.bat');
|
||||
// Tools to build multibyte search enabled chm
|
||||
define('PATH_DBCSFIX', 'C:\Program Files (x86)\Sandcastle\ProductionTools\DBCSFix.exe');
|
||||
define('PATH_APPLOCALE','C:\Program Files (x86)\Sandcastle\ProductionTools\SBAppLocale.exe');
|
||||
|
||||
/**
|
||||
* Only if PHD_BETA is set to on (Tuxxedo does not have Pear installed)
|
||||
*/
|
||||
define('PATH_PEAR', '');
|
||||
|
||||
define('EXTENDED', true);
|
||||
define('DEBUG', true);
|
||||
define('PHD_BETA', false);
|
||||
define('MULTIBYTE_SEARCH', true);
|
||||
|
||||
/**
|
||||
* Fallback to a set of known languages in the event of a failure to retrieve online list.
|
||||
*/
|
||||
$ACTIVE_ONLINE_LANGUAGES = Array(
|
||||
'en' => 'English',
|
||||
'de' => 'German',
|
||||
'es' => 'Spanish',
|
||||
'fr' => 'French',
|
||||
'it' => 'Italian',
|
||||
'ja' => 'Japanese',
|
||||
'pt_BR' => 'Brazilian Portuguese',
|
||||
'ro' => 'Romanian',
|
||||
'ru' => 'Russian',
|
||||
'tr' => 'Turkish',
|
||||
'kr' => 'Korean',
|
||||
'zh' => 'Chinese (Simplified)',
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* CHM full text search does not work without compiling
|
||||
* with Windows Language Code Identifier(LCID).
|
||||
*
|
||||
* http://msdn.microsoft.com/en-us/library/cc233965.aspx
|
||||
* http://msdn.microsoft.com/ja-jp/library/cc392381.aspx
|
||||
*/
|
||||
$CHM_FULLTEXT_SEARCH_LCID = array(
|
||||
'en' => 1033,
|
||||
'ar' => 14337,
|
||||
'bg' => 1026,
|
||||
'pt_BR' => 1046,
|
||||
'zh' => 2052,
|
||||
'hk' => 3076,
|
||||
'tw' => 1028,
|
||||
'ca' => 1027,
|
||||
'cs' => 1029,
|
||||
'da' => 1030,
|
||||
'nl' => 1043,
|
||||
'fi' => 1035,
|
||||
'fr' => 1036,
|
||||
'de' => 1031,
|
||||
'el' => 1032,
|
||||
'he' => 1037,
|
||||
'hu' => 1038,
|
||||
'id' => 1057,
|
||||
'it' => 1040,
|
||||
'ja' => 1041,
|
||||
'kr' => 1042,
|
||||
'lt' => 1063,
|
||||
'no' => 1044,
|
||||
'pl' => 1045,
|
||||
'pt' => 2070,
|
||||
'ro' => 1048,
|
||||
'ru' => 1049,
|
||||
'fa' => 1065,
|
||||
'sr' => 3098,
|
||||
'sk' => 1051,
|
||||
'sl' => 1060,
|
||||
'es' => 1034,
|
||||
'sv' => 1053,
|
||||
'tr' => 1055,
|
||||
);
|
||||
|
||||
/**
|
||||
* Helper function for execution a program (used by build-chm-history.php too)
|
||||
*
|
||||
* @param string Path to the program to execute
|
||||
* @param string (optional) Parameters to pass the this call
|
||||
* @param string (optional) Log output to a specific file defined here
|
||||
* @return void No value is returned
|
||||
*/
|
||||
function execute_task($title, $program, $parameters, $log)
|
||||
{
|
||||
echo(date('r') . ' ' . $title . '...' . PHP_EOL);
|
||||
|
||||
if(empty($program))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$cmd = sprintf('"%s"%s%s', $program, (!$parameters ?: ' ' . $parameters), (!$log ? '' : ' > ' . PATH_LOG . '\\' . $log . '.log 2<&1'));
|
||||
|
||||
echo $cmd;
|
||||
|
||||
@popen($cmd, 'r');
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user