version 1.1, 2013/09/02 20:26:41 |
version 1.7, 2019/03/28 08:03:07 |
|
|
@echo off |
@rem $OpenXM: OpenXM_contrib2/windows/help/makehelp2.bat,v 1.6 2016/06/29 15:24:11 ohara Exp $
|
|
@echo off
|
set PATH=..;..\..;%PATH% |
|
set lang=%~1 |
setlocal
|
set PERL=c:\cygwin\bin\perl |
|
|
set PATH=..;..\..;%PATH%;c:\cygwin\bin;c:\cygwin64\bin;c:\msys64\usr\bin
|
set srcdir1=..\..\..\..\..\OpenXM\src\asir-doc |
set lang=%~1
|
set srcdir2=..\..\..\..\..\OpenXM\src\asir-contrib\packages\doc |
set PERL=perl
|
set srcdir3=..\..\..\..\..\OpenXM\src\asir-contrib\packages\src |
|
set srcdir4=..\..\..\..\asir2000\lib |
REM 相対パスを絶対パスに変換する
|
|
REM 重要!! %%~fi と ) の間に空白を入れてはならない!!
|
mkdir %lang% |
for %%i in ( ..\..\..\OpenXM\src ) do (set oxsrc=%%~fi)
|
pushd %lang% |
for %%i in ( ..\..\asir2000\lib ) do (set srcdir4=%%~fi)
|
|
|
REM case 1: asir 標準マニュアル |
set srcdir1=%oxsrc%\asir-doc
|
|
set srcdir2=%oxsrc%\asir-contrib\packages\doc
|
mkdir asir\parts\builtin |
set srcdir3=%oxsrc%\asir-contrib\packages\src
|
pushd asir |
|
|
mkdir %lang%
|
for %%i in ( texinfo.tex texinfo.ini txi-ja.tex txi-en.tex ) do ( |
pushd %lang%
|
nkf32 -e %srcdir1%\%%i > %%i |
|
) |
REM case 1: asir 標準マニュアル
|
|
|
for %%i in ( man.texi parts\algnum.texi parts\appendix.texi parts\asir.texi parts\builtin.texi parts\debug.texi parts\ff.texi parts\groebner.texi parts\intro.texi parts\process.texi parts\risa.texi parts\type.texi parts\builtin\array.texi parts\builtin\bit.texi parts\builtin\function.texi parts\builtin\io.texi parts\builtin\list.texi parts\builtin\misc.texi parts\builtin\module.texi parts\builtin\num.texi parts\builtin\numeric.texi parts\builtin\poly.texi parts\builtin\string.texi parts\builtin\structure.texi parts\builtin\type.texi parts\builtin\upoly.texi ) do ( |
mkdir asir\parts\builtin
|
extract_man %lang% %srcdir1%\%%i | nkf32 -e > %%i |
pushd asir
|
) |
|
|
for %%i in ( texinfo.tex texinfo.ini txi-ja.tex txi-en.tex ) do (
|
%PERL% ../../texi2html -menu -split_node man.texi |
nkf32 -e %srcdir1%\%%i > %%i
|
call :html_euc_to_sjis |
)
|
popd |
|
|
for %%i in ( man.texi parts\algnum.texi parts\appendix.texi parts\asir.texi parts\builtin.texi parts\debug.texi parts\ff.texi parts\groebner.texi parts\intro.texi parts\process.texi parts\risa.texi parts\type.texi parts\builtin\array.texi parts\builtin\bit.texi parts\builtin\function.texi parts\builtin\io.texi parts\builtin\list.texi parts\builtin\misc.texi parts\builtin\module.texi parts\builtin\num.texi parts\builtin\numeric.texi parts\builtin\poly.texi parts\builtin\string.texi parts\builtin\structure.texi parts\builtin\type.texi parts\builtin\upoly.texi ) do (
|
gen_hh asir . |
extract_man %lang% %srcdir1%\%%i | nkf32 -e > %%i
|
hhc asirhelp.hhp |
)
|
|
|
REM case 2: asir-contrib マニュアル |
%PERL% ../../texi2html -menu -split_node man.texi
|
|
call :html_euc_to_sjis
|
mkdir cman |
popd
|
pushd cman |
|
|
gen_hh asir .
|
nkf32 -e %srcdir2%\top\cman-%lang%.texi > cman-%lang%.texi |
hhc asirhelp.hhp
|
nkf32 -e %srcdir3%\names.rr > names.rr |
|
|
REM case 2: asir-contrib マニュアル
|
for %%i in ( base calculus complex glib graphic hypergeometric intro load matrix misc names number oxrfc100 oxshell poly print series util windows ) do ( |
|
nkf32 -e %srcdir2%\top\%%i.oxw | oxweave C %lang% > %%i.%lang% |
mkdir cman
|
) |
pushd cman
|
|
|
for %%i in ( base matrix number poly print util ) do ( |
nkf32 -e %srcdir2%\top\cman-%lang%.texi > cman-%lang%.texi
|
oxweave usage < names.rr | oxgentexi --category %%i --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang% |
nkf32 -e %srcdir3%\names.rr > names.rr
|
) |
|
|
for %%i in ( base calculus complex glib graphic hypergeometric intro load matrix misc names number oxrfc100 oxshell poly print series util windows ) do (
|
for %%i in ( glib ) do ( |
nkf32 -e %srcdir2%\top\%%i.oxw | oxweave C %lang% > %%i.%lang%
|
nkf32 -e %srcdir4%\%%i | oxweave usage | oxgentexi --category %%i --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang% |
)
|
) |
|
|
for %%i in ( base matrix number poly print util ) do (
|
for %%i in ( oxshell ) do ( |
oxweave usage < names.rr | oxgentexi --category %%i --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang%
|
nkf32 -e %srcdir3%\%%i.rr | oxweave usage | oxgentexi --category %%i --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang% |
)
|
) |
|
|
for %%i in ( glib ) do (
|
%PERL% ../../texi2html -menu -split_node cman-%lang%.texi |
nkf32 -e %srcdir4%\%%i | oxweave usage | oxgentexi --category %%i --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang%
|
call :html_euc_to_sjis |
)
|
popd |
|
|
for %%i in ( oxshell ) do (
|
gen_hh cman . %lang% |
nkf32 -e %srcdir3%\%%i.rr | oxweave usage | oxgentexi --category %%i --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang%
|
hhc cmanhelp.hhp |
)
|
|
|
REM 個別の場合 |
%PERL% ../../texi2html -menu -split_node cman-%lang%.texi
|
|
call :html_euc_to_sjis
|
REM case 3a: *.{oxg,oxw} から生成。 |
popd
|
|
|
for %%i in ( dsolv gnuplot mathematica ok_diff ok_dmodule phc tigers ) do ( |
gen_hh cman . %lang%
|
mkdir %%i |
hhc cmanhelp.hhp
|
pushd %%i |
|
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi |
REM 個別の場合
|
nkf32 -e %srcdir2%\%%i\%%i.oxw | oxweave C %lang% > %%i.%lang% |
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
REM case 3a: *.{oxg,oxw} から生成。
|
call :html_euc_to_sjis |
|
popd |
for %%i in ( dsolv gnuplot mathematica ok_diff ok_dmodule phc tigers ) do (
|
gen_hh %%i . %lang% |
mkdir %%i
|
hhc %%ihelp.hhp |
pushd %%i
|
) |
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi
|
|
nkf32 -e %srcdir2%\%%i\%%i.oxw | oxweave C %lang% > %%i.%lang%
|
REM case 3b: plucker, sm1: *.{oxg,oxw,rr} から生成。 |
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
|
call :html_euc_to_sjis
|
for %%i in ( plucker sm1 ) do ( |
popd
|
mkdir %%i |
gen_hh %%i . %lang%
|
pushd %%i |
hhc %%ihelp.hhp
|
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi |
)
|
nkf32 -e %srcdir2%\%%i\%%i.oxw | oxweave C %lang% > %%i.%lang% |
|
nkf32 -e %srcdir3%\%%i.rr | oxweave usage | oxgentexi --category %name% --en --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang% |
REM case 3b: plucker, sm1: *.{oxg,oxw,rr} から生成。
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
|
call :html_euc_to_sjis |
for %%i in ( plucker sm1 ) do (
|
popd |
mkdir %%i
|
gen_hh %%i . %lang% |
pushd %%i
|
hhc %%ihelp.hhp |
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi
|
) |
nkf32 -e %srcdir2%\%%i\%%i.oxw | oxweave C %lang% > %%i.%lang%
|
|
nkf32 -e %srcdir3%\%%i.rr | oxweave usage | oxgentexi --category %name% --en --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang%
|
REM case 3c: pfpcoh: *.{oxg,oxw,rr} から生成。 |
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
|
call :html_euc_to_sjis
|
for %%i in ( pfpcoh ) do ( |
popd
|
mkdir %%i |
gen_hh %%i . %lang%
|
pushd %%i |
hhc %%ihelp.hhp
|
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi |
)
|
nkf32 -e %srcdir2%\%%i\%%i.oxw | oxweave C %lang% > %%i.%lang% |
|
nkf32 -e %srcdir3%\%%i.rr %srcdir3%\pfphom.rr | oxweave usage | oxgentexi --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang% |
REM case 3c: pfpcoh: *.{oxg,oxw,rr} から生成。
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
|
call :html_euc_to_sjis |
for %%i in ( pfpcoh ) do (
|
popd |
mkdir %%i
|
gen_hh %%i . %lang% |
pushd %%i
|
hhc %%ihelp.hhp |
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi
|
) |
nkf32 -e %srcdir2%\%%i\%%i.oxw | oxweave C %lang% > %%i.%lang%
|
|
nkf32 -e %srcdir3%\%%i.rr %srcdir3%\pfphom.rr | oxweave usage | oxgentexi --%lang% --upnode %%i --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i > %%i-auto.%lang%
|
REM case 3d: om: *.{oxg,rr} から生成。 |
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
|
call :html_euc_to_sjis
|
for %%i in ( om ) do ( |
popd
|
mkdir %%i |
gen_hh %%i . %lang%
|
pushd %%i |
hhc %%ihelp.hhp
|
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi |
)
|
echo /*^&%lang% > %%i.oxw |
|
nkf32 -e %srcdir3%\%%i.rr >> %%i.oxw |
REM case 3d: om: *.{oxg,rr} から生成。
|
echo */ >> %%i.oxw |
|
oxweave C %lang% < %%i.oxw > %%i.%lang% |
for %%i in ( om ) do (
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
mkdir %%i
|
call :html_euc_to_sjis |
pushd %%i
|
popd |
nkf32 -e %srcdir2%\%%i\%%i.oxg | oxweave usage-%lang% | oxgentexi --noSorting --author "OpenXM.org" --infoName asir-contrib-%%i --title "%%i manual" > %%i-%lang%.texi
|
gen_hh %%i . %lang% |
echo /*^&%lang% > %%i.oxw
|
hhc %%ihelp.hhp |
nkf32 -e %srcdir3%\%%i.rr >> %%i.oxw
|
) |
echo */ >> %%i.oxw
|
|
oxweave C %lang% < %%i.oxw > %%i.%lang%
|
REM case 4a: *.texi から生成。 |
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
|
call :html_euc_to_sjis
|
for %%i in ( nn_ndbf ) do ( |
popd
|
mkdir %%i |
gen_hh %%i . %lang%
|
pushd %%i |
hhc %%ihelp.hhp
|
nkf32 -e %srcdir2%\%%i\%%i.texi > %%i.texi |
)
|
extract_man %lang% %%i.texi > %%i-%lang%.texi |
|
oxreplace --old @fref --new @ref %%i-%lang%.texi |
REM case 4a: *.texi から生成。
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
|
call :html_euc_to_sjis |
for %%i in ( nn_ndbf ) do (
|
popd |
mkdir %%i
|
gen_hh %%i . %lang% |
pushd %%i
|
hhc %%ihelp.hhp |
nkf32 -e %srcdir2%\%%i\%%i.texi > %%i.texi
|
) |
extract_man %lang% %%i.texi > %%i-%lang%.texi
|
|
oxreplace --old @fref --new @ref %%i-%lang%.texi
|
REM case 4b: *-{ja,en}.texi から生成。 |
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
|
call :html_euc_to_sjis
|
for %%i in ( ns_twistedlog ) do ( |
popd
|
mkdir %%i |
gen_hh %%i . %lang%
|
pushd %%i |
hhc %%ihelp.hhp
|
nkf32 -e %srcdir2%\%%i\%%i-%lang%.texi > %%i-%lang%.texi |
)
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
|
call :html_euc_to_sjis |
REM case 4b: *-{ja,en}.texi から生成。
|
popd |
|
gen_hh %%i . %lang% |
for %%i in ( ns_twistedlog ) do (
|
hhc %%ihelp.hhp |
mkdir %%i
|
) |
pushd %%i
|
|
nkf32 -e %srcdir2%\%%i\%%i-%lang%.texi > %%i-%lang%.texi
|
REM case 4c: *-ja.texi から生成。日本語のみ。 |
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
|
call :html_euc_to_sjis
|
for %%i in ( noro_matrix noro_mwl noro_pd todo_parametrize ) do ( |
popd
|
if exist %srcdir2%\%%i\%%i-%lang%.texi ( |
gen_hh %%i . %lang%
|
mkdir %%i |
hhc %%ihelp.hhp
|
pushd %%i |
)
|
nkf32 -e %srcdir2%\%%i\%%i-%lang%.texi > %%i-%lang%.texi |
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi |
REM case 4c: *-ja.texi から生成。日本語のみ。
|
call :html_euc_to_sjis |
|
popd |
for %%i in ( noro_matrix noro_mwl noro_pd todo_parametrize ) do (
|
gen_hh %%i . %lang% |
if exist %srcdir2%\%%i\%%i-%lang%.texi (
|
hhc %%ihelp.hhp |
mkdir %%i
|
) |
pushd %%i
|
) |
nkf32 -e %srcdir2%\%%i\%%i-%lang%.texi > %%i-%lang%.texi
|
|
%PERL% ../../texi2html -menu -split_node %%i-%lang%.texi
|
popd |
call :html_euc_to_sjis
|
|
popd
|
exit /b 0 |
gen_hh %%i . %lang%
|
|
hhc %%ihelp.hhp
|
:html_euc_to_sjis |
)
|
for %%i in ( *.html ) do ( |
)
|
rename %%i __tmp |
|
nkf32 -Es __tmp > %%i |
popd
|
del /q __tmp |
|
) |
exit /b 0
|
|
|
exit /b 0 |
:html_euc_to_sjis
|
|
for %%i in ( *.html ) do (
|
|
rename %%i __tmp
|
|
nkf32 -Es __tmp > %%i
|
|
del /q __tmp
|
|
)
|
|
|
|
exit /b 0
|