[Ttssh2-commit] [9294] ヘルプファイル内に生成に失敗したページがあったので修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2021年 5月 29日 (土) 00:43:02 JST


Revision: 9294
          https://osdn.net/projects/ttssh2/scm/svn/commits/9294
Author:   zmatsuo
Date:     2021-05-29 00:43:01 +0900 (Sat, 29 May 2021)
Log Message:
-----------
ヘルプファイル内に生成に失敗したページがあったので修正

- libs/doc_help/ にあるファイルからヘルプ用ファイルを生成するよう修正
- 2sjis.pl 入力ファイルがオープンできなかった時エラーが出るようにした

Modified Paths:
--------------
    trunk/doc/.gitignore
    trunk/doc/CMakeLists.txt
    trunk/installer/2sjis.pl

-------------- next part --------------
Modified: trunk/doc/.gitignore
===================================================================
--- trunk/doc/.gitignore	2021-05-28 15:42:49 UTC (rev 9293)
+++ trunk/doc/.gitignore	2021-05-28 15:43:01 UTC (rev 9294)
@@ -4,3 +4,6 @@
 ja/Index.hhk
 ja/teratermj.chm
 ja/teratermj.chm.rule
+*.txt
+*.md
+*.html

Modified: trunk/doc/CMakeLists.txt
===================================================================
--- trunk/doc/CMakeLists.txt	2021-05-28 15:42:49 UTC (rev 9293)
+++ trunk/doc/CMakeLists.txt	2021-05-28 15:43:01 UTC (rev 9294)
@@ -51,13 +51,13 @@
 
   add_custom_command(
     OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/en/teraterm.chm
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/oniguruma/COPYING   -o en/html/reference/Oniguruma-LICENSE.txt -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/oniguruma/doc/RE.ja -o en/html/reference/RE.txt      -c utf8   -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/openssl/LICENSE     -o en/html/reference/OpenSSL-LICENSE.txt   -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/putty/LICENCE       -o en/html/reference/PuTTY-LICENSE.txt     -l crlf
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/SFMT/LICENSE.txt    -o en/html/reference/SFMT-LICENSE.txt      -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING          -o en/html/reference/CygTerm+-LICENSE.txt  -l unix
-    COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/zlib/README -o en/html/reference/zlib-LICENSE.txt   -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/Oniguruma-LICENSE.txt -o en/html/reference/Oniguruma-LICENSE.txt -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/en/RE                 -o en/html/reference/RE.txt      -c utf8   -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/OpenSSL-LICENSE.txt   -o en/html/reference/OpenSSL-LICENSE.txt   -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/PuTTY-LICENSE.txt     -o en/html/reference/PuTTY-LICENSE.txt     -l crlf
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/SFMT-LICENSE.txt      -o en/html/reference/SFMT-LICENSE.txt      -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING                     -o en/html/reference/CygTerm+-LICENSE.txt  -l unix
+    COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/doc_help/zlib-LICENSE.txt -o en/html/reference/zlib-LICENSE.txt -l unix
     COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_with_cmake.md > en/html/reference/build_with_cmake_no_bom.md
     COMMAND ${PERL} Markdown_1.0.1/Markdown.pl en/html/reference/build_with_cmake_no_bom.md > en/html/reference/build_with_cmake_utf8.html
     COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/build_with_cmake_utf8.html -o en/html/reference/build_with_cmake.html  -c utf8
@@ -64,6 +64,12 @@
     COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/build_library_with_cmake.md > en/html/reference/build_library_with_cmake_no_bom.md
     COMMAND ${PERL} Markdown_1.0.1/Markdown.pl en/html/reference/build_library_with_cmake_no_bom.md > en/html/reference/build_library_with_cmake_utf8.html
     COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/build_library_with_cmake_utf8.html -o en/html/reference/build_library_with_cmake.html  -c utf8
+    COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/keyboard_cfg.md > en/html/reference/keyboard_cfg_no_bom.md
+    COMMAND ${PERL} Markdown_1.0.1/Markdown.pl en/html/reference/keyboard_cfg_no_bom.md > en/html/reference/keyboard_cfg_utf8.html
+    COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/keyboard_cfg_utf8.html -o en/html/reference/keyboard_cfg.html  -c utf8
+    COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" en/html/reference/menu_id.md > en/html/reference/menu_id_no_bom.md
+    COMMAND ${PERL} Markdown_1.0.1/Markdown.pl en/html/reference/menu_id_no_bom.md > en/html/reference/menu_id_utf8.html
+    COMMAND ${PERL} ../installer/2sjis.pl -i en/html/reference/menu_id_utf8.html -o en/html/reference/menu_id.html  -c utf8
     COMMAND ${PERL} htmlhelp_index_make.pl en html > en/Index.hhk
     COMMAND ${HHC} en/teraterm.hhp || (exit 0)
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -72,11 +78,11 @@
 
   add_custom_command(
     OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ja/teratermj.chm
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/oniguruma/COPYING   -o ja/html/reference/Oniguruma-LICENSE.txt -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/oniguruma/doc/RE.ja -o ja/html/reference/RE.txt      -c utf8   -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/openssl/LICENSE     -o ja/html/reference/OpenSSL-LICENSE.txt   -l unix
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/putty/LICENCE       -o ja/html/reference/PuTTY-LICENSE.txt     -l crlf
-    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/SFMT/LICENSE.txt    -o ja/html/reference/SFMT-LICENSE.txt      -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/Oniguruma-LICENSE.txt -o ja/html/reference/Oniguruma-LICENSE.txt -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/ja/RE                 -o ja/html/reference/RE.txt      -c utf8   -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/OpenSSL-LICENSE.txt   -o ja/html/reference/OpenSSL-LICENSE.txt   -l unix
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/PuTTY-LICENSE.txt     -o ja/html/reference/PuTTY-LICENSE.txt     -l crlf
+    COMMAND ${PERL} ../installer/2sjis.pl -i ../libs/doc_help/SFMT-LICENSE.txt      -o ja/html/reference/SFMT-LICENSE.txt      -l unix
     COMMAND ${PERL} ../installer/2sjis.pl -i ../cygterm/COPYING          -o ja/html/reference/CygTerm+-LICENSE.txt  -l unix
     COMMAND ${PERL} ../installer/copy-zliblicense.pl -i ../libs/zlib/README -o ja/html/reference/zlib-LICENSE.txt   -l unix
     COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_with_cmake.md > ja/html/reference/build_with_cmake_no_bom.md
@@ -85,6 +91,12 @@
     COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/build_library_with_cmake.md > ja/html/reference/build_library_with_cmake_no_bom.md
     COMMAND ${PERL} Markdown_1.0.1/Markdown.pl ja/html/reference/build_library_with_cmake_no_bom.md > ja/html/reference/build_library_with_cmake_utf8.html
     COMMAND ${PERL} ../installer/2sjis.pl -i ja/html/reference/build_library_with_cmake_utf8.html -o ja/html/reference/build_library_with_cmake.html  -c utf8
+    COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/keyboard_cfg.md > ja/html/reference/keyboard_cfg_no_bom.md
+    COMMAND ${PERL} Markdown_1.0.1/Markdown.pl ja/html/reference/keyboard_cfg_no_bom.md > ja/html/reference/keyboard_cfg_utf8.html
+    COMMAND ${PERL} ../installer/2sjis.pl -i ja/html/reference/keyboard_cfg_utf8.html -o ja/html/reference/keyboard_cfg.html  -c utf8
+    COMMAND ${PERL} -C0 -pe "s/^\\xef\\xbb\\xbf//" ja/html/reference/menu_id.md > ja/html/reference/menu_id_no_bom.md
+    COMMAND ${PERL} Markdown_1.0.1/Markdown.pl ja/html/reference/menu_id_no_bom.md > ja/html/reference/menu_id_utf8.html
+    COMMAND ${PERL} ../installer/2sjis.pl -i ja/html/reference/menu_id_utf8.html -o ja/html/reference/menu_id.html  -c utf8
     COMMAND ${PERL} htmlhelp_index_make.pl ja html > ja/Index.hhk
     COMMAND ${HHC} ja/teraterm.hhp || (exit 0)
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

Modified: trunk/installer/2sjis.pl
===================================================================
--- trunk/installer/2sjis.pl	2021-05-28 15:42:49 UTC (rev 9293)
+++ trunk/installer/2sjis.pl	2021-05-28 15:43:01 UTC (rev 9294)
@@ -26,7 +26,7 @@
 	binmode STDIN, ":$lf:encoding($coding)";
 	$IN = *STDIN;
 } else {
-	open ($IN,  "<:$lf:encoding($coding)",   $in);
+	open ($IN,  "<:$lf:encoding($coding)",   $in) or die("error :$! $in");
 }
 open (OUT, '>:crlf:encoding(shiftjis)', $out);
 while (<$IN>) {


Ttssh2-commit メーリングリストの案内
Back to archive index