OSDN Git Service

Added.
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Wed, 30 Sep 2009 12:57:30 +0000 (12:57 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Wed, 30 Sep 2009 12:57:30 +0000 (12:57 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@1 9df91469-1e22-0410-86e7-ea8537beb833

79 files changed:
bin/association-sample.reg [new file with mode: 0644]
bin/frontend.desktop [new file with mode: 0644]
bin/frontend.exe.manifest [new file with mode: 0644]
bin/lib/calLibrary.xml [new file with mode: 0644]
bin/lib/cuiWrapper.xml [new file with mode: 0644]
doc/files.html [new file with mode: 0644]
doc/history.html [new file with mode: 0644]
doc/license.txt [new file with mode: 0644]
doc/readme.html [new file with mode: 0644]
doc/style.css [new file with mode: 0644]
share/ico/16/add.png [new file with mode: 0644]
share/ico/16/close.png [new file with mode: 0644]
share/ico/16/create.png [new file with mode: 0644]
share/ico/16/delete.png [new file with mode: 0644]
share/ico/16/extract.png [new file with mode: 0644]
share/ico/16/open.png [new file with mode: 0644]
share/ico/16/repair.png [new file with mode: 0644]
share/ico/16/sfx.png [new file with mode: 0644]
share/ico/16/test.png [new file with mode: 0644]
share/ico/16/unsfx.png [new file with mode: 0644]
share/ico/24/add.png [new file with mode: 0644]
share/ico/24/close.png [new file with mode: 0644]
share/ico/24/create.png [new file with mode: 0644]
share/ico/24/delete.png [new file with mode: 0644]
share/ico/24/extract.png [new file with mode: 0644]
share/ico/24/open.png [new file with mode: 0644]
share/ico/24/repair.png [new file with mode: 0644]
share/ico/24/sfx.png [new file with mode: 0644]
share/ico/24/test.png [new file with mode: 0644]
share/ico/24/unsfx.png [new file with mode: 0644]
share/ico/app.png [new file with mode: 0644]
share/ico/archive.ico [new file with mode: 0644]
share/ico/archive.png [new file with mode: 0644]
share/ico/exe.png [new file with mode: 0644]
share/ico/file.png [new file with mode: 0644]
share/ico/folder_closed.png [new file with mode: 0644]
share/ico/folder_open.png [new file with mode: 0644]
src/Makefile [new file with mode: 0644]
src/common/handle/TPIHandle.cpp [new file with mode: 0644]
src/common/handle/TPIHandle.h [new file with mode: 0644]
src/common/header/Doxyfile [new file with mode: 0644]
src/common/header/Makefile [new file with mode: 0644]
src/common/header/plugin-extra.h [new file with mode: 0644]
src/common/header/plugin.def [new file with mode: 0644]
src/common/header/plugin.h [new file with mode: 0644]
src/common/library/library.cpp [new file with mode: 0644]
src/common/library/library.h [new file with mode: 0644]
src/frontend/Makefile [new file with mode: 0644]
src/frontend/cls_filedroptarget.cpp [new file with mode: 0644]
src/frontend/cls_filedroptarget.h [new file with mode: 0644]
src/frontend/cls_listctrl.cpp [new file with mode: 0644]
src/frontend/cls_listctrl.h [new file with mode: 0644]
src/frontend/dlg_make.cpp [new file with mode: 0644]
src/frontend/dlg_make.h [new file with mode: 0644]
src/frontend/dlg_process.cpp [new file with mode: 0644]
src/frontend/dlg_process.h [new file with mode: 0644]
src/frontend/frm_main.cpp [new file with mode: 0644]
src/frontend/frm_main.h [new file with mode: 0644]
src/frontend/frontend.cpp [new file with mode: 0644]
src/frontend/frontend.h [new file with mode: 0644]
src/frontend/frontend.vcproj [new file with mode: 0644]
src/frontend/functions.cpp [new file with mode: 0644]
src/frontend/functions.h [new file with mode: 0644]
src/frontend/ui/dlg_make.fbp [new file with mode: 0644]
src/frontend/ui/dlg_process.fbp [new file with mode: 0644]
src/frontend/ui/frm_main.fbp [new file with mode: 0644]
src/plugin/calLibrary/Makefile [new file with mode: 0644]
src/plugin/calLibrary/calLibrary.cpp [new file with mode: 0644]
src/plugin/calLibrary/calLibrary.h [new file with mode: 0644]
src/plugin/calLibrary/calLibrary.vcproj [new file with mode: 0644]
src/plugin/cuiWrapper/Makefile [new file with mode: 0644]
src/plugin/cuiWrapper/cuiWrapper.cpp [new file with mode: 0644]
src/plugin/cuiWrapper/cuiWrapper.h [new file with mode: 0644]
src/plugin/cuiWrapper/cuiWrapper.vcproj [new file with mode: 0644]
src/plugin/spiLibrary/Makefile [new file with mode: 0644]
src/plugin/spiLibrary/spiLibrary.cpp [new file with mode: 0644]
src/plugin/spiLibrary/spiLibrary.h [new file with mode: 0644]
src/plugin/spiLibrary/spiLibrary.vcproj [new file with mode: 0644]
src/tpi.sln [new file with mode: 0644]

diff --git a/bin/association-sample.reg b/bin/association-sample.reg
new file mode 100644 (file)
index 0000000..c5aca9a
Binary files /dev/null and b/bin/association-sample.reg differ
diff --git a/bin/frontend.desktop b/bin/frontend.desktop
new file mode 100644 (file)
index 0000000..c4bf410
--- /dev/null
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=Frontend
+Exec=/mnt/data/svn/tpi/bin/frontend %F
+Categories=GTK;KDE;Utility;System;Archiving;
+Icon=/mnt/data/svn/tpi/share/ico/app.png
+MimeType=application/zip;application/x-tarz;application/x-tar;application/x-rpm;application/x-rar;application/x-lha;application/x-java-archive;application/x-deb;application/x-cpio-compressed;application/x-cpio;application/x-compressed-tar;application/x-cd-image;application/x-bzip-compressed-tar;application/x-arj;application/x-ace;application/x-7z-compressed;application/vnd.ms-cab-compressed;application/x-msi;application/x-gzip;application/x-compress
+StartupNotify=true
+Terminal=false
+Type=Application
diff --git a/bin/frontend.exe.manifest b/bin/frontend.exe.manifest
new file mode 100644 (file)
index 0000000..ae72c95
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.4053" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+    </dependentAssembly>
+  </dependency>
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
+    </dependentAssembly>
+  </dependency>
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+    </dependentAssembly>
+  </dependency>
+</assembly>
\ No newline at end of file
diff --git a/bin/lib/calLibrary.xml b/bin/lib/calLibrary.xml
new file mode 100644 (file)
index 0000000..d02cdbb
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<libraries>
+ <library name="unlha32.dll" prefix="Unlha" unicode="0" typename="Lzh" suffix="lzh;lha;lzs"
+        sfx     ='s -n -gw4 "-gr%93" --3 "%90" "%91"'
+        add     ='a -n -a1 -x%a0 %a1{-gw3|} --3 "%90" "%91" "@%92"'
+        extract ='x -n -a1 -x%a0 --3 "%90" "%91" "@%92"'
+        delete  ='d -n --3 "%90" "@%92"'
+        test    ='t -n --3 "%90" "@%92"' />
+ <library name="unzip32.dll" prefix="UnZip" name-alt="zip32j.dll" prefix-alt="Zip" typename="Zip" suffix="zip"
+        extract   ='-x --i -qUdde %a0{|-j} %a5{"-P#"|} "%90" "%91" "@%92"'
+        test      ='-t --i -qudde "%90" "%91" "@%92"'
+        sfx-alt   ='--sfx "%90" "%91"'
+        unsfx-alt ='-J "%90" "%91"'
+        add-alt   ='-9 -q -S %a0{|-j} %a1{--sfx|} -%94 "%90" "%91" "@%92"'
+        delete-alt='-d -q -S "%90" "%91" "@%92"'
+        repair-alt='-F "%90"' />
+ <library name="cab32.dll" prefix="Cab" typename="Cab" suffix="cab"
+        sfx     ='-f "%90" "%91"'
+        add     ='-a -i %a0{|-j} %a7{-v:#|} "%90" "%91" "@%92"'
+        extract ='-x -i %a0{|-j} "%90" "%91" "@%92"'
+        test    ='-t "%90" "@%92"' />
+ <library name="7-zip32.dll" prefix="SevenZip" typename="7z" suffix="7z"
+        add     ='a -t7z -hide -ssw %a1{-sfx|} -ms=%a2{on|off} -mhe=%a4{on|off} %a5{"-p#"|} %a7{-v#|} -- "%90" "%91" "@%92"'
+        extract ='%a0{x|e} -hide %a5{"-p#"|} "-o%91" -- "%90" "@%92"'
+        delete  ='d -hide -ms=off -- "%90" "@%92"'
+        test    ='t -- "%90" "@%92"' />
+ <library name="UnIso32.dll" prefix="UnIso"
+        extract ='%a0{x|e} -hide "-o%91" -- "%90" "@%92"'
+        test    ='t -- "%90" "@%92"' />
+ <library name="tar32.dll" prefix="Tar" typename="Tar" suffix="tar;gz;bz2;z;tgz"
+        add     ='-c --use-directory=%a0 --display-dialog=0 --inverse-procresult=1 -- "%90" "%91" "@%92"'
+        extract ='-x --use-directory=%a0 --display-dialog=0 --inverse-procresult=1 -- "%90" "%91" "@%92"' />
+ <library name="tar32.dll" prefix="Tar" typename="Tar+GZip" suffix="tar.gz"
+        add     ='-c -z%94 --use-directory=%a0 --display-dialog=0 --inverse-procresult=1 -- "%90" "%91" "@%92"' />
+ <library name="tar32.dll" prefix="Tar" typename="Tar+BZip2" suffix="tar.bz2"
+        add     ='-c -B%94 --use-directory=%a0 --display-dialog=0 --inverse-procresult=1 -- "%90" "%91" "@%92"' />
+ <library name="unrar32.dll" prefix="Unrar"
+        extract ='-%a0{x|e} -s -r -q %a5{"-p#"|} -- "%90" "%91" "@%92"' />
+ <library name="UnGCA32.dll" prefix="UnGCA"
+        extract ='e -sx0 -xx%a0 %a5{-p "#"|} %a6{-k "#"|} "%90" "%91" "@%92"' />
+ <library name="UnAceV2J.dll" prefix="UnAce" quote-resp="0"
+        extract ='%a0{x|e} --hide "%90" "%91" "@%92"'
+        test    ='t --hide "%90" "%91" "@%92"' />
+ <library name="unarj32j.dll" prefix="Unarj" unicode="0"
+        extract ='%a0{x|e} -i -!@ -- "%90" "%91" "@%92"'
+        test    ='t -i -- "%90" "@%92"' />
+ <library name="yz1.dll" prefix="Yz1" typename="Yz1" suffix="yz1"
+        sfx     ='s -i2 "%90" "%91"'
+        unsfx   ='j -i2 "%90" "%91"'
+        add     ='c -i2 %a5{"-p#"|} -x%a0 %a1{-s|} "%90" "%91" "@%92"'
+        extract ='x -i2 %a5{"-p#"|} -x%a0 "%90" "%91" "@%92"' />
+ <library name="Bga32.dll" prefix="Bga" typename="Bga" suffix="bza;gza"
+        sfx     ='s "%90" "%91"'
+        unsfx   ='j "%90" "%91"'
+        add     ='a -a -i -r -l%94 "%90" "%91" "@%92"'
+        extract ='x -a -i -r %a0{|-j} "%90" "%91" "@%92"'
+        delete  ='d -i "%90" "@%92"'
+        test    ='t -i "%90" "@%92"' />
+ <!-- calLibrary plug-in. See cuiWrapper.xml for details. -->
+</libraries>
diff --git a/bin/lib/cuiWrapper.xml b/bin/lib/cuiWrapper.xml
new file mode 100644 (file)
index 0000000..4f10b56
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<libraries>
+ <library name="7z" typename="7z" suffix="7z;zip;lzh;lha;cab;nsis;rpm;deb;cpio;iso;msi"
+        list    ='l -- "%90"'
+        list-line-s ='------------------- ----- ------------ ------------  ------------------------' list-line-c="1"
+        list-fname-s="53"
+        list-usize-s="26" list-usize-c="12"
+        list-psize-s="40" list-psize-c="12"
+        list-date-s = "0" list-date-c ="19" list-date-f="%Y-%m-%d %H:%M:%S"
+        add     ='a -t7z %a1{-sfx|} -ms=%a2{on|off} -mhe=%a4{on|off} %a5{"-p#"|} %a7{-v#|} -- "%90" "@%92"'
+        extract ='%a0{x|e} %a5{-p#|} "-o%91" -- "%90" "@%92"'
+        delete  ='d -ms=off -- "%90" "@%92"'
+        test    ='t -- "%90" "@%92"' />
+ <library name="tar" typename="Tar+XZ" suffix="tar.xz" quote-resp="0"
+        add     ='-c -J -f "%90" -T "%92"' />
+ <library name="tar" typename="Tar+GZip" suffix="tar.gz" quote-resp="0"
+        add     ='-c -z -f "%90" -T "%92"' />
+ <library name="tar" typename="Tar+BZip2" suffix="tar.bz2" quote-resp="0"
+        add     ='-c -j -f "%90" -T "%92"' />
+ <library name="tar" typename="Tar+Z" suffix="tar.Z" quote-resp="0"
+        add     ='-c -Z -f "%90" -T "%92"' />
+ <library name="tar" typename="Tar" suffix="tar;tar.gz;tar.bz2;tar.Z;.tar.xz;tgz" quote-resp="0"
+        list    ='-t -v -f "%90" | awk &apos;{ printf "%%10d %%s %%s %%s\n",$3,$4,$5,$6 }&apos;'
+        list-line-s ='' list-line-c = "1"
+        list-fname-s="28"
+        list-usize-s= "0" list-usize-c="10"
+        list-date-s ="11" list-date-c ="16" list-date-f="%Y-%m-%d %H:%M"
+        add     ='-c -f "%90" -T "%92"'
+        extract ='-x %a0{|--xform=&apos;s|.*/\([^/]*\)|\1|&apos;} -f "%90" -C "%91" -T "%92"'
+        delete  ='--delete -f "%90" -T "%92"' />
+ <library name="gzip" typename="GZip" suffix="gz;Z" quote-resp="0"
+        list    ='-l -v "%90"'
+        list-line-s ='method  crc     date  time           compressed        uncompressed  ratio uncompressed_name' list-line-c = "1"
+        list-fname-s="75"
+        list-usize-s="48" list-usize-c="19"
+        list-psize-s="28" list-psize-c="19"
+        list-date-s ="15" list-date-c ="12" list-date-f="%b %d %H:%M"
+        add     ='-%94 -c `cat "%92"` &gt; "%90"'
+        extract ='-d -c "%90" &gt; "%91`basename "%90" .gz`"'
+        test    ='-t "%90"' />
+ <library name="unrar" suffix="rar"
+        list    ='v -c- -- "%90"'
+        list-line-s ='-------------------------------------------------------------------------------' list-line-c="2"
+        list-fname-s= "1"
+        list-usize-s="14" list-usize-c= "8" list-usize-l="1"
+        list-psize-s="23" list-psize-c= "8" list-psize-l="1"
+        list-date-s ="37" list-date-c ="14" list-date-l ="1" list-date-f="%d-%m-%y %H:%M"
+        extract ='%a0{x|e} %a5{"-p#"|} -- "%90" "@%92" "%91"'
+        test    ='t -- "%90" "@%92"' />
+ <library name="innounp" suffix="inno"
+        list    ='-v "%90"'
+        list-line-s ='--------------------------------------' list-line-c="1"
+        list-fname-s="30"
+        list-usize-s= "0" list-usize-c="10"
+        list-date-s ="12" list-date-c ="16" list-date-f="%Y.%m.%d %H:%M"
+        extract ='-%a0{x|e} %a5{"-p#"|} "-d%91" "%90" "@%92"' />
+ <library name="dgcac" typename="DGCA" suffix="dgc" quote-resp="0"
+        list    ='l "%90"'
+        list-line-s ='------------------------- ------------------- ------------ ------------ -------' list-line-c="1"
+        list-fname-s= "0" list-fname-c="25"
+        list-usize-s="46" list-usize-c="12"
+        list-psize-s="60" list-psize-c="12"
+        list-date-s ="26" list-date-c ="19" list-date-f="%Y/%m/%d %H:%M:%S"
+        add     ='a %a5{"-p#"|} %a6{"-k#"|} "-o%92" "%90"'
+        extract ='e %a5{"-p#"|} %a6{"-k#"|} "-o%92" "%90"' />
+ <!--
+; cuiWrapper plug-in.
+;   Constant:
+;           %%  : %
+;   Variable:
+;           %90 : Archive name.
+;           %92 : Response file name.
+;           %93 : Target files.
+;       Add:
+;           %91 : Base directory.
+;           %94 : Compression level.
+;           %95 : Recovery Record.
+;           %96 : Comment.
+;       Extract/Sfx:
+;           %91 : Destination directory.
+;   Valiable/If:
+;           %a0 : Enable pathes.
+;       Add:
+;           %a1 : Make SFX.
+;           %a2 : Solid compression.
+;           %a3 : Multimedia optimization.
+;           %a4 : Encrypt header.
+;           %a5 : Enable Password.(Use # for actual string)
+;           %a6 : Enable Keyfile. (Use # for actual string)
+;           %a7 : Split size.     (Use # for actual size)
+ -->
+</libraries>
diff --git a/doc/files.html b/doc/files.html
new file mode 100644 (file)
index 0000000..880a62c
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">\r
+ <head>\r
+  <title>TPI Frontend</title>\r
+  <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\r
+  <link rel="stylesheet" href="style.css" type="text/css" />\r
+ </head>\r
+ <body>\r
+  <h1>TPI Frontend</h1>\r
+  <h2>Files</h2>\r
+ <p>主要なファイルについてのみ紹介しています。</p>\r
+  <dl class="sub">\r
+   <dt class="file_lin">xxx</dt><dd>Linux上で使用されるファイル</dd>\r
+   <dt class="file_win">xxx</dt><dd>Windows上で使用されるファイル</dd>\r
+   <dt>xxx</dt><dd>いずれの環境でも使用されるファイル</dd>\r
+  </dl>\r
+  <dl>\r
+   <dt class="dir">(root)</dt>\r
+   <dd>\r
+    <dl>\r
+     <dt class="dir">bin</dt>\r
+     <dd>\r
+      TPI Frontend本体を含みます。\r
+      <dl>\r
+       <dt class="dir" id="bin_lib">lib</dt>\r
+       <dd>\r
+        TPIとその関連ファイルを含みます。\r
+        <dl>\r
+         <dt class="file_win">calLibrary.dll</dt><dd>統合アーカイバライブラリに対応するTPIです。</dd>\r
+         <dt><a href="../bin/lib/calLibrary.xml" id="bin_lib_calLibrary.xml">calLibrary.xml</a></dt><dd>calLibraryの設定ファイルです。</dd>\r
+         <dt class="file_win">cuiWrapper.dll</dt><dd>CUIアプリに対応するTPIです。</dd>\r
+         <dt class="file_lin">cuiWrapper.so</dt><dd>CUIアプリに対応するTPIです。</dd>\r
+         <dt><a href="../bin/lib/cuiWrapper.xml" id="bin_lib_cuiWrapper.xml">cuiWrapper.xml</a></dt><dd>cuiWrapperの設定ファイルです。</dd>\r
+         <dt class="file_win">spiLibrary.dll</dt><dd>Susie Plug-In(SPI)に対応するTPIです。</dd>\r
+        </dl>\r
+       </dd>\r
+       <dt class="file_win"><a href="../bin/association-sample.reg" id="bin_association-sample.reg">association-sample.reg</a></dt><dd>関連付けを行うためのサンプルファイルです。</dd>\r
+       <dt class="file_lin">frontend</dt><dd>TPI Frontendの実行ファイルです。</dd>\r
+       <dt><a href="../bin/frontend.conf" id="bin_frontend.conf">frontend.conf</a></dt><dd>TPI Frontendの設定ファイルです。</dd>\r
+       <dt class="file_lin"><a href="../bin/frontend.desktop" id="bin_frontend.desktop">frontend.desktop</a></dt><dd>関連付けを行うためのサンプルファイルです。</dd>\r
+       <dt class="file_win">frontend.exe</dt><dd>TPI Frontendの実行ファイルです。</dd>\r
+       <dt class="file_win">frontend.exe.manifest</dt><dd>TPI Frontendのマニフェストファイルです。</dd>\r
+      </dl>\r
+     </dd>\r
+     <dt class="dir">doc</dt>\r
+     <dd>\r
+      TPI Frontendの説明書を含みます。\r
+      <dl>\r
+       <dt class="dir">api</dt>\r
+       <dd>\r
+        <dl>\r
+         <dt><a href="api/index.html">index.html</a></dt><dd>TPI仕様の解説書です。</dd>\r
+        </dl>\r
+       </dd>\r
+       <dt><a href="files.html">files.html</a></dt><dd>このファイルです。</dd>\r
+       <dt><a href="history.html">history.html</a></dt><dd>TPI Frontendの更新履歴です。</dd>\r
+       <dt><a href="license.txt" id="doc_license.txt">license.txt</a></dt><dd>GNU 劣等一般公衆利用許諾契約書2.1(GNU LGPL 2.1)です。</dd>\r
+       <dt><a href="readme.html">readme.html</a></dt><dd>TPI Frontendの説明書です。</dd>\r
+      </dl>\r
+     </dd>\r
+     <dt class="dir">share</dt>\r
+     <dd>\r
+      TPI Frontendで必要な各種ファイルを含みます。\r
+      <dl>\r
+       <dt class="dir" id="share_ico">ico</dt>\r
+       <dd>\r
+        TPI Frontendで使用する画像を含みます。\r
+        <dl>\r
+         <dt>app.png</dt><dd>TPI Frontendのアイコンです。</dd>\r
+         <dt class="file_win">archive.ico</dt><dd>関連付け用に使用できる書庫のアイコンです。</dd>\r
+         <dt>archive.png</dt><dd>TPI Frontendで使用される書庫のアイコンです。</dd>\r
+        </dl>\r
+       </dd>\r
+       <dt class="dir" id="share_xrc">xrc</dt><dd>TPI Frontendで使用するUI定義を含みます。</dd>\r
+      </dl>\r
+     </dd>\r
+     <dt class="dir">src</dt>\r
+     <dd>\r
+      TPI Projectのソースを含みます。\r
+      <dl>\r
+       <dt class="dir">common</dt><dd>TPI Projectで共用するソースを含みます。</dd>\r
+       <dt class="dir">frontend-wx</dt><dd>TPI Frontendのソースを含みます。</dd>\r
+       <dt class="dir">plugin</dt><dd>各種TPIのソースを含みます。</dd>\r
+       <dt class="dir">tmp</dt><dd>コンパイルの際に中間ファイルが生成されます。</dd>\r
+      </dl>\r
+     </dd>\r
+    </dl>\r
+   </dd>\r
+  </dl>\r
+ </body>\r
+</html>
\ No newline at end of file
diff --git a/doc/history.html b/doc/history.html
new file mode 100644 (file)
index 0000000..a3d69c1
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">\r
+ <head>\r
+  <title>TPI Frontend</title>\r
+  <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\r
+  <link rel="stylesheet" href="style.css" type="text/css" />\r
+ </head>\r
+ <body>\r
+  <h1>TPI Frontend</h1>\r
+  <h2>History</h2>\r
+  <dl id="history">\r
+   <dt>2009/09/30</dt>\r
+   <dd>\r
+    Ver.0.01&beta;2\r
+    <dl>\r
+     <dt>Frontend</dt>\r
+     <dd>\r
+      <ul>\r
+       <li><a href="files.html#bin_frontend.desktop">frontend.desktop</a>を追加。</li>\r
+       <li>readme.txtをhtml化し分割。</li>\r
+      </ul>\r
+     </dd>\r
+     <dt>calLibrary</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>Unicodeに対応。</li>\r
+      </ul>\r
+     </dd>\r
+     <dt>cuiWrapper</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>Unicodeに対応。</li>\r
+       <li>gzipに対応。</li>\r
+       <li>tarでパス情報を無視した展開に対応。</li>\r
+      </ul>\r
+     </dd>\r
+    </dl>\r
+   </dd>\r
+   <dt>2009/08/29</dt>\r
+   <dd>\r
+    Ver.0.01&beta;\r
+    <dl>\r
+     <dt>TPI</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>暗号化、分割書庫、リカバリーレコードなど格納時の設定に対応。</li>\r
+      </ul>\r
+     </dd>\r
+     <dt>cuiWrapper</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>Linux上の動作を可能にした。</li>\r
+       <li>unrar, innounp, tarへの対応。</li>\r
+      </ul>\r
+     </dd>\r
+    </dl>\r
+   </dd>\r
+   <dt>2009/08/22</dt>\r
+   <dd>\r
+    Ver.0.00.20090822\r
+    <dl>\r
+     <dt>Frontend</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>仮想リストビューを採用し高速化。</li>\r
+       <li>説明書を作成。</li>\r
+      </ul>\r
+     </dd>\r
+     <dt>cuiWrapper</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>コンソール版アプリケーションからのデータ取得に対応。</li>\r
+      </ul>\r
+     </dd>\r
+    </dl>\r
+   </dd>\r
+   <dt>2009/08/13</dt>\r
+   <dd>\r
+    Ver.0.00.20090813\r
+    <dl>\r
+     <dt>TPI</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>Unicode化。</li>\r
+      </ul>\r
+     </dd>\r
+     <dt>Frontend</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>格納/展開ダイアログを統合。</li>\r
+       <li>書庫へのファイル追加機能を実装。</li>\r
+      </ul>\r
+     </dd>\r
+     <dt>calLibrary</dt>\r
+     <dd>\r
+      <ul>\r
+       <li>zip32j.dllを代替ライブラリとして登録。</li>\r
+       <li>tar32.dllを使用できるよう変更。</li>\r
+       <li>UnAceV2J.dllへの対応。</li>\r
+      </ul>\r
+     </dd>\r
+    </dl>\r
+   </dd>\r
+   <dt>2009/04/29</dt>\r
+   <dd>\r
+    Ver.0.00.20090429\r
+    <ul>\r
+     <li>wxWidgetsを使用するよう変更。</li>\r
+    </ul>\r
+   </dd>\r
+   <dt>2006/11/20</dt>\r
+   <dd>\r
+    Ver.0.00.20061120\r
+    <ul>\r
+     <li>wxWidgets使用前の最終版。</li>\r
+    </ul>\r
+   </dd>\r
+  </dl>\r
+ </body>\r
+</html>
\ No newline at end of file
diff --git a/doc/license.txt b/doc/license.txt
new file mode 100644 (file)
index 0000000..602bfc9
--- /dev/null
@@ -0,0 +1,504 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+\f
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+\f
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/doc/readme.html b/doc/readme.html
new file mode 100644 (file)
index 0000000..b9bc182
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">\r
+ <head>\r
+  <title>TPI Frontend</title>\r
+  <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\r
+  <link rel="stylesheet" href="style.css" type="text/css" />\r
+ </head>\r
+ <body>\r
+  <h1>TPI Frontend</h1>\r
+\r
+  <address style="top:5px">\r
+   Silky(sirakaba@gmail.com)<br />\r
+   <a href="http://tpi.sourceforge.jp/">http://tpi.sourceforge.jp/</a>\r
+  </address>\r
+\r
+  <ul id="menu">\r
+   <li>Readme</li>\r
+   <li><a href="files.html">Files</a></li>\r
+   <li><a href="history.html">History</a></li>\r
+   <li><a href="api/index.html">TPI spec</a></li>\r
+  </ul>\r
+\r
+  <h2>About</h2>\r
+  <p>TPI Frontendは、TPIという仕様に対応したプラグインを利用することでさまざまな書庫を操作することができるアーカイバです。TPI Frontendには、統合アーカイバDLLやSusie Plugin(SPI)に対応するTPIなどが同封されています。</p>\r
+\r
+  <h2>Feature</h2>\r
+  <ul>\r
+   <li>\r
+    統合アーカイバDLL, SPI, CUI Applicationによる書庫操作。\r
+    <ul>\r
+     <li>書庫の作成、ファイルの追加、展開、削除、検査、修復機能。</li>\r
+     <li>書庫とSFXの相互変換機能。</li>\r
+    </ul>\r
+   </li>\r
+   <li>wxWidgetsを採用することでWindows/Linux双方で動作。</li>\r
+   <li>Unicodeへの対応。</li>\r
+   <li>仮想リストビューを用いた高速動作。</li>\r
+  </ul>\r
+  <div>※但し、実際の動作はTPIの実装に依存する部分があります。</div>\r
+\r
+  <h2>Customize</h2>\r
+  <h3>対応する書庫形式を増やす。</h3>\r
+  <p>calLibraryとcuiWrapperは、それぞれ<a href="files.html#bin_lib_calLibrary.xml">calLibrary.xml</a>と<a href="files.html#bin_lib_cuiWrapper.xml">cuiWrapper.xml</a>を編集することで対応する書庫形式を増やせます。詳細はxmlファイルの記述を参照してください。</p>\r
+  <p>また、<a href="files.html#bin_lib">bin/lib</a>以下にSPIを配置することにより、spiLibraryが対応する書庫形式を増やせます。</p>\r
+\r
+  <h3>TPIの動作を変更する。</h3>\r
+  <p>calLibraryとcuiWrapperはxmlファイルを編集することで、ライブラリや実行ファイルに渡すコマンドラインを変更できます。</p>\r
+\r
+  <h3>TPI Frontendの設定を変更する。</h3>\r
+  <p><a href="files.html#bin_frontend.conf">confファイル</a>を編集することで動作を変更できます。</p>\r
+\r
+  <h3>TPI FrontendのUIを変更する。</h3>\r
+  <p><a href="files.html#share_ico">share/ico</a>以下の画像を差し替えることで、UIで使用するアイコンを変更できます。また、<a href="files.html#share_xrc">share/xrc</a>以下のXRCを編集することで、UIをさまざまに変更できます。</p>\r
+\r
+  <h3>TPI Frontendを書庫に関連付ける。</h3>\r
+  <h4>Windows</h4>\r
+  <p><a href="files.html#bin_association-sample.reg">association-sample.reg</a>を参考にregファイルを編集し、実行してください。association-sample.regはあくまでもサンプルなので、決してそのまま実行しないでください。</p>\r
+\r
+  <h4>Linux</h4>\r
+  <p><a href="files.html#bin_frontend.desktop">frontend.desktop</a>を参考にdesktop ファイルを編集し、~/.local/share/applications/(現在のユーザのみ)または /usr/share/applications/(全ユーザ)のいずれかにコピーしてください。その後、update-desktop-database (コピー先フォルダ)を実行してください。</p>\r
+\r
+  <h2>Tips</h2>\r
+  <h3>NSISやInno Setupのインストーラを展開するには?</h3>\r
+  <p>7z.exeやinnounp.exe を用意した上で、ファイルの拡張子をそれぞれ'.nsis'や'.inno'に変更してから開いてください。</p>\r
+\r
+  <h2>Notes</h2>\r
+  <p>TPI FrontendはGNU LGPL 2.1の下で配布されています。再配布、改変などの条件については<a href="files.html#doc_license.txt">license.txt</a>を参照してください。また、TPI Frontendに使用されている画像は、Crystal Projectの画像を使用しています。Crystal Project はGNU LGPL 2.1で配布されている画像集で、<a href="http://www.everaldo.com/">Everaldo.com</a>から入手できます。</p>\r
+  <p>TPI Frontendは正式版ではありません。未完成の部分や欠陥が存在することをご承知の上ご利用ください。また、TPI Frontendを使用したことにより生じたいかなる損害に対しても、開発者は一切の補償を致しません。しかしながら、バグや要望などが有りましたら、TPI Projectのウェブサイトもしくはメールにてご連絡いただければ対応するかもしれません。</p>\r
+ </body>\r
+</html>
\ No newline at end of file
diff --git a/doc/style.css b/doc/style.css
new file mode 100644 (file)
index 0000000..e004c52
--- /dev/null
@@ -0,0 +1,60 @@
+\r
+body\r
+{\r
+  margin: auto 15%;\r
+  border-left: 1px solid #ccffcc;\r
+  border-right:1px solid #ccffcc;\r
+}\r
+\r
+h1, h2, h3, h4\r
+{\r
+  font-size:medium;\r
+  color: gray;\r
+}\r
+h2\r
+{\r
+  border-top:    1px solid #ccccff;\r
+  border-bottom: 1px solid #ccccff;\r
+}\r
+h3{ text-decoration: underline; }\r
+\r
+#menu\r
+{\r
+  position:absolute;\r
+  left: 5px;\r
+  float: left;\r
+  padding: 10px;\r
+  background-color: white;\r
+  border: 1px solid #ccccff;\r
+  list-style-type: none;\r
+}\r
+\r
+address, .sub\r
+{\r
+  position:absolute;\r
+  right: 5px;\r
+  float: right;\r
+  padding: 10px;\r
+  background-color: white;\r
+  border: 1px solid #ffcccc;\r
+}\r
+\r
+p{ text-indent: 1em; }\r
+a{ color: blue; }\r
+\r
+.dir{ quotes: '[ ' '/ ]'; }\r
+.dir:before{ content:  open-quote; }\r
+.dir:after { content: close-quote; }\r
+#history dl dt,\r
+.file_win{ background-color: #f5f5ff; }\r
+.file_lin{ background-color: #fff5f5; }\r
+dt{        background-color: #f5fff5; display: inline;}\r
+.file_win:after{ font-size: xx-small; content: ' (W)' }\r
+.file_lin:after{ font-size: xx-small; content: ' (L)' }\r
+\r
+dt a\r
+{\r
+  color: black;\r
+  text-decoration: none;\r
+  border-bottom: 1px dashed blue;\r
+}\r
diff --git a/share/ico/16/add.png b/share/ico/16/add.png
new file mode 100644 (file)
index 0000000..4325343
Binary files /dev/null and b/share/ico/16/add.png differ
diff --git a/share/ico/16/close.png b/share/ico/16/close.png
new file mode 100644 (file)
index 0000000..86361c1
Binary files /dev/null and b/share/ico/16/close.png differ
diff --git a/share/ico/16/create.png b/share/ico/16/create.png
new file mode 100644 (file)
index 0000000..3f484cf
Binary files /dev/null and b/share/ico/16/create.png differ
diff --git a/share/ico/16/delete.png b/share/ico/16/delete.png
new file mode 100644 (file)
index 0000000..dc5d79c
Binary files /dev/null and b/share/ico/16/delete.png differ
diff --git a/share/ico/16/extract.png b/share/ico/16/extract.png
new file mode 100644 (file)
index 0000000..6e4b157
Binary files /dev/null and b/share/ico/16/extract.png differ
diff --git a/share/ico/16/open.png b/share/ico/16/open.png
new file mode 100644 (file)
index 0000000..2bf5dd9
Binary files /dev/null and b/share/ico/16/open.png differ
diff --git a/share/ico/16/repair.png b/share/ico/16/repair.png
new file mode 100644 (file)
index 0000000..6fbea02
Binary files /dev/null and b/share/ico/16/repair.png differ
diff --git a/share/ico/16/sfx.png b/share/ico/16/sfx.png
new file mode 100644 (file)
index 0000000..cc98ea7
Binary files /dev/null and b/share/ico/16/sfx.png differ
diff --git a/share/ico/16/test.png b/share/ico/16/test.png
new file mode 100644 (file)
index 0000000..deed6a8
Binary files /dev/null and b/share/ico/16/test.png differ
diff --git a/share/ico/16/unsfx.png b/share/ico/16/unsfx.png
new file mode 100644 (file)
index 0000000..f949cc3
Binary files /dev/null and b/share/ico/16/unsfx.png differ
diff --git a/share/ico/24/add.png b/share/ico/24/add.png
new file mode 100644 (file)
index 0000000..92517a2
Binary files /dev/null and b/share/ico/24/add.png differ
diff --git a/share/ico/24/close.png b/share/ico/24/close.png
new file mode 100644 (file)
index 0000000..452c359
Binary files /dev/null and b/share/ico/24/close.png differ
diff --git a/share/ico/24/create.png b/share/ico/24/create.png
new file mode 100644 (file)
index 0000000..cef689a
Binary files /dev/null and b/share/ico/24/create.png differ
diff --git a/share/ico/24/delete.png b/share/ico/24/delete.png
new file mode 100644 (file)
index 0000000..d64d8a6
Binary files /dev/null and b/share/ico/24/delete.png differ
diff --git a/share/ico/24/extract.png b/share/ico/24/extract.png
new file mode 100644 (file)
index 0000000..f17a2f7
Binary files /dev/null and b/share/ico/24/extract.png differ
diff --git a/share/ico/24/open.png b/share/ico/24/open.png
new file mode 100644 (file)
index 0000000..4f046d4
Binary files /dev/null and b/share/ico/24/open.png differ
diff --git a/share/ico/24/repair.png b/share/ico/24/repair.png
new file mode 100644 (file)
index 0000000..bf91f98
Binary files /dev/null and b/share/ico/24/repair.png differ
diff --git a/share/ico/24/sfx.png b/share/ico/24/sfx.png
new file mode 100644 (file)
index 0000000..91c4651
Binary files /dev/null and b/share/ico/24/sfx.png differ
diff --git a/share/ico/24/test.png b/share/ico/24/test.png
new file mode 100644 (file)
index 0000000..378aacc
Binary files /dev/null and b/share/ico/24/test.png differ
diff --git a/share/ico/24/unsfx.png b/share/ico/24/unsfx.png
new file mode 100644 (file)
index 0000000..728edef
Binary files /dev/null and b/share/ico/24/unsfx.png differ
diff --git a/share/ico/app.png b/share/ico/app.png
new file mode 100644 (file)
index 0000000..1753139
Binary files /dev/null and b/share/ico/app.png differ
diff --git a/share/ico/archive.ico b/share/ico/archive.ico
new file mode 100644 (file)
index 0000000..07bdfc9
Binary files /dev/null and b/share/ico/archive.ico differ
diff --git a/share/ico/archive.png b/share/ico/archive.png
new file mode 100644 (file)
index 0000000..5a52ef8
Binary files /dev/null and b/share/ico/archive.png differ
diff --git a/share/ico/exe.png b/share/ico/exe.png
new file mode 100644 (file)
index 0000000..85c6f85
Binary files /dev/null and b/share/ico/exe.png differ
diff --git a/share/ico/file.png b/share/ico/file.png
new file mode 100644 (file)
index 0000000..733397b
Binary files /dev/null and b/share/ico/file.png differ
diff --git a/share/ico/folder_closed.png b/share/ico/folder_closed.png
new file mode 100644 (file)
index 0000000..86361c1
Binary files /dev/null and b/share/ico/folder_closed.png differ
diff --git a/share/ico/folder_open.png b/share/ico/folder_open.png
new file mode 100644 (file)
index 0000000..66704bd
Binary files /dev/null and b/share/ico/folder_open.png differ
diff --git a/src/Makefile b/src/Makefile
new file mode 100644 (file)
index 0000000..af65888
--- /dev/null
@@ -0,0 +1,18 @@
+# Makefile.\r
+# $Id: Makefile,v 1.5 2009/08/26 13:41:28 sirakaba Exp $\r
+\r
+.PHONY: all clean\r
+\r
+all:\r
+       make -C frontend-wx\r
+#      make -C plugin/calLibrary\r
+       make -C plugin/cuiWrapper\r
+#      make -C plugin/spiLibrary\r
+       make -C common/header\r
+\r
+clean:\r
+       make -C frontend-wx clean\r
+#      make -C plugin/calLibrary clean\r
+       make -C plugin/cuiWrapper clean\r
+#      make -C plugin/spiLibrary clean\r
+       make -C common/header clean\r
diff --git a/src/common/handle/TPIHandle.cpp b/src/common/handle/TPIHandle.cpp
new file mode 100644 (file)
index 0000000..f426073
--- /dev/null
@@ -0,0 +1,242 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: TPIHandle.cpp,v 1.5 2009/08/28 12:41:29 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Includes\r
+//******************************************************************************\r
+\r
+#define wxUSE_DYNLIB_CLASS 1\r
+#include "../header/plugin.h"\r
+#include <wx/dynlib.h>\r
+#include "TPIHandle.h"\r
+\r
+//******************************************************************************\r
+//    Class (TPIHandle)\r
+//******************************************************************************\r
+\r
+TPIHandle::~TPIHandle(void)\r
+{\r
+       this->FreeLibrary();\r
+}\r
+\r
+bool TPIHandle::InitLibrary(const wxString & _szLibName, const wxString & _szArcName, wxULongLong _llSubOption)\r
+{\r
+       this->lib.Load(_szLibName);\r
+       if (! this->lib.IsLoaded())\r
+       {\r
+               return false;\r
+       }\r
+\r
+       if (_szArcName.IsEmpty())\r
+       {\r
+               return true;\r
+       }\r
+\r
+       if (! this->lib.HasSymbol(wxT("LoadPlugin")))\r
+       {\r
+               return false;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("LoadPlugin"));\r
+       if (! p)\r
+       {\r
+               return false;\r
+       }\r
+\r
+       return ((int (__stdcall *)(const wxString &, wxULongLong)) p)(_szArcName, _llSubOption) == TPI_ERROR_SUCCESS;\r
+}\r
+\r
+bool TPIHandle::FreeLibrary(void)\r
+{\r
+       if (! this->lib.IsLoaded())\r
+       {\r
+               return false;\r
+       }\r
+\r
+       if (! this->lib.HasSymbol(wxT("FreePlugin")))\r
+       {\r
+               return false;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("FreePlugin"));\r
+       if (! p)\r
+       {\r
+               return false;\r
+       }\r
+       ((int (__stdcall *)(void *)) p)(NULL);\r
+\r
+       this->lib.Unload();\r
+       return true;\r
+}\r
+\r
+int TPIHandle::GetPluginInformation(unsigned int _uInfoId, wxULongLong _llSubOption, void * _pPtr)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("GetPluginInformation")))\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("GetPluginInformation"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       return ((int (__stdcall *)(unsigned int, wxULongLong, void *)) p)(_uInfoId, _llSubOption, _pPtr);\r
+}\r
+\r
+int TPIHandle::CheckArchive(const wxString & _szArcName, int * _nFileCount)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("CheckArchive")))\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("CheckArchive"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       return ((int (__stdcall *)(const wxString &, int *)) p)(_szArcName, _nFileCount);\r
+}\r
+\r
+int TPIHandle::OpenArchive(const wxString & _szArcName, void * * _hArchive)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("OpenArchive")))\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("OpenArchive"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       return ((int (__stdcall *)(const wxString &, void * *)) p)(_szArcName, _hArchive);\r
+}\r
+\r
+int TPIHandle::CloseArchive(void * _hArchive)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("CloseArchive")))\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("CloseArchive"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       return ((int (__stdcall *)(void *)) p)(_hArchive);\r
+}\r
+\r
+int TPIHandle::GetFileInformation(void * _hArchive, TPI_FILEINFO * _fiInfo, bool _bFirst)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("GetFileInformation")) || ! _fiInfo)\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("GetFileInformation"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       // Initialization.\r
+       _fiInfo->dwAttribute    = 0;\r
+       _fiInfo->dwCRC32        = 0;\r
+       _fiInfo->tmAccess       = 0;\r
+       _fiInfo->tmCreate       = 0;\r
+       _fiInfo->tmModified     = 0;\r
+       _fiInfo->uOSType        = 0;\r
+       _fiInfo->llPackedSize   = 0;\r
+       _fiInfo->llUnpackedSize = 0;\r
+       _fiInfo->szStoredName   = wxEmptyString;\r
+       _fiInfo->szMethod       = wxEmptyString;\r
+       _fiInfo->wCompressRatio = 0;\r
+       _fiInfo->llFileID       = 0;\r
+       _fiInfo->pCustomInfo    = NULL;\r
+\r
+       return ((int (__stdcall *)(void *, TPI_FILEINFO *, bool)) p)(_hArchive, _fiInfo, _bFirst);\r
+}\r
+\r
+int TPIHandle::GetArchiveInformation(void * _hArchive, TPI_ARCHIVEINFO * _aiInfo)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("GetArchiveInformation")) || ! _aiInfo)\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("GetArchiveInformation"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       // Initialization.\r
+       _aiInfo->fSolid                 = false;\r
+       _aiInfo->fMMOptimize    = false;\r
+       _aiInfo->fEncryptData   = false;\r
+       _aiInfo->fEncryptHeader = false;\r
+       _aiInfo->sCompressLevel = 0;\r
+       _aiInfo->sRecoveryRecord= 0;\r
+       _aiInfo->tmAccess       = 0;\r
+       _aiInfo->tmCreate       = 0;\r
+       _aiInfo->tmModified     = 0;\r
+       _aiInfo->nSFXType       = 0;\r
+       _aiInfo->uOSType        = 0;\r
+       _aiInfo->llFileSize     = 0;\r
+       _aiInfo->llPackedSize   = 0;\r
+       _aiInfo->llReadSize     = 0;\r
+       _aiInfo->llUnpackedSize = 0;\r
+       _aiInfo->llSplitSize    = 0;\r
+       _aiInfo->szComment      = wxEmptyString;\r
+       _aiInfo->wCompressRatio = 0;\r
+       _aiInfo->pCustomInfo    = NULL;\r
+\r
+       return ((int (__stdcall *)(void *, TPI_ARCHIVEINFO *)) p)(_hArchive, _aiInfo);\r
+}\r
+\r
+int TPIHandle::Command(unsigned int _uCommand, TPI_SWITCHES * _swInfo, const wxString & _szArcName, const wxArrayString & _szFiles)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("Command")))\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("Command"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       return ((int (__stdcall *)(unsigned int, TPI_SWITCHES *, const wxString &, const wxArrayString &)) p)(_uCommand, _swInfo, _szArcName, _szFiles);\r
+}\r
+\r
+int TPIHandle::SetCallbackProc(TPI_PROC _prProc)\r
+{\r
+       if (! this->lib.HasSymbol(wxT("SetCallbackProc")))\r
+       {\r
+               return -1;\r
+       }\r
+       void * p = this->lib.GetSymbol(wxT("SetCallbackProc"));\r
+       if (! p)\r
+       {\r
+               return -1;\r
+       }\r
+\r
+       return ((int (__stdcall *)(TPI_PROC)) p)(_prProc);\r
+}\r
diff --git a/src/common/handle/TPIHandle.h b/src/common/handle/TPIHandle.h
new file mode 100644 (file)
index 0000000..aea42f4
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: TPIHandle.h,v 1.2 2009/08/15 07:20:13 sirakaba Exp $
+*******************************************************************************/
+
+#ifndef H_LOADED_TPI_HANDLE
+#define H_LOADED_TPI_HANDLE
+
+#define wxUSE_DYNLIB_CLASS  1
+#include <wx/dynlib.h>
+
+//******************************************************************************
+//    Class (TPIHandle)
+//******************************************************************************
+
+class TPIHandle
+{
+       public:
+               ~TPIHandle(void);
+               int GetPluginInformation(unsigned int, wxULongLong, void *);
+               bool InitLibrary(const wxString &, const wxString &, wxULongLong);
+               bool FreeLibrary(void);
+
+               int CheckArchive(const wxString &, int *);
+               int OpenArchive(const wxString &, void * *);
+               int CloseArchive(void *);
+               int GetFileInformation(void *, TPI_FILEINFO *, bool);
+               int GetArchiveInformation(void *, TPI_ARCHIVEINFO *);
+
+               int Command(unsigned int, TPI_SWITCHES *, const wxString &, const wxArrayString &);
+
+               int SetCallbackProc(TPI_PROC);
+       private:
+               wxDynamicLibrary lib;
+};
+
+#endif
diff --git a/src/common/header/Doxyfile b/src/common/header/Doxyfile
new file mode 100644 (file)
index 0000000..d834932
--- /dev/null
@@ -0,0 +1,1473 @@
+# Doxyfile 1.5.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = TPI
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ../../../doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, 
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), 
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, 
+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, 
+# Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = Japanese
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
+# doxygen. The layout file controls the global structure of the generated output files 
+# in an output format independent way. The create the layout file that represents 
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
+# of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = plugin.h
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = 
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = api
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
+# are set, an additional index file will be generated that can be used as input for 
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file .
+
+QHG_LOCATION           = 
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to FRAME, a side panel will be generated
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature. Other possible values 
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list;
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
+# disables this behavior completely. For backwards compatibility with previous
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
+# respectively.
+
+GENERATE_TREEVIEW      = NONE
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff --git a/src/common/header/Makefile b/src/common/header/Makefile
new file mode 100644 (file)
index 0000000..f71799d
--- /dev/null
@@ -0,0 +1,10 @@
+# Makefile.\r
+# $Id: Makefile,v 1.3 2009/08/22 07:18:18 sirakaba Exp $\r
+\r
+.PHONY: all clean\r
+\r
+all: Doxyfile plugin.h\r
+       doxygen $^\r
+\r
+clean:\r
+       rm -f -r ../../../doc/api\r
diff --git a/src/common/header/plugin-extra.h b/src/common/header/plugin-extra.h
new file mode 100644 (file)
index 0000000..8eda0e8
--- /dev/null
@@ -0,0 +1,102 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: plugin-extra.h,v 1.1 2009/05/01 11:42:18 sirakaba Exp $
+*******************************************************************************/
+
+#ifndef __TPI_API_SPEC_EXTRA
+#define __TPI_API_SPEC_EXTRA
+
+//******************************************************************************
+//    Defines
+//******************************************************************************
+
+//
+// Extra Error Codes
+//
+#define TPI_ERROR_IO_MISC_MISC      TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_MISC
+#define TPI_ERROR_IO_MISC_NOTFOUND  TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_NOTFOUND
+#define TPI_ERROR_IO_MISC_ACCESS    TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_ACCESS
+#define TPI_ERROR_IO_MISC_OPEN      TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_OPEN
+#define TPI_ERROR_IO_MISC_CLOSE     TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_CLOSE
+#define TPI_ERROR_IO_MISC_READ      TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_READ
+#define TPI_ERROR_IO_MISC_WRITE     TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_WRITE
+#define TPI_ERROR_IO_MISC_GETINFO   TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_GETINFO
+#define TPI_ERROR_IO_MISC_POINT     TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_POINT
+#define TPI_ERROR_IO_MISC_COPY      TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_COPY
+#define TPI_ERROR_IO_MISC_MOVE      TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_MOVE
+#define TPI_ERROR_IO_MISC_DELETE    TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_DELETE
+#define TPI_ERROR_IO_MISC_SETINFO   TPI_ERROR_IO_MISC_MISC + TPI_ERROR_IO_SETINFO
+
+#define TPI_ERROR_IO_ARC_MISC       TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE
+#define TPI_ERROR_IO_ARC_NOTFOUND   TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_NOTFOUND
+#define TPI_ERROR_IO_ARC_ACCESS     TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_ACCESS
+#define TPI_ERROR_IO_ARC_OPEN       TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_OPEN
+#define TPI_ERROR_IO_ARC_CLOSE      TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_CLOSE
+#define TPI_ERROR_IO_ARC_READ       TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_READ
+#define TPI_ERROR_IO_ARC_WRITE      TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_WRITE
+#define TPI_ERROR_IO_ARC_GETINFO    TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_GETINFO
+#define TPI_ERROR_IO_ARC_POINT      TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_POINT
+#define TPI_ERROR_IO_ARC_COPY       TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_COPY
+#define TPI_ERROR_IO_ARC_MOVE       TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_MOVE
+#define TPI_ERROR_IO_ARC_DELETE     TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_DELETE
+#define TPI_ERROR_IO_ARC_SETINFO    TPI_ERROR_IO_ARC_MISC + TPI_ERROR_IO_SETINFO
+
+#define TPI_ERROR_IO_FILE_MISC      TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_FILE
+#define TPI_ERROR_IO_FILE_NOTFOUND  TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_NOTFOUND
+#define TPI_ERROR_IO_FILE_ACCESS    TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_ACCESS
+#define TPI_ERROR_IO_FILE_OPEN      TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_OPEN
+#define TPI_ERROR_IO_FILE_CLOSE     TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_CLOSE
+#define TPI_ERROR_IO_FILE_READ      TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_READ
+#define TPI_ERROR_IO_FILE_WRITE     TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_WRITE
+#define TPI_ERROR_IO_FILE_GETINFO   TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_GETINFO
+#define TPI_ERROR_IO_FILE_POINT     TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_POINT
+#define TPI_ERROR_IO_FILE_COPY      TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_COPY
+#define TPI_ERROR_IO_FILE_MOVE      TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_MOVE
+#define TPI_ERROR_IO_FILE_DELETE    TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_DELETE
+#define TPI_ERROR_IO_FILE_SETINFO   TPI_ERROR_IO_FILE_MISC + TPI_ERROR_IO_SETINFO
+
+#define TPI_ERROR_IO_TMP_MISC       TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_WORKING
+#define TPI_ERROR_IO_TMP_NOTFOUND   TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_NOTFOUND
+#define TPI_ERROR_IO_TMP_ACCESS     TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_ACCESS
+#define TPI_ERROR_IO_TMP_OPEN       TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_OPEN
+#define TPI_ERROR_IO_TMP_CLOSE      TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_CLOSE
+#define TPI_ERROR_IO_TMP_READ       TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_READ
+#define TPI_ERROR_IO_TMP_WRITE      TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_WRITE
+#define TPI_ERROR_IO_TMP_GETINFO    TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_GETINFO
+#define TPI_ERROR_IO_TMP_POINT      TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_POINT
+#define TPI_ERROR_IO_TMP_COPY       TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_COPY
+#define TPI_ERROR_IO_TMP_MOVE       TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_MOVE
+#define TPI_ERROR_IO_TMP_DELETE     TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_DELETE
+#define TPI_ERROR_IO_TMP_SETINFO    TPI_ERROR_IO_TMP_MISC + TPI_ERROR_IO_SETINFO
+
+#define TPI_ERROR_IO_DIR_MISC       TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_DIRECTORY
+#define TPI_ERROR_IO_DIR_NOTFOUND   TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_NOTFOUND
+#define TPI_ERROR_IO_DIR_ACCESS     TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_ACCESS
+#define TPI_ERROR_IO_DIR_OPEN       TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_OPEN
+#define TPI_ERROR_IO_DIR_CLOSE      TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_CLOSE
+#define TPI_ERROR_IO_DIR_READ       TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_READ
+#define TPI_ERROR_IO_DIR_WRITE      TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_WRITE
+#define TPI_ERROR_IO_DIR_GETINFO    TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_GETINFO
+#define TPI_ERROR_IO_DIR_POINT      TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_POINT
+#define TPI_ERROR_IO_DIR_COPY       TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_COPY
+#define TPI_ERROR_IO_DIR_MOVE       TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_MOVE
+#define TPI_ERROR_IO_DIR_DELETE     TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_DELETE
+#define TPI_ERROR_IO_DIR_SETINFO    TPI_ERROR_IO_DIR_MISC + TPI_ERROR_IO_SETINFO
+
+#endif /* __TPI_API_SPEC_EXTRA */
diff --git a/src/common/header/plugin.def b/src/common/header/plugin.def
new file mode 100644 (file)
index 0000000..e6627b1
--- /dev/null
@@ -0,0 +1,14 @@
+; TPI Common define file for plug-ins.
+; $Id: plugin.def,v 1.1 2009/05/01 11:42:18 sirakaba Exp $
+
+EXPORTS
+       GetPluginInformation            @1
+       LoadPlugin                                      @2
+       FreePlugin                                      @3
+       CheckArchive                            @10
+       OpenArchive                                     @20
+       CloseArchive                            @21
+       GetFileInformation                      @22
+       GetArchiveInformation           @23
+       Command                                         @40
+       SetCallbackProc                         @41
diff --git a/src/common/header/plugin.h b/src/common/header/plugin.h
new file mode 100644 (file)
index 0000000..01c1ccd
--- /dev/null
@@ -0,0 +1,462 @@
+/** \r
+ * @file    plugin.h\r
+ * @brief   プラグインで読み込むTPI共通ヘッダ。\r
+ * @version $Id: plugin.h,v 1.5 2009/08/28 12:41:29 sirakaba Exp $\r
+ *\r
+ * @mainpage TPI reference manual\r
+ * TPIは簡易でマルチプラットフォームなプラグイン仕様です。仕様は現在策定中であるため、今後改訂される可能性があります。\r
+ */\r
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+*******************************************************************************/\r
+\r
+#define wxUSE_UNICODE       1\r
+#include <wx/wx.h>\r
+#include <wx/filename.h>\r
+\r
+#ifndef __TPI_API_SPEC\r
+#define __TPI_API_SPEC\r
+\r
+#ifdef __GNUC__\r
+#define __stdcall __attribute__((__stdcall__))\r
+#endif\r
+\r
+// *****************************************************************************\r
+/// @defgroup constants 定数\r
+/// @{\r
+// *****************************************************************************\r
+\r
+/**\r
+ * @defgroup c_error エラーコード\r
+ * 各APIを実行した場合に返される、異常の理由を表す一意の数値。\r
+ * @{\r
+ */\r
+/** 異常が発生せず、正常に処理を終了した。 */\r
+#define TPI_ERROR_SUCCESS           TRUE\r
+\r
+/**\r
+ * @defgroup c_error_undefined 未定義エラー\r
+ * TPIとしては未定義の、各プラグイン独自のエラーを表す。\r
+ * @{\r
+ */\r
+/** 未定義エラーの基本値。 */\r
+#define TPI_ERROR_UNDEFINED         2000\r
+#define TPI_ERROR_U_LOAD_LIBRARY    TPI_ERROR_UNDEFINED + 1 /**< 処理ライブラリの初期化に失敗した。 */\r
+#define TPI_ERROR_U_USE_LIBRARY     TPI_ERROR_UNDEFINED + 2 /**< 処理ライブラリの使用時に問題が発生した。 */\r
+#define TPI_ERROR_U_FREE_LIBRARY    TPI_ERROR_UNDEFINED + 3 /**< 処理ライブラリの解放に失敗した。 */\r
+/** @} c_error_undefined */\r
+\r
+/**\r
+ * @defgroup c_error_defined 定義済エラー\r
+ * TPIとして定義されたエラーを表す。\r
+ * @{\r
+ */\r
+/** 定義済みエラーの基本値。 */\r
+#define TPI_ERROR_DEFINED           3000\r
+#define TPI_ERROR_D_PARAMETER       TPI_ERROR_DEFINED + 1   /**< APIに渡された引数が不正であった。 */\r
+#define TPI_ERROR_D_UNSUPPORTED     TPI_ERROR_DEFINED + 2   /**< 対応していないAPIである。もしくは、APIの動作のうち対応していないものを実行しようとした。 */\r
+#define TPI_ERROR_D_SKIPPED         TPI_ERROR_DEFINED + 3   /**< コールバック関数が、APIに処理を中止するよう指示した。 */\r
+#define TPI_ERROR_D_OUTOFMEMORY     TPI_ERROR_DEFINED + 4   /**< 処理中にメモリが不足し、確保できなくなった。 */\r
+#define TPI_ERROR_D_USEMEMORY       TPI_ERROR_DEFINED + 5   /**< メモリを使用/解放する際に問題が発生した。 */\r
+\r
+/**\r
+ * @defgroup c_error_defined_io I/Oエラー\r
+ * 各種I/Oエラーを表す。実際に返される数値は plugin-extra.h に定義されている定数を参照。\r
+ * @{\r
+ * @defgroup c_error_defined_io_target I/O対象ファイル\r
+ * I/Oエラーの対象となったファイルを表す。\r
+ * @{\r
+ */\r
+#define TPI_ERROR_T_IO_MISC         0                           /**< 不明 */\r
+#define TPI_ERROR_T_IO_ARCHIVE      TPI_ERROR_T_IO_MISC + 100   /**< 書庫 */\r
+#define TPI_ERROR_T_IO_FILE         TPI_ERROR_T_IO_MISC + 200   /**< 通常ファイル */\r
+#define TPI_ERROR_T_IO_WORKING      TPI_ERROR_T_IO_MISC + 300   /**< 中間ファイル */\r
+#define TPI_ERROR_T_IO_DIRECTORY    TPI_ERROR_T_IO_MISC + 400   /**< ディレクトリ */\r
+/** @} c_error_defined_io_target */\r
+\r
+#define TPI_ERROR_IO_MISC           4000                    /**< その他/不明なI/Oエラー。 */\r
+#define TPI_ERROR_IO_NOTFOUND       TPI_ERROR_IO_MISC + 1   /**< ファイルが存在しない。 */\r
+#define TPI_ERROR_IO_ACCESS         TPI_ERROR_IO_MISC + 2   /**< ファイルにアクセスできない。共有違反が発生した。 */\r
+#define TPI_ERROR_IO_OPEN           TPI_ERROR_IO_MISC + 3   /**< ファイルを開くことに失敗した。 */\r
+#define TPI_ERROR_IO_CLOSE          TPI_ERROR_IO_MISC + 4   /**< ファイルを閉じることに失敗した。 */\r
+#define TPI_ERROR_IO_READ           TPI_ERROR_IO_MISC + 5   /**< ファイルからデータを読み込めない。 */\r
+#define TPI_ERROR_IO_WRITE          TPI_ERROR_IO_MISC + 6   /**< ファイルにデータを書き込めない。 */\r
+#define TPI_ERROR_IO_GETINFO        TPI_ERROR_IO_MISC + 7   /**< ファイルから各種の情報を取得することに失敗した。 */\r
+#define TPI_ERROR_IO_POINT          TPI_ERROR_IO_MISC + 8   /**< ファイル内のポインタ移動に失敗した。 */\r
+#define TPI_ERROR_IO_COPY           TPI_ERROR_IO_MISC + 9   /**< ファイルのコピーに失敗した。 */\r
+#define TPI_ERROR_IO_MOVE           TPI_ERROR_IO_MISC + 10  /**< ファイルの移動に失敗した。 */\r
+#define TPI_ERROR_IO_DELETE         TPI_ERROR_IO_MISC + 11  /**< ファイルの削除に失敗した。 */\r
+#define TPI_ERROR_IO_SETINFO        TPI_ERROR_IO_MISC + 12  /**< ファイルに各種の情報を設定することに失敗した。 */\r
+\r
+#define TPI_ERROR_ARC_MISC          TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + 20 /**< 書庫に関するエラーの基本値。 */\r
+#define TPI_ERROR_ARC_UNSUPPORTED   TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_MISC + 1 /**< 書庫に対応していない。 */\r
+#define TPI_ERROR_ARC_ENCRYPTED     TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_MISC + 2 /**< 書庫が暗号化されている。 */\r
+#define TPI_ERROR_ARC_BROKEN_MISC   TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + 30 /**< 書庫の破損に関するエラーの基本値。 */\r
+#define TPI_ERROR_ARC_BROKEN_SUM    TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_BROKEN_MISC + 1  /**< チェックサムが一致しない。 */\r
+#define TPI_ERROR_ARC_BROKEN_SIZE   TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_BROKEN_MISC + 2  /**< ファイルサイズが一致しない。 */\r
+#define TPI_ERROR_ARC_BROKEN_HEADER TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_BROKEN_MISC + 3  /**< ヘッダが破損している。 */\r
+/** @} c_error_defined_io */\r
+/** @} c_error_defined */\r
+/** @} c_error */\r
+\r
+/**\r
+ * @defgroup c_info 情報コード\r
+ * GetPluginInformation() で、プラグインに関する情報を取得する時に用いる、情報を表す一意の数値。\r
+ * @{\r
+ */\r
+#define TPI_INFO_VERSION_MAJOR      0x0001  /**< プラグインのメジャーバージョン */\r
+#define TPI_INFO_VERSION_MINOR      0x0002  /**< プラグインのマイナーバージョン */\r
+#define TPI_INFO_VERSION_API        0x0003  /**< プラグインが対応するAPIのバージョン */\r
+#define TPI_INFO_SUPPORTED_TYPE     0x0004  /**< プラグインが格納に対応している形式名 */\r
+#define TPI_INFO_SUPPORTED_SUFFIX   0x0005  /**< プラグインが格納に対応している拡張子 */\r
+/** @} c_info */\r
+\r
+/**\r
+ * @defgroup c_command コマンドコード\r
+ * Command() で処理する内容を指定する一意の数値。\r
+ * @{\r
+ */\r
+#define TPI_COMMAND_ADD             0x0001  /**< 書庫にファイルを格納する */\r
+#define TPI_COMMAND_EXTRACT         0x0002  /**< 書庫からファイルを展開する */\r
+#define TPI_COMMAND_DELETE          0x0003  /**< 書庫からファイルを削除する */\r
+#define TPI_COMMAND_UPDATE          0x0004  /**< 書庫のファイルを更新する */\r
+#define TPI_COMMAND_TEST            0x0005  /**< 書庫のファイルを検査する */\r
+#define TPI_COMMAND_REPAIR          0x0006  /**< 書庫のファイルを修復する */\r
+#define TPI_COMMAND_MOVE            0x0007  /**< 書庫のファイルを移動する */\r
+#define TPI_COMMAND_SFX             0x0011  /**< 書庫をSFXに変換する */\r
+#define TPI_COMMAND_UNSFX           0x0012  /**< 書庫をSFXから通常の書庫に変換する */\r
+/** @} c_command */\r
+\r
+/**\r
+ * @defgroup c_process 処理コード\r
+ * コールバック関数にて対象となる処理を通知する一意の数値。\r
+ * @sa TPI_PROC\r
+ * @{\r
+ */\r
+/** 共通メッセージ。通常の処理に対して送信される。 */\r
+/** @sa c_process_common */\r
+#define TPI_NOTIFY_COMMON           0x0001\r
+#define TPI_NOTIFY_SETPARAM         0x0002  /**< パラメータ設定。任意のパラメータが要求する場合に送信される。 */\r
+/** @} c_process */\r
+\r
+/**\r
+ * @defgroup c_process_common イベントコード\r
+ * TPI_NOTIFY_COMMON 送信時に、TPI_PROCESSINFO 構造体の uMessage に格納される値。\r
+ * @sa TPI_NOTIFY_COMMON\r
+ * @sa TPI_PROCESSINFO::uMessage\r
+ * @{\r
+ */\r
+/** 進捗状況についての情報を TPI_PROCESSINFO に格納。 */\r
+/** @sa c_process_common_status */\r
+/** @sa TPI_PROCESSINFO */\r
+#define TPI_MESSAGE_STATUS          0x0001\r
+/** 処理中に続行不可能なエラーが発生した。 */\r
+/** @sa c_error */\r
+#define TPI_MESSAGE_ERROR           0x0002\r
+#define TPI_MESSAGE_WARNING         0x0003  /**< 処理中に続行可能な警告が発生した。 */\r
+/** @} c_process_common */\r
+\r
+/**\r
+ * @defgroup c_process_common_status 進捗状況コード\r
+ * TPI_MESSAGE_STATUS が送信された時に、TPI_PROCESSINFO 構造体の uStatus に格納される値。\r
+ * @sa TPI_MESSAGE_STATUS\r
+ * @sa TPI_PROCESSINFO::uStatus\r
+ * @{\r
+ */\r
+#define TPI_STATUS_OPENARCHIVE      0x0001  /**< 書庫を開いた。 */\r
+#define TPI_STATUS_CLOSEARCHIVE     0x0002  /**< 書庫を閉じた。 */\r
+#define TPI_STATUS_SEEKFILE         0x0003  /**< 対象ファイルを検索している。 */\r
+#define TPI_STATUS_BEGINPROCESS     0x0004  /**< 処理を開始した。 */\r
+#define TPI_STATUS_INPROCESS        0x0005  /**< 処理中である。 */\r
+#define TPI_STATUS_ENDPROCESS       0x0006  /**< 処理を終了した。 */\r
+#define TPI_STATUS_TESTARCHIVE      0x0007  /**< 書庫を検査中。 */\r
+#define TPI_STATUS_COPYARCHIVE      0x0008  /**< 書庫を移動/複製中。 */\r
+/** @} c_process_common_status */\r
+\r
+/**\r
+ * @defgroup c_callback_return コールバック関数の返し値\r
+ * コールバック関数の終了時に、返し値として指定し、処理の続行について指示する値。\r
+ * @sa TPI_PROC\r
+ * @{\r
+ */\r
+#define TPI_CALLBACK_CONTINUE       TRUE    /**< 処理を続行する。 */\r
+#define TPI_CALLBACK_CANCEL         0x1000  /**< 処理を中断する。 */\r
+#define TPI_CALLBACK_UNSUPPORTED    0x1001  /**< 処理を無視した。不明な処理である。 */\r
+/** @} c_callback_return */\r
+\r
+/**\r
+ * @defgroup c_file_attribute ファイル属性コード\r
+ * TPI_FILEINFO 構造体の dwAttribute に格納される、ファイルの属性を表す値。\r
+ * @sa TPI_FILEINFO::dwAttribute\r
+ * @{\r
+ */\r
+#define TPI_ATTRIBUTE_READONLY          0x00000001 /**< 読み取り専用。 */\r
+#define TPI_ATTRIBUTE_HIDDEN            0x00000002 /**< 隠しファイル。 */\r
+#define TPI_ATTRIBUTE_SYSTEM            0x00000004 /**< システムファイル。 */\r
+#define TPI_ATTRIBUTE_DIRECTORY         0x00000010 /**< ディレクトリ。 */\r
+#define TPI_ATTRIBUTE_ARCHIVE           0x00000020 /**< アーカイブ。 */\r
+#define TPI_ATTRIBUTE_ENCRYPTED         0x00004000 /**< 暗号化ファイル。 */\r
+/** @} c_file_attribute */\r
+/// @} constants\r
+\r
+// *****************************************************************************\r
+/// @defgroup structures 構造体\r
+/// @{\r
+// *****************************************************************************\r
+\r
+#pragma pack(1)\r
+/** ライブラリについての情報を格納する構造体。 */\r
+typedef struct _TPI_tagLIBINFO\r
+{\r
+       wxFileName      fnLibrary;  /**< ファイル名 */\r
+       wxString        szTypeName; /**< 形式名 */\r
+       wxString        szSuffix;   /**< 拡張子 */\r
+       wxULongLong     llFileId;   /**< 一意のファイルID */\r
+}      TPI_LIBINFO;\r
+\r
+/** 特定ファイルについての情報を格納する構造体。 */\r
+typedef struct _TPI_tagFILEINFO\r
+{\r
+       /** 属性。 */\r
+       /** @sa c_file_attribute */\r
+       unsigned long   dwAttribute;\r
+       unsigned long   dwCRC32;        /**< CRC32。 */\r
+       wxDateTime      tmAccess;       /**< 最終参照日時 */\r
+       wxDateTime      tmCreate;       /**< 作成日時 */\r
+       wxDateTime      tmModified;     /**< 最終更新日時 */\r
+       unsigned int    uOSType;        /**< 作成元OS */\r
+       wxULongLong     llPackedSize;   /**< 格納後のサイズ */\r
+       wxULongLong     llUnpackedSize; /**< 格納前のサイズ */\r
+       wxFileName      fnFileName;     /**< ファイル名 */\r
+       wxString        szStoredName;   /**< 格納された名前 */\r
+       wxString        szMethod;       /**< 格納メソッド */\r
+       unsigned short  wCompressRatio; /**< 圧縮率 */\r
+       wxULongLong     llFileID;       /**< 一意のファイルID */\r
+       void *          pCustomInfo;    /**< 任意の情報を格納 */\r
+}      TPI_FILEINFO;\r
+\r
+/** 書庫についての情報を格納する構造体。 */\r
+typedef struct _TPI_tagARCHIVEINFO\r
+{\r
+       bool            fSolid;             /**< Solid圧縮されているならtrue */\r
+       bool            fMMOptimize;        /**< マルチメディアファイルに最適化されているならtrue */\r
+       bool            fEncryptData;       /**< データが暗号化されているならtrue */\r
+       bool            fEncryptHeader;     /**< ヘッダが暗号化されているならtrue */\r
+       short           sCompressLevel;     /**< 圧縮レベル(0-9) */\r
+       short           sRecoveryRecord;    /**< リカバリーレコード(0-100) */\r
+       wxDateTime      tmAccess;           /**< 最終参照日時 */\r
+       wxDateTime      tmCreate;           /**< 作成日時 */\r
+       wxDateTime      tmModified;         /**< 最終更新日時 */\r
+       int             nSFXType;           /**< SFXの種類を表す一意の値 */\r
+       unsigned int    uOSType;            /**< 作成元OS */\r
+       wxULongLong     llFileSize;         /**< ファイルサイズ */\r
+       wxULongLong     llPackedSize;       /**< 格納後のサイズ */\r
+       wxULongLong     llReadSize;         /**< 読み込み済みサイズ */\r
+       wxULongLong     llUnpackedSize;     /**< 格納前のサイズ */\r
+       wxULongLong     llSplitSize;        /**< 分割サイズ */\r
+       wxFileName      fnArchive;          /**< ファイル名 */\r
+       wxString        szComment;          /**< コメント */\r
+       unsigned short  wCompressRatio;     /**< 圧縮率 */\r
+       void *          pCustomInfo;        /**< 任意の情報を格納 */\r
+}      TPI_ARCHIVEINFO;\r
+\r
+/** 処理についての基本情報を格納する構造体。 */\r
+typedef struct _TPI_tagSWITCHES\r
+{\r
+       bool            fStoreDirectoryPathes;  /**< パス情報を格納するならtrue */\r
+       bool            fMakeSFX;               /**< SFXを作成するならtrue */\r
+       bool            fSolid;                 /**< Solid圧縮をするならtrue */\r
+       bool            fMMOptimize;            /**< マルチメディアファイルに最適化するならtrue */\r
+       bool            fEncryptHeader;         /**< ヘッダを暗号化するならtrue */\r
+       wxFileName      fnDestinationDirectory; /**< 出力先ディレクトリ */\r
+       short           sCompressLevel;         /**< 圧縮レベル(0-9) */\r
+       short           sRecoveryRecord;        /**< リカバリーレコード(0-100) */\r
+       wxULongLong     llSplitSize;            /**< 分割サイズ(0のときは分割しない) */\r
+       wxString        szPassword;             /**< パスワード */\r
+       wxString        szKeyFile;              /**< キーファイル */\r
+       wxString        szComment;              /**< コメント */\r
+       int             eArchiveType;           /**< 書庫形式を表す一意の数値 */\r
+       void *          pCustomSwitches;        /**< 任意の情報を格納 */\r
+}      TPI_SWITCHES;\r
+\r
+/** 処理についての通知情報を格納する構造体。 */\r
+typedef struct _TPI_tagPROCESSINFO\r
+{\r
+       /** イベントコード。 */\r
+       /** @sa c_process_common */\r
+       unsigned int    uMessage;\r
+       /** 進捗状況コード。 */\r
+       /** @sa c_process_common_status */\r
+       unsigned int    uStatus;\r
+       TPI_FILEINFO    fiInfo;                 /**< 処理中のファイルに関する情報 */\r
+       wxULongLong     llProcessedSize;        /**< 処理済サイズ */\r
+       wxFileName      fnDestination;          /**< 出力先ファイル */\r
+       void *          pCustomInfo;            /**< 任意の情報を格納 */\r
+}      TPI_PROCESSINFO;\r
+\r
+/// @} structures\r
+\r
+// *****************************************************************************\r
+/// @defgroup callback コールバック関数\r
+/// @{\r
+// *****************************************************************************\r
+\r
+/** コールバック関数\r
+  * @param  _uMsg   処理コード。\r
+  * @param  _pInfo  処理コードにより異なる。\r
+  * @return コールバック関数の返し値。\r
+  * @sa c_process\r
+  * @sa c_callback_return\r
+  */\r
+typedef int(__stdcall * TPI_PROC)(unsigned int _uMsg, void * _pInfo);\r
+\r
+/// @} callback\r
+\r
+#pragma pack()\r
+\r
+// *****************************************************************************\r
+/// @defgroup functions API\r
+/// @{\r
+// *****************************************************************************\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif\r
+\r
+/** プラグインに関する情報を取得。\r
+ * @param  _uInfoId     取得する情報を示す数値(情報コード)。\r
+ * @param  _llSubOption 情報コードにより異なる。\r
+ * @param  _pPtr        結果を格納するバッファへのポインタ。\r
+ * @return エラーコード。\r
+ * @sa c_info\r
+ */\r
+int __stdcall GetPluginInformation\r
+(\r
+       unsigned int _uInfoId,\r
+       wxULongLong _llSubOption,\r
+       void * _pPtr\r
+);\r
+\r
+/** プラグインを使用するための初期化を行う。\r
+ * @param  _szArcName   これから操作する対象となる書庫名。不明な場合はNULLを指定。\r
+ * @param  _llSubOption 書庫を作成する場合には、その格納形式IDを指定。それ以外の場合は0。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall LoadPlugin\r
+(\r
+       const wxString & _szArcName,\r
+       wxULongLong _llSubOption\r
+);\r
+\r
+/** プラグインを解放する。\r
+ * @param  _pReserved   予約済み。現状では常にNULL。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall FreePlugin\r
+(\r
+       void * _pReserved\r
+);\r
+\r
+/** プラグインが対応しているファイルかどうか確認する。\r
+ * @param  _szArcName   確認する対象となる書庫名。\r
+ * @param  _nFileCount  書庫に格納されているファイル数を格納するためのポインタ。情報が不要ならばNULLを指定。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall CheckArchive\r
+(\r
+       const wxString & _szArcName,\r
+       int * _nFileCount\r
+);\r
+\r
+/** 書庫のハンドルを取得する。\r
+ * @param  _szArcName   操作する対象となる書庫名。\r
+ * @param  _hArchive    取得したハンドルを格納するためのポインタ。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall OpenArchive\r
+(\r
+       const wxString & _szArcName,\r
+       void * * _hArchive\r
+);\r
+\r
+/** 書庫のハンドルを解放する。\r
+ * @param  _hArchive    操作する対象となる書庫ハンドル。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall CloseArchive\r
+(\r
+       void * _hArchive\r
+);\r
+\r
+/** 書庫に格納されているファイルの情報を順に取得する。\r
+ * @param  _hArchive    操作する対象となる書庫ハンドル。\r
+ * @param  _fiInfo      取得した情報を格納するためのポインタ。\r
+ * @param  _bFirst      最初のファイルから情報を取得する場合にはTRUE。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall GetFileInformation\r
+(\r
+       void * _hArchive,\r
+       TPI_FILEINFO * _fiInfo,\r
+       bool _bFirst\r
+);\r
+\r
+/** 書庫の情報を順に取得する。\r
+ * @param  _hArchive    操作する対象となる書庫ハンドル。\r
+ * @param  _aiInfo      取得した情報を格納するためのポインタ。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall GetArchiveInformation\r
+(\r
+       void * _hArchive,\r
+       TPI_ARCHIVEINFO * _aiInfo\r
+);\r
+\r
+/** 各種の書庫操作を行う。\r
+ * @param  _uCommand    書庫操作の種類を表すコマンドコード。\r
+ * @param  _swInfo      書庫操作に必要な情報を格納した構造体へのポインタ。\r
+ * @param  _szArcName   操作する対象となる書庫名。\r
+ * @param  _szFiles     ファイル名を指定する改行(¥n)区切りリスト。\r
+ * @return エラーコード。\r
+ * @sa c_command\r
+ */\r
+int __stdcall Command\r
+(\r
+       unsigned int _uCommand,\r
+       TPI_SWITCHES * _swInfo,\r
+       const wxString & _szArcName,\r
+       const wxArrayString & _szFiles\r
+);\r
+\r
+/** Command() 実行中に処理の進捗状況を送信するコールバック関数を指定する。\r
+ * @param  _prArcProc   コールバック関数へのポインタ。\r
+ * @return エラーコード。\r
+ */\r
+int __stdcall SetCallbackProc\r
+(\r
+       TPI_PROC _prArcProc\r
+);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+/// @} functions\r
+\r
+#endif /* __TPI_API_SPEC */\r
diff --git a/src/common/library/library.cpp b/src/common/library/library.cpp
new file mode 100644 (file)
index 0000000..69e8f24
--- /dev/null
@@ -0,0 +1,185 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: library.cpp,v 1.10 2009/09/27 13:42:33 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Includes\r
+//******************************************************************************\r
+\r
+#include "library.h"\r
+\r
+//******************************************************************************\r
+//    Functions\r
+//******************************************************************************\r
+\r
+wxString ProcessBoolLoop(bool b, wxString szCommandLine, size_t * nPos, wxString szVal, bool fIf)\r
+{\r
+       wxString szCommandLineSend;\r
+       size_t i = * nPos;\r
+       for (i++; i < szCommandLine.Len() && szCommandLine[i] != (fIf ? wxT('|') : wxT('}')); i++)\r
+       {\r
+               if (fIf ? b : ! b)\r
+               {\r
+                       szCommandLineSend += szCommandLine[i] == wxT('#') ? szVal : szCommandLine[i];\r
+               }\r
+       }\r
+       * nPos = i;\r
+       return szCommandLineSend;\r
+}\r
+\r
+wxString ProcessBool(bool b, wxString szCommandLine, size_t * nPos, wxString szVal = wxEmptyString)\r
+{\r
+       wxString szCommandLineSend;\r
+       size_t i = * nPos;\r
+       if (szCommandLine[++i] == wxT('{'))\r
+       {\r
+               // \8fð\8c\8f\94»\95Ê\81B\r
+               szCommandLineSend += ProcessBoolLoop(b, szCommandLine, & i, szVal, true);\r
+               szCommandLineSend += ProcessBoolLoop(b, szCommandLine, & i, szVal, false);\r
+       }\r
+       else\r
+       {\r
+               // bool\92l\82ð\95Ô\8bp\81B\r
+               szCommandLineSend += b ? wxT('1') : wxT('0');\r
+               i--;\r
+       }\r
+       * nPos = i;\r
+       return szCommandLineSend;\r
+}\r
+\r
+wxString MakeCommandLineSend(wxString szCommandLine, wxString szArcName, TPI_SWITCHES * swInfo, wxArrayString asFiles, wxString szResponceFileName)\r
+{\r
+       // \83R\83}\83\93\83h\83\89\83C\83\93\95Ï\90\94\82ð\8d·\82µ\91Ö\82¦\81B\r
+       wxString szCommandLineSend;\r
+       for (size_t i = 0; i < szCommandLine.Len(); i++)\r
+       {\r
+               if (szCommandLine[i] == wxT('%'))\r
+               {\r
+                       // \95Ï\90\94\89ð\90Í\8aJ\8en\81B\r
+                       switch (szCommandLine[++i])\r
+                       {\r
+                       case wxT('%'):\r
+                               // \93Á\8eê\95\8e\9a\81B\r
+                               szCommandLineSend += szCommandLine[i];\r
+                               break;\r
+                       case wxT('9'):\r
+                               switch (szCommandLine[++i])\r
+                               {\r
+                               // 0: \8f\91\8cÉ\96¼\r
+                               // 1: \8fo\97Í\90æ\r
+                               // 2: \83\8c\83X\83|\83\93\83X\83t\83@\83C\83\8b\r
+                               // 3: \83t\83@\83C\83\8b\83\8a\83X\83g\r
+                               // 4: \88³\8fk\83\8c\83x\83\8b\r
+                               // 5: \83\8a\83J\83o\83\8a\81[\83\8c\83R\81[\83h\r
+                               // 6: \83R\83\81\83\93\83g\r
+                               case wxT('0'): szCommandLineSend += szArcName; break;\r
+                               case wxT('1'): szCommandLineSend += swInfo->fnDestinationDirectory.GetPathWithSep(); break;\r
+                               case wxT('2'): szCommandLineSend += szResponceFileName; break;\r
+                               case wxT('3'):\r
+                                       for (size_t j = 0; j < asFiles.GetCount(); j++)\r
+                                       {\r
+                                               szCommandLineSend += wxT("\"") + asFiles[j] + wxT("\" ");\r
+                                       }\r
+                                       break;\r
+                               case wxT('4'): szCommandLineSend += wxString::Format(wxT("%d"), swInfo->sCompressLevel); break;\r
+                               case wxT('5'): szCommandLineSend += wxString::Format(wxT("%d"), swInfo->sRecoveryRecord); break;\r
+                               case wxT('6'): szCommandLineSend += swInfo->szComment; break;\r
+                               }\r
+                               break;\r
+                       case wxT('a'):\r
+                               switch (szCommandLine[++i])\r
+                               {\r
+                               // 0: \83p\83X\82ð\97L\8cø\82É\82·\82é\82©\r
+                               // 1: SFX\82ð\8dì\90¬\82·\82é\82©\r
+                               // 2: Solid\88³\8fk\r
+                               // 3: MM\8dÅ\93K\89»\r
+                               // 4: \83w\83b\83_\88Ã\8d\86\89»\r
+                               // 5: \83p\83X\83\8f\81[\83h\r
+                               // 6: \83L\81[\83t\83@\83C\83\8b\r
+                               // 7: \95ª\8a\84\83T\83C\83Y\r
+                               case wxT('0'): szCommandLineSend += ProcessBool(swInfo->fStoreDirectoryPathes,      szCommandLine, & i); break;\r
+                               case wxT('1'): szCommandLineSend += ProcessBool(swInfo->fMakeSFX,                   szCommandLine, & i); break;\r
+                               case wxT('2'): szCommandLineSend += ProcessBool(swInfo->fSolid,                     szCommandLine, & i); break;\r
+                               case wxT('3'): szCommandLineSend += ProcessBool(swInfo->fMMOptimize,                szCommandLine, & i); break;\r
+                               case wxT('4'): szCommandLineSend += ProcessBool(swInfo->fEncryptHeader,             szCommandLine, & i); break;\r
+                               case wxT('5'): szCommandLineSend += ProcessBool(swInfo->szPassword != wxEmptyString,szCommandLine, & i, swInfo->szPassword); break;\r
+                               case wxT('6'): szCommandLineSend += ProcessBool(swInfo->szKeyFile  != wxEmptyString,szCommandLine, & i, swInfo->szKeyFile); break;\r
+                               case wxT('7'): szCommandLineSend += ProcessBool(swInfo->llSplitSize != 0,           szCommandLine, & i, swInfo->llSplitSize.ToString()); break;\r
+                               }\r
+                               break;\r
+                       }\r
+               }\r
+               else\r
+               {\r
+                       szCommandLineSend += szCommandLine[i];\r
+               }\r
+       }\r
+\r
+       return szCommandLineSend;\r
+}\r
+\r
+wxString MakeResponceFile(wxArrayString asFiles, bool bQuote)\r
+{\r
+       wxFile fListFile;\r
+       wxString szFileName = wxFileName::CreateTempFileName(wxT("__listfile"), & fListFile);\r
+       if (szFileName.IsEmpty())\r
+       {\r
+               return wxEmptyString;\r
+       }\r
+\r
+       // \83t\83@\83C\83\8b\83\8a\83X\83g\8f\91\82«\8d\9e\82Ý\8f\88\97\9d\81B\r
+       if (asFiles.GetCount() == 0)\r
+       {\r
+               fListFile.Write(wxT("*"));\r
+       }\r
+       else\r
+       {\r
+               // \96\88\89ñ\88ø\97p\95\84\82Å\8a\87\82Á\82Ä\8f\88\97\9d\82·\82é\81B\r
+               for (size_t i = 0; i < asFiles.GetCount(); i++)\r
+               {\r
+                       // \8dÅ\8cã\82É\89ü\8ds\82ª\82 \82é\82Æ\93®\8dì\82ª\82¨\82©\82µ\82­\82È\82é\8fê\8d\87\82ª\82 \82é\96Í\97l\81B\r
+                       if (i != 0)\r
+                       {\r
+#ifdef __WINDOWS__\r
+                               fListFile.Write(wxT("\r\n"));\r
+#else\r
+                               fListFile.Write(wxT("\n"));\r
+#endif\r
+                       }\r
+                       fListFile.Write((bQuote ? wxT("\"") : wxEmptyString) + asFiles[i] + (bQuote ? wxT("\"") : wxEmptyString));\r
+               }\r
+       }\r
+       fListFile.Close();\r
+\r
+       return szFileName;\r
+}\r
+\r
+wxString MB2String(const char * sz)\r
+{\r
+//     wxString szTemp(sz, wxConvLibc);\r
+       wxString szTemp(sz, wxConvUTF8);\r
+       return szTemp;\r
+}\r
+\r
+wxString WC2String(const wchar_t * sz)\r
+{\r
+       wxString szTemp((wchar_t *) sz, wxConvUTF8);\r
+       return szTemp;\r
+}\r
diff --git a/src/common/library/library.h b/src/common/library/library.h
new file mode 100644 (file)
index 0000000..53d0cd9
--- /dev/null
@@ -0,0 +1,36 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: library.h,v 1.5 2009/09/27 10:11:13 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Includes\r
+//******************************************************************************\r
+\r
+#include "../header/plugin.h"\r
+#include <wx/file.h>\r
+\r
+//******************************************************************************\r
+//    Functions\r
+//******************************************************************************\r
+\r
+wxString MakeCommandLineSend(wxString szCommandLine, wxString szArcName, TPI_SWITCHES * swInfo, wxArrayString asFiles, wxString szResponceFileName);\r
+wxString MakeResponceFile(wxArrayString asFiles, bool bQuote);\r
+wxString MB2String(const char * sz);\r
+wxString WC2String(const wchar_t * sz);\r
diff --git a/src/frontend/Makefile b/src/frontend/Makefile
new file mode 100644 (file)
index 0000000..d62259c
--- /dev/null
@@ -0,0 +1,27 @@
+# Makefile.\r
+# $Id: Makefile,v 1.5 2009/08/22 13:31:54 sirakaba Exp $\r
+\r
+# Define compilers.\r
+CC = g++\r
+CPPFLAGS = -c -O3 -Wall -W `wx-config --cppflags`\r
+LDFLAGS  = -s `wx-config --libs`\r
+\r
+# Define i/o files.\r
+DIR_OBJ  = ../tmp\r
+OBJS  = frontend-wx.o cls_filedroptarget.o cls_listctrl.o dlg_make.o dlg_process.o frm_main.o functions.o ../common/handle/TPIHandle.o\r
+OUT_EXE  = ../../bin/frontend\r
+\r
+.PHONY: all clean\r
+.SUFFIXES: .cpp .o\r
+\r
+all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+       $(CC) $(LDFLAGS) -o $(OUT_EXE) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+\r
+clean:\r
+       rm -f -r $(DIR_OBJ) $(OUT_EXE)\r
+\r
+$(DIR_OBJ):\r
+       mkdir $(DIR_OBJ)\r
+\r
+$(DIR_OBJ)/%.o: %.cpp\r
+       $(CC) $(CPPFLAGS) -o $@ $<\r
diff --git a/src/frontend/cls_filedroptarget.cpp b/src/frontend/cls_filedroptarget.cpp
new file mode 100644 (file)
index 0000000..ba9b68a
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: cls_filedroptarget.cpp,v 1.2 2009/08/09 06:08:51 sirakaba Exp $
+*******************************************************************************/
+
+#include "frontend.h"
+
+#include "frm_main.h"
+#include "cls_filedroptarget.h"
+
+//******************************************************************************
+// myFileDropTarget
+//******************************************************************************
+
+myFileDropTarget::myFileDropTarget(MainFrame * mainFrame)
+{
+       this->mainFrame = mainFrame;
+}
+
+//******************************************************************************
+// Event handler.
+//******************************************************************************
+
+bool myFileDropTarget::OnDropFiles(wxCoord, wxCoord, const wxArrayString & szFileNames)
+{
+       // \8dÅ\8f\89\82Ì\83t\83@\83C\83\8b\82µ\82©\8f\88\97\9d\82µ\82È\82¢\81B
+       // \8f\91\8cÉ\82ð\8aJ\82­\81B
+       wxCommandEvent e;
+       this->mainFrame->OnArcClose(e);
+       this->mainFrame->LoadArc(szFileNames[0]);
+
+       return true;
+}
diff --git a/src/frontend/cls_filedroptarget.h b/src/frontend/cls_filedroptarget.h
new file mode 100644 (file)
index 0000000..e7f44f6
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: cls_filedroptarget.h,v 1.3 2009/08/15 07:20:13 sirakaba Exp $
+*******************************************************************************/
+
+#ifndef H_LOADED_CLS_FDT
+#define H_LOADED_CLS_FDT
+
+#define wxUSE_DRAG_AND_DROP 1
+#include <wx/dnd.h>
+
+//******************************************************************************
+//    Class (myFileDropTarget)
+//******************************************************************************
+
+class myFileDropTarget: public wxFileDropTarget
+{
+public:
+       virtual bool OnDropFiles(wxCoord, wxCoord, const wxArrayString &);
+
+       myFileDropTarget(MainFrame *);
+
+private:
+       MainFrame * mainFrame;
+};
+
+#endif
diff --git a/src/frontend/cls_listctrl.cpp b/src/frontend/cls_listctrl.cpp
new file mode 100644 (file)
index 0000000..1d5d7bc
--- /dev/null
@@ -0,0 +1,137 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: cls_listctrl.cpp,v 1.6 2009/08/23 03:00:34 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+#include "frontend.h"\r
+\r
+#include "cls_listctrl.h"\r
+#include "dlg_make.h"\r
+#include "frm_main.h"\r
+#include "functions.h"\r
+\r
+//******************************************************************************\r
+// myListCtrl\r
+//******************************************************************************\r
+\r
+IMPLEMENT_DYNAMIC_CLASS(myListCtrl, wxListView)\r
+\r
+//******************************************************************************\r
+// Event Table.\r
+//******************************************************************************\r
+\r
+BEGIN_EVENT_TABLE(myListCtrl, wxListCtrl)\r
+       // ListView\r
+       EVT_LIST_COL_CLICK(XRCID("ListView"), myListCtrl::OnColClick)\r
+END_EVENT_TABLE()\r
+\r
+//******************************************************************************\r
+// Event handler.\r
+//******************************************************************************\r
+\r
+wxString myListCtrl::OnGetItemText(long i, long column) const\r
+{\r
+       // \83\8a\83X\83g\83r\83\85\81[\82É\8d\80\96Ú\82ð\92Ç\89Á\81B\r
+       switch (column)\r
+       {\r
+       case 0:\r
+               return this->showFileInfo[i].fnFileName.GetFullName();\r
+       case 1:\r
+               return this->showFileInfo[i].llUnpackedSize.ToString();\r
+       case 2:\r
+               return this->showFileInfo[i].llPackedSize.ToString();\r
+       case 3:\r
+               return wxString::Format(wxT("%3.1f%%"), this->showFileInfo[i].wCompressRatio / 10.0);\r
+       case 4:\r
+               return this->showFileInfo[i].szMethod;\r
+       case 5:\r
+       {\r
+               wxString szTemp = wxT("---w-");\r
+               szTemp[0] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_DIRECTORY ? wxT('d') : \r
+                           this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_ARCHIVE   ? wxT('a') : wxT('-');\r
+               szTemp[1] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_SYSTEM    ? wxT('s') : wxT('-');\r
+               szTemp[2] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_HIDDEN    ? wxT('h') : wxT('-');\r
+               szTemp[3] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_READONLY  ? wxT('r') : wxT('w');\r
+               szTemp[4] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_ENCRYPTED ? wxT('g') : wxT('-');\r
+               return szTemp;\r
+       }\r
+       case 6:\r
+               return this->showFileInfo[i].tmModified.Format(wxT("%Y/%m/%d %H:%M:%S"));\r
+       case 7:\r
+               return this->showFileInfo[i].fnFileName.GetPath();\r
+       case 8:\r
+               return GetFileTypeName(this->showFileInfo[i].fnFileName);\r
+       case 9:\r
+               return wxString::Format(wxT("%d"), this->showFileInfo[i].llFileID.ToULong());\r
+       default:\r
+               return wxEmptyString;\r
+       }\r
+}\r
+\r
+int myListCtrl::OnGetItemImage(long i) const\r
+{\r
+       wxIcon icon = GetFileTypeIcon(this->showFileInfo[i].fnFileName);\r
+       g_hIconLL.Add(icon);\r
+       // wxGTK\82Å16x16\82Ì\83A\83C\83R\83\93\82ª\95\\8e¦\82Å\82«\82é\82æ\82¤\83\8a\83T\83C\83Y\82µ\82Ä\82¨\82­\81B\r
+#ifdef __WINDOWS__\r
+       return g_hIconLS.Add(icon);\r
+#else\r
+       return g_hIconLS.Add(icon.ConvertToImage().Rescale(16, 16));\r
+#endif\r
+}\r
+\r
+void myListCtrl::OnColClick(wxListEvent& e)\r
+{\r
+       g_nSortingColumn = e.GetColumn();\r
+\r
+       // \83\\81[\83g\81B\r
+       this->showFileInfo.Sort(& ListCtrlCompareProc);\r
+       this->SetItemCount(this->showFileInfo.Count());\r
+       this->RefreshItems(0, this->showFileInfo.Count() - 1);\r
+}\r
+\r
+//******************************************************************************\r
+//    \8f\94\8f\88\97\9d\8aÖ\90\94\r
+//******************************************************************************\r
+\r
+int ListCtrlCompareProc(TPI_FILEINFO ** pItem1, TPI_FILEINFO ** pItem2)\r
+{\r
+       TPI_FILEINFO * item1 = * pItem1, * item2 = * pItem2;\r
+       switch (g_nSortingColumn)\r
+       {\r
+       case 0:// Filename\r
+               return ::wxStricmp(item1->fnFileName.GetFullName(), item2->fnFileName.GetFullName());\r
+       case 1:// Unpacked\r
+               return (item1->llUnpackedSize < item2->llUnpackedSize) ? -1 : ((item1->llUnpackedSize > item2->llUnpackedSize) ? 1 : 0);\r
+       case 2:// Packed\r
+               return (item1->llPackedSize < item2->llPackedSize) ? -1 : ((item1->llPackedSize > item2->llPackedSize) ? 1 : 0);\r
+       case 3:// Ratio\r
+               return (item1->wCompressRatio < item2->wCompressRatio) ? -1 : ((item1->wCompressRatio > item2->wCompressRatio) ? 1 : 0);\r
+       case 6:// Last Modified\r
+               return (item1->tmModified < item2->tmModified) ? -1 : ((item1->tmModified > item2->tmModified) ? 1 : 0);\r
+       case 7:// Path\r
+               return ::wxStricmp(item1->fnFileName.GetPath(), item2->fnFileName.GetPath());\r
+       case 8:// Type\r
+               return ::wxStricmp(GetFileTypeName(item1->fnFileName), GetFileTypeName(item2->fnFileName));\r
+       case 9:// No\r
+               return (item1->llFileID < item2->llFileID) ? -1 : ((item1->llFileID > item2->llFileID) ? 1 : 0);\r
+       default:\r
+               return 0;\r
+       }\r
+}\r
diff --git a/src/frontend/cls_listctrl.h b/src/frontend/cls_listctrl.h
new file mode 100644 (file)
index 0000000..cb47652
--- /dev/null
@@ -0,0 +1,45 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: cls_listctrl.h,v 1.3 2009/08/20 11:51:49 sirakaba Exp $
+*******************************************************************************/
+
+#ifndef H_LOADED_CLS_LC
+#define H_LOADED_CLS_LC
+
+class myListCtrl: public wxListCtrl
+{
+public:
+       virtual wxString OnGetItemText(long, long) const;
+       virtual int OnGetItemImage(long) const;
+       void OnColClick(wxListEvent&);
+
+       ArrayTPI_FILEINFO showFileInfo;
+
+       myListCtrl(): wxListCtrl(){}
+       myListCtrl(wxWindow * parent, wxWindowID id, const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize, long style = wxLC_ICON, const wxValidator & validator = wxDefaultValidator, const wxString & name = wxListCtrlNameStr): wxListCtrl(parent, id, pos, size, style, validator, name){}
+
+       DECLARE_DYNAMIC_CLASS(myListCtrl)
+    DECLARE_EVENT_TABLE()
+};
+
+int ListCtrlCompareProc(TPI_FILEINFO **, TPI_FILEINFO **);
+extern wxImageList g_hIconLL, g_hIconLS;
+extern int g_nSortingColumn;
+
+#endif
diff --git a/src/frontend/dlg_make.cpp b/src/frontend/dlg_make.cpp
new file mode 100644 (file)
index 0000000..83e36b0
--- /dev/null
@@ -0,0 +1,278 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: dlg_make.cpp,v 1.15 2009/08/30 08:07:17 sirakaba Exp $
+*******************************************************************************/
+
+#include "frontend.h"
+
+#include "dlg_make.h"
+#include "frm_main.h"
+#include "functions.h"
+
+#include <wx/dirdlg.h>
+
+//******************************************************************************
+// MakeDialog
+//******************************************************************************
+
+MakeDialog::MakeDialog(): wxDialog()
+{
+       this->bIsMake = true;
+}
+
+//******************************************************************************
+// Event Table.
+//******************************************************************************
+
+BEGIN_EVENT_TABLE(MakeDialog, wxDialog)
+       EVT_INIT_DIALOG(                 MakeDialog::OnInit)
+       EVT_BUTTON(XRCID("btnDefault"),  MakeDialog::OnBtnDefault)
+       EVT_BUTTON(XRCID("btnDesktop"),  MakeDialog::OnBtnDesktop)
+       EVT_BUTTON(XRCID("btnCurrent"),  MakeDialog::OnBtnCurrent)
+       EVT_BUTTON(XRCID("btnBrowse"),   MakeDialog::OnBtnBrowse)
+       EVT_BUTTON(XRCID("btnBrowseKF"), MakeDialog::OnBtnBrowseKF)
+       EVT_BUTTON(XRCID("btnOK"),       MakeDialog::OnBtnOK)
+       EVT_BUTTON(XRCID("btnCancel"),   MakeDialog::OnBtnCancel)
+       EVT_CHECKBOX(XRCID("cbUnmask"),  MakeDialog::OnCbUnmask)
+       EVT_NOTEBOOK_PAGE_CHANGED(XRCID("nbTabs"), MakeDialog::OnTabChanged)
+END_EVENT_TABLE()
+
+//******************************************************************************
+// Event handler.
+//******************************************************************************
+
+void MakeDialog::OnInit(wxInitDialogEvent&)
+{
+       // XRC\82Æ\8c\8b\82Ñ\82Â\82¯\81B
+       // "General"\83^\83u
+       this->cbDir             = XRCCTRL(* this, "cbDir",        wxComboBox);
+       this->cbFileName        = XRCCTRL(* this, "cbFileName",   wxComboBox);
+       this->cbOpenAfter       = XRCCTRL(* this, "cbOpenAfter",  wxCheckBox);
+       this->cbIgnorePath      = XRCCTRL(* this, "cbIgnorePath", wxCheckBox);
+       this->cbExitAfter       = XRCCTRL(* this, "cbExitAfter",  wxCheckBox);
+       this->chType            = XRCCTRL(* this, "chType",       wxChoice);
+       this->chDirMake         = XRCCTRL(* this, "chDirMake",    wxChoice);
+       // "Config"\83^\83u
+       this->scLevel           = XRCCTRL(* this, "scLevel",      wxSpinCtrl);
+       this->scRR              = XRCCTRL(* this, "scRR",         wxSpinCtrl);
+       this->tcPassword        = XRCCTRL(* this, "tcPassword",   wxTextCtrl);
+       this->tcKeyfile         = XRCCTRL(* this, "tcKeyfile",    wxTextCtrl);
+       this->cbSplitSize       = XRCCTRL(* this, "cbSplitSize",  wxComboBox);
+       this->cbUnmask          = XRCCTRL(* this, "cbUnmask",     wxCheckBox);
+       this->cbEncryptHeader   = XRCCTRL(* this, "cbEncryptHeader", wxCheckBox);
+       this->cbSolid           = XRCCTRL(* this, "cbSolid",      wxCheckBox);
+       this->cbMMOptimize      = XRCCTRL(* this, "cbMMOptimize", wxCheckBox);
+       this->cbMakeSFX         = XRCCTRL(* this, "cbMakeSFX",    wxCheckBox);
+       // "Comment"\83^\83u
+       this->tcComment         = XRCCTRL(* this, "tcComment",    wxTextCtrl);
+       // "Files"\83^\83u
+       this->lcFiles           = XRCCTRL(* this, "lcFiles",      wxListCtrl);
+
+       if (! this->cbDir->GetValue().IsEmpty())
+       {
+               return;
+       }
+
+       // ListCtrl\82É\97ñ\82ð\92Ç\89Á\81B
+       this->lcFiles->InsertColumn(0, wxT("Input"),  wxLIST_FORMAT_LEFT,  150);
+       this->lcFiles->InsertColumn(1, wxT("Output"), wxLIST_FORMAT_LEFT,  300);
+
+       ::wxXmlResource::Get()->Unload(FE_DIR_S_XRC wxT("dlg_make.xrc"));
+
+       // \93W\8aJ\8e\9e\82Í\8ae\8eí\83R\83\93\83g\83\8d\81[\83\8b\82Ì\8fó\91Ô\82ð\95Ï\8dX\82·\82é\81B
+       if (! this->bIsMake)
+       {
+               this->cbFileName->Disable();
+               this->chType->Disable();
+               this->chDirMake->Enable();
+               this->scLevel->Disable();
+               this->scRR->Disable();
+               this->cbSplitSize->Disable();
+               this->cbEncryptHeader->Disable();
+               this->cbSolid->Disable();
+               this->cbMMOptimize->Disable();
+               this->cbMakeSFX->Disable();
+               this->tcComment->SetEditable(false);
+
+               // \8f\89\8aú\92l\82ð\90Ý\92è\81B
+               wxFileName fnArchive(((MainFrame *) this->GetParent())->statusbar->GetStatusText(5));
+               this->cbDir->SetValue(fnArchive.GetPath());
+               this->cbFileName->SetValue(fnArchive.GetFullName());
+
+               // \93W\8aJ\90æ\82ð\97\\91ª\81B\82½\82¾\82µDTV\83X\83L\83\83\83\93\82É\8e\9e\8aÔ\82ª\82©\82©\82é\8fê\8d\87\82Í\83X\83L\83b\83v\89Â\94\\81B
+               if (this->files.Count() < 3000 || ::wxMessageBox(wxT("This archive contains so many files that it takes long to check Directory Traversal Vulnerability(DTV) problem. If you are sure this archive is safe, you can skip this scanning process. Do you want to scan for DTV problem?"), wxMessageBoxCaptionStr, wxICON_EXCLAMATION | wxYES_NO | wxCENTRE) == wxYES)
+               {
+                       wxNotebookEvent e;
+                       e.SetSelection(-3);
+                       this->OnTabChanged(e);
+               }
+               return;
+       }
+
+       // \83\89\83C\83u\83\89\83\8a\82ð\8c\9f\8dõ\81B
+       TPIHandle tpi;
+       wxFileSystem fs;
+       fs.ChangePathTo(FE_DIR_B_LIB, true);
+       wxString szTPIName = fs.FindFirst(wxT("*" TPI_EXT), wxFILE);
+       while (! szTPIName.IsEmpty())
+       {
+               // \83\8d\81[\83h\81B
+               if (tpi.InitLibrary(szTPIName, wxEmptyString, 0))
+               {
+                       // \91Î\89\9e\82·\82é\8c`\8e®\96¼\82ð\8eæ\93¾\81B
+                       wxString type;
+                       for (unsigned int i = 0; tpi.GetPluginInformation(TPI_INFO_SUPPORTED_TYPE, i, & type) == TPI_ERROR_SUCCESS; i++)
+                       {
+                               if (! type.IsEmpty())
+                               {
+                                       this->libname.Add(szTPIName);
+                                       this->chType->Append(type);
+                                       this->nLibNum[this->defext.Count()] = i;
+                                       tpi.GetPluginInformation(TPI_INFO_SUPPORTED_SUFFIX, i, & type);
+                                       this->defext.Add(type.BeforeFirst(wxT(';')));
+                               }
+                       }
+
+                       tpi.FreeLibrary();
+               }
+               szTPIName = fs.FindNext();
+       }
+       this->chType->SetSelection(0);
+}
+
+void MakeDialog::OnBtnDefault(wxCommandEvent&)
+{
+}
+
+void MakeDialog::OnBtnDesktop(wxCommandEvent&)
+{
+       wxFileName fn(wxFileName::GetHomeDir(), wxT("Desktop"));
+       this->cbDir->SetValue(fn.GetFullPath());
+}
+
+void MakeDialog::OnBtnCurrent(wxCommandEvent&)
+{
+       this->cbDir->SetValue(wxFileName::FileName(((MainFrame *) this->GetParent())->statusbar->GetStatusText(5)).GetPath());
+}
+
+void MakeDialog::OnBtnBrowse(wxCommandEvent&)
+{
+       wxDirDialog dd(this, wxDirSelectorPromptStr, this->cbDir->GetValue());
+       if (dd.ShowModal() == wxID_OK)
+       {
+               this->cbDir->SetValue(dd.GetPath());
+       }
+}
+
+void MakeDialog::OnBtnBrowseKF(wxCommandEvent&)
+{
+       wxFileDialog fd(this, wxFileSelectorPromptStr);
+       if (fd.ShowModal() == wxID_OK)
+       {
+               this->tcKeyfile->SetValue(fd.GetPath());
+       }
+}
+
+void MakeDialog::OnBtnOK(wxCommandEvent&)
+{
+       this->EndModal(wxID_OK);
+}
+
+void MakeDialog::OnBtnCancel(wxCommandEvent&)
+{
+       this->EndModal(wxID_CANCEL);
+}
+
+void MakeDialog::OnCbUnmask(wxCommandEvent&)
+{
+       this->tcPassword->SetWindowStyle(this->tcPassword->GetWindowStyle() & (this->cbUnmask->IsChecked() ? ~ wxTE_PASSWORD : wxTE_PASSWORD));
+       this->tcPassword->Refresh();
+}
+
+void MakeDialog::OnTabChanged(wxNotebookEvent& e)
+{
+       // "Files"\83^\83u\82Ì\82Æ\82«\82Í\8f\88\97\9d\81B
+       bool bReallyShow = e.GetSelection() == 3;
+       if (abs(e.GetSelection()) != 3)
+       {
+               return;
+       }
+
+       // "Files"\83^\83u\82ð\95\\8e¦\82·\82é\8f\89\89ñ\82©\82Ç\82¤\82©\81B
+       if (bReallyShow && this->lcFiles->GetItemCount() == 0)
+       {
+               // \83t\83@\83C\83\8b\83\8a\83X\83g\82ð\92Ç\89Á\81B
+               for (size_t i = 0; i < this->files.Count(); i++)
+               {
+                       this->lcFiles->InsertItem(i, this->files[i]);
+               }
+       }
+
+       if (bIsMake)
+       {
+               // \8ai\94[\83p\83X\82ð\90\84\91ª\81B
+               for (size_t i = 0; i < this->files.Count(); i++)
+               {
+                       if (bReallyShow)
+                       {
+                               this->lcFiles->SetItem(i, 1, this->files[i]);
+                       }
+               }
+       }
+       else
+       {
+               // \83t\83@\83C\83\8b\82Ì\8fo\97Í\90æ\82ð\90\84\91ª\81B
+               wxString szOutputRootDir = WillMakeDirByArcName((MainFrame *) this->GetParent(), this) ? MakeDirPath(wxFileName::DirName(this->cbDir->GetValue()), this->cbFileName->GetValue(), false).GetPath() : this->cbDir->GetValue();
+
+               // \8ae\83t\83@\83C\83\8b\82É\83p\83X\82ð\95t\89Á\81B
+               bool fDTVWarning = false;
+               for (size_t i = 0; i < this->files.Count(); i++)
+               {
+                       wxString szOutputFile = szOutputRootDir + wxFileName::GetPathSeparator();
+                       wxFileName fnStored(this->files[i]);
+                       if (! this->cbIgnorePath->IsChecked())
+                       {
+                               szOutputFile += fnStored.GetPathWithSep();
+                       }
+                       szOutputFile += fnStored.GetFullName();
+                       wxFileName fnOutput(szOutputFile);
+                       if (! fnOutput.Normalize() || ! fnOutput.GetFullPath().StartsWith(szOutputRootDir))
+                       {
+                               fDTVWarning = true;
+                               if (bReallyShow)
+                               {
+                                       this->lcFiles->SetItemTextColour(i, * wxRED);
+                               }
+                       }
+                       if (bReallyShow)
+                       {
+                               this->lcFiles->SetItem(i, 1, fnOutput.GetFullPath());
+                       }
+               }
+
+               if (fDTVWarning && ::wxMessageBox(wxT("This archive may have Directory Traversal Vulnerability(DTV) problem, and some danger files may be extracted to the unexpected system directory! It is strongly recommended to ignore file path. Would you like to do so?"), wxMessageBoxCaptionStr, wxICON_EXCLAMATION | wxYES_NO | wxCENTRE) == wxYES)
+               {
+                       this->cbIgnorePath->SetValue(true);
+                       if (bReallyShow)
+                       {
+                               this->OnTabChanged(e);
+                       }
+               }
+       }
+}
diff --git a/src/frontend/dlg_make.h b/src/frontend/dlg_make.h
new file mode 100644 (file)
index 0000000..5c4fd93
--- /dev/null
@@ -0,0 +1,81 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: dlg_make.h,v 1.8 2009/08/28 12:52:38 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+#ifndef H_LOADED_DLG_MAKE\r
+#define H_LOADED_DLG_MAKE\r
+\r
+#include <wx/spinctrl.h>\r
+#include <wx/notebook.h>\r
+\r
+//******************************************************************************\r
+//    Class (MakeDialog)\r
+//******************************************************************************\r
+\r
+class MakeDialog: public wxDialog {\r
+public:\r
+       // "General"\83^\83u\r
+    wxComboBox* cbDir;\r
+    wxComboBox* cbFileName;\r
+    wxCheckBox* cbOpenAfter;\r
+    wxCheckBox* cbIgnorePath;\r
+    wxCheckBox* cbExitAfter;\r
+       wxChoice* chType;\r
+       wxChoice* chDirMake;\r
+       // "Config"\83^\83u\r
+       wxSpinCtrl* scLevel;\r
+       wxSpinCtrl* scRR;\r
+       wxTextCtrl* tcPassword;\r
+       wxTextCtrl* tcKeyfile;\r
+    wxComboBox* cbSplitSize;\r
+    wxCheckBox* cbUnmask;\r
+    wxCheckBox* cbEncryptHeader;\r
+    wxCheckBox* cbSolid;\r
+    wxCheckBox* cbMMOptimize;\r
+       wxCheckBox* cbMakeSFX;\r
+       // "Comment"\83^\83u\r
+       wxTextCtrl* tcComment;\r
+       // "Files"\83^\83u\r
+       wxListCtrl* lcFiles;\r
+\r
+       wxArrayString libname;\r
+       wxArrayString defext;\r
+       wxArrayString files;\r
+       int nLibNum[513];\r
+       bool bIsMake;\r
+\r
+       MakeDialog();\r
+\r
+       // Event handler.\r
+    void OnInit(     wxInitDialogEvent&);\r
+    void OnBtnDefault(  wxCommandEvent&);\r
+    void OnBtnDesktop(  wxCommandEvent&);\r
+    void OnBtnCurrent(  wxCommandEvent&);\r
+    void OnBtnBrowse(   wxCommandEvent&);\r
+    void OnBtnBrowseKF( wxCommandEvent&);\r
+    void OnBtnOK(       wxCommandEvent&);\r
+    void OnBtnCancel(   wxCommandEvent&);\r
+    void OnCbUnmask(    wxCommandEvent&);\r
+    void OnTabChanged( wxNotebookEvent&);\r
+\r
+    DECLARE_EVENT_TABLE()\r
+};\r
+\r
+#endif\r
diff --git a/src/frontend/dlg_process.cpp b/src/frontend/dlg_process.cpp
new file mode 100644 (file)
index 0000000..02e0497
--- /dev/null
@@ -0,0 +1,135 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: dlg_process.cpp,v 1.6 2009/09/01 12:20:49 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+#include "frontend.h"\r
+#include "dlg_process.h"\r
+\r
+bool g_fCancel = false;\r
+ProcessDialog * g_procDlg = NULL;\r
+\r
+//******************************************************************************\r
+// ProcessDialog\r
+//******************************************************************************\r
+\r
+ProcessDialog::ProcessDialog(): wxDialog()\r
+{\r
+}\r
+\r
+ProcessDialog::~ProcessDialog()\r
+{\r
+       g_procDlg = NULL;\r
+       g_fCancel = false;\r
+}\r
+\r
+//******************************************************************************\r
+// Event table.\r
+//******************************************************************************\r
+\r
+BEGIN_EVENT_TABLE(ProcessDialog, wxDialog)\r
+       EVT_INIT_DIALOG(                 ProcessDialog::OnInit)\r
+       EVT_BUTTON(XRCID("btnCancel"),   ProcessDialog::OnBtnCancel)\r
+END_EVENT_TABLE()\r
+\r
+//******************************************************************************\r
+// Event handler.\r
+//******************************************************************************\r
+\r
+void ProcessDialog::OnInit(wxInitDialogEvent &)\r
+{\r
+       // XRC\82Æ\8c\8b\82Ñ\82Â\82¯\81B\r
+       this->ebSource          = XRCCTRL(* this, "ebSource",     wxTextCtrl);\r
+       this->ebTarget          = XRCCTRL(* this, "ebTarget",     wxTextCtrl);\r
+       this->gauge             = XRCCTRL(* this, "gauge",        wxGauge);\r
+       g_procDlg = this;\r
+\r
+       ::wxXmlResource::Get()->Unload(FE_DIR_S_XRC wxT("dlg_process.xrc"));\r
+}\r
+\r
+void ProcessDialog::OnBtnCancel(wxCommandEvent &)\r
+{\r
+       g_fCancel = true;\r
+       this->Close(true);\r
+}\r
+\r
+//******************************************************************************\r
+//    \83_\83C\83A\83\8d\83O\83v\83\8d\83V\81[\83W\83\83\r
+//******************************************************************************\r
+\r
+int __stdcall TPICallbackProc(unsigned int _uMsg, void * _pStructure)\r
+{\r
+       if (_uMsg != TPI_NOTIFY_COMMON)\r
+       {\r
+               return TPI_CALLBACK_UNSUPPORTED;\r
+       }\r
+\r
+       TPI_PROCESSINFO * piInfo = (TPI_PROCESSINFO *) _pStructure;\r
+       if (g_procDlg == NULL || piInfo == NULL || piInfo->uMessage != TPI_MESSAGE_STATUS || ! g_procDlg->IsShown())\r
+       {\r
+               return TPI_CALLBACK_CONTINUE;\r
+       }\r
+\r
+       static int s_nGaugeCounter = 0;\r
+       switch (piInfo->uStatus)\r
+       {\r
+       case TPI_STATUS_OPENARCHIVE:\r
+               g_procDlg->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+               break;\r
+       case TPI_STATUS_BEGINPROCESS:\r
+//             g_procDlg->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+               g_procDlg->ebTarget->ChangeValue(piInfo->fnDestination.GetFullPath());\r
+               g_procDlg->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong());\r
+               g_procDlg->gauge->SetValue(0);\r
+               g_procDlg->Update();\r
+               break;\r
+       case TPI_STATUS_INPROCESS:\r
+               if (piInfo->fiInfo.llUnpackedSize > 10000 && s_nGaugeCounter++ > 100)\r
+               {\r
+                       g_procDlg->gauge->SetValue(piInfo->llProcessedSize.ToULong());\r
+                       s_nGaugeCounter = 0;\r
+               }\r
+               break;\r
+       case TPI_STATUS_ENDPROCESS:\r
+               g_procDlg->gauge->SetValue(piInfo->fiInfo.llUnpackedSize.ToULong());\r
+               break;\r
+       // \8f\91\8cÉ\83\8d\81[\83h\8e\9e\97p\82Ì\93Æ\8e©\8ed\97l\81B\r
+       case 0x1000:\r
+               g_procDlg->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+               g_procDlg->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong());\r
+               g_procDlg->gauge->SetValue(0);\r
+               break;\r
+       case 0x1001:\r
+               // \8dX\90V\82µ\82·\82¬\82é\82Æ\92á\91¬\82È\82Ì\82Å100\83t\83@\83C\83\8b\96\88\82É\8dX\90V\82·\82é\81B\r
+               if (piInfo->llProcessedSize > g_procDlg->gauge->GetValue() + 100)\r
+               {\r
+                       g_procDlg->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath());\r
+                       g_procDlg->Update();\r
+               }\r
+               break;\r
+       case 0x1002:\r
+               if (piInfo->llProcessedSize > g_procDlg->gauge->GetValue() + 100)\r
+               {\r
+                       g_procDlg->gauge->SetValue(piInfo->llProcessedSize.ToULong());\r
+               }\r
+               break;\r
+       }\r
+\r
+       return g_fCancel ? TPI_CALLBACK_CANCEL : TPI_CALLBACK_CONTINUE;\r
+}\r
diff --git a/src/frontend/dlg_process.h b/src/frontend/dlg_process.h
new file mode 100644 (file)
index 0000000..a6611c9
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: dlg_process.h,v 1.3 2009/08/15 07:20:13 sirakaba Exp $
+*******************************************************************************/
+
+#ifndef H_LOADED_DLG_PROCESS
+#define H_LOADED_DLG_PROCESS
+
+class ProcessDialog: public wxDialog {
+public:
+    wxTextCtrl* ebSource;
+    wxTextCtrl* ebTarget;
+    wxGauge* gauge;
+
+    void OnInit(  wxInitDialogEvent &);
+       void OnBtnCancel(wxCommandEvent &);
+
+       ProcessDialog();
+       ~ProcessDialog();
+
+       DECLARE_EVENT_TABLE()
+};
+
+//******************************************************************************
+//    \83v\83\8d\83V\81[\83W\83\83
+//******************************************************************************
+
+int __stdcall TPICallbackProc(unsigned int, void *);
+
+#endif
diff --git a/src/frontend/frm_main.cpp b/src/frontend/frm_main.cpp
new file mode 100644 (file)
index 0000000..0d21d2d
--- /dev/null
@@ -0,0 +1,849 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: frm_main.cpp,v 1.42 2009/09/05 03:24:58 sirakaba Exp $
+*******************************************************************************/
+
+#include "frontend.h"
+
+#include "frm_main.h"
+#include "cls_filedroptarget.h"
+#include "dlg_make.h"
+#include "dlg_process.h"
+#include "functions.h"
+
+#include <wx/fileconf.h>
+#include <wx/arrimpl.cpp>
+
+WX_DEFINE_OBJARRAY(ArrayTPI_FILEINFO);
+
+#define SetMenuToolState(id, state) this->toolbar->EnableTool(XRCID(id), state); this->menubar->Enable(XRCID(id), state)
+
+//******************************************************************************
+//    \83O\83\8d\81[\83o\83\8b\95Ï\90\94
+//******************************************************************************
+
+wxImageList g_hIconT(16, 16), g_hIconLL(32, 32), g_hIconLS(16, 16);
+int g_nSortingColumn;
+
+//******************************************************************************
+// MainFrame
+//******************************************************************************
+
+MainFrame::MainFrame(): wxFrame()
+{
+}
+
+MainFrame::~MainFrame()
+{
+       wxCommandEvent e;
+       this->OnArcClose(e);
+
+       // \90Ý\92è\82ð\8bL\98^\81B
+       wxFileConfig fc(wxEmptyString, wxEmptyString, ::wxGetCwd() + wxT("/frontend.conf"), wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
+       if (! this->IsIconized() && ! this->IsMaximized())
+       {
+               int a, b;
+               this->GetSize(& a, & b);
+               fc.Write(wxT("Window-Width"), a);
+               fc.Write(wxT("Window-Height"), b);
+               this->GetPosition(& a, & b);
+               fc.Write(wxT("Window-X"), a);
+               fc.Write(wxT("Window-Y"), b);
+       }
+       fc.Write(wxT("Splitter-Pos"), this->window_splitter->GetSashPosition());
+       fc.Write(wxT("ListView-IconMode"), this->menubar->IsChecked(XRCID("Exe_View_Icons")));
+       fc.Write(wxT("ListView-SortingColumn"), g_nSortingColumn);
+       fc.Write(wxT("LastOpenPath"), this->fnLastOpenPath.GetFullPath());
+
+       this->Close(true);
+}
+
+//******************************************************************************
+// Event Table.
+//******************************************************************************
+
+BEGIN_EVENT_TABLE(MainFrame, wxFrame)
+       EVT_INIT_DIALOG(      MainFrame::OnInit)
+       // Menu
+       EVT_MENU(XRCID("Arc_Create"),  MainFrame::OnArcCreate)
+       EVT_MENU(XRCID("Arc_Open"),    MainFrame::OnArcOpen)
+       EVT_MENU(XRCID("Arc_Close"),   MainFrame::OnArcClose)
+       EVT_MENU(XRCID("Arc_Add"),     MainFrame::OnArcAdd)
+       EVT_MENU(XRCID("Arc_SFX"),     MainFrame::OnArcSFX)
+       EVT_MENU(XRCID("Arc_UnSFX"),   MainFrame::OnArcUnSFX)
+       EVT_MENU(XRCID("Exe_Exit"),    MainFrame::OnExit)
+       EVT_MENU(XRCID("Arc_Extract"), MainFrame::OnArcExtract)
+       EVT_MENU(XRCID("Arc_Delete"),  MainFrame::OnArcDelete)
+       EVT_MENU(XRCID("Arc_Test"),    MainFrame::OnArcTest)
+       EVT_MENU(XRCID("Arc_Repair"),  MainFrame::OnArcRepair)
+       EVT_MENU(XRCID("Exe_View_Icons"),  MainFrame::OnViewMode)
+       EVT_MENU(XRCID("Exe_View_Details"),MainFrame::OnViewMode)
+       EVT_MENU(XRCID("Exe_View_SelectAll"),MainFrame::OnSelectAll)
+       // TreeView
+       EVT_TREE_SEL_CHANGED(XRCID("TreeView"), MainFrame::OnTreeChanged)
+       // ListView
+       EVT_LIST_ITEM_ACTIVATED(XRCID("ListView"), MainFrame::OnListItemDClick)
+       EVT_LIST_BEGIN_DRAG(XRCID("ListView"), MainFrame::OnListBeginDrag)
+END_EVENT_TABLE()
+
+//******************************************************************************
+// Event handler.
+//******************************************************************************
+
+void MainFrame::OnInit(wxInitDialogEvent&)
+{
+       // XRC\82Æ\8c\8b\82Ñ\82Â\82¯\81B
+       this->menubar    = this->GetMenuBar();
+       this->toolbar    = this->GetToolBar();
+       this->statusbar = XRCCTRL(* this, "statusbar", wxStatusBar);
+       this->tree_ctrl = XRCCTRL(* this, "TreeView", wxTreeCtrl);
+       this->list_ctrl = XRCCTRL(* this, "ListView", myListCtrl);
+       this->window_splitter = XRCCTRL(* this, "window_splitter", wxSplitterWindow);
+
+       // \90Ý\92è\82ð\93Ç\82Ý\8d\9e\82Ý\81B
+       wxFileConfig fc(wxEmptyString, wxEmptyString, ::wxGetCwd() + wxT("/frontend.conf"), wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
+       this->SetSize(fc.Read(wxT("Window-X"), 0l), fc.Read(wxT("Window-Y"), 0l), fc.Read(wxT("Window-Width"), 800), fc.Read(wxT("Window-Height"), 400));
+       this->fnLastOpenPath = wxFileName::DirName(fc.Read(wxT("LastOpenPath"), ::wxGetCwd()));
+       wxTheMimeTypesManager->Initialize(wxMAILCAP_ALL);
+
+       // \8f\89\8aú\92l\90Ý\92è\81B
+       {
+               wxIcon icon;
+               icon.CopyFromBitmap(wxBitmap(FE_DIR_S_ICO wxT("app.png"), wxBITMAP_TYPE_ANY));
+               this->SetIcon(icon);
+       }
+
+       wxCommandEvent e;
+       e.SetId(fc.Read(wxT("ListView-IconMode"), 0l) ? XRCID("Exe_View_Icons") : XRCID("Exe_View_Details"));
+       this->OnArcClose(e);
+       this->OnViewMode(e);
+       this->window_splitter->SetSashPosition(fc.Read(wxT("Splitter-Pos"), 200));
+       // wxGTK\82Å\82Í\92¼\90ÚwxLC_VIRTUAL\82ð\8ew\92è\82µ\82È\82¢\82Æ\94½\89f\82³\82ê\82È\82¢\81B
+       this->list_ctrl->SetSingleStyle(wxLC_VIRTUAL);
+       this->list_ctrl->InsertColumn(0, wxT("Filename"),      wxLIST_FORMAT_LEFT,  140);
+       this->list_ctrl->InsertColumn(1, wxT("Unpacked"),      wxLIST_FORMAT_RIGHT,  80);
+       this->list_ctrl->InsertColumn(2, wxT("Packed"),        wxLIST_FORMAT_RIGHT,  80);
+       this->list_ctrl->InsertColumn(3, wxT("Ratio"),         wxLIST_FORMAT_RIGHT,  50);
+       this->list_ctrl->InsertColumn(4, wxT("Method"),        wxLIST_FORMAT_LEFT,   60);
+       this->list_ctrl->InsertColumn(5, wxT("Attr"),          wxLIST_FORMAT_LEFT,   50);
+       this->list_ctrl->InsertColumn(6, wxT("Last modified"), wxLIST_FORMAT_RIGHT, 150);
+       this->list_ctrl->InsertColumn(7, wxT("Path"),          wxLIST_FORMAT_LEFT,  100);
+       this->list_ctrl->InsertColumn(8, wxT("Type"),          wxLIST_FORMAT_LEFT,  100);
+       this->list_ctrl->InsertColumn(9, wxT("No."),           wxLIST_FORMAT_LEFT,   35);
+       g_nSortingColumn = fc.Read(wxT("ListView-SortingColumn"), 9);
+
+       this->list_ctrl->SetDropTarget(new myFileDropTarget(this));
+
+       int nStatusBarParts[] = {40, 60, 120, 120, 90, 1000};
+       this->statusbar->SetFieldsCount(6, nStatusBarParts);
+
+       // \83R\83}\83\93\83h\83\89\83C\83\93\93Ç\82Ý\8d\9e\82Ý\81B
+       this->cmdLine.SetSwitchChars(wxT("-"));
+       this->cmdLine.AddSwitch(wxT("x"), wxEmptyString, wxT("(command) Extract filenames in archive."));
+       this->cmdLine.AddSwitch(wxT("l"), wxEmptyString, wxT("(command) List archive(default)."));
+       this->cmdLine.AddParam(wxT("archive"),   wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
+       this->cmdLine.AddParam(wxT("filenames"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE);
+       if (this->cmdLine.Parse() == 0)
+       {
+               if (this->cmdLine.GetParamCount() == 0)
+               {
+                       return;
+               }
+
+               if (this->cmdLine.Found(wxT("x")))
+               {
+                       // \8f\91\8cÉ\82ð\93W\8aJ\81B
+                       wxFileName fnArchive(this->cmdLine.GetParam(0));
+                       fnArchive.Normalize(wxPATH_NORM_ALL, this->szCurrentPath);
+                       this->LoadArc(fnArchive.GetFullPath());
+                       this->OnArcExtract(e);
+                       this->Close(true);
+               }
+               else
+               {
+                       // \8f\91\8cÉ\82ð\8aJ\82­\81B
+                       wxFileName fnArchive(this->cmdLine.GetParam(0));
+                       fnArchive.Normalize(wxPATH_NORM_ALL, this->szCurrentPath);
+                       this->LoadArc(fnArchive.GetFullPath());
+               }
+       }
+}
+
+// MenuBar
+
+void MainFrame::OnExit(wxCommandEvent&)
+{
+       this->Close(true);
+}
+
+void MainFrame::OnArcCreate(wxCommandEvent& e)
+{
+       // \8f\88\97\9d\91Î\8fÛ\82Ì\83t\83@\83C\83\8b\82ð\91I\91ð\81B
+       wxFileDialog fdDlg(this, wxT("Choose files to compress"), this->fnLastOpenPath.GetFullPath(), wxEmptyString, wxFileSelectorDefaultWildcardStr, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);
+       if (fdDlg.ShowModal() == wxID_CANCEL)
+       {
+               return;
+       }
+       // \82±\82±\82ÅwxFileName::FileName\82ð\97p\82¢\82Ä\82¢\82é\82Ì\82Í\81A\8cã\82Å\83f\83B\83\8c\83N\83g\83\8a\96¼\82ð\95K\97v\82Æ\82·\82é\8fê\8d\87\82ª\82 \82é\82½\82ß\81B
+       // \82 \82Ü\82è\82æ\82¢\8ed\97l\82Å\82Í\82È\82¢\82ª\93®\82­\82Ì\82Å\82Æ\82è\82 \82¦\82¸\95ú\92u\81B
+       this->fnLastOpenPath = wxFileName::FileName(fdDlg.GetDirectory());
+
+       // \8ae\8eí\90Ý\92è\81B
+       TPI_SWITCHES swInfo;
+       swInfo.fnDestinationDirectory = wxFileName::DirName(this->fnLastOpenPath.GetFullPath());
+       swInfo.pCustomSwitches = NULL;
+       this->statusbar->SetStatusText(swInfo.fnDestinationDirectory.GetFullPath(), 5);
+
+       // \8dì\90¬\83_\83C\83A\83\8d\83O\82ð\90Ý\92è\81B
+       MakeDialog mkDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_make.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& mkDlg, this, wxT("dlg_make"));     
+       fdDlg.GetFilenames(mkDlg.files);
+       mkDlg.InitDialog();
+       mkDlg.cbDir->SetValue(swInfo.fnDestinationDirectory.GetFullPath());
+       // \8f\91\8cÉ\96¼\82Í\83t\83@\83C\83\8b\96¼\82Ì\8ag\92£\8eq\82æ\82è\91O\81A\82à\82µ\82­\82Í\83f\83B\83\8c\83N\83g\83\8a\96¼\81B
+       mkDlg.cbFileName->SetValue(mkDlg.files.GetCount() == 1 ? wxFileName::FileName(mkDlg.files[0]).GetName() : this->fnLastOpenPath.GetFullName());
+
+       // \83_\83C\83A\83\8d\83O\82ð\95\\8e¦\81B
+       if (mkDlg.ShowModal() == wxID_CANCEL)
+       {
+               this->statusbar->SetStatusText(wxEmptyString, 5);
+               return;
+       }
+       this->statusbar->SetStatusText(wxEmptyString, 5);
+
+       // \8ae\8eí\90Ý\92è\81B
+       swInfo.fStoreDirectoryPathes= ! mkDlg.cbIgnorePath->IsChecked();
+       swInfo.fMakeSFX                     = mkDlg.cbMakeSFX->IsChecked();
+       swInfo.fSolid               = mkDlg.cbSolid->IsChecked();
+       swInfo.fMMOptimize          = mkDlg.cbMMOptimize->IsChecked();
+       swInfo.fEncryptHeader       = mkDlg.cbEncryptHeader->IsChecked();
+       swInfo.sCompressLevel       = mkDlg.scLevel->GetValue();
+       swInfo.sRecoveryRecord      = mkDlg.scRR->GetValue();
+       swInfo.szPassword           = mkDlg.tcPassword->GetValue();
+       swInfo.szKeyFile            = mkDlg.tcKeyfile->GetValue();
+       swInfo.szComment            = mkDlg.tcComment->GetValue();
+       {
+               wxULongLong_t ll;
+               mkDlg.cbSplitSize->GetValue().ToULongLong(& ll);
+               swInfo.llSplitSize      = ll;
+       }
+
+       // TPI\82ð\93Ç\82Ý\8d\9e\82Ý\81B
+       int nSelected = mkDlg.chType->GetSelection();
+       wxFileName fnArchive = wxFileName::DirName(mkDlg.cbDir->GetValue());
+       fnArchive.SetName(mkDlg.cbFileName->GetValue());
+       fnArchive.SetExt(swInfo.fMakeSFX ? (wxString) EXE_EXT : mkDlg.defext[nSelected]);
+       if (! tpi.InitLibrary(mkDlg.libname[nSelected], fnArchive.GetFullPath(), mkDlg.nLibNum[nSelected]))
+       {
+               ::wxMessageBox(wxT("Fault: InitLibrary()!"));
+               return;
+       }
+
+       // \8f\88\97\9d\82ð\8ds\82¤\81B
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       int nErrorCode = this->ErrorCheck(tpi.Command(TPI_COMMAND_ADD, & swInfo, fnArchive.GetFullPath(), mkDlg.files));
+       procDlg.Show(false);
+       tpi.FreeLibrary();
+       if (nErrorCode != TPI_ERROR_SUCCESS)
+       {
+               return;
+       }
+
+       if (mkDlg.cbOpenAfter->IsChecked())
+       {
+               // \8dì\90¬\90æ\82ð\8aJ\82­\81B
+#ifdef __WINDOWS__
+               ::wxExecute(wxT("explorer ") + swInfo.fnDestinationDirectory.GetFullPath());
+#endif
+       }
+
+       if (mkDlg.cbExitAfter->IsChecked())
+       {
+               // \8fI\97¹\81B
+               this->Close(true);
+       }
+
+       // \8fI\97¹\82µ\82È\82¢\8fê\8d\87\82Í\8f\91\8cÉ\82ð\8aJ\82­\81B
+       this->OnArcClose(e);
+       this->LoadArc(fnArchive.GetFullPath());
+}
+
+void MainFrame::OnArcOpen(wxCommandEvent& e)
+{
+       // \8f\91\8cÉ\82ð\91I\91ð\81B
+       wxString szFileName;
+       {
+               wxFileDialog fdDlg(this);
+               fdDlg.SetDirectory(this->fnLastOpenPath.GetFullPath());
+               if (fdDlg.ShowModal() == wxID_CANCEL)
+               {
+                       return;
+               }
+               this->fnLastOpenPath = wxFileName::DirName(fdDlg.GetDirectory());
+               szFileName = fdDlg.GetPath();
+       }
+
+       // \8f\91\8cÉ\82ð\93Ç\82Ý\8d\9e\82Ý\81B
+       this->OnArcClose(e);
+       this->LoadArc(szFileName);
+}
+
+void MainFrame::OnArcClose(wxCommandEvent&)
+{
+       // \83c\83\8a\81[\83r\83\85\81[\81E\83\8a\83X\83g\83r\83\85\81[\90Ý\92è\81B
+       this->tree_ctrl->DeleteAllItems();
+       this->list_ctrl->DeleteAllItems();
+       this->list_ctrl->showFileInfo.Clear();
+
+       // \83c\81[\83\8b\83o\81[\81E\83\81\83j\83\85\81[\83o\81[\90Ý\92è\81B
+       SetMenuToolState("Arc_Close",   false);
+       SetMenuToolState("Arc_Add",     false);
+       SetMenuToolState("Arc_SFX",     false);
+       SetMenuToolState("Arc_UnSFX",   false);
+       SetMenuToolState("Arc_Extract", false);
+       SetMenuToolState("Arc_Delete",  false);
+       SetMenuToolState("Arc_Test",    false);
+       SetMenuToolState("Arc_Repair",  false);
+
+       for (int i = 0; i < this->statusbar->GetFieldsCount(); i++)
+       {
+               this->statusbar->SetStatusText(wxEmptyString, i);
+       }
+       this->fileinfo.Clear();
+       g_hIconT.RemoveAll();
+       g_hIconLL.RemoveAll();
+       g_hIconLS.RemoveAll();
+       this->tpi.FreeLibrary();
+}
+
+void MainFrame::OnArcAdd(wxCommandEvent& e)
+{
+       // \8f\88\97\9d\91Î\8fÛ\82Ì\83t\83@\83C\83\8b\82ð\91I\91ð\81B
+       wxArrayString files;
+       wxFileDialog fdDlg(this, wxT("Choose files to add"), wxEmptyString, wxEmptyString, wxFileSelectorDefaultWildcardStr, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);
+       if (fdDlg.ShowModal() == wxID_CANCEL)
+       {
+               return;
+       }
+       fdDlg.GetFilenames(files);
+
+       // \8ae\8eí\90Ý\92è\81B
+       TPI_SWITCHES swInfo;
+       swInfo.fnDestinationDirectory = wxFileName::DirName(fdDlg.GetDirectory());
+       swInfo.fMakeSFX = false;
+       swInfo.pCustomSwitches = NULL;
+       wxString szArcName = this->statusbar->GetStatusText(5);
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       this->ErrorCheck(this->tpi.Command(TPI_COMMAND_ADD, & swInfo, szArcName, files));
+       procDlg.Show(false);
+
+       // \8f\91\8cÉ\82ð\8dÄ\93Ç\82Ý\8d\9e\82Ý\81B
+       this->OnArcClose(e);
+       this->LoadArc(szArcName);
+}
+
+void MainFrame::OnArcSFX(wxCommandEvent&)
+{
+       this->ConvertArc(true);
+}
+
+void MainFrame::OnArcUnSFX(wxCommandEvent&)
+{
+       this->ConvertArc(false);
+}
+
+void MainFrame::OnArcExtract(wxCommandEvent&)
+{
+       // \93W\8aJ\83_\83C\83A\83\8d\83O\82ð\8dì\90¬\81B
+       MakeDialog mkDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_make.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& mkDlg, this, wxT("dlg_make"));
+       mkDlg.bIsMake = false;
+       mkDlg.files   = MakeTargetFileList(this, false);
+       mkDlg.InitDialog();
+       if (mkDlg.ShowModal() == wxID_CANCEL)
+       {
+               return;
+       }
+
+       // \8ae\8eí\90Ý\92è\81B
+       TPI_SWITCHES swInfo;
+       swInfo.fStoreDirectoryPathes = ! mkDlg.cbIgnorePath->IsChecked();
+       swInfo.fnDestinationDirectory = wxFileName::DirName(mkDlg.cbDir->GetValue());
+       swInfo.szPassword           = mkDlg.tcPassword->GetValue();
+       swInfo.szKeyFile            = mkDlg.tcKeyfile->GetValue();
+       swInfo.pCustomSwitches = NULL;
+
+       // \95K\97v\82È\82ç\8f\91\8cÉ\96¼\82Å\83f\83B\83\8c\83N\83g\83\8a\82ð\8dì\90¬\82·\82é\81B
+       if (WillMakeDirByArcName(this, & mkDlg))
+       {
+               swInfo.fnDestinationDirectory = MakeDirPath(swInfo.fnDestinationDirectory, wxFileName::FileName(this->statusbar->GetStatusText(5)).GetFullName(), true);
+               if (! swInfo.fnDestinationDirectory.IsOk())
+               {
+                       ::wxMessageBox(wxT("Fault: Unable to make the destination directory!"));
+                       return;
+               }
+       }
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       this->ErrorCheck(this->tpi.Command(TPI_COMMAND_EXTRACT, & swInfo, this->statusbar->GetStatusText(5), mkDlg.files));
+       procDlg.Show(false);
+
+       if (mkDlg.cbOpenAfter->IsChecked())
+       {
+               // \93W\8aJ\90æ\82ð\8aJ\82­\81B
+#ifdef __WINDOWS__
+               ::wxExecute(wxT("explorer ") + swInfo.fnDestinationDirectory.GetFullPath());
+#endif
+       }
+
+       if (mkDlg.cbExitAfter->IsChecked())
+       {
+               // \8fI\97¹\81B
+               this->Close(true);
+       }
+}
+
+void MainFrame::OnArcDelete(wxCommandEvent& e)
+{
+       // \91S\83t\83@\83C\83\8b\8dí\8f\9c\82Í\8aë\8c¯\82Å\82Í\82È\82¢\82©\82Æ\81B
+       if (this->list_ctrl->GetSelectedItemCount() == 0)
+       {
+               return;
+       }
+
+       if (::wxMessageBox(wxT("Are you sure to delete selected files?"), wxMessageBoxCaptionStr, wxYES_NO | wxICON_EXCLAMATION, this) == wxNO)
+       {
+               return;
+       }
+
+       // \8ae\8eí\90Ý\92è\81B
+       TPI_SWITCHES swInfo;
+       wxString szArcName = this->statusbar->GetStatusText(5);
+       wxArrayString files = MakeTargetFileList(this, false);
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       this->ErrorCheck(this->tpi.Command(TPI_COMMAND_DELETE, & swInfo, szArcName, files));
+       procDlg.Show(false);    
+
+       // \8f\91\8cÉ\82ð\8dÄ\93Ç\82Ý\8d\9e\82Ý\82·\82é\81B
+       this->OnArcClose(e);
+       this->LoadArc(szArcName);
+}
+
+void MainFrame::OnArcTest(wxCommandEvent&)
+{
+       // \8ae\8eí\90Ý\92è\81B
+       wxArrayString files = MakeTargetFileList(this, false);
+       TPI_SWITCHES swInfo;
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       if (this->ErrorCheck(this->tpi.Command(TPI_COMMAND_TEST, & swInfo, this->statusbar->GetStatusText(5), files)) == TPI_ERROR_SUCCESS)
+       {
+               ::wxMessageBox(wxT("This is a correct archive."), wxT("Frontend"), wxOK | wxCENTRE | wxICON_INFORMATION, this);
+       }
+       procDlg.Show(false);
+}
+
+void MainFrame::OnArcRepair(wxCommandEvent&)
+{
+       // \8ae\8eí\90Ý\92è\81B
+       wxArrayString files = MakeTargetFileList(this, false);
+       TPI_SWITCHES swInfo;
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       this->ErrorCheck(this->tpi.Command(TPI_COMMAND_REPAIR, & swInfo, this->statusbar->GetStatusText(5), files));
+       procDlg.Show(false);    
+}
+
+void MainFrame::OnViewMode(wxCommandEvent & e)
+{
+       int n = e.GetId();
+       this->menubar->Check(n, true);
+       this->list_ctrl->SetSingleStyle(wxLC_REPORT, n == XRCID("Exe_View_Details"));
+       this->list_ctrl->SetSingleStyle(wxLC_ICON,   n == XRCID("Exe_View_Icons"));
+}
+
+void MainFrame::OnSelectAll(wxCommandEvent &)
+{
+       for (int i = 0; i < this->list_ctrl->GetItemCount(); i++)
+       {
+               this->list_ctrl->SetItemState(i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+       }
+}
+
+// TreeView
+
+void MainFrame::OnTreeChanged(wxTreeEvent& e)
+{
+       // \83c\83\8a\81[\83r\83\85\81[\82©\82ç\83p\83X\82ð\8eæ\93¾\81B
+       wxString szNodePath = TreeView_GetItemPath(this->tree_ctrl, e.GetItem());
+       // \83\8a\83X\83g\83r\83\85\81[\82ð\8f\89\8aú\89»\81B
+       this->list_ctrl->showFileInfo.Clear();
+       g_hIconLL.RemoveAll();
+       g_hIconLS.RemoveAll();
+
+       // \83A\83C\83R\83\93\90Ý\92è\81B
+       this->list_ctrl->SetImageList(& g_hIconLL, wxIMAGE_LIST_NORMAL);
+       this->list_ctrl->SetImageList(& g_hIconLS, wxIMAGE_LIST_SMALL);
+
+       // \94z\97ñ\82Æ\94ä\8ar\82µ\81A\83p\83X\82ª\88ê\92v\82µ\82È\82¯\82ê\82Î\8fÁ\82·\81B
+       for (size_t i = 0; i < this->fileinfo.GetCount(); i++)
+       {
+               // \83p\83X\82ð\94ä\8ar\81B
+               if (szNodePath == wxT("*") || szNodePath == this->fileinfo[i].fnFileName.GetPath())
+               {
+                       // \8d\80\96Ú\82ª\83t\83H\83\8b\83_\82Å\82 \82é\82È\82ç\96³\8e\8b\81B
+                       if (this->fileinfo[i].fnFileName.IsDir() || ! TreeView_CheckNewerItem(this->tree_ctrl, this->tree_ctrl->GetLastChild(this->tree_ctrl->GetRootItem()), this->fileinfo[i].fnFileName.GetFullPath(), false))
+                       {
+                               continue;
+                       }
+
+                       this->list_ctrl->showFileInfo.Add(this->fileinfo[i]);
+               }
+       }
+       // \83\\81[\83g\82µ\82Ä\95\\8e¦\81B
+       this->list_ctrl->showFileInfo.Sort(& ListCtrlCompareProc);
+       this->list_ctrl->SetItemCount(this->list_ctrl->showFileInfo.Count());
+}
+
+// ListView
+
+void MainFrame::OnListItemDClick(wxListEvent&)
+{
+       // \93W\8aJ\91Î\8fÛ\82ð\8c\88\92è\81B
+       wxArrayString files = MakeTargetFileList(this, true);
+
+       // \83R\83}\83\93\83h\82ð\8eæ\93¾\81B
+       wxFileType * ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(wxFileName::FileName(files[0]).GetExt());
+       if (! ftFile)
+       {
+               ::wxMessageBox(wxT("Fault: Unable to get the file type!"));
+               return;
+       }
+
+       // \8ae\8eí\90Ý\92è\81B
+       TPI_SWITCHES swInfo;
+       swInfo.fStoreDirectoryPathes = false;
+       swInfo.pCustomSwitches = NULL;
+       swInfo.fnDestinationDirectory = MakeDirPath(wxFileName::DirName(::wxGetCwd()), wxT("tpi_tmp"), true);
+       if (! swInfo.fnDestinationDirectory.IsOk())
+       {
+               ::wxMessageBox(wxT("Fault: Unable to make the temporary directory!"));
+               return;
+       }
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       int nErrorCode = this->ErrorCheck(this->tpi.Command(TPI_COMMAND_EXTRACT, & swInfo, this->statusbar->GetStatusText(5), files));
+       procDlg.Show(false);
+
+       // \83R\83}\83\93\83h\82ð\8eÀ\8ds\81B
+       wxString s = swInfo.fnDestinationDirectory.GetPathWithSep() + wxFileName::FileName(files[0]).GetFullName();
+       if (nErrorCode == TPI_ERROR_SUCCESS)
+       {
+               ::wxExecute(ftFile->GetOpenCommand(s), wxEXEC_SYNC);
+       }
+
+       // \88ê\8e\9e\83f\83B\83\8c\83N\83g\83\8a\82ð\8dí\8f\9c\81B
+       ::wxRemoveFile(s);
+       ::wxRmdir(swInfo.fnDestinationDirectory.GetFullPath());
+}
+
+void MainFrame::OnListBeginDrag(wxListEvent&)
+{
+       if (this->list_ctrl->GetSelectedItemCount() == 0)
+       {
+               // \83A\83C\83e\83\80\82ð\91I\91ð\82¹\82¸\83h\83\89\83b\83O\82µ\82æ\82¤\82Æ\82µ\82½\8fê\8d\87\81B
+               return;
+       }
+
+       // \8ae\8eí\90Ý\92è\81B
+       TPI_SWITCHES swInfo;
+       swInfo.fStoreDirectoryPathes = false;
+       swInfo.pCustomSwitches = NULL;
+       swInfo.fnDestinationDirectory = MakeDirPath(wxFileName::DirName(::wxGetCwd()), wxT("tpi_tmp"), true);
+       if (! swInfo.fnDestinationDirectory.IsOk())
+       {
+               ::wxMessageBox(wxT("Fault: Unable to make the temporary directory!"));
+               return;
+       }
+
+       // \93W\8aJ\91Î\8fÛ\82ð\8c\88\92è\81B
+       wxFileDataObject objFile;
+       wxArrayString files = MakeTargetFileList(this, false);
+       for (size_t i = 0; i < files.Count(); i++)
+       {
+               // \83\8a\83X\83g\82É\92Ç\89Á\81B
+               objFile.AddFile(swInfo.fnDestinationDirectory.GetPathWithSep() + wxFileName::FileName(files[i]).GetFullName());
+       }
+
+       this->ErrorCheck(tpi.Command(TPI_COMMAND_EXTRACT, & swInfo, this->statusbar->GetStatusText(5), files));
+
+       wxDropSource dropSource(objFile, this);
+       if (dropSource.DoDragDrop() != wxDragMove)
+       {
+#ifdef __LINUX__
+               // Linux\82Å\82Í\82Ü\82¾\8f\88\97\9d\82ª\8fI\82í\82Á\82Ä\82¢\82È\82¢(\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\82ª\95\\8e¦\82³\82ê\82Ä\82¢\82é)\82Ì\82Å\81A\82Æ\82è\82 \82¦\82¸3\95b\82¾\82¯\91Ò\82Â\81B
+               sleep(3);
+#endif
+               // \88ê\8e\9e\83f\83B\83\8c\83N\83g\83\8a\82ð\8dí\8f\9c\81B
+               wxArrayString szFileNames = objFile.GetFilenames();
+               for (size_t i = 0; i < szFileNames.GetCount(); i++)
+               {
+                       ::wxRemoveFile(szFileNames[i]);
+               }
+               ::wxRmdir(swInfo.fnDestinationDirectory.GetFullPath());
+       }
+}
+
+// \83C\83x\83\93\83g\83n\83\93\83h\83\89\88È\8aO\81B
+
+void MainFrame::LoadArc(wxString szFileName)
+{
+       if (szFileName.IsEmpty())
+       {
+               return;
+       }
+
+       // TPI\82ð\93Ç\82Ý\8d\9e\82Ý\81B
+       wxFileSystem fs;
+       fs.ChangePathTo(FE_DIR_B_LIB, true);
+       wxString szTPIName = fs.FindFirst(wxT("*" TPI_EXT), wxFILE);
+       int nFileCount = -1;
+       while (! szTPIName.IsEmpty())
+       {
+               // \91Î\89\9e\8am\94F\81B
+               if (! tpi.InitLibrary(szTPIName, szFileName, 0) || ! tpi.CheckArchive(szFileName, & nFileCount) || nFileCount < 0)
+               {
+                       tpi.FreeLibrary();
+                       szTPIName = fs.FindNext();
+                       continue;
+               }
+               break;
+       }
+       if (nFileCount == -1)
+       {
+               tpi.FreeLibrary();
+               ::wxMessageBox(wxT("Fault : No plug-in supporting this archive was found!"));
+               return;
+       }
+
+       // \90i\92»\83_\83C\83A\83\8d\83O\95\\8e¦\81B\82½\82¾\82µ\81A\83t\83@\83C\83\8b\90\94\82ª\91½\82¢\82Æ\82«\82Í\91¬\93x\82ð\97D\90æ\82µ\82Ä\95\\8e¦\82µ\82È\82¢\81B
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+
+       // \8dÅ\8f\89\82Ì\83R\81[\83\8b\83o\83b\83N\82ð\91\97\90M\81B
+       TPI_PROCESSINFO piInfo;
+       piInfo.uMessage = TPI_MESSAGE_STATUS;
+       piInfo.uStatus = 0x1000;
+       piInfo.llProcessedSize = 0;
+       piInfo.fiInfo.fnFileName = wxFileName::FileName(szFileName);
+       piInfo.fiInfo.llUnpackedSize = nFileCount;
+       TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo);
+
+       // \8f\91\8cÉ\82ð\8aJ\82­\81B
+       void * hArc = NULL;
+       if (tpi.OpenArchive(szFileName, & hArc) != TPI_ERROR_SUCCESS)
+       {
+               procDlg.Show(false);
+               tpi.FreeLibrary();
+               ::wxMessageBox(wxT("Fault : OpenArchive()!"));
+               return;
+       }
+
+       // \89æ\91\9c\83\8a\83X\83g\82ð\8dì\90¬\81B
+       this->tree_ctrl->SetImageList(& g_hIconT);
+       this->tree_ctrl->AddRoot(wxEmptyString);
+
+       // \8f\91\8cÉ\82Ì\83A\83C\83R\83\93\82ð\8eæ\93¾\82µ\81A\8f\91\8cÉ\83\8b\81[\83g\82ð\8dì\90¬\81B
+       wxFileName fn(szFileName);
+       wxTreeItemId idRoot = this->tree_ctrl->GetRootItem();
+#ifdef __WINDOWS__
+       wxTreeItemId idArchive = this->tree_ctrl->InsertItem(idRoot, idRoot, fn.GetFullName(), g_hIconT.Add(GetFileTypeIcon(fn)), -1);
+#else
+       wxTreeItemId idArchive = this->tree_ctrl->InsertItem(idRoot, idRoot, fn.GetFullName(), g_hIconT.Add(GetFileTypeIcon(fn).ConvertToImage().Rescale(16, 16)), -1);
+#endif
+
+       // \83\8b\81[\83g\83f\83B\83\8c\83N\83g\83\8a\82ð\8dì\90¬\81B
+       g_hIconT.Add(wxBitmap(FE_DIR_S_ICO wxT("folder_closed.png"), wxBITMAP_TYPE_ANY));
+       g_hIconT.Add(wxBitmap(FE_DIR_S_ICO wxT("folder_open.png"), wxBITMAP_TYPE_ANY));
+       wxTreeItemId idArcRoot = this->tree_ctrl->InsertItem(idRoot, idArchive, wxT("-----"), 1, 2);
+
+       // \94z\97ñ\82Ì\83T\83C\83Y\82ð\8am\95Û\81B
+       this->fileinfo.Alloc(nFileCount);
+
+       // \83t\83@\83C\83\8b\8fî\95ñ\82ð\83\8d\81[\83h\81B
+       if (tpi.GetFileInformation(hArc, & piInfo.fiInfo, true) == TPI_ERROR_SUCCESS)
+       {
+               do
+               {
+                       piInfo.uStatus = 0x1001;
+                       piInfo.llProcessedSize++;
+                       TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo);
+
+                       // \83c\83\8a\81[\83r\83\85\81[\82É\94½\89f\81B
+                       TreeView_CheckNewerItem(this->tree_ctrl, idArcRoot, piInfo.fiInfo.fnFileName.GetPath(wxPATH_GET_VOLUME), true);
+
+                       // \83f\83B\83\8c\83N\83g\83\8a\91®\90«\82ð\8aÜ\82Þ\82à\82Ì\82É\82Â\82¢\82Ä\82Í\8f\9c\8b\8e\81B
+                       if (piInfo.fiInfo.dwAttribute & TPI_ATTRIBUTE_DIRECTORY)
+                       {
+                               continue;
+                       }
+
+                       // \8fî\95ñ\82ð\95Û\91\82µ\82Ä\83J\83E\83\93\83g\83A\83b\83v\81B
+                       this->fileinfo.Add(piInfo.fiInfo);
+                       piInfo.uStatus = 0x1002;
+                       TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo);
+               }
+               while (tpi.GetFileInformation(hArc, & piInfo.fiInfo, false) == TPI_ERROR_SUCCESS);
+       }
+       this->fileinfo.Shrink();
+       this->tree_ctrl->ExpandAllChildren(idArcRoot);
+       this->tree_ctrl->ScrollTo(idArchive);
+       this->tree_ctrl->SelectItem(idArchive);
+
+       // \8f\91\8cÉ\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B
+       TPI_ARCHIVEINFO aiInfo;
+       if (tpi.GetArchiveInformation(hArc, & aiInfo) != TPI_ERROR_SUCCESS)
+       {
+               procDlg.Show(false);
+               tpi.FreeLibrary();
+               ::wxMessageBox(wxT("Fault : GetArchiveInformation()!"));
+               return;
+       }
+
+       wxString szStatusText;
+       this->statusbar->SetStatusText(wxEmptyString, 0);
+       this->statusbar->SetStatusText(wxString::Format(wxT("%d file(s)"), this->fileinfo.Count()), 1);
+       this->statusbar->SetStatusText(wxT("Unpacked: ") + aiInfo.llUnpackedSize.ToString() + wxT(" B"), 2);
+       this->statusbar->SetStatusText(wxT("Packed: ")   + aiInfo.llPackedSize.ToString()   + wxT(" B"), 3);
+       this->statusbar->SetStatusText(wxString::Format(wxT("Ratio: %3.1f%%"), aiInfo.wCompressRatio / 10.0), 4);
+       this->statusbar->SetStatusText(szFileName, 5);
+
+       // \8f\91\8cÉ\82ð\95Â\82\82é\81B
+       if (tpi.CloseArchive(hArc) != TPI_ERROR_SUCCESS)
+       {
+               ::wxMessageBox(wxT("Fault : CloseArchive()!"));
+       }
+
+       // \83R\81[\83\8b\83o\83b\83N\8aÖ\90\94\82ð\90Ý\92è\81B
+       if (tpi.SetCallbackProc(TPICallbackProc) != TPI_ERROR_SUCCESS)
+       {
+               ::wxMessageBox(wxT("Fault : SetCallbackProc()!"));
+       }
+
+       // UI\8ae\8eí\90Ý\92è\81B
+       {
+               // \83c\81[\83\8b\83o\81[\81E\83\81\83j\83\85\81[\83o\81[\90Ý\92è\81B
+               SetMenuToolState("Arc_Close",   true);
+               SetMenuToolState("Arc_Add",     true);
+               SetMenuToolState("Arc_SFX",     aiInfo.nSFXType == 0);
+               SetMenuToolState("Arc_UnSFX",   aiInfo.nSFXType != 0);
+               SetMenuToolState("Arc_Extract", true);
+               SetMenuToolState("Arc_Delete",  true);
+               SetMenuToolState("Arc_Test",    true);
+               SetMenuToolState("Arc_Repair",  true);
+       }
+
+       procDlg.Show(false);
+}
+
+void MainFrame::ConvertArc(bool fToSFX)
+{
+       // \95Û\91\90æ\82ð\90q\82Ë\82é\81B
+       wxFileName fnArchive(this->statusbar->GetStatusText(5));
+       if (fToSFX)
+       {
+               fnArchive.SetExt(EXE_EXT);
+       }
+       wxFileDialog fdDlg(this, fToSFX ? wxT("Save as SFX") : wxT("Save as normal archive"), fnArchive.GetPath(wxPATH_GET_VOLUME), fToSFX ? fnArchive.GetFullName() : fnArchive.GetName(), wxFileSelectorDefaultWildcardStr, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
+       if (fdDlg.ShowModal() == wxID_CANCEL)
+       {
+               return;
+       }
+       this->fnLastOpenPath = wxFileName::DirName(fdDlg.GetDirectory());
+
+       wxArrayString files;
+       files.Add(fdDlg.GetPath());
+
+       TPI_SWITCHES swInfo;
+       swInfo.fMakeSFX = fToSFX;
+       swInfo.fnDestinationDirectory = wxFileName::DirName(fdDlg.GetDirectory());
+
+       ProcessDialog procDlg;
+       ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("dlg_process.xrc"));
+       ::wxXmlResource::Get()->LoadDialog(& procDlg, this, wxT("dlg_process"));        
+       procDlg.InitDialog();
+       procDlg.Show(true);
+       this->ErrorCheck(this->tpi.Command(fToSFX ? TPI_COMMAND_SFX : TPI_COMMAND_UNSFX, & swInfo, fnArchive.GetFullPath(), files));
+       procDlg.Show(false);
+}
+
+int MainFrame::ErrorCheck(int nErrorCode)
+{
+       wxString s;
+       switch (nErrorCode)
+       {
+       case TPI_ERROR_SUCCESS:
+               return TPI_ERROR_SUCCESS;
+       case TPI_ERROR_D_UNSUPPORTED:
+               s.Printf(wxT("Sorry, this functions is not supported yet."), nErrorCode);
+               break;
+       case TPI_ERROR_D_SKIPPED:
+               s.Printf(wxT("This operation is canceled by the user."), nErrorCode);
+               break;
+       default:
+               s.Printf(wxT("ErrorCode:%d"), nErrorCode);
+       }
+       ::wxMessageBox(s, wxT("Frontend"), wxOK | wxCENTRE | wxICON_ERROR, this);
+       return nErrorCode;
+}
diff --git a/src/frontend/frm_main.h b/src/frontend/frm_main.h
new file mode 100644 (file)
index 0000000..83c7553
--- /dev/null
@@ -0,0 +1,72 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: frm_main.h,v 1.10 2009/08/30 09:28:27 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+#include <wx/cmdline.h>\r
+#include <wx/splitter.h>\r
+\r
+#ifndef H_LOADED_FRM_MAIN\r
+#define H_LOADED_FRM_MAIN\r
+\r
+class MainFrame: public wxFrame {\r
+public:\r
+    wxStatusBar* statusbar;\r
+    wxTreeCtrl* tree_ctrl;\r
+    myListCtrl* list_ctrl;\r
+       ArrayTPI_FILEINFO fileinfo;\r
+       TPIHandle tpi;\r
+       wxString szCurrentPath;\r
+       wxFileName fnLastOpenPath;\r
+       wxCmdLineParser cmdLine;\r
+\r
+    // Event handler.\r
+    void OnInit(    wxInitDialogEvent&);\r
+    void OnExit(       wxCommandEvent&);\r
+    void OnArcCreate(  wxCommandEvent&);\r
+    void OnArcOpen(    wxCommandEvent&);\r
+    void OnArcClose(   wxCommandEvent&);\r
+    void OnArcAdd(     wxCommandEvent&);\r
+    void OnArcSFX(     wxCommandEvent&);\r
+    void OnArcUnSFX(   wxCommandEvent&);\r
+    void OnArcExtract( wxCommandEvent&);\r
+    void OnArcDelete(  wxCommandEvent&);\r
+    void OnArcTest(    wxCommandEvent&);\r
+    void OnArcRepair(  wxCommandEvent&);\r
+    void OnViewMode(   wxCommandEvent&);\r
+    void OnSelectAll(  wxCommandEvent&);\r
+    void OnTreeChanged(   wxTreeEvent&);\r
+    void OnListItemDClick(wxListEvent&);\r
+    void OnListBeginDrag( wxListEvent&);\r
+\r
+       void LoadArc(wxString);\r
+       void ConvertArc(bool);\r
+       int ErrorCheck(int);\r
+\r
+       MainFrame();\r
+       ~MainFrame();\r
+\r
+protected:\r
+    wxMenuBar* menubar;\r
+    wxToolBar* toolbar;\r
+    wxSplitterWindow* window_splitter;\r
+    DECLARE_EVENT_TABLE()\r
+};\r
+\r
+#endif\r
diff --git a/src/frontend/frontend.cpp b/src/frontend/frontend.cpp
new file mode 100644 (file)
index 0000000..5531085
--- /dev/null
@@ -0,0 +1,66 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: frontend.cpp,v 1.3 2009/08/27 11:26:00 sirakaba Exp $
+*******************************************************************************/
+
+#include "frontend.h"
+#include "frm_main.h"
+
+//******************************************************************************
+// Frontend
+//******************************************************************************
+
+class Frontend: public wxApp
+{
+public:
+    bool OnInit();
+};
+
+IMPLEMENT_APP(Frontend)
+
+bool Frontend::OnInit()
+{
+       wxInitAllImageHandlers();
+       ::wxXmlResource::Get()->InitAllHandlers();
+
+       MainFrame * frm_main = new MainFrame();
+
+       // \8dì\8bÆ\83p\83X\82ð\90Ý\92è\81B
+       {
+               wxChar cSep = wxFileName::GetPathSeparator();
+               wxStandardPaths p;
+               frm_main->szCurrentPath = ::wxGetCwd() + cSep;
+               ::wxSetWorkingDirectory(::wxPathOnly(p.GetExecutablePath()) + cSep);
+       }
+
+       if (! ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("frm_main.xrc")))
+       {
+               ::wxMessageBox(wxT("Error: Unable to find XRC!"));
+               return false;
+       }
+
+       ::wxXmlResource::Get()->LoadFrame(frm_main, NULL, wxT("frame_main"));
+       ::wxXmlResource::Get()->Unload(FE_DIR_S_XRC wxT("frm_main.xrc"));
+       SetTopWindow(frm_main);
+       frm_main->cmdLine.SetCmdLine(this->argc, this->argv);
+       frm_main->InitDialog();
+       frm_main->Show();
+
+       return true;
+}
diff --git a/src/frontend/frontend.h b/src/frontend/frontend.h
new file mode 100644 (file)
index 0000000..990cba4
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: frontend.h,v 1.9 2009/08/29 08:13:09 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+#ifndef H_LOADED_FRONTEND\r
+#define H_LOADED_FRONTEND\r
+\r
+#define wxUSE_UNICODE       1\r
+#include "../common/header/plugin.h"\r
+#include <wx/treectrl.h>\r
+#include <wx/listctrl.h>\r
+#include <wx/imaglist.h>\r
+#include <wx/mimetype.h>\r
+#include <wx/xrc/xmlres.h>\r
+#include <wx/stdpaths.h>\r
+#include <wx/dynarray.h>\r
+\r
+#include "../common/handle/TPIHandle.h"\r
+\r
+WX_DECLARE_OBJARRAY(TPI_FILEINFO, ArrayTPI_FILEINFO);\r
+\r
+#include "cls_listctrl.h"\r
+\r
+#ifdef __WINDOWS__\r
+#define TPI_EXT wxT(".dll")\r
+#define EXE_EXT wxT(".exe")\r
+#else\r
+#define TPI_EXT wxT(".so")\r
+#define EXE_EXT wxEmptyString\r
+#endif\r
+\r
+#define FE_DIR_BIN wxT("./")\r
+#define FE_DIR_SHR wxT("../share/")\r
+#define FE_DIR_B_LIB FE_DIR_BIN wxT("lib/")\r
+#define FE_DIR_S_XRC FE_DIR_SHR wxT("xrc/")\r
+#define FE_DIR_S_ICO FE_DIR_SHR wxT("ico/")\r
+\r
+#endif\r
diff --git a/src/frontend/frontend.vcproj b/src/frontend/frontend.vcproj
new file mode 100644 (file)
index 0000000..da13975
--- /dev/null
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="shift_jis"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="frontend"\r
+       ProjectGUID="{50F13951-5698-4418-8353-BFDFC5A6BC13}"\r
+       RootNamespace="frontendwx"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\bin"\r
+                       IntermediateDirectory="..\tmp"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="4"\r
+                               DisableSpecificWarnings="4819"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxmsw28u_adv.lib wxexpat.lib wxmsw28u_html.lib wxbase28u_xml.lib wxmsw28u_xrc.lib comctl32.lib"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                               EmbedManifest="false"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="\83\\81[\83\83t\83@\83C\83\8b"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\cls_filedroptarget.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\cls_listctrl.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dlg_make.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dlg_process.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\frm_main.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\frontend.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\functions.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\common\handle\TPIHandle.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               ObjectFile="$(IntDir)\common\"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="\83w\83b\83_\81\83t\83@\83C\83\8b"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\cls_filedroptarget.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\cls_listctrl.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dlg_make.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dlg_process.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\frm_main.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\frontend.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\functions.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\common\handle\TPIHandle.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="\83\8a\83\\81[\83\83t\83@\83C\83\8b"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/src/frontend/functions.cpp b/src/frontend/functions.cpp
new file mode 100644 (file)
index 0000000..387a234
--- /dev/null
@@ -0,0 +1,258 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: functions.cpp,v 1.17 2009/09/02 11:18:49 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    \83t\83@\83C\83\8b\93Ç\82Ý\8d\9e\82Ý\r
+//******************************************************************************\r
+\r
+#include "frontend.h"\r
+#include "frm_main.h"\r
+#include "dlg_make.h"\r
+#include "functions.h"\r
+\r
+//******************************************************************************\r
+//    \83R\83\93\83g\83\8d\81[\83\8b\8f\88\97\9d\8cn\8aÖ\90\94\r
+//******************************************************************************\r
+\r
+bool TreeView_CheckNewerItem(wxTreeCtrl * tree_ctrl, wxTreeItemId idParent, const wxString & szDirPath, bool bReallyMake)\r
+{\r
+       // \8dÅ\8f\89\82Ì\8eq\83A\83C\83e\83\80\82ð\8eæ\93¾\81B\r
+       wxTreeItemIdValue idv;\r
+       wxTreeItemId idChild = tree_ctrl->GetFirstChild(idParent, idv);\r
+       wxChar cSep = wxFileName::GetPathSeparator();\r
+       if (idChild.IsOk())\r
+       {\r
+               do\r
+               {\r
+                       // \83A\83C\83e\83\80\82Æ\96¼\91O\82ª\93¯\82\82È\82çOK\81B\r
+                       if (tree_ctrl->GetItemText(idChild) == szDirPath.BeforeFirst(cSep))\r
+                       {\r
+                               // \82±\82ê\88È\89º\82Ì\8aK\91w\82ª\96³\82¢\8fê\8d\87\81B\r
+                               if (szDirPath.Find(cSep) == wxNOT_FOUND)\r
+                               {\r
+                                       return bReallyMake;\r
+                               }\r
+\r
+                               // \82Ü\82¾\8aK\91w\82ª\97L\82é\8fê\8d\87\81A\8dÄ\8bA\81B\r
+                               return TreeView_CheckNewerItem(tree_ctrl, idChild, szDirPath.AfterFirst(cSep), bReallyMake);\r
+                       }\r
+\r
+                       idChild = tree_ctrl->GetNextSibling(idChild);\r
+               }\r
+               while (idChild.IsOk());\r
+       }\r
+\r
+       // \91Î\8fÛ\82ª\96³\82¢\8fê\8d\87\82É\82Í\8dì\90¬\81B\r
+       if (! szDirPath.IsEmpty())\r
+       {\r
+               if (! bReallyMake)\r
+               {\r
+                       // \8am\94F\82·\82é\82¾\82¯\82È\82ç\82±\82±\82Å\8fI\97¹\81B\r
+                       return true;\r
+               }\r
+\r
+               // 2\8aK\91w\88È\8fã\90[\82¢\8fê\8d\87\82É\82à\91Î\89\9e\81B\r
+               wxString szTemp = szDirPath;\r
+               wxTreeItemId idTemp = idParent;\r
+               do\r
+               {\r
+                       // \93W\8aJ\82µ\82Ä\82©\82ç\8dì\90¬\81B\r
+                       idTemp = tree_ctrl->AppendItem(idTemp, szTemp.BeforeFirst(cSep), 1, 2);\r
+                       szTemp = szTemp.AfterFirst(cSep);\r
+               }\r
+               while (szTemp.Find(cSep) != wxNOT_FOUND);\r
+\r
+               // \8dÅ\8cã\82É\8bó\82Å\82È\82¢\8fê\8d\87\82É\82Í\82à\82¤1\8aK\91w\8dì\90¬\81B\r
+               if (! szTemp.IsEmpty())\r
+               {\r
+                       tree_ctrl->AppendItem(idTemp, szTemp, 1, -1);\r
+               }\r
+       }\r
+\r
+       return false;\r
+}\r
+\r
+wxString TreeView_GetItemPath(wxTreeCtrl * tree_ctrl, wxTreeItemId idItem)\r
+{\r
+       wxString szItemName, szNodePath = wxEmptyString;\r
+       wxChar cSep = wxFileName::GetPathSeparator();\r
+\r
+       // \83A\83C\83e\83\80\82Ì\96¼\91O\82ð\8eæ\93¾\81B\r
+       while ((szItemName = tree_ctrl->GetItemText(idItem)))\r
+       {\r
+               if (szItemName == wxT("-----"))\r
+               {\r
+                       break;\r
+               }\r
+\r
+               // \83p\83X\82É\92Ç\89Á\81B\r
+               szNodePath = szItemName + cSep + szNodePath;\r
+\r
+               // \90e\83A\83C\83e\83\80\82É\91k\82é\81B\r
+               idItem = tree_ctrl->GetItemParent(idItem);\r
+               if (idItem == tree_ctrl->GetRootItem())\r
+               {\r
+                       // \82±\82±\82É\82­\82é\82Ì\82Í\8f\91\8cÉ\93à\91S\95\\8e¦\8e\9e\81B\r
+                       szNodePath = wxT("*");\r
+                       break;\r
+               }\r
+       }\r
+\r
+       return (szNodePath.Find(cSep) == wxNOT_FOUND) ? szNodePath : szNodePath.BeforeLast(cSep);\r
+}\r
+\r
+//******************************************************************************\r
+//    \8f\94\8f\88\97\9d\8aÖ\90\94\r
+//******************************************************************************\r
+\r
+// \83f\83B\83\8c\83N\83g\83\8a\82ð\90V\8bK\82É\8dì\90¬\81B\r
+wxFileName MakeDirPath(wxFileName fnPath, wxString szBase, bool bAct)\r
+{\r
+       // \82Æ\82è\82 \82¦\82¸\8dì\82Á\82Ä\82Ý\82é\81B\r
+       wxFileName fnDir = fnPath;\r
+       fnDir.AppendDir(szBase);\r
+       if (! fnDir.DirExists() && ! ::wxFileExists(fnDir.GetPath()))\r
+       {\r
+               if (! bAct || fnDir.Mkdir())\r
+               {\r
+                       return fnDir;\r
+               }\r
+       }\r
+\r
+       // \83_\83\81\82È\82ç"_%d"\82ð\95t\89Á\82µ\82Ä\8e\8e\8ds\81B\r
+       for (int i = 0; i < 255; i++)\r
+       {\r
+               fnDir = fnPath;\r
+               fnDir.AppendDir(szBase + wxString::Format(wxT("_%d"), i));\r
+               if (! fnDir.DirExists() && ! ::wxFileExists(fnDir.GetPath()))\r
+               {\r
+                       if (! bAct || fnDir.Mkdir())\r
+                       {\r
+                               return fnDir;\r
+                       }\r
+               }\r
+       }\r
+\r
+       // \83G\83\89\81[\8fI\97¹\81B\r
+       fnDir.Clear();\r
+       return fnDir;\r
+}\r
+\r
+wxArrayString MakeTargetFileList(MainFrame * frm, bool fOnlyOneFile)\r
+{\r
+       wxArrayString as;\r
+       for (int i = 0; i < frm->list_ctrl->GetItemCount(); i++)\r
+       {\r
+               if (((as.GetCount() < (unsigned) frm->list_ctrl->GetSelectedItemCount()) && (frm->list_ctrl->GetItemState(i, wxLIST_STATE_SELECTED) & wxLIST_STATE_SELECTED)) || frm->list_ctrl->GetSelectedItemCount() == 0)\r
+               {\r
+                       as.Add(frm->list_ctrl->showFileInfo[i].szStoredName);\r
+                       if (fOnlyOneFile)\r
+                       {\r
+                               return as;\r
+                       }\r
+               }\r
+       }\r
+\r
+       return as;\r
+}\r
+\r
+bool WillMakeDirByArcName(MainFrame * frm, MakeDialog * mk)\r
+{\r
+       if (mk->chDirMake->GetSelection() != 2)\r
+       {\r
+               return mk->chDirMake->GetSelection() == 1;\r
+       }\r
+\r
+       // \83\8b\81[\83g\82É\83f\83B\83\8c\83N\83g\83\8a\82Æ\83t\83@\83C\83\8b\8d\87\82í\82¹\82Ä2\8cÂ\88È\8fã\82 \82é\82Æ\82«\81A\83f\83B\83\8c\83N\83g\83\8a\82ð\8dì\90¬\81B\r
+       switch (frm->tree_ctrl->GetChildrenCount(frm->tree_ctrl->GetLastChild(frm->tree_ctrl->GetRootItem()), false))\r
+       {\r
+       case 0:\r
+       {\r
+               // \83f\83B\83\8c\83N\83g\83\8a\82ª\82È\82¢\82Ì\82Å\81A\83\8b\81[\83g\82É\83t\83@\83C\83\8b\82ª2\8cÂ\88È\8fã\82 \82é\82©\82Ç\82¤\82©\82ð\94»\92è\81B\r
+               bool fFlag = false;\r
+               for (size_t i = 0; i < frm->fileinfo.GetCount(); i++)\r
+               {\r
+                       if (frm->fileinfo[i].fnFileName.GetPath().IsEmpty())\r
+                       {\r
+                               // \83t\83@\83C\83\8b\82Í\83\8b\81[\83g\82É\82 \82é\81B\r
+                               if (fFlag)\r
+                               {\r
+                                       return true;\r
+                               }\r
+\r
+                               fFlag = true;\r
+                       }\r
+               }\r
+               break;\r
+       }\r
+       case 1:\r
+               // \83f\83B\83\8c\83N\83g\83\8a\82ª1\8cÂ\82È\82Ì\82Å\81A\83\8b\81[\83g\82É\83t\83@\83C\83\8b\82ª\82È\82¢\82©\82Ç\82¤\82©\82ð\94»\92è\81B\r
+               for (size_t i = 0; i < frm->fileinfo.GetCount(); i++)\r
+               {\r
+                       if (frm->fileinfo[i].fnFileName.GetPath().IsEmpty())\r
+                       {\r
+                               return true;\r
+                       }\r
+               }\r
+               break;\r
+       default:\r
+               // \83f\83B\83\8c\83N\83g\83\8a\82¾\82¯\82Å2\8cÂ\88È\8fã\82 \82é\82Ì\82Å\81A\8e©\93®\93I\82É\93W\8aJ\90æ\83f\83B\83\8c\83N\83g\83\8a\82ð\8dì\90¬\81B\r
+               return true;\r
+       }\r
+\r
+       return false;\r
+}\r
+\r
+wxString GetFileTypeName(wxFileName fn)\r
+{\r
+       wxString szExt = fn.GetExt().MakeUpper();\r
+       wxString sz = szExt + (szExt.IsEmpty() ? wxT("file") : wxT(" file"));\r
+       wxFileType * ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(szExt);\r
+       if (ftFile)\r
+       {\r
+               ftFile->GetDescription(& sz);\r
+       }\r
+       return sz;\r
+}\r
+\r
+wxIcon GetFileTypeIcon(wxFileName fn)\r
+{\r
+       wxIcon icon;\r
+       wxIconLocation ilFile;\r
+       wxFileType * ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(fn.GetExt());\r
+       if (ftFile && ftFile->GetIcon(& ilFile))\r
+       {\r
+               if (! ::wxFileExists(ilFile.GetFileName()))\r
+               {\r
+                       icon.CopyFromBitmap(wxBitmap((ilFile.GetFileName() == wxT("%1") || ilFile.GetFileName() == wxT("\"%1\"")) ? FE_DIR_S_ICO wxT("exe.png") : FE_DIR_S_ICO wxT("file.png"), wxBITMAP_TYPE_ANY));\r
+               }\r
+               else\r
+               {\r
+                       wxIcon i(ilFile);\r
+                       icon = i;\r
+               }\r
+       }\r
+       else\r
+       {\r
+               icon.CopyFromBitmap(wxBitmap(FE_DIR_S_ICO wxT("file.png"), wxBITMAP_TYPE_ANY));\r
+       }\r
+       return icon;\r
+}\r
diff --git a/src/frontend/functions.h b/src/frontend/functions.h
new file mode 100644 (file)
index 0000000..6296b53
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: functions.h,v 1.7 2009/08/23 10:59:56 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+#ifndef H_LOADED_FUNCTIONS\r
+#define H_LOADED_FUNCTIONS\r
+\r
+//******************************************************************************\r
+//    \83R\83\93\83g\83\8d\81[\83\8b\8f\88\97\9d\8cn\8aÖ\90\94\r
+//******************************************************************************\r
+\r
+bool TreeView_CheckNewerItem(wxTreeCtrl *, wxTreeItemId, const wxString &, bool);\r
+wxString TreeView_GetItemPath(wxTreeCtrl *, wxTreeItemId);\r
+\r
+//******************************************************************************\r
+//    \8f\94\8f\88\97\9d\8aÖ\90\94\r
+//******************************************************************************\r
+\r
+wxFileName MakeDirPath(wxFileName, wxString, bool);\r
+wxArrayString MakeTargetFileList(MainFrame *, bool);\r
+bool WillMakeDirByArcName(MainFrame *, MakeDialog *);\r
+wxString GetFileTypeName(wxFileName);\r
+wxIcon GetFileTypeIcon(wxFileName);\r
+\r
+#endif\r
diff --git a/src/frontend/ui/dlg_make.fbp b/src/frontend/ui/dlg_make.fbp
new file mode 100644 (file)
index 0000000..b719485
--- /dev/null
@@ -0,0 +1,2212 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\r
+<wxFormBuilder_Project>\r
+    <FileVersion major="1" minor="9" />\r
+    <object class="Project" expanded="1">\r
+        <property name="class_decoration"></property>\r
+        <property name="code_generation">XRC</property>\r
+        <property name="disconnect_events">1</property>\r
+        <property name="encoding">UTF-8</property>\r
+        <property name="event_generation">connect</property>\r
+        <property name="file">dlg_make</property>\r
+        <property name="first_id">1000</property>\r
+        <property name="help_provider">none</property>\r
+        <property name="internationalize">0</property>\r
+        <property name="name">dlg_make</property>\r
+        <property name="namespace"></property>\r
+        <property name="path">../../../share/xrc</property>\r
+        <property name="precompiled_header"></property>\r
+        <property name="relative_path">1</property>\r
+        <property name="use_enum">0</property>\r
+        <property name="use_microsoft_bom">0</property>\r
+        <object class="Dialog" expanded="1">\r
+            <property name="bg"></property>\r
+            <property name="center"></property>\r
+            <property name="context_help"></property>\r
+            <property name="enabled">1</property>\r
+            <property name="extra_style"></property>\r
+            <property name="fg"></property>\r
+            <property name="font"></property>\r
+            <property name="hidden">0</property>\r
+            <property name="id">wxID_ANY</property>\r
+            <property name="maximum_size"></property>\r
+            <property name="minimum_size"></property>\r
+            <property name="name">dlg_make</property>\r
+            <property name="pos"></property>\r
+            <property name="size">490,210</property>\r
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>\r
+            <property name="subclass"></property>\r
+            <property name="title">Create/Extract an archive</property>\r
+            <property name="tooltip"></property>\r
+            <property name="window_extra_style"></property>\r
+            <property name="window_name"></property>\r
+            <property name="window_style"></property>\r
+            <event name="OnActivate"></event>\r
+            <event name="OnActivateApp"></event>\r
+            <event name="OnChar"></event>\r
+            <event name="OnClose"></event>\r
+            <event name="OnEnterWindow"></event>\r
+            <event name="OnEraseBackground"></event>\r
+            <event name="OnHibernate"></event>\r
+            <event name="OnIconize"></event>\r
+            <event name="OnIdle"></event>\r
+            <event name="OnInitDialog"></event>\r
+            <event name="OnKeyDown"></event>\r
+            <event name="OnKeyUp"></event>\r
+            <event name="OnKillFocus"></event>\r
+            <event name="OnLeaveWindow"></event>\r
+            <event name="OnLeftDClick"></event>\r
+            <event name="OnLeftDown"></event>\r
+            <event name="OnLeftUp"></event>\r
+            <event name="OnMiddleDClick"></event>\r
+            <event name="OnMiddleDown"></event>\r
+            <event name="OnMiddleUp"></event>\r
+            <event name="OnMotion"></event>\r
+            <event name="OnMouseEvents"></event>\r
+            <event name="OnMouseWheel"></event>\r
+            <event name="OnPaint"></event>\r
+            <event name="OnRightDClick"></event>\r
+            <event name="OnRightDown"></event>\r
+            <event name="OnRightUp"></event>\r
+            <event name="OnSetFocus"></event>\r
+            <event name="OnSize"></event>\r
+            <event name="OnUpdateUI"></event>\r
+            <object class="wxBoxSizer" expanded="1">\r
+                <property name="minimum_size"></property>\r
+                <property name="name"></property>\r
+                <property name="orient">wxVERTICAL</property>\r
+                <property name="permission">none</property>\r
+                <object class="sizeritem" expanded="1">\r
+                    <property name="border">2</property>\r
+                    <property name="flag">wxEXPAND | wxALL</property>\r
+                    <property name="proportion">7</property>\r
+                    <object class="wxNotebook" expanded="1">\r
+                        <property name="bg"></property>\r
+                        <property name="bitmapsize"></property>\r
+                        <property name="context_help"></property>\r
+                        <property name="enabled">1</property>\r
+                        <property name="fg"></property>\r
+                        <property name="font"></property>\r
+                        <property name="hidden">0</property>\r
+                        <property name="id">wxID_ANY</property>\r
+                        <property name="maximum_size"></property>\r
+                        <property name="minimum_size"></property>\r
+                        <property name="name">nbTabs</property>\r
+                        <property name="permission">protected</property>\r
+                        <property name="pos"></property>\r
+                        <property name="size"></property>\r
+                        <property name="style"></property>\r
+                        <property name="subclass"></property>\r
+                        <property name="tooltip"></property>\r
+                        <property name="window_extra_style"></property>\r
+                        <property name="window_name"></property>\r
+                        <property name="window_style"></property>\r
+                        <event name="OnChar"></event>\r
+                        <event name="OnEnterWindow"></event>\r
+                        <event name="OnEraseBackground"></event>\r
+                        <event name="OnKeyDown"></event>\r
+                        <event name="OnKeyUp"></event>\r
+                        <event name="OnKillFocus"></event>\r
+                        <event name="OnLeaveWindow"></event>\r
+                        <event name="OnLeftDClick"></event>\r
+                        <event name="OnLeftDown"></event>\r
+                        <event name="OnLeftUp"></event>\r
+                        <event name="OnMiddleDClick"></event>\r
+                        <event name="OnMiddleDown"></event>\r
+                        <event name="OnMiddleUp"></event>\r
+                        <event name="OnMotion"></event>\r
+                        <event name="OnMouseEvents"></event>\r
+                        <event name="OnMouseWheel"></event>\r
+                        <event name="OnNotebookPageChanged"></event>\r
+                        <event name="OnNotebookPageChanging"></event>\r
+                        <event name="OnPaint"></event>\r
+                        <event name="OnRightDClick"></event>\r
+                        <event name="OnRightDown"></event>\r
+                        <event name="OnRightUp"></event>\r
+                        <event name="OnSetFocus"></event>\r
+                        <event name="OnSize"></event>\r
+                        <event name="OnUpdateUI"></event>\r
+                        <object class="notebookpage" expanded="1">\r
+                            <property name="bitmap"></property>\r
+                            <property name="label">General</property>\r
+                            <property name="select">1</property>\r
+                            <object class="wxPanel" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden">0</property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">m_panel1</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style">wxTAB_TRAVERSAL</property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                                <object class="wxBoxSizer" expanded="1">\r
+                                    <property name="minimum_size"></property>\r
+                                    <property name="name">bSizer1</property>\r
+                                    <property name="orient">wxVERTICAL</property>\r
+                                    <property name="permission">none</property>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">0</property>\r
+                                        <property name="flag">wxEXPAND</property>\r
+                                        <property name="proportion">0</property>\r
+                                        <object class="wxBoxSizer" expanded="1">\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">bSizer2</property>\r
+                                            <property name="orient">wxHORIZONTAL</property>\r
+                                            <property name="permission">none</property>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">3</property>\r
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxStaticText" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Destination directory/filename:</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name"></property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">-1,-1</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <property name="wrap">-1</property>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">1</property>\r
+                                                <object class="spacer" expanded="1">\r
+                                                    <property name="height">0</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="width">0</property>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">3</property>\r
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxButton" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="default"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Default</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">btnDefault</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">70,25</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <event name="OnButtonClick"></event>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxButton" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="default"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Desktop</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">btnDesktop</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">70,25</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <event name="OnButtonClick"></event>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">3</property>\r
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxButton" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="default"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Current</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">btnCurrent</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">70,25</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <event name="OnButtonClick"></event>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxLEFT|wxRIGHT|wxTOP</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxButton" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="default"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Browse</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">btnBrowse</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">70,25</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <event name="OnButtonClick"></event>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                        </object>\r
+                                    </object>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">0</property>\r
+                                        <property name="flag">wxEXPAND</property>\r
+                                        <property name="proportion">0</property>\r
+                                        <object class="wxBoxSizer" expanded="1">\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">bSizer3</property>\r
+                                            <property name="orient">wxHORIZONTAL</property>\r
+                                            <property name="permission">none</property>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxComboBox" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="choices"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size">-1,-1</property>\r
+                                                    <property name="name">cbDir</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">320,22</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="value"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnCombobox"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnText"></event>\r
+                                                    <event name="OnTextEnter"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">0</property>\r
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxComboBox" expanded="1">\r
+                                                    <property name="bg"></property>\r
+                                                    <property name="choices"></property>\r
+                                                    <property name="context_help"></property>\r
+                                                    <property name="enabled">1</property>\r
+                                                    <property name="fg"></property>\r
+                                                    <property name="font"></property>\r
+                                                    <property name="hidden"></property>\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="maximum_size"></property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">cbFileName</property>\r
+                                                    <property name="permission">protected</property>\r
+                                                    <property name="pos"></property>\r
+                                                    <property name="size">140,22</property>\r
+                                                    <property name="style"></property>\r
+                                                    <property name="subclass"></property>\r
+                                                    <property name="tooltip"></property>\r
+                                                    <property name="value"></property>\r
+                                                    <property name="window_extra_style"></property>\r
+                                                    <property name="window_name"></property>\r
+                                                    <property name="window_style"></property>\r
+                                                    <event name="OnChar"></event>\r
+                                                    <event name="OnCombobox"></event>\r
+                                                    <event name="OnEnterWindow"></event>\r
+                                                    <event name="OnEraseBackground"></event>\r
+                                                    <event name="OnKeyDown"></event>\r
+                                                    <event name="OnKeyUp"></event>\r
+                                                    <event name="OnKillFocus"></event>\r
+                                                    <event name="OnLeaveWindow"></event>\r
+                                                    <event name="OnLeftDClick"></event>\r
+                                                    <event name="OnLeftDown"></event>\r
+                                                    <event name="OnLeftUp"></event>\r
+                                                    <event name="OnMiddleDClick"></event>\r
+                                                    <event name="OnMiddleDown"></event>\r
+                                                    <event name="OnMiddleUp"></event>\r
+                                                    <event name="OnMotion"></event>\r
+                                                    <event name="OnMouseEvents"></event>\r
+                                                    <event name="OnMouseWheel"></event>\r
+                                                    <event name="OnPaint"></event>\r
+                                                    <event name="OnRightDClick"></event>\r
+                                                    <event name="OnRightDown"></event>\r
+                                                    <event name="OnRightUp"></event>\r
+                                                    <event name="OnSetFocus"></event>\r
+                                                    <event name="OnSize"></event>\r
+                                                    <event name="OnText"></event>\r
+                                                    <event name="OnTextEnter"></event>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                </object>\r
+                                            </object>\r
+                                        </object>\r
+                                    </object>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxALL|wxEXPAND</property>\r
+                                        <property name="proportion">0</property>\r
+                                        <object class="wxStaticBoxSizer" expanded="1">\r
+                                            <property name="id">wxID_ANY</property>\r
+                                            <property name="label">Options</property>\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">sbSizer1</property>\r
+                                            <property name="orient">wxHORIZONTAL</property>\r
+                                            <property name="permission">none</property>\r
+                                            <event name="OnUpdateUI"></event>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">1</property>\r
+                                                <object class="wxBoxSizer" expanded="1">\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">bSizer24</property>\r
+                                                    <property name="orient">wxVERTICAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">0</property>\r
+                                                        <property name="flag">wxEXPAND</property>\r
+                                                        <property name="proportion">1</property>\r
+                                                        <object class="wxBoxSizer" expanded="1">\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">bSizer5</property>\r
+                                                            <property name="orient">wxHORIZONTAL</property>\r
+                                                            <property name="permission">none</property>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxStaticText" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden"></property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="label">Archive type:</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name"></property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size"></property>\r
+                                                                    <property name="style"></property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <property name="wrap">-1</property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_CENTER|wxEXPAND|wxLEFT|wxRIGHT</property>\r
+                                                                <property name="proportion">1</property>\r
+                                                                <object class="wxChoice" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="choices"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name">chType</property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="selection">0</property>\r
+                                                                    <property name="size">-1,25</property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnChoice"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxChoice" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="choices">&quot;Don&apos;t make directory&quot; &quot;Make DIR by the archive name&quot; &quot;Make DIR if needed&quot;</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">0</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">chDirMake</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="selection">2</property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnChoice"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">0</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">1</property>\r
+                                                <object class="wxBoxSizer" expanded="1">\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">bSizer7</property>\r
+                                                    <property name="orient">wxVERTICAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">3</property>\r
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked">0</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden"></property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Open the destination afterward</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbOpenAfter</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">3</property>\r
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked"></property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden"></property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Ignore file pathes</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbIgnorePath</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">3</property>\r
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked"></property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden"></property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Exit afterward</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbExitAfter</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                        </object>\r
+                                    </object>\r
+                                </object>\r
+                            </object>\r
+                        </object>\r
+                        <object class="notebookpage" expanded="1">\r
+                            <property name="bitmap"></property>\r
+                            <property name="label">Config</property>\r
+                            <property name="select">0</property>\r
+                            <object class="wxPanel" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden">0</property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">m_panel2</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style">wxTAB_TRAVERSAL</property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                                <object class="wxBoxSizer" expanded="1">\r
+                                    <property name="minimum_size"></property>\r
+                                    <property name="name">bSizer11</property>\r
+                                    <property name="orient">wxHORIZONTAL</property>\r
+                                    <property name="permission">none</property>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxLEFT|wxRIGHT</property>\r
+                                        <property name="proportion">2</property>\r
+                                        <object class="wxBoxSizer" expanded="1">\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">bSizer21</property>\r
+                                            <property name="orient">wxVERTICAL</property>\r
+                                            <property name="permission">none</property>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxStaticBoxSizer" expanded="1">\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Compression Level</property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">sbSizer11</property>\r
+                                                    <property name="orient">wxVERTICAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxEXPAND</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxSpinCtrl" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="initial">5</property>\r
+                                                            <property name="max">9</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="min">0</property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">scLevel</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style">wxSP_ARROW_KEYS|wxSP_WRAP</property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="value"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnSpinCtrl"></event>\r
+                                                            <event name="OnSpinCtrlText"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxStaticBoxSizer" expanded="1">\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Multivolume</property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">sbSizer2</property>\r
+                                                    <property name="orient">wxVERTICAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxALL|wxEXPAND</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxComboBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="choices">&quot;1.44MB&quot; &quot;650MB&quot; &quot;700MB&quot;</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbSplitSize</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="value">Don&apos;t split.</property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCombobox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnText"></event>\r
+                                                            <event name="OnTextEnter"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxStaticBoxSizer" expanded="1">\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Recovery Record</property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">sbSizer5</property>\r
+                                                    <property name="orient">wxHORIZONTAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxSpinCtrl" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="initial">0</property>\r
+                                                            <property name="max">100</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="min">0</property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">scRR</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style">wxSP_ARROW_KEYS|wxSP_WRAP</property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="value"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnSpinCtrl"></event>\r
+                                                            <event name="OnSpinCtrlText"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxALIGN_CENTER</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxStaticText" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">%</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name"></property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <property name="wrap">-1</property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                        </object>\r
+                                    </object>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxBOTTOM|wxEXPAND|wxRIGHT</property>\r
+                                        <property name="proportion">3</property>\r
+                                        <object class="wxBoxSizer" expanded="1">\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">bSizer31</property>\r
+                                            <property name="orient">wxVERTICAL</property>\r
+                                            <property name="permission">none</property>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxStaticBoxSizer" expanded="1">\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Encryption</property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">sbSizer3</property>\r
+                                                    <property name="orient">wxVERTICAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxEXPAND</property>\r
+                                                        <property name="proportion">1</property>\r
+                                                        <object class="wxFlexGridSizer" expanded="1">\r
+                                                            <property name="cols">3</property>\r
+                                                            <property name="flexible_direction">wxBOTH</property>\r
+                                                            <property name="growablecols"></property>\r
+                                                            <property name="growablerows"></property>\r
+                                                            <property name="hgap">0</property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">fgSizer1</property>\r
+                                                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>\r
+                                                            <property name="permission">none</property>\r
+                                                            <property name="rows">2</property>\r
+                                                            <property name="vgap">0</property>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxStaticText" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="label">Password:</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name"></property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size"></property>\r
+                                                                    <property name="style"></property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <property name="wrap">-1</property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_BOTTOM|wxLEFT|wxRIGHT</property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxTextCtrl" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="maxlength">0</property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name">tcPassword</property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size">-1,20</property>\r
+                                                                    <property name="style">wxTE_PASSWORD</property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="value"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnText"></event>\r
+                                                                    <event name="OnTextEnter"></event>\r
+                                                                    <event name="OnTextMaxLen"></event>\r
+                                                                    <event name="OnTextURL"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxCheckBox" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="checked">0</property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="label">Unmask</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name">cbUnmask</property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size"></property>\r
+                                                                    <property name="style"></property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnCheckBox"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxStaticText" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="label">Keyfile:</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name"></property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size"></property>\r
+                                                                    <property name="style"></property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <property name="wrap">-1</property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxTextCtrl" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="maxlength">0</property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name">tcKeyfile</property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size">-1,20</property>\r
+                                                                    <property name="style"></property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="value"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnText"></event>\r
+                                                                    <event name="OnTextEnter"></event>\r
+                                                                    <event name="OnTextMaxLen"></event>\r
+                                                                    <event name="OnTextURL"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                            <object class="sizeritem" expanded="1">\r
+                                                                <property name="border">5</property>\r
+                                                                <property name="flag"></property>\r
+                                                                <property name="proportion">0</property>\r
+                                                                <object class="wxButton" expanded="1">\r
+                                                                    <property name="bg"></property>\r
+                                                                    <property name="context_help"></property>\r
+                                                                    <property name="default">0</property>\r
+                                                                    <property name="enabled">1</property>\r
+                                                                    <property name="fg"></property>\r
+                                                                    <property name="font"></property>\r
+                                                                    <property name="hidden">0</property>\r
+                                                                    <property name="id">wxID_ANY</property>\r
+                                                                    <property name="label">Browse</property>\r
+                                                                    <property name="maximum_size"></property>\r
+                                                                    <property name="minimum_size"></property>\r
+                                                                    <property name="name">btnBrowseKF</property>\r
+                                                                    <property name="permission">protected</property>\r
+                                                                    <property name="pos"></property>\r
+                                                                    <property name="size">70,25</property>\r
+                                                                    <property name="style"></property>\r
+                                                                    <property name="subclass"></property>\r
+                                                                    <property name="tooltip"></property>\r
+                                                                    <property name="window_extra_style"></property>\r
+                                                                    <property name="window_name"></property>\r
+                                                                    <property name="window_style"></property>\r
+                                                                    <event name="OnButtonClick"></event>\r
+                                                                    <event name="OnChar"></event>\r
+                                                                    <event name="OnEnterWindow"></event>\r
+                                                                    <event name="OnEraseBackground"></event>\r
+                                                                    <event name="OnKeyDown"></event>\r
+                                                                    <event name="OnKeyUp"></event>\r
+                                                                    <event name="OnKillFocus"></event>\r
+                                                                    <event name="OnLeaveWindow"></event>\r
+                                                                    <event name="OnLeftDClick"></event>\r
+                                                                    <event name="OnLeftDown"></event>\r
+                                                                    <event name="OnLeftUp"></event>\r
+                                                                    <event name="OnMiddleDClick"></event>\r
+                                                                    <event name="OnMiddleDown"></event>\r
+                                                                    <event name="OnMiddleUp"></event>\r
+                                                                    <event name="OnMotion"></event>\r
+                                                                    <event name="OnMouseEvents"></event>\r
+                                                                    <event name="OnMouseWheel"></event>\r
+                                                                    <event name="OnPaint"></event>\r
+                                                                    <event name="OnRightDClick"></event>\r
+                                                                    <event name="OnRightDown"></event>\r
+                                                                    <event name="OnRightUp"></event>\r
+                                                                    <event name="OnSetFocus"></event>\r
+                                                                    <event name="OnSize"></event>\r
+                                                                    <event name="OnUpdateUI"></event>\r
+                                                                </object>\r
+                                                            </object>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxLEFT</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked">0</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Header encryption</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbEncryptHeader</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                            <object class="sizeritem" expanded="1">\r
+                                                <property name="border">5</property>\r
+                                                <property name="flag">wxEXPAND</property>\r
+                                                <property name="proportion">0</property>\r
+                                                <object class="wxStaticBoxSizer" expanded="1">\r
+                                                    <property name="id">wxID_ANY</property>\r
+                                                    <property name="label">Misc.</property>\r
+                                                    <property name="minimum_size"></property>\r
+                                                    <property name="name">sbSizer4</property>\r
+                                                    <property name="orient">wxVERTICAL</property>\r
+                                                    <property name="permission">none</property>\r
+                                                    <event name="OnUpdateUI"></event>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxEXPAND|wxLEFT</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked">1</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Solid compression</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbSolid</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxEXPAND|wxLEFT</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked">1</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden">0</property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Multimedia optimization</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbMMOptimize</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                    <object class="sizeritem" expanded="1">\r
+                                                        <property name="border">5</property>\r
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT</property>\r
+                                                        <property name="proportion">0</property>\r
+                                                        <object class="wxCheckBox" expanded="1">\r
+                                                            <property name="bg"></property>\r
+                                                            <property name="checked">0</property>\r
+                                                            <property name="context_help"></property>\r
+                                                            <property name="enabled">1</property>\r
+                                                            <property name="fg"></property>\r
+                                                            <property name="font"></property>\r
+                                                            <property name="hidden"></property>\r
+                                                            <property name="id">wxID_ANY</property>\r
+                                                            <property name="label">Self-extracting archive</property>\r
+                                                            <property name="maximum_size"></property>\r
+                                                            <property name="minimum_size"></property>\r
+                                                            <property name="name">cbMakeSFX</property>\r
+                                                            <property name="permission">protected</property>\r
+                                                            <property name="pos"></property>\r
+                                                            <property name="size"></property>\r
+                                                            <property name="style"></property>\r
+                                                            <property name="subclass"></property>\r
+                                                            <property name="tooltip"></property>\r
+                                                            <property name="window_extra_style"></property>\r
+                                                            <property name="window_name"></property>\r
+                                                            <property name="window_style"></property>\r
+                                                            <event name="OnChar"></event>\r
+                                                            <event name="OnCheckBox"></event>\r
+                                                            <event name="OnEnterWindow"></event>\r
+                                                            <event name="OnEraseBackground"></event>\r
+                                                            <event name="OnKeyDown"></event>\r
+                                                            <event name="OnKeyUp"></event>\r
+                                                            <event name="OnKillFocus"></event>\r
+                                                            <event name="OnLeaveWindow"></event>\r
+                                                            <event name="OnLeftDClick"></event>\r
+                                                            <event name="OnLeftDown"></event>\r
+                                                            <event name="OnLeftUp"></event>\r
+                                                            <event name="OnMiddleDClick"></event>\r
+                                                            <event name="OnMiddleDown"></event>\r
+                                                            <event name="OnMiddleUp"></event>\r
+                                                            <event name="OnMotion"></event>\r
+                                                            <event name="OnMouseEvents"></event>\r
+                                                            <event name="OnMouseWheel"></event>\r
+                                                            <event name="OnPaint"></event>\r
+                                                            <event name="OnRightDClick"></event>\r
+                                                            <event name="OnRightDown"></event>\r
+                                                            <event name="OnRightUp"></event>\r
+                                                            <event name="OnSetFocus"></event>\r
+                                                            <event name="OnSize"></event>\r
+                                                            <event name="OnUpdateUI"></event>\r
+                                                        </object>\r
+                                                    </object>\r
+                                                </object>\r
+                                            </object>\r
+                                        </object>\r
+                                    </object>\r
+                                </object>\r
+                            </object>\r
+                        </object>\r
+                        <object class="notebookpage" expanded="1">\r
+                            <property name="bitmap"></property>\r
+                            <property name="label">Comment</property>\r
+                            <property name="select">0</property>\r
+                            <object class="wxPanel" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden">0</property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">m_panel3</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style">wxTAB_TRAVERSAL</property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                                <object class="wxBoxSizer" expanded="1">\r
+                                    <property name="minimum_size"></property>\r
+                                    <property name="name">bSizer211</property>\r
+                                    <property name="orient">wxVERTICAL</property>\r
+                                    <property name="permission">none</property>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxALIGN_CENTER|wxALL|wxEXPAND</property>\r
+                                        <property name="proportion">1</property>\r
+                                        <object class="wxTextCtrl" expanded="1">\r
+                                            <property name="bg"></property>\r
+                                            <property name="context_help"></property>\r
+                                            <property name="enabled">1</property>\r
+                                            <property name="fg"></property>\r
+                                            <property name="font"></property>\r
+                                            <property name="hidden">0</property>\r
+                                            <property name="id">wxID_ANY</property>\r
+                                            <property name="maximum_size"></property>\r
+                                            <property name="maxlength">0</property>\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">tcComment</property>\r
+                                            <property name="permission">protected</property>\r
+                                            <property name="pos"></property>\r
+                                            <property name="size">-1,-1</property>\r
+                                            <property name="style">wxTE_MULTILINE</property>\r
+                                            <property name="subclass"></property>\r
+                                            <property name="tooltip"></property>\r
+                                            <property name="value"></property>\r
+                                            <property name="window_extra_style"></property>\r
+                                            <property name="window_name"></property>\r
+                                            <property name="window_style"></property>\r
+                                            <event name="OnChar"></event>\r
+                                            <event name="OnEnterWindow"></event>\r
+                                            <event name="OnEraseBackground"></event>\r
+                                            <event name="OnKeyDown"></event>\r
+                                            <event name="OnKeyUp"></event>\r
+                                            <event name="OnKillFocus"></event>\r
+                                            <event name="OnLeaveWindow"></event>\r
+                                            <event name="OnLeftDClick"></event>\r
+                                            <event name="OnLeftDown"></event>\r
+                                            <event name="OnLeftUp"></event>\r
+                                            <event name="OnMiddleDClick"></event>\r
+                                            <event name="OnMiddleDown"></event>\r
+                                            <event name="OnMiddleUp"></event>\r
+                                            <event name="OnMotion"></event>\r
+                                            <event name="OnMouseEvents"></event>\r
+                                            <event name="OnMouseWheel"></event>\r
+                                            <event name="OnPaint"></event>\r
+                                            <event name="OnRightDClick"></event>\r
+                                            <event name="OnRightDown"></event>\r
+                                            <event name="OnRightUp"></event>\r
+                                            <event name="OnSetFocus"></event>\r
+                                            <event name="OnSize"></event>\r
+                                            <event name="OnText"></event>\r
+                                            <event name="OnTextEnter"></event>\r
+                                            <event name="OnTextMaxLen"></event>\r
+                                            <event name="OnTextURL"></event>\r
+                                            <event name="OnUpdateUI"></event>\r
+                                        </object>\r
+                                    </object>\r
+                                </object>\r
+                            </object>\r
+                        </object>\r
+                        <object class="notebookpage" expanded="1">\r
+                            <property name="bitmap"></property>\r
+                            <property name="label">Files</property>\r
+                            <property name="select">0</property>\r
+                            <object class="wxPanel" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden">0</property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">m_panel5</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style">wxTAB_TRAVERSAL</property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                                <object class="wxBoxSizer" expanded="1">\r
+                                    <property name="minimum_size"></property>\r
+                                    <property name="name">bSizer13</property>\r
+                                    <property name="orient">wxVERTICAL</property>\r
+                                    <property name="permission">none</property>\r
+                                    <object class="sizeritem" expanded="1">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxALL|wxEXPAND</property>\r
+                                        <property name="proportion">1</property>\r
+                                        <object class="wxListCtrl" expanded="1">\r
+                                            <property name="bg"></property>\r
+                                            <property name="context_help"></property>\r
+                                            <property name="enabled">1</property>\r
+                                            <property name="fg"></property>\r
+                                            <property name="font"></property>\r
+                                            <property name="hidden">0</property>\r
+                                            <property name="id">wxID_ANY</property>\r
+                                            <property name="maximum_size"></property>\r
+                                            <property name="minimum_size"></property>\r
+                                            <property name="name">lcFiles</property>\r
+                                            <property name="permission">protected</property>\r
+                                            <property name="pos"></property>\r
+                                            <property name="size"></property>\r
+                                            <property name="style">wxLC_REPORT</property>\r
+                                            <property name="subclass"></property>\r
+                                            <property name="tooltip"></property>\r
+                                            <property name="window_extra_style"></property>\r
+                                            <property name="window_name"></property>\r
+                                            <property name="window_style"></property>\r
+                                            <event name="OnChar"></event>\r
+                                            <event name="OnEnterWindow"></event>\r
+                                            <event name="OnEraseBackground"></event>\r
+                                            <event name="OnKeyDown"></event>\r
+                                            <event name="OnKeyUp"></event>\r
+                                            <event name="OnKillFocus"></event>\r
+                                            <event name="OnLeaveWindow"></event>\r
+                                            <event name="OnLeftDClick"></event>\r
+                                            <event name="OnLeftDown"></event>\r
+                                            <event name="OnLeftUp"></event>\r
+                                            <event name="OnListBeginDrag"></event>\r
+                                            <event name="OnListBeginLabelEdit"></event>\r
+                                            <event name="OnListBeginRDrag"></event>\r
+                                            <event name="OnListCacheHint"></event>\r
+                                            <event name="OnListColBeginDrag"></event>\r
+                                            <event name="OnListColClick"></event>\r
+                                            <event name="OnListColDragging"></event>\r
+                                            <event name="OnListColEndDrag"></event>\r
+                                            <event name="OnListColRightClick"></event>\r
+                                            <event name="OnListDeleteAllItems"></event>\r
+                                            <event name="OnListDeleteItem"></event>\r
+                                            <event name="OnListEndLabelEdit"></event>\r
+                                            <event name="OnListInsertItem"></event>\r
+                                            <event name="OnListItemActivated"></event>\r
+                                            <event name="OnListItemDeselected"></event>\r
+                                            <event name="OnListItemFocused"></event>\r
+                                            <event name="OnListItemMiddleClick"></event>\r
+                                            <event name="OnListItemRightClick"></event>\r
+                                            <event name="OnListItemSelected"></event>\r
+                                            <event name="OnListKeyDown"></event>\r
+                                            <event name="OnMiddleDClick"></event>\r
+                                            <event name="OnMiddleDown"></event>\r
+                                            <event name="OnMiddleUp"></event>\r
+                                            <event name="OnMotion"></event>\r
+                                            <event name="OnMouseEvents"></event>\r
+                                            <event name="OnMouseWheel"></event>\r
+                                            <event name="OnPaint"></event>\r
+                                            <event name="OnRightDClick"></event>\r
+                                            <event name="OnRightDown"></event>\r
+                                            <event name="OnRightUp"></event>\r
+                                            <event name="OnSetFocus"></event>\r
+                                            <event name="OnSize"></event>\r
+                                            <event name="OnUpdateUI"></event>\r
+                                        </object>\r
+                                    </object>\r
+                                </object>\r
+                            </object>\r
+                        </object>\r
+                    </object>\r
+                </object>\r
+                <object class="sizeritem" expanded="1">\r
+                    <property name="border">5</property>\r
+                    <property name="flag">wxEXPAND</property>\r
+                    <property name="proportion">1</property>\r
+                    <object class="wxBoxSizer" expanded="1">\r
+                        <property name="minimum_size"></property>\r
+                        <property name="name">bSizer23</property>\r
+                        <property name="orient">wxHORIZONTAL</property>\r
+                        <property name="permission">none</property>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">5</property>\r
+                            <property name="flag">wxEXPAND</property>\r
+                            <property name="proportion">1</property>\r
+                            <object class="spacer" expanded="1">\r
+                                <property name="height">0</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="width">0</property>\r
+                            </object>\r
+                        </object>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">5</property>\r
+                            <property name="flag">wxALIGN_CENTER_VERTICAL</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxButton" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="default"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="label">OK</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">btnOK</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size">-1,25</property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <event name="OnButtonClick"></event>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">5</property>\r
+                            <property name="flag">wxALIGN_CENTER|wxLEFT|wxRIGHT</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxButton" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="default"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="label">Cancel</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">btnCancel</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size">-1,25</property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <event name="OnButtonClick"></event>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">5</property>\r
+                            <property name="flag">wxEXPAND</property>\r
+                            <property name="proportion">1</property>\r
+                            <object class="spacer" expanded="1">\r
+                                <property name="height">0</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="width">0</property>\r
+                            </object>\r
+                        </object>\r
+                    </object>\r
+                </object>\r
+            </object>\r
+        </object>\r
+    </object>\r
+</wxFormBuilder_Project>\r
diff --git a/src/frontend/ui/dlg_process.fbp b/src/frontend/ui/dlg_process.fbp
new file mode 100644 (file)
index 0000000..1bcfb41
--- /dev/null
@@ -0,0 +1,429 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\r
+<wxFormBuilder_Project>\r
+    <FileVersion major="1" minor="9" />\r
+    <object class="Project" expanded="1">\r
+        <property name="class_decoration"></property>\r
+        <property name="code_generation">XRC</property>\r
+        <property name="disconnect_events">1</property>\r
+        <property name="encoding">UTF-8</property>\r
+        <property name="event_generation">connect</property>\r
+        <property name="file">dlg_process</property>\r
+        <property name="first_id">1000</property>\r
+        <property name="help_provider">none</property>\r
+        <property name="internationalize">0</property>\r
+        <property name="name">dlg_process</property>\r
+        <property name="namespace"></property>\r
+        <property name="path">../../../share/xrc</property>\r
+        <property name="precompiled_header"></property>\r
+        <property name="relative_path">1</property>\r
+        <property name="use_enum">0</property>\r
+        <property name="use_microsoft_bom">0</property>\r
+        <object class="Dialog" expanded="1">\r
+            <property name="bg"></property>\r
+            <property name="center"></property>\r
+            <property name="context_help"></property>\r
+            <property name="enabled">1</property>\r
+            <property name="extra_style"></property>\r
+            <property name="fg"></property>\r
+            <property name="font"></property>\r
+            <property name="hidden"></property>\r
+            <property name="id">wxID_ANY</property>\r
+            <property name="maximum_size"></property>\r
+            <property name="minimum_size"></property>\r
+            <property name="name">dlg_process</property>\r
+            <property name="pos"></property>\r
+            <property name="size"></property>\r
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>\r
+            <property name="subclass">ProcessDialog</property>\r
+            <property name="title">Frontend is processing ...</property>\r
+            <property name="tooltip"></property>\r
+            <property name="window_extra_style"></property>\r
+            <property name="window_name"></property>\r
+            <property name="window_style"></property>\r
+            <event name="OnActivate"></event>\r
+            <event name="OnActivateApp"></event>\r
+            <event name="OnChar"></event>\r
+            <event name="OnClose"></event>\r
+            <event name="OnEnterWindow"></event>\r
+            <event name="OnEraseBackground"></event>\r
+            <event name="OnHibernate"></event>\r
+            <event name="OnIconize"></event>\r
+            <event name="OnIdle"></event>\r
+            <event name="OnInitDialog"></event>\r
+            <event name="OnKeyDown"></event>\r
+            <event name="OnKeyUp"></event>\r
+            <event name="OnKillFocus"></event>\r
+            <event name="OnLeaveWindow"></event>\r
+            <event name="OnLeftDClick"></event>\r
+            <event name="OnLeftDown"></event>\r
+            <event name="OnLeftUp"></event>\r
+            <event name="OnMiddleDClick"></event>\r
+            <event name="OnMiddleDown"></event>\r
+            <event name="OnMiddleUp"></event>\r
+            <event name="OnMotion"></event>\r
+            <event name="OnMouseEvents"></event>\r
+            <event name="OnMouseWheel"></event>\r
+            <event name="OnPaint"></event>\r
+            <event name="OnRightDClick"></event>\r
+            <event name="OnRightDown"></event>\r
+            <event name="OnRightUp"></event>\r
+            <event name="OnSetFocus"></event>\r
+            <event name="OnSize"></event>\r
+            <event name="OnUpdateUI"></event>\r
+            <object class="wxBoxSizer" expanded="1">\r
+                <property name="minimum_size"></property>\r
+                <property name="name">bSizer10</property>\r
+                <property name="orient">wxVERTICAL</property>\r
+                <property name="permission">none</property>\r
+                <object class="sizeritem" expanded="1">\r
+                    <property name="border">0</property>\r
+                    <property name="flag">wxEXPAND</property>\r
+                    <property name="proportion">1</property>\r
+                    <object class="wxBoxSizer" expanded="1">\r
+                        <property name="minimum_size"></property>\r
+                        <property name="name">bSizer11</property>\r
+                        <property name="orient">wxHORIZONTAL</property>\r
+                        <property name="permission">none</property>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">3</property>\r
+                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxStaticText" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="label">Source:</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">label_3</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size">50, 14</property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <property name="wrap">-1</property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">3</property>\r
+                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxTextCtrl" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">0</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="maxlength">0</property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">ebSource</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size">300, 22</property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="value"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnText"></event>\r
+                                <event name="OnTextEnter"></event>\r
+                                <event name="OnTextMaxLen"></event>\r
+                                <event name="OnTextURL"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                    </object>\r
+                </object>\r
+                <object class="sizeritem" expanded="1">\r
+                    <property name="border">0</property>\r
+                    <property name="flag">wxEXPAND</property>\r
+                    <property name="proportion">1</property>\r
+                    <object class="wxBoxSizer" expanded="1">\r
+                        <property name="minimum_size"></property>\r
+                        <property name="name">bSizer12</property>\r
+                        <property name="orient">wxHORIZONTAL</property>\r
+                        <property name="permission">none</property>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">3</property>\r
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxStaticText" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="label">Target:</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">label_4</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size">50, 14</property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <property name="wrap">-1</property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">3</property>\r
+                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxTextCtrl" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">0</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="maxlength">0</property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">ebTarget</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size">300, 22</property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="value"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnText"></event>\r
+                                <event name="OnTextEnter"></event>\r
+                                <event name="OnTextMaxLen"></event>\r
+                                <event name="OnTextURL"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                    </object>\r
+                </object>\r
+                <object class="sizeritem" expanded="1">\r
+                    <property name="border">0</property>\r
+                    <property name="flag">wxEXPAND</property>\r
+                    <property name="proportion">1</property>\r
+                    <object class="wxBoxSizer" expanded="1">\r
+                        <property name="minimum_size"></property>\r
+                        <property name="name">bSizer13</property>\r
+                        <property name="orient">wxHORIZONTAL</property>\r
+                        <property name="permission">none</property>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">8</property>\r
+                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>\r
+                            <property name="proportion">2</property>\r
+                            <object class="wxGauge" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">gauge</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="range">10</property>\r
+                                <property name="size">246, 20</property>\r
+                                <property name="style">wxGA_HORIZONTAL</property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="value">0</property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                        <object class="sizeritem" expanded="1">\r
+                            <property name="border">8</property>\r
+                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>\r
+                            <property name="proportion">0</property>\r
+                            <object class="wxButton" expanded="1">\r
+                                <property name="bg"></property>\r
+                                <property name="context_help"></property>\r
+                                <property name="default"></property>\r
+                                <property name="enabled">1</property>\r
+                                <property name="fg"></property>\r
+                                <property name="font"></property>\r
+                                <property name="hidden"></property>\r
+                                <property name="id">wxID_ANY</property>\r
+                                <property name="label">Cancel</property>\r
+                                <property name="maximum_size"></property>\r
+                                <property name="minimum_size"></property>\r
+                                <property name="name">btnCancel</property>\r
+                                <property name="permission">protected</property>\r
+                                <property name="pos"></property>\r
+                                <property name="size"></property>\r
+                                <property name="style"></property>\r
+                                <property name="subclass"></property>\r
+                                <property name="tooltip"></property>\r
+                                <property name="window_extra_style"></property>\r
+                                <property name="window_name"></property>\r
+                                <property name="window_style"></property>\r
+                                <event name="OnButtonClick"></event>\r
+                                <event name="OnChar"></event>\r
+                                <event name="OnEnterWindow"></event>\r
+                                <event name="OnEraseBackground"></event>\r
+                                <event name="OnKeyDown"></event>\r
+                                <event name="OnKeyUp"></event>\r
+                                <event name="OnKillFocus"></event>\r
+                                <event name="OnLeaveWindow"></event>\r
+                                <event name="OnLeftDClick"></event>\r
+                                <event name="OnLeftDown"></event>\r
+                                <event name="OnLeftUp"></event>\r
+                                <event name="OnMiddleDClick"></event>\r
+                                <event name="OnMiddleDown"></event>\r
+                                <event name="OnMiddleUp"></event>\r
+                                <event name="OnMotion"></event>\r
+                                <event name="OnMouseEvents"></event>\r
+                                <event name="OnMouseWheel"></event>\r
+                                <event name="OnPaint"></event>\r
+                                <event name="OnRightDClick"></event>\r
+                                <event name="OnRightDown"></event>\r
+                                <event name="OnRightUp"></event>\r
+                                <event name="OnSetFocus"></event>\r
+                                <event name="OnSize"></event>\r
+                                <event name="OnUpdateUI"></event>\r
+                            </object>\r
+                        </object>\r
+                    </object>\r
+                </object>\r
+            </object>\r
+        </object>\r
+    </object>\r
+</wxFormBuilder_Project>\r
diff --git a/src/frontend/ui/frm_main.fbp b/src/frontend/ui/frm_main.fbp
new file mode 100644 (file)
index 0000000..394914b
--- /dev/null
@@ -0,0 +1,894 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="9" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration"></property>
+        <property name="code_generation">XRC</property>
+        <property name="disconnect_events">1</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">frm_main</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">0</property>
+        <property name="name">frm_main</property>
+        <property name="namespace"></property>
+        <property name="path">../../../share/xrc</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="1">
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="enabled">1</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden"></property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">frame_main</property>
+            <property name="pos"></property>
+            <property name="size">800, 400</property>
+            <property name="style">wxDEFAULT_FRAME_STYLE</property>
+            <property name="subclass">MainFrame</property>
+            <property name="title">Frontend</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxMenuBar" expanded="1">
+                <property name="bg"></property>
+                <property name="context_help"></property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="label"></property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">menubar</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="style"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">File</property>
+                    <property name="name">m_menu1</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/create.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_NEW</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Create archive</property>
+                        <property name="name">Arc_Create</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/open.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_OPEN</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Open archive</property>
+                        <property name="name">Arc_Open</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/close.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_CLOSE</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Close archive</property>
+                        <property name="name">Arc_Close</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="1">
+                        <property name="permission">none</property>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/add.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Add files</property>
+                        <property name="name">Arc_Add</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/sfx.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Make SFX</property>
+                        <property name="name">Arc_SFX</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/unsfx.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">UnSFX</property>
+                        <property name="name">Arc_UnSFX</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="1">
+                        <property name="permission">none</property>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_EXIT</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Exit</property>
+                        <property name="name">Exe_Exit</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut">Ctrl+Q</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">Archive</property>
+                    <property name="name">m_menu2</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/extract.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Extract</property>
+                        <property name="name">Arc_Extract</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/delete.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Delete</property>
+                        <property name="name">Arc_Delete</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/test.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Test</property>
+                        <property name="name">Arc_Test</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap">../share/ico/16/repair.png; Load From File</property>
+                        <property name="checked">0</property>
+                        <property name="enabled">0</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Repair</property>
+                        <property name="name">Arc_Repair</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut"></property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">View</property>
+                    <property name="name">m_menu3</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_RADIO</property>
+                        <property name="label">Icons</property>
+                        <property name="name">Exe_View_Icons</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut">Ctrl+1</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">1</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_RADIO</property>
+                        <property name="label">Details</property>
+                        <property name="name">Exe_View_Details</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut">Ctrl+2</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="1">
+                        <property name="permission">none</property>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_SELECTALL</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Select All</property>
+                        <property name="name">Exe_View_SelectAll</property>
+                        <property name="permission">none</property>
+                        <property name="shortcut">Ctrl+A</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+            <object class="wxStatusBar" expanded="1">
+                <property name="bg"></property>
+                <property name="context_help"></property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="fields">1</property>
+                <property name="font"></property>
+                <property name="hidden"></property>
+                <property name="id">wxID_ANY</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">statusbar</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="style">wxST_SIZEGRIP</property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+            </object>
+            <object class="wxToolBar" expanded="1">
+                <property name="bg"></property>
+                <property name="bitmapsize">32, 32</property>
+                <property name="context_help"></property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden"></property>
+                <property name="id">wxID_ANY</property>
+                <property name="margins"></property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">toolbar</property>
+                <property name="packing">0</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="separation">0</property>
+                <property name="size"></property>
+                <property name="style">wxTB_HORIZONTAL|wxTB_TEXT</property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/create.png; Load From File</property>
+                    <property name="id">wxID_NEW</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Create</property>
+                    <property name="name">Arc_Create</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Create new archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/open.png; Load From File</property>
+                    <property name="id">wxID_OPEN</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Open</property>
+                    <property name="name">Arc_Open</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Open archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/close.png; Load From File</property>
+                    <property name="id">wxID_CLOSE</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Close</property>
+                    <property name="name">Arc_Close</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Close archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="toolSeparator" expanded="1" />
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/add.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Add</property>
+                    <property name="name">Arc_Add</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Add files or a folder to this archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/sfx.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Make SFX</property>
+                    <property name="name">Arc_SFX</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Convert to self-extract archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/unsfx.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">UnSFX</property>
+                    <property name="name">Arc_UnSFX</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Convert to normal archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="toolSeparator" expanded="1" />
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/extract.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Extract</property>
+                    <property name="name">Arc_Extract</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Extract selected files or whole archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/delete.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Delete</property>
+                    <property name="name">Arc_Delete</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Delete selected files from this archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/test.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Test</property>
+                    <property name="name">Arc_Test</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Test selected files or whole archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+                <object class="tool" expanded="1">
+                    <property name="bitmap">../share/ico/24/repair.png; Load From File</property>
+                    <property name="id">wxID_ANY</property>
+                    <property name="kind">wxITEM_NORMAL</property>
+                    <property name="label">Repair</property>
+                    <property name="name">Arc_Repair</property>
+                    <property name="statusbar"></property>
+                    <property name="tooltip">Repair selected files or whole archive</property>
+                    <event name="OnMenuSelection"></event>
+                    <event name="OnToolClicked"></event>
+                    <event name="OnToolEnter"></event>
+                    <event name="OnToolRClicked"></event>
+                    <event name="OnUpdateUI"></event>
+                </object>
+            </object>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer14</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxSplitterWindow" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_pane_size">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">window_splitter</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="sashgravity">0.0</property>
+                        <property name="sashpos">162</property>
+                        <property name="sashsize">-1</property>
+                        <property name="size"></property>
+                        <property name="splitmode">wxSPLIT_VERTICAL</property>
+                        <property name="style">wxSP_3D|wxSP_BORDER|wxSP_LIVE_UPDATE</property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnSplitterDClick"></event>
+                        <event name="OnSplitterSashPosChanged"></event>
+                        <event name="OnSplitterSashPosChanging"></event>
+                        <event name="OnSplitterUnsplit"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="splitteritem" expanded="1">
+                            <object class="wxPanel" expanded="1">
+                                <property name="bg"></property>
+                                <property name="context_help"></property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="font"></property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="maximum_size"></property>
+                                <property name="minimum_size"></property>
+                                <property name="name">m_panel1</property>
+                                <property name="permission">protected</property>
+                                <property name="pos"></property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer19</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">1</property>
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTreeCtrl" expanded="1">
+                                            <property name="bg"></property>
+                                            <property name="context_help"></property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="font"></property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">TreeView</property>
+                                            <property name="permission">protected</property>
+                                            <property name="pos"></property>
+                                            <property name="size"></property>
+                                            <property name="style">wxTR_DEFAULT_STYLE|wxTR_HAS_BUTTONS|wxTR_HIDE_ROOT</property>
+                                            <property name="subclass"></property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxSUNKEN_BORDER</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnTreeBeginDrag"></event>
+                                            <event name="OnTreeBeginLabelEdit"></event>
+                                            <event name="OnTreeBeginRDrag"></event>
+                                            <event name="OnTreeDeleteItem"></event>
+                                            <event name="OnTreeEndDrag"></event>
+                                            <event name="OnTreeEndLabelEdit"></event>
+                                            <event name="OnTreeGetInfo"></event>
+                                            <event name="OnTreeItemActivated"></event>
+                                            <event name="OnTreeItemCollapsed"></event>
+                                            <event name="OnTreeItemCollapsing"></event>
+                                            <event name="OnTreeItemExpanded"></event>
+                                            <event name="OnTreeItemExpanding"></event>
+                                            <event name="OnTreeItemGetTooltip"></event>
+                                            <event name="OnTreeItemMenu"></event>
+                                            <event name="OnTreeItemMiddleClick"></event>
+                                            <event name="OnTreeItemRightClick"></event>
+                                            <event name="OnTreeKeyDown"></event>
+                                            <event name="OnTreeSelChanged"></event>
+                                            <event name="OnTreeSelChanging"></event>
+                                            <event name="OnTreeSetInfo"></event>
+                                            <event name="OnTreeStateImageClick"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="splitteritem" expanded="1">
+                            <object class="wxPanel" expanded="1">
+                                <property name="bg"></property>
+                                <property name="context_help"></property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="font"></property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="maximum_size"></property>
+                                <property name="minimum_size"></property>
+                                <property name="name">m_panel2</property>
+                                <property name="permission">protected</property>
+                                <property name="pos"></property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer20</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">1</property>
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxListCtrl" expanded="1">
+                                            <property name="bg"></property>
+                                            <property name="context_help"></property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="font"></property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">ListView</property>
+                                            <property name="permission">protected</property>
+                                            <property name="pos"></property>
+                                            <property name="size"></property>
+                                            <property name="style">wxLC_REPORT|wxLC_VIRTUAL</property>
+                                            <property name="subclass">myListCtrl; </property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxSUNKEN_BORDER</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnListBeginDrag"></event>
+                                            <event name="OnListBeginLabelEdit"></event>
+                                            <event name="OnListBeginRDrag"></event>
+                                            <event name="OnListCacheHint"></event>
+                                            <event name="OnListColBeginDrag"></event>
+                                            <event name="OnListColClick"></event>
+                                            <event name="OnListColDragging"></event>
+                                            <event name="OnListColEndDrag"></event>
+                                            <event name="OnListColRightClick"></event>
+                                            <event name="OnListDeleteAllItems"></event>
+                                            <event name="OnListDeleteItem"></event>
+                                            <event name="OnListEndLabelEdit"></event>
+                                            <event name="OnListInsertItem"></event>
+                                            <event name="OnListItemActivated"></event>
+                                            <event name="OnListItemDeselected"></event>
+                                            <event name="OnListItemFocused"></event>
+                                            <event name="OnListItemMiddleClick"></event>
+                                            <event name="OnListItemRightClick"></event>
+                                            <event name="OnListItemSelected"></event>
+                                            <event name="OnListKeyDown"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/src/plugin/calLibrary/Makefile b/src/plugin/calLibrary/Makefile
new file mode 100644 (file)
index 0000000..a347003
--- /dev/null
@@ -0,0 +1,28 @@
+# Makefile.\r
+# $Id: Makefile,v 1.5 2009/08/02 03:41:44 sirakaba Exp $\r
+\r
+# Define compilers.\r
+CC = g++\r
+CPPFLAGS = -c -g -O3 -Wall -W -fPIC `wx-config --cppflags`\r
+LDFLAGS  = -shared -Wl,-Bsymbolic `wx-config --libs` -lwine\r
+\r
+# Define i/o files.\r
+DIR_OBJ  = ../../tmp/calLibrary\r
+OBJS     = calLibrary-wx.o\r
+IN_DEF   = ../../common/header/plugin.def\r
+OUT_LIB  = ../../../bin/lib/calLibrary.so\r
+\r
+.PHONY: all clean\r
+.SUFFIXES: .cpp .o\r
+\r
+all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+       $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+\r
+clean:\r
+       rm -f -r $(DIR_OBJ) $(OUT_LIB)\r
+\r
+$(DIR_OBJ):\r
+       mkdir $(DIR_OBJ)\r
+\r
+$(DIR_OBJ)/%.o: %.cpp\r
+       $(CC) $(CPPFLAGS) -o $@ $<\r
diff --git a/src/plugin/calLibrary/calLibrary.cpp b/src/plugin/calLibrary/calLibrary.cpp
new file mode 100644 (file)
index 0000000..98c4249
--- /dev/null
@@ -0,0 +1,920 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: calLibrary.cpp,v 1.23 2009/09/27 13:44:12 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Includes\r
+//******************************************************************************\r
+\r
+#include "../../common/header/plugin.h"\r
+#include "../../common/header/plugin-extra.h"\r
+#include "../../common/library/library.h"\r
+#include <wx/dynlib.h>\r
+#include <wx/config.h>\r
+#include <wx/stdpaths.h>\r
+#include <wx/xml/xml.h>\r
+#include <windows.h>\r
+#include "calLibrary.h"\r
+\r
+//******************************************************************************\r
+//    Global varients\r
+//******************************************************************************\r
+\r
+struct g_LibInfo\r
+{\r
+       HMODULE hLib;\r
+       HMODULE hLibAlt;\r
+       wxString szPrefix;\r
+       wxString szPrefixAlt;\r
+       int nLibIndex;\r
+       unsigned long nExFlag;\r
+       wxXmlNode node;\r
+       bool fUnicode;\r
+       bool fUnicodeAlt;\r
+}      g_LibInfo;\r
+\r
+TPI_PROC g_prProc;\r
+bool g_fCallback32bit;\r
+bool g_fExistUnicodeMode;\r
+wxString g_szAppPath;\r
+\r
+//******************************************************************************\r
+//    Entry\r
+//******************************************************************************\r
+\r
+#ifdef __LINUX__\r
+void __attribute__((constructor)) Attach(void)\r
+{\r
+       wxStandardPaths p;\r
+       g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+}\r
+\r
+void __attribute__((destructor)) Detach(void)\r
+{\r
+       ::FreeLibrary(g_LibInfo.hLib);\r
+}\r
+#else\r
+BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *)\r
+{\r
+       switch (fdwReason)\r
+       {\r
+       case DLL_PROCESS_ATTACH:\r
+       {\r
+               wxStandardPaths p;\r
+               g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+               break;\r
+       }\r
+       case DLL_PROCESS_DETACH:\r
+               ::FreeLibrary(g_LibInfo.hLib);\r
+               break;\r
+       }\r
+       return TRUE;\r
+}\r
+#endif\r
+\r
+wxDateTime FileTimeToWxDateTime(FILETIME * pft)\r
+{\r
+#ifdef __WINDOWS__\r
+       FILETIME ftLocal;\r
+       SYSTEMTIME st;\r
+       if (! ::FileTimeToLocalFileTime(pft, & ftLocal) || ! ::FileTimeToSystemTime(& ftLocal, & st))\r
+       {\r
+               return (time_t) 0;\r
+       }\r
+       wxDateTime dt(st.wDay, wxDateTime::Month(st.wMonth - 1), st.wYear, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);\r
+       return dt;\r
+#else\r
+    return (time_t) 0;\r
+#endif\r
+}\r
+\r
+//******************************************************************************\r
+//    Callback Wrapper\r
+//******************************************************************************\r
+\r
+BOOL __stdcall CallbackProc(HWND, unsigned int _uMsg, unsigned int _uState, void * _lpEis)\r
+{\r
+       if (_uMsg != ::RegisterWindowMessage((const wchar_t *) WM_ARCEXTRACT))\r
+       {\r
+               // \93Æ\8e©\8ed\97l\82È\82Ç\82É\91Î\82·\82é\97\\94õ\83R\81[\83h\81B\r
+               return TRUE;\r
+       }\r
+\r
+       // \8d\\91¢\91Ì\82ð\8f\89\8aú\89»\81B\r
+       TPI_PROCESSINFO piInfo;\r
+       piInfo.uMessage = TPI_MESSAGE_STATUS;\r
+\r
+       if (_lpEis != NULL)\r
+       {\r
+               if (g_fCallback32bit)\r
+               {\r
+                       if (g_LibInfo.fUnicode)\r
+                       {\r
+                               // \8f\89\8aú\89»\81B\r
+                               EXTRACTINGINFOEXW * ex = (EXTRACTINGINFOEXW *) _lpEis;\r
+\r
+                               // EXTRACTINGINFOEXW -> TPI_FILEINFO\95Ï\8a·\81B\r
+                               piInfo.fiInfo.dwCRC32           = ex->dwCRC;\r
+                               piInfo.fiInfo.tmModified.SetFromDOS(ex->wTime | (ex->wDate << 16));\r
+                               piInfo.fiInfo.llPackedSize      = ex->dwCompressedSize;\r
+                               piInfo.fiInfo.llUnpackedSize    = ex->exinfo.dwFileSize;\r
+                               piInfo.fiInfo.uOSType           = ex->uOSType;\r
+                               piInfo.fiInfo.wCompressRatio    = ex->wRatio;\r
+                               piInfo.fiInfo.szStoredName      = WC2String(ex->exinfo.szSourceFileName);\r
+                               piInfo.fiInfo.szMethod          = WC2String(ex->szMode);\r
+\r
+                               // EXTRACTINGINFOEXW -> TPI_PROCESSINFO\95Ï\8a·\81B\r
+                               piInfo.llProcessedSize          = ex->exinfo.dwWriteSize;\r
+                               piInfo.fnDestination            = wxFileName::FileName(WC2String(ex->exinfo.szDestFileName));\r
+                       }\r
+                       else\r
+                       {\r
+                               // \8f\89\8aú\89»\81B\r
+                               EXTRACTINGINFOEX * ex = (EXTRACTINGINFOEX *) _lpEis;\r
+\r
+                               // EXTRACTINGINFOEX -> TPI_FILEINFO\95Ï\8a·\81B\r
+                               piInfo.fiInfo.dwCRC32           = ex->dwCRC;\r
+                               piInfo.fiInfo.tmModified.SetFromDOS(ex->wTime | (ex->wDate << 16));\r
+                               piInfo.fiInfo.llPackedSize      = ex->dwCompressedSize;\r
+                               piInfo.fiInfo.llUnpackedSize    = ex->exinfo.dwFileSize;\r
+                               piInfo.fiInfo.uOSType           = ex->uOSType;\r
+                               piInfo.fiInfo.wCompressRatio    = ex->wRatio;\r
+                               piInfo.fiInfo.szStoredName      = MB2String(ex->exinfo.szSourceFileName);\r
+                               piInfo.fiInfo.szMethod          = MB2String(ex->szMode);\r
+\r
+                               // EXTRACTINGINFOEX -> TPI_PROCESSINFO\95Ï\8a·\81B\r
+                               piInfo.llProcessedSize          = ex->exinfo.dwWriteSize;\r
+                               piInfo.fnDestination            = wxFileName::FileName(MB2String(ex->exinfo.szDestFileName));\r
+                       }\r
+                       piInfo.fiInfo.dwAttribute       = 0;\r
+               }\r
+               else\r
+               {\r
+                       if (g_LibInfo.fUnicode)\r
+                       {\r
+                               // \8f\89\8aú\89»\81B\r
+                               EXTRACTINGINFOEX64W * ex = (EXTRACTINGINFOEX64W *) _lpEis;\r
+\r
+                               // EXTRACTINGINFOEX64W -> TPI_FILEINFO\95Ï\8a·\81B\r
+                               piInfo.fiInfo.dwAttribute       = ex->dwAttributes;\r
+                               piInfo.fiInfo.dwCRC32           = ex->dwCRC;\r
+                               piInfo.fiInfo.tmAccess          = FileTimeToWxDateTime(& ex->ftAccessTime);\r
+                               piInfo.fiInfo.tmCreate          = FileTimeToWxDateTime(& ex->ftCreateTime);\r
+                               piInfo.fiInfo.tmModified        = FileTimeToWxDateTime(& ex->ftWriteTime);\r
+                               piInfo.fiInfo.llPackedSize      = ex->llCompressedSize;\r
+                               piInfo.fiInfo.llUnpackedSize    = ex->llFileSize;\r
+                               piInfo.fiInfo.uOSType           = ex->uOSType;\r
+                               piInfo.fiInfo.wCompressRatio    = ex->wRatio;\r
+                               piInfo.fiInfo.szStoredName      = WC2String(ex->exinfo.szSourceFileName);\r
+                               piInfo.fiInfo.szMethod          = WC2String(ex->szMode);\r
+\r
+                               // EXTRACTINGINFOEX64 -> TPI_PROCESSINFO\95Ï\8a·\81B\r
+                               piInfo.llProcessedSize          = ex->llWriteSize;\r
+                               piInfo.fnDestination            = wxFileName::FileName(WC2String(ex->exinfo.szDestFileName));\r
+                       }\r
+                       else\r
+                       {\r
+                               // \8f\89\8aú\89»\81B\r
+                               EXTRACTINGINFOEX64 * ex = (EXTRACTINGINFOEX64 *) _lpEis;\r
+\r
+                               // EXTRACTINGINFOEX64 -> TPI_FILEINFO\95Ï\8a·\81B\r
+                               piInfo.fiInfo.dwAttribute       = ex->dwAttributes;\r
+                               piInfo.fiInfo.dwCRC32           = ex->dwCRC;\r
+                               piInfo.fiInfo.tmAccess          = FileTimeToWxDateTime(& ex->ftAccessTime);\r
+                               piInfo.fiInfo.tmCreate          = FileTimeToWxDateTime(& ex->ftCreateTime);\r
+                               piInfo.fiInfo.tmModified        = FileTimeToWxDateTime(& ex->ftWriteTime);\r
+                               piInfo.fiInfo.llPackedSize      = ex->llCompressedSize;\r
+                               piInfo.fiInfo.llUnpackedSize    = ex->llFileSize;\r
+                               piInfo.fiInfo.uOSType           = ex->uOSType;\r
+                               piInfo.fiInfo.wCompressRatio    = ex->wRatio;\r
+                               piInfo.fiInfo.szStoredName      = MB2String(ex->exinfo.szSourceFileName);\r
+                               piInfo.fiInfo.szMethod          = MB2String(ex->szMode);\r
+\r
+                               // EXTRACTINGINFOEX64 -> TPI_PROCESSINFO\95Ï\8a·\81B\r
+                               piInfo.llProcessedSize          = ex->llWriteSize;\r
+                               piInfo.fnDestination            = wxFileName::FileName(MB2String(ex->exinfo.szDestFileName));\r
+                       }\r
+               }\r
+               piInfo.fiInfo.fnFileName        = wxFileName::FileName(piInfo.fiInfo.szStoredName);\r
+       }\r
+\r
+       // \90\94\8e\9a\82Ì\8f\87\82Å\82È\82­\8f\88\97\9d\82Ì\8f\87\82Å\95À\82ñ\82Å\82¢\82é\82±\82Æ\82É\92\8d\88Ó\81B\r
+       switch (_uState)\r
+       {\r
+       case ARCEXTRACT_OPEN:\r
+               // \93\96\8aY\8f\91\8cÉ\82Ì\8f\88\97\9d\82ð\8aJ\8en\81B\r
+               piInfo.uStatus = TPI_STATUS_OPENARCHIVE;\r
+               break;\r
+       case 5:\r
+               // \93\96\8aY\83t\83@\83C\83\8b\82Ì\8c\9f\8dõ\92\86\81B\r
+               piInfo.uStatus = TPI_STATUS_SEEKFILE;\r
+               break;\r
+       case ARCEXTRACT_BEGIN:\r
+               // \93\96\8aY\83t\83@\83C\83\8b\82Ì\8f\88\97\9d\82ð\8aJ\8en\81B\r
+               piInfo.uStatus = TPI_STATUS_BEGINPROCESS;\r
+               break;\r
+       case ARCEXTRACT_INPROCESS:\r
+               // \93\96\8aY\83t\83@\83C\83\8b\82Ì\8f\88\97\9d\82ð\8eÀ\8ds\92\86\81B\r
+               piInfo.uStatus = TPI_STATUS_INPROCESS;\r
+               break;\r
+       case 6:\r
+               // \93\96\8aY\83t\83@\83C\83\8b\82Ì\8f\88\97\9d\82ð\8fI\97¹\81B\r
+               piInfo.uStatus = TPI_STATUS_ENDPROCESS;\r
+               break;\r
+       case 7:\r
+               // \93\96\8aY\8f\91\8cÉ\82Ì\8c\9f\8d¸\92\86\81B\r
+               piInfo.uStatus = TPI_STATUS_TESTARCHIVE;\r
+               break;\r
+       case ARCEXTRACT_COPY:\r
+               // \93\96\8aY\8f\91\8cÉ\82Ì\8f\91\82«\96ß\82µ\92\86\81B\r
+               piInfo.uStatus = TPI_STATUS_COPYARCHIVE;\r
+               break;\r
+       case ARCEXTRACT_END:\r
+               // \93\96\8aY\8f\91\8cÉ\82Ì\8f\88\97\9d\82ð\8fI\97¹\81B\r
+               piInfo.uStatus = TPI_STATUS_CLOSEARCHIVE;\r
+               break;\r
+       }\r
+\r
+       // \83R\81[\83\8b\83o\83b\83N\8aÖ\90\94\82É\91\97\90M\81B\r
+       if (g_prProc == NULL)\r
+       {\r
+               return TRUE;\r
+       }\r
+\r
+       // \8ag\92£\83t\83\89\83O\82Ì\92l\82É\82æ\82è\8bt\93]\82³\82¹\82é\81B\r
+       bool bRetVal = g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CANCEL;\r
+       return g_LibInfo.nExFlag == 1 ? ! bRetVal : bRetVal;\r
+}\r
+\r
+//******************************************************************************\r
+//    Inside Functions\r
+//******************************************************************************\r
+\r
+int CalErrorCodeConvert(int nCalErrorCode)\r
+{\r
+       switch (nCalErrorCode)\r
+       {\r
+       case 0:                     return TPI_ERROR_SUCCESS;\r
+       case ERROR_DISK_SPACE:      return TPI_ERROR_IO_ARC_WRITE;\r
+       case ERROR_READ_ONLY:       return TPI_ERROR_IO_FILE_WRITE;\r
+       case ERROR_USER_SKIP:       return TPI_ERROR_D_SKIPPED;\r
+       case ERROR_UNKNOWN_TYPE:    return TPI_ERROR_IO_MISC;\r
+       case ERROR_METHOD:          return TPI_ERROR_ARC_UNSUPPORTED;\r
+       case ERROR_PASSWORD_FILE:   return TPI_ERROR_ARC_ENCRYPTED;\r
+       case ERROR_VERSION:         return TPI_ERROR_ARC_UNSUPPORTED;\r
+       case ERROR_FILE_CRC:        return TPI_ERROR_ARC_BROKEN_SUM;\r
+       case ERROR_FILE_OPEN:       return TPI_ERROR_IO_FILE_OPEN;\r
+       case ERROR_MORE_FRESH:      return TPI_ERROR_IO_FILE_MISC;\r
+       case ERROR_NOT_EXIST:       return TPI_ERROR_IO_FILE_ACCESS;\r
+       case ERROR_ALREADY_EXIST:   return TPI_ERROR_IO_FILE_ACCESS;\r
+       case ERROR_TOO_MANY_FILES:  return TPI_ERROR_IO_ARC_MISC;\r
+       case ERROR_MAKEDIRECTORY:   return TPI_ERROR_IO_DIR_OPEN;\r
+       case ERROR_CANNOT_WRITE:    return TPI_ERROR_IO_FILE_WRITE;\r
+       case ERROR_HUFFMAN_CODE:    return TPI_ERROR_ARC_BROKEN_MISC;\r
+       case ERROR_COMMENT_HEADER:  return TPI_ERROR_ARC_BROKEN_HEADER;\r
+       case ERROR_HEADER_CRC:      return TPI_ERROR_ARC_BROKEN_SUM;\r
+       case ERROR_HEADER_BROKEN:   return TPI_ERROR_ARC_BROKEN_HEADER;\r
+       case ERROR_ARC_FILE_OPEN:   return TPI_ERROR_IO_ARC_OPEN;\r
+       case ERROR_NOT_ARC_FILE:    return TPI_ERROR_D_UNSUPPORTED;\r
+       case ERROR_CANNOT_READ:     return TPI_ERROR_IO_ARC_READ;\r
+       case ERROR_FILE_STYLE:      return TPI_ERROR_D_UNSUPPORTED;\r
+       case ERROR_COMMAND_NAME:    return TPI_ERROR_UNDEFINED;\r
+       case ERROR_MORE_HEAP_MEMORY:return TPI_ERROR_D_OUTOFMEMORY;\r
+       case ERROR_ENOUGH_MEMORY:   return TPI_ERROR_D_OUTOFMEMORY;\r
+       case ERROR_ALREADY_RUNNING: return TPI_ERROR_UNDEFINED;\r
+       case ERROR_USER_CANCEL:     return TPI_ERROR_D_SKIPPED;\r
+       case ERROR_HARC_ISNOT_OPENED: return TPI_ERROR_D_PARAMETER;\r
+       case ERROR_NOT_SEARCH_MODE: return TPI_ERROR_D_PARAMETER;\r
+       case ERROR_NOT_SUPPORT:     return TPI_ERROR_U_USE_LIBRARY;\r
+       case ERROR_TIME_STAMP:      return TPI_ERROR_UNDEFINED;\r
+       case ERROR_TMP_OPEN:        return TPI_ERROR_IO_TMP_OPEN;\r
+       case ERROR_LONG_FILE_NAME:  return TPI_ERROR_IO_FILE_ACCESS;\r
+       case ERROR_ARC_READ_ONLY:   return TPI_ERROR_IO_ARC_ACCESS;\r
+       case ERROR_SAME_NAME_FILE:  return TPI_ERROR_UNDEFINED;\r
+       case ERROR_NOT_FIND_ARC_FILE: return TPI_ERROR_IO_ARC_NOTFOUND;\r
+       case ERROR_RESPONSE_READ:   return TPI_ERROR_IO_MISC_READ;\r
+       case ERROR_NOT_FILENAME:    return TPI_ERROR_IO_FILE_NOTFOUND;\r
+       case ERROR_TMP_COPY:        return TPI_ERROR_IO_TMP_COPY;\r
+       case ERROR_EOF:             return TPI_ERROR_ARC_BROKEN_SIZE;\r
+       case ERROR_ADD_TO_LARC:     return TPI_ERROR_UNDEFINED;\r
+       case ERROR_TMP_BACK_SPACE:  return TPI_ERROR_IO_TMP_MOVE;\r
+       case ERROR_SHARING:         return TPI_ERROR_IO_FILE_ACCESS;\r
+       case ERROR_NOT_FIND_FILE:   return TPI_ERROR_IO_NOTFOUND;\r
+       case ERROR_LOG_FILE:        return TPI_ERROR_IO_MISC_WRITE;\r
+       case ERROR_NO_DEVICE:       return TPI_ERROR_IO_FILE_ACCESS;\r
+       case ERROR_GET_ATTRIBUTES:  return TPI_ERROR_IO_FILE_GETINFO;\r
+       case ERROR_SET_ATTRIBUTES:  return TPI_ERROR_IO_FILE_SETINFO;\r
+       case ERROR_GET_INFORMATION: return TPI_ERROR_IO_FILE_GETINFO;\r
+       case ERROR_GET_POINT:       return TPI_ERROR_IO_FILE_POINT;\r
+       case ERROR_SET_POINT:       return TPI_ERROR_IO_FILE_POINT;\r
+       case ERROR_CONVERT_TIME:    return TPI_ERROR_UNDEFINED;\r
+       case ERROR_GET_TIME:        return TPI_ERROR_IO_FILE_GETINFO;\r
+       case ERROR_SET_TIME:        return TPI_ERROR_IO_FILE_SETINFO;\r
+       case ERROR_CLOSE_FILE:      return TPI_ERROR_IO_FILE_CLOSE;\r
+       case ERROR_HEAP_MEMORY:     return TPI_ERROR_D_USEMEMORY;\r
+       case ERROR_HANDLE:          return TPI_ERROR_UNDEFINED;\r
+       case ERROR_TIME_STAMP_RANGE:return TPI_ERROR_UNDEFINED;\r
+       case ERROR_MAKE_ARCHIVE:    return TPI_ERROR_ARC_BROKEN_MISC;\r
+       case ERROR_NOT_CONFIRM_NAME:return TPI_ERROR_ARC_BROKEN_HEADER;\r
+       case ERROR_UNEXPECTED_EOF:  return TPI_ERROR_ARC_BROKEN_HEADER;\r
+       case ERROR_INVALID_END_MARK:return TPI_ERROR_ARC_BROKEN_SIZE;\r
+       case ERROR_INVOLVED_LZH:    return TPI_ERROR_ARC_BROKEN_MISC;\r
+       case ERROR_NO_END_MARK:     return TPI_ERROR_ARC_BROKEN_SIZE;\r
+       case ERROR_HDR_INVALID_SIZE:return TPI_ERROR_ARC_BROKEN_HEADER;\r
+       case ERROR_UNKNOWN_LEVEL:   return TPI_ERROR_ARC_UNSUPPORTED;\r
+       case ERROR_BROKEN_DATA:     return TPI_ERROR_ARC_BROKEN_MISC;\r
+       case ERROR_INVALID_PATH:    return TPI_ERROR_UNDEFINED;\r
+       case ERROR_TOO_BIG:         return TPI_ERROR_IO_FILE_WRITE;\r
+       case ERROR_EXECUTABLE_FILE: return TPI_ERROR_UNDEFINED;\r
+       case ERROR_INVALID_VALUE:   return TPI_ERROR_UNDEFINED;\r
+       default:                    return TPI_ERROR_UNDEFINED;\r
+       }\r
+}\r
+\r
+#define GetAPIAddress(name, unicode) GetProcAddress(g_LibInfo.hLib, (g_LibInfo.szPrefix + wxT(name) + ((unicode && g_LibInfo.fUnicode) ? wxT("W") : wxEmptyString)).char_str())\r
+\r
+//******************************************************************************\r
+//    Functions\r
+//******************************************************************************\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif\r
+\r
+int __stdcall GetPluginInformation\r
+(\r
+       unsigned int _uInfoId,\r
+       wxULongLong _llSubOption,\r
+       void * _pPtr\r
+)\r
+{\r
+       // \83p\83X\90Ý\92è\81BTODO : \8dí\8f\9c\81B\r
+       wxStandardPaths p;\r
+       g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+\r
+       if (_pPtr == NULL)\r
+       {\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       switch (LOWORD(_uInfoId))\r
+       {\r
+       case TPI_INFO_VERSION_MAJOR:\r
+       case TPI_INFO_VERSION_MINOR:\r
+               * (int *) _pPtr = 0;\r
+               break;\r
+       case TPI_INFO_VERSION_API:\r
+               * (int *) _pPtr = 2;\r
+               break;\r
+       case TPI_INFO_SUPPORTED_TYPE:\r
+       case TPI_INFO_SUPPORTED_SUFFIX:\r
+       {\r
+               // xml\89ð\90Í\8aJ\8en\81B\r
+               wxXmlDocument config(g_szAppPath + wxT("/lib/calLibrary.xml"));\r
+               // \88ê\8bC\82É\90æ\93ª\82Ì\83\89\83C\83u\83\89\83\8a\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B\r
+               wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren();\r
+\r
+               // \93K\93\96\82È\88Ê\92u\82Ü\82Å\88Ú\93®\81B\r
+               for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL;)\r
+               {\r
+                       xmlLibrary = xmlLibrary->GetNext();\r
+                       if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix")))\r
+                       {\r
+                               i++;\r
+                       }\r
+               }\r
+               if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library"))\r
+               {\r
+                       // xml\95\96@\83G\83\89\81[\81B\r
+                       return TPI_ERROR_UNDEFINED;\r
+               }\r
+\r
+               * (wxString *) _pPtr = xmlLibrary->GetPropVal(LOWORD(_uInfoId) == TPI_INFO_SUPPORTED_TYPE ? wxT("typename") : wxT("suffix"), wxEmptyString);\r
+               break;\r
+       }\r
+       default:\r
+               return TPI_ERROR_D_UNSUPPORTED;\r
+       }\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall LoadPlugin\r
+(\r
+       const wxString & _szArcName,\r
+       wxULongLong _llSubOption\r
+)\r
+{\r
+       // \83p\83X\90Ý\92è\81B\r
+       wxStandardPaths p;\r
+       g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+\r
+       // xml\89ð\90Í\8aJ\8en\81B\r
+       wxXmlDocument config(g_szAppPath + wxT("/lib/calLibrary.xml"));\r
+       if (! config.IsOk())\r
+       {\r
+               return TPI_ERROR_UNDEFINED;\r
+       }\r
+       // \88ê\8bC\82É\90æ\93ª\82Ì\83\89\83C\83u\83\89\83\8a\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B\r
+       wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren();\r
+\r
+       // \91Î\8fÛ\82ª\91\8dÝ\82·\82é\82È\82ç\82Î\91Î\89\9e\82·\82é\83\89\83C\83u\83\89\83\8a\82ð\92²\8d¸\81A\r
+       // \91Î\8fÛ\82ª\91\8dÝ\82µ\82È\82¢\82È\82ç\82Î\8ew\8e¦\82³\82ê\82½\83\89\83C\83u\83\89\83\8a\82ð\83\8d\81[\83h\81B\r
+       if (! ::wxFileExists(_szArcName))\r
+       {\r
+               // \93K\93\96\82È\88Ê\92u\82Ü\82Å\88Ú\93®\81B\r
+               int u = 0;\r
+               for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL; u++)\r
+               {\r
+                       xmlLibrary = xmlLibrary->GetNext();\r
+                       if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix")))\r
+                       {\r
+                               i++;\r
+                       }\r
+               }\r
+               if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library"))\r
+               {\r
+                       // xml\95\96@\83G\83\89\81[\81B\r
+                       return TPI_ERROR_UNDEFINED;\r
+               }\r
+               g_LibInfo.nLibIndex = u;\r
+               g_LibInfo.node = * xmlLibrary;\r
+\r
+               // \83\89\83C\83u\83\89\83\8a\82ð\83\8d\81[\83h\81B\r
+               g_LibInfo.hLib = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name"), wxEmptyString).c_str());\r
+               if (g_LibInfo.hLib == NULL)\r
+               {\r
+                       return TPI_ERROR_U_LOAD_LIBRARY;\r
+               }\r
+               g_LibInfo.szPrefix = xmlLibrary->GetPropVal(wxT("prefix"), wxEmptyString);\r
+               g_LibInfo.fUnicode = xmlLibrary->GetPropVal(wxT("unicode"), wxT("0")) == wxT("1");\r
+               g_LibInfo.node.GetPropVal(wxT("exflag"), wxT("0")).ToULong(& g_LibInfo.nExFlag);\r
+\r
+               // \91ã\91Ö\83\89\83C\83u\83\89\83\8a\82à\83\8d\81[\83h\81B\83\8d\81[\83h\82Å\82«\82È\82­\82Ä\82à\83G\83\89\81[\82É\82Í\82µ\82È\82¢\81B\r
+               g_LibInfo.szPrefixAlt = xmlLibrary->GetPropVal(wxT("prefix-alt"), wxEmptyString);\r
+               g_LibInfo.fUnicodeAlt = xmlLibrary->GetPropVal(wxT("unicode-alt"), wxT("0")) == wxT("1");\r
+               g_LibInfo.hLibAlt = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString).c_str());\r
+\r
+               return TPI_ERROR_SUCCESS;\r
+       }\r
+\r
+       // \96³\8cÀ\83\8b\81[\83v\82É\8a×\82ç\82È\82¢\82æ\82¤\8fã\8cÀ\82ð\90Ý\92è\81B\r
+       for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++)\r
+       {\r
+               // \83\89\83C\83u\83\89\83\8a\82ð\83\8d\81[\83h\81B\r
+               g_LibInfo.hLib = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name"), wxEmptyString).c_str());\r
+               if (g_LibInfo.hLib == NULL)\r
+               {\r
+                       xmlLibrary = xmlLibrary->GetNext();\r
+                       continue;\r
+               }\r
+               g_LibInfo.szPrefix = xmlLibrary->GetPropVal(wxT("prefix"), wxEmptyString);\r
+               g_LibInfo.fUnicode = xmlLibrary->GetPropVal(wxT("unicode"), wxT("0")) == wxT("1");\r
+               g_LibInfo.node.GetPropVal(wxT("exflag"), wxT("0")).ToULong(& g_LibInfo.nExFlag);\r
+\r
+               // \91ã\91Ö\83\89\83C\83u\83\89\83\8a\82à\83\8d\81[\83h\81B\83\8d\81[\83h\82Å\82«\82È\82­\82Ä\82à\83G\83\89\81[\82É\82Í\82µ\82È\82¢\81B\r
+               g_LibInfo.szPrefixAlt = xmlLibrary->GetPropVal(wxT("prefix-alt"), wxEmptyString);\r
+               g_LibInfo.fUnicodeAlt = xmlLibrary->GetPropVal(wxT("unicode-alt"), wxT("0")) == wxT("1");\r
+               g_LibInfo.hLibAlt = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString).c_str());\r
+               g_LibInfo.node = * xmlLibrary;\r
+\r
+               // \8f\91\8cÉ\82É\91Î\89\9e\82µ\82Ä\82¢\82é\82©\83`\83F\83b\83N\81B\r
+               if (CheckArchive(_szArcName, NULL) == TPI_ERROR_SUCCESS)\r
+               {\r
+                       // \91Î\89\9e\82µ\82Ä\82¢\82ê\82Î\8f\88\97\9d\82ð\8fI\97¹\81B\r
+                       return TPI_ERROR_SUCCESS;\r
+               }\r
+\r
+               ::FreeLibrary(g_LibInfo.hLib);\r
+               xmlLibrary = xmlLibrary->GetNext();\r
+       }\r
+\r
+       return TPI_ERROR_U_LOAD_LIBRARY;\r
+}\r
+\r
+int __stdcall FreePlugin\r
+(\r
+       void * // _pReserved\r
+)\r
+{\r
+       ::FreeLibrary(g_LibInfo.hLib);\r
+       ::FreeLibrary(g_LibInfo.hLibAlt);\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall CheckArchive\r
+(\r
+       const wxString & _szArcName,\r
+       int * _nFileCount\r
+)\r
+{\r
+       // Unicode\83\82\81[\83h\82É\90Ý\92è\81B\r
+       FARPROC fpProc = ::GetAPIAddress("SetUnicodeMode", false);\r
+       g_fExistUnicodeMode = fpProc != NULL;\r
+       if (g_fExistUnicodeMode)\r
+       {\r
+               ((BOOL (__stdcall *)(BOOL)) fpProc)(TRUE);\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("CheckArchive", true);\r
+       if (fpProc == NULL)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       if (! (g_LibInfo.fUnicode\r
+               ? ((BOOL (__stdcall *)(const wchar_t *, const int)) fpProc)(_szArcName.wchar_str(), 0)\r
+               : ((BOOL (__stdcall *)(const char    *, const int)) fpProc)(g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str(),  0)\r
+       ))\r
+       {\r
+               return TPI_ERROR_D_UNSUPPORTED;\r
+       }\r
+\r
+       if (_nFileCount != NULL)\r
+       {\r
+               fpProc = ::GetAPIAddress("GetFileCount", true);\r
+               if (fpProc == NULL)\r
+               {\r
+                       return TPI_ERROR_U_USE_LIBRARY;\r
+               }\r
+\r
+               * _nFileCount = g_LibInfo.fUnicode\r
+                       ? ((int (__stdcall *)(const wchar_t *)) fpProc)(_szArcName.wchar_str())\r
+                       : ((int (__stdcall *)(const char *)) fpProc)(g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str());\r
+               if (* _nFileCount == -1)\r
+               {\r
+                       return TPI_ERROR_ARC_UNSUPPORTED;\r
+               }\r
+       }\r
+\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall OpenArchive\r
+(\r
+       const wxString & _szArcName,\r
+       void * * _hArchive\r
+)\r
+{\r
+       FARPROC fpProc = ::GetAPIAddress("OpenArchive", true);\r
+       if (fpProc == NULL)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       * _hArchive = g_LibInfo.fUnicode\r
+               ? ((void * (__stdcall *)(const HWND, const wchar_t *, const DWORD)) fpProc)(NULL, _szArcName.wchar_str(), 0)\r
+               : ((void * (__stdcall *)(const HWND, const char    *, const DWORD)) fpProc)(NULL, g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str(),  0);\r
+       return _hArchive == NULL ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall CloseArchive\r
+(\r
+       void * _hArchive\r
+)\r
+{\r
+       FARPROC fpProc = ::GetAPIAddress("CloseArchive", false);\r
+       return fpProc == NULL ? TPI_ERROR_U_USE_LIBRARY : CalErrorCodeConvert(((int (__stdcall *)(void *)) fpProc)(_hArchive));\r
+}\r
+\r
+int __stdcall GetFileInformation\r
+(\r
+       void * _hArchive,\r
+       TPI_FILEINFO * _fiInfo,\r
+       bool _bFirst\r
+)\r
+{\r
+       static unsigned int s_uFileID;\r
+       int nResult;\r
+       INDIVIDUALINFO iiInfo;\r
+       INDIVIDUALINFOW iiInfoW;\r
+       memset(& iiInfo,  0, sizeof(iiInfo));\r
+       memset(& iiInfoW, 0, sizeof(iiInfoW));\r
+\r
+       if (_bFirst)\r
+       {\r
+               s_uFileID = 0;\r
+               FARPROC fpProc = ::GetAPIAddress("FindFirst", true);\r
+               if (fpProc == NULL)\r
+               {\r
+                       return TPI_ERROR_U_USE_LIBRARY;\r
+               }\r
+\r
+               nResult = g_LibInfo.fUnicode\r
+                       ? ((int (__stdcall *)(void *, const wchar_t *, LPINDIVIDUALINFOW)) fpProc)(_hArchive, L"*", & iiInfoW)\r
+                       : ((int (__stdcall *)(void *, const char *,    LPINDIVIDUALINFO))  fpProc)(_hArchive,  "*", & iiInfo);\r
+       }\r
+       else\r
+       {\r
+               FARPROC fpProc = ::GetAPIAddress("FindNext", true);\r
+               if (fpProc == NULL)\r
+               {\r
+                       return TPI_ERROR_U_USE_LIBRARY;\r
+               }\r
+\r
+               nResult = g_LibInfo.fUnicode\r
+                       ? ((int (__stdcall *)(void *, LPINDIVIDUALINFOW)) fpProc)(_hArchive, & iiInfoW)\r
+                       : ((int (__stdcall *)(void *, LPINDIVIDUALINFO))  fpProc)(_hArchive, & iiInfo);\r
+       }\r
+\r
+       nResult = CalErrorCodeConvert(nResult);\r
+       if (nResult == TPI_ERROR_SUCCESS)\r
+       {\r
+               FARPROC fpProc = ::GetAPIAddress("GetAttribute", false);\r
+               _fiInfo->dwAttribute = (fpProc == NULL) ? 0 : ((int (__stdcall *)(void *)) fpProc)(_hArchive);\r
+               if ((signed) _fiInfo->dwAttribute == -1)\r
+               {\r
+                       _fiInfo->dwAttribute = 0;\r
+               }\r
+\r
+               if (g_LibInfo.fUnicode)\r
+               {\r
+                       _fiInfo->dwCRC32        = iiInfoW.dwCRC;\r
+                       _fiInfo->uOSType        = iiInfoW.uOSType;\r
+                       _fiInfo->llPackedSize   = iiInfoW.dwCompressedSize;\r
+                       _fiInfo->llUnpackedSize = iiInfoW.dwOriginalSize;\r
+                       _fiInfo->tmModified.SetFromDOS(MAKELONG(iiInfoW.wTime, iiInfoW.wDate));\r
+                       _fiInfo->szStoredName   = WC2String(iiInfoW.szFileName);\r
+                       _fiInfo->szMethod       = WC2String(iiInfoW.szMode);\r
+                       _fiInfo->wCompressRatio = iiInfoW.wRatio;\r
+               }\r
+               else\r
+               {\r
+                       _fiInfo->dwCRC32        = iiInfo.dwCRC;\r
+                       _fiInfo->uOSType        = iiInfo.uOSType;\r
+                       _fiInfo->llPackedSize   = iiInfo.dwCompressedSize;\r
+                       _fiInfo->llUnpackedSize = iiInfo.dwOriginalSize;\r
+                       _fiInfo->tmModified.SetFromDOS(MAKELONG(iiInfo.wTime, iiInfo.wDate));\r
+                       _fiInfo->szStoredName   = MB2String(iiInfo.szFileName);\r
+                       _fiInfo->szMethod       = MB2String(iiInfo.szMode);\r
+                       _fiInfo->wCompressRatio = iiInfo.wRatio;\r
+               }\r
+               _fiInfo->llFileID       = s_uFileID++;\r
+               _fiInfo->fnFileName     = wxFileName::FileName(_fiInfo->szStoredName);\r
+//             _fiInfo->ftAccessTime   = 0;\r
+//             _fiInfo->ftCreateTime   = 0;\r
+       }\r
+\r
+       return nResult;\r
+}\r
+\r
+int __stdcall GetArchiveInformation\r
+(\r
+       void * _hArchive,\r
+       TPI_ARCHIVEINFO * _aiInfo\r
+)\r
+{\r
+       FARPROC fpProc = ::GetAPIAddress("GetArcFileName", true);\r
+       if (fpProc != NULL)\r
+       {\r
+               // TODO : \83t\83@\83C\83\8b\96¼\82Ì\95\8e\9a\90\94\90§\8cÀ\82ð\93P\94p\81B\r
+               wxString s;\r
+               if (g_LibInfo.fUnicode)\r
+               {\r
+                       wchar_t sz[2049];\r
+                       ((int (__stdcall *)(void *, wchar_t *, const int)) fpProc)(_hArchive, sz, 2048);\r
+                       s = WC2String(sz);\r
+               }\r
+               else\r
+               {\r
+                       char sz[2049];\r
+                       ((int (__stdcall *)(void *, char *, const int)) fpProc)(_hArchive, sz, 2048);\r
+                       s = MB2String(sz);\r
+               }\r
+               _aiInfo->fnArchive = wxFileName::FileName(s);\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcFileSizeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llFileSize);\r
+       }\r
+       else\r
+       {\r
+               fpProc = ::GetAPIAddress("GetArcFileSize", false);\r
+               if (fpProc != NULL)\r
+               {\r
+                       _aiInfo->llFileSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive);\r
+               }\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcOriginalSizeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llUnpackedSize);\r
+       }\r
+       else\r
+       {\r
+               fpProc = ::GetAPIAddress("GetArcOriginalSize", false);\r
+               if (fpProc != NULL)\r
+               {\r
+                       _aiInfo->llUnpackedSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive);\r
+               }\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcCompressedSizeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llPackedSize);\r
+       }\r
+       else\r
+       {\r
+               fpProc = ::GetAPIAddress("GetArcCompressedSize", false);\r
+               if (fpProc != NULL)\r
+               {\r
+                       _aiInfo->llPackedSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive);\r
+               }\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcReadSizeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llReadSize);\r
+       }\r
+       else\r
+       {\r
+               fpProc = ::GetAPIAddress("GetArcReadSize", false);\r
+               if (fpProc != NULL)\r
+               {\r
+                       _aiInfo->llReadSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive);\r
+               }\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcRatio", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               _aiInfo->wCompressRatio = ((WORD (__stdcall *)(void *)) fpProc)(_hArchive);\r
+       }\r
+\r
+       FILETIME ft;\r
+       fpProc = ::GetAPIAddress("GetArcAccessTimeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft);\r
+               _aiInfo->tmAccess = FileTimeToWxDateTime(& ft);\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcCreatedTimeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft);\r
+               _aiInfo->tmCreate = FileTimeToWxDateTime(& ft);\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcWriteTimeEx", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft);\r
+               _aiInfo->tmModified = FileTimeToWxDateTime(& ft);\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("GetArcOSType", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               _aiInfo->uOSType = ((UINT (__stdcall *)(void *)) fpProc)(_hArchive);\r
+       }\r
+\r
+       fpProc = ::GetAPIAddress("IsSFXFile", false);\r
+       if (fpProc != NULL)\r
+       {\r
+               _aiInfo->nSFXType = ((int (__stdcall *)(void *)) fpProc)(_hArchive);\r
+       }\r
+       if (fpProc == NULL || _aiInfo->nSFXType < 0)\r
+       {\r
+               // \83G\83\89\81[\82Ì\8fê\8d\87\82Í\82Æ\82è\82 \82¦\82¸\92Ê\8fí\82Ì\8f\91\8cÉ\82Æ\82Ý\82È\82·\81B\r
+               _aiInfo->nSFXType = 0;\r
+       }\r
+\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall Command\r
+(\r
+       unsigned int _uCommand,\r
+       TPI_SWITCHES * _swInfo,\r
+       const wxString & _szArcName,\r
+       const wxArrayString & _szFiles\r
+)\r
+{\r
+       // Ini\82©\82ç\83R\83}\83\93\83h\83\89\83C\83\93\82ð\8eæ\93¾\81B\r
+       wxString szPath, szCommandLine;\r
+\r
+       // API\83A\83h\83\8c\83X\8eæ\93¾\81B\r
+       FARPROC fpProc\r
+               = g_LibInfo.node.GetPropVal(\r
+                       _uCommand == TPI_COMMAND_ADD     ? wxT("add") :\r
+                       _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract") : \r
+                       _uCommand == TPI_COMMAND_DELETE  ? wxT("delete") : \r
+                       _uCommand == TPI_COMMAND_UPDATE  ? wxT("update") : \r
+                       _uCommand == TPI_COMMAND_TEST    ? wxT("test") : \r
+                       _uCommand == TPI_COMMAND_REPAIR  ? wxT("repair") : \r
+                       _uCommand == TPI_COMMAND_MOVE    ? wxT("move") : \r
+                       _uCommand == TPI_COMMAND_SFX     ? wxT("sfx") : \r
+                       _uCommand == TPI_COMMAND_UNSFX   ? wxT("unsfx") : wxEmptyString, & szCommandLine)\r
+               ? ::GetAPIAddress("", true)\r
+               : g_LibInfo.node.GetPropVal(\r
+                       _uCommand == TPI_COMMAND_ADD     ? wxT("add-alt") :\r
+                       _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract-alt") : \r
+                       _uCommand == TPI_COMMAND_DELETE  ? wxT("delete-alt") : \r
+                       _uCommand == TPI_COMMAND_UPDATE  ? wxT("update-alt") : \r
+                       _uCommand == TPI_COMMAND_TEST    ? wxT("test-alt") : \r
+                       _uCommand == TPI_COMMAND_REPAIR  ? wxT("repair-alt") : \r
+                       _uCommand == TPI_COMMAND_MOVE    ? wxT("move-alt") : \r
+                       _uCommand == TPI_COMMAND_SFX     ? wxT("sfx-alt") : \r
+                       _uCommand == TPI_COMMAND_UNSFX   ? wxT("unsfx-alt") : wxEmptyString, & szCommandLine)\r
+               ? ::GetProcAddress(g_LibInfo.hLibAlt, g_LibInfo.szPrefixAlt.char_str()) : NULL;\r
+\r
+       if (fpProc == NULL || szCommandLine.IsEmpty())\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       // \83R\83}\83\93\83h\83\89\83C\83\93\81E\83\8c\83X\83|\83\93\83X\83t\83@\83C\83\8b\8dì\90¬\81B\r
+       wxString\r
+               szResponceFileName = MakeResponceFile(_szFiles, g_LibInfo.node.GetPropVal(wxT("quote-resp"), wxT("1")) == wxT("1")),\r
+               szCommandLineSend  = MakeCommandLineSend(szCommandLine, _szArcName, _swInfo, _szFiles, szResponceFileName);\r
+\r
+       // \83R\83}\83\93\83h\83\89\83C\83\93\8eÀ\8ds\81B\r
+       int nErrorCode;\r
+       wxString szOutput;\r
+       if (g_LibInfo.fUnicode)\r
+       {\r
+               wchar_t szTmpOut[2049];\r
+               nErrorCode = ((int (__stdcall *)(const HWND, const wchar_t *, wchar_t *, DWORD)) fpProc)(NULL, szCommandLineSend.wchar_str(), szTmpOut, 2048);\r
+               szOutput = WC2String(szTmpOut);\r
+       }\r
+       else\r
+       {\r
+               char szTmpOut[2049];\r
+               nErrorCode = ((int (__stdcall *)(const HWND, const char *, char *, DWORD)) fpProc)(NULL, g_fExistUnicodeMode ? szCommandLineSend.ToUTF8() : szCommandLineSend.char_str(), szTmpOut, 2048);\r
+               szOutput = MB2String(szTmpOut);\r
+       }\r
+\r
+       // \83\8c\83X\83|\83\93\83X\83t\83@\83C\83\8b\8dí\8f\9c\81B\r
+       ::wxRemoveFile(szResponceFileName);\r
+\r
+       if (nErrorCode != 0)\r
+       {\r
+#ifdef __LINUX__\r
+               ::wxMessageBox(wxString::Format(wxT("Error :\n%x\n\nCommandLine:\n%s\n\nOutput:\n%s"), nErrorCode, szCommandLineSend.c_str(), szOutput.c_str()));\r
+#else\r
+               MessageBox(NULL, wxString::Format(wxT("Error :\n%x\n\nCommandLine:\n%s\n\nOutput:\n%s"), nErrorCode, szCommandLineSend.c_str(), szOutput.c_str()), NULL, 0);\r
+#endif\r
+       }\r
+       return CalErrorCodeConvert(nErrorCode);\r
+}\r
+\r
+int __stdcall SetCallbackProc\r
+(\r
+       TPI_PROC _prArcProc\r
+)\r
+{\r
+       // \83|\83C\83\93\83^\82ð\95Û\91\81B\r
+       if (_prArcProc == NULL)\r
+       {\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       g_prProc = * _prArcProc;\r
+       g_fCallback32bit = FALSE;\r
+\r
+       // API\82Ì\83A\83h\83\8c\83X\82ð\8eæ\93¾\81B\r
+       FARPROC fpProc = ::GetAPIAddress("SetOwnerWindowEx64", true);\r
+\r
+       BOOL fResult = FALSE;\r
+       if (fpProc == NULL)\r
+       {\r
+               // SetOwnerWindowEx64\82ª\8eÀ\91\95\82³\82ê\82Ä\82¢\82È\82¢\8fê\8d\87\81ASetOwnerWindowEx\82ð\97\98\97p\81B\r
+               fpProc = ::GetAPIAddress("SetOwnerWindowEx", true);\r
+               if (fpProc == NULL)\r
+               {\r
+                       return TPI_ERROR_U_USE_LIBRARY;\r
+               }\r
+               g_fCallback32bit = TRUE;\r
+               fResult = ((BOOL (__stdcall *)(HWND, ARCHIVERPROC *)) fpProc)(NULL, (ARCHIVERPROC *) CallbackProc);\r
+       }\r
+       else\r
+       {\r
+               fResult = ((BOOL (__stdcall *)(HWND, ARCHIVERPROC *, DWORD)) fpProc)(NULL, (ARCHIVERPROC *) CallbackProc, g_LibInfo.fUnicode ? sizeof(EXTRACTINGINFOEX64W) : sizeof(EXTRACTINGINFOEX64));\r
+       }\r
+       return fResult ? TPI_ERROR_SUCCESS : TPI_ERROR_UNDEFINED;\r
+}\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
diff --git a/src/plugin/calLibrary/calLibrary.h b/src/plugin/calLibrary/calLibrary.h
new file mode 100644 (file)
index 0000000..33cd53d
--- /dev/null
@@ -0,0 +1,241 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: calLibrary.h,v 1.3 2009/09/27 10:11:13 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Defines\r
+//******************************************************************************\r
+\r
+#ifndef FNAME_MAX32\r
+#define FNAME_MAX32 512\r
+#endif\r
+\r
+// Window Message\r
+#define        WM_ARCEXTRACT           wxT("wm_arcextract")\r
+#define        ARCEXTRACT_BEGIN                0\r
+#define        ARCEXTRACT_INPROCESS    1\r
+#define        ARCEXTRACT_END                  2\r
+#define ARCEXTRACT_OPEN                        3\r
+#define ARCEXTRACT_COPY                        4\r
+\r
+// Warning Code\r
+#ifndef ERROR_START\r
+#define ERROR_START                            0x8000\r
+#define ERROR_DISK_SPACE               0x8005\r
+#define ERROR_READ_ONLY                        0x8006\r
+#define ERROR_USER_SKIP                        0x8007\r
+#define ERROR_UNKNOWN_TYPE             0x8008\r
+#define ERROR_METHOD                   0x8009\r
+#define ERROR_PASSWORD_FILE            0x800A\r
+#define ERROR_VERSION                  0x800B\r
+#define ERROR_FILE_CRC                 0x800C\r
+#define ERROR_FILE_OPEN                        0x800D\r
+#define ERROR_MORE_FRESH               0x800E\r
+#define ERROR_NOT_EXIST                        0x800F\r
+#define ERROR_ALREADY_EXIST            0x8010\r
+#define ERROR_TOO_MANY_FILES   0x8011\r
+// Error Code\r
+#define ERROR_MAKEDIRECTORY            0x8012\r
+#define ERROR_CANNOT_WRITE             0x8013\r
+#define ERROR_HUFFMAN_CODE             0x8014\r
+#define ERROR_COMMENT_HEADER   0x8015\r
+#define ERROR_HEADER_CRC               0x8016\r
+#define ERROR_HEADER_BROKEN            0x8017\r
+#define ERROR_ARC_FILE_OPEN            0x8018\r
+#define ERROR_NOT_ARC_FILE             0x8019\r
+#define ERROR_CANNOT_READ              0x801A\r
+#define ERROR_FILE_STYLE               0x801B\r
+#define ERROR_COMMAND_NAME             0x801C\r
+#define ERROR_MORE_HEAP_MEMORY 0x801D\r
+#define ERROR_ENOUGH_MEMORY            0x801E\r
+#define ERROR_ALREADY_RUNNING  0x801F\r
+#define ERROR_USER_CANCEL              0x8020\r
+#define ERROR_HARC_ISNOT_OPENED        0x8021\r
+#define ERROR_NOT_SEARCH_MODE  0x8022\r
+#define ERROR_NOT_SUPPORT              0x8023\r
+#define ERROR_TIME_STAMP               0x8024\r
+#define ERROR_TMP_OPEN                 0x8025\r
+#define ERROR_LONG_FILE_NAME   0x8026\r
+#define ERROR_ARC_READ_ONLY            0x8027\r
+#define ERROR_SAME_NAME_FILE   0x8028\r
+#define ERROR_NOT_FIND_ARC_FILE        0x8029\r
+#define ERROR_RESPONSE_READ            0x802A\r
+#define ERROR_NOT_FILENAME             0x802B\r
+#define ERROR_TMP_COPY                 0x802C\r
+#define ERROR_EOF                              0x802D\r
+#define ERROR_ADD_TO_LARC              0x802E\r
+#define ERROR_TMP_BACK_SPACE    0x802F\r
+#define ERROR_SHARING                  0x8030\r
+#define ERROR_NOT_FIND_FILE            0x8031\r
+#define ERROR_LOG_FILE                 0x8032\r
+#define        ERROR_NO_DEVICE                 0x8033\r
+#define ERROR_GET_ATTRIBUTES    0x8034\r
+#define ERROR_SET_ATTRIBUTES   0x8035\r
+#define ERROR_GET_INFORMATION   0x8036\r
+#define ERROR_GET_POINT                        0x8037\r
+#define ERROR_SET_POINT                        0x8038\r
+#define ERROR_CONVERT_TIME             0x8039\r
+#define ERROR_GET_TIME                 0x803A\r
+#define ERROR_SET_TIME                 0x803B\r
+#define ERROR_CLOSE_FILE               0x803C\r
+#define ERROR_HEAP_MEMORY              0x803D\r
+#define ERROR_HANDLE                   0x803E\r
+#define ERROR_TIME_STAMP_RANGE  0x803F\r
+#define ERROR_MAKE_ARCHIVE             0x8040\r
+#define ERROR_NOT_CONFIRM_NAME 0x8041\r
+#define ERROR_UNEXPECTED_EOF   0x8042\r
+#define ERROR_INVALID_END_MARK 0x8043\r
+#define ERROR_INVOLVED_LZH             0x8044\r
+#define ERROR_NO_END_MARK              0x8045\r
+#define ERROR_HDR_INVALID_SIZE 0x8046\r
+#define ERROR_UNKNOWN_LEVEL            0x8047\r
+#define ERROR_BROKEN_DATA              0x8048\r
+#define ERROR_INVALID_PATH             0x8049\r
+#define ERROR_TOO_BIG                  0x804A\r
+#define ERROR_EXECUTABLE_FILE  0x804B\r
+#define ERROR_INVALID_VALUE            0x804C\r
+#define ERROR_END                              ERROR_INVALID_VALUE\r
+#endif\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct _tagINDIVIDUALINFO\r
+{\r
+       DWORD dwOriginalSize;\r
+       DWORD dwCompressedSize;\r
+       DWORD dwCRC;\r
+       UINT uFlag;\r
+       UINT uOSType;\r
+       WORD wRatio;\r
+       WORD wDate;\r
+       WORD wTime;\r
+       char szFileName[FNAME_MAX32 + 1];\r
+       char dummy1[3];\r
+       char szAttribute[8];\r
+       char szMode[8];\r
+}      INDIVIDUALINFO, * LPINDIVIDUALINFO;\r
+\r
+typedef struct _tagINDIVIDUALINFOW\r
+{\r
+       DWORD dwOriginalSize;\r
+       DWORD dwCompressedSize;\r
+       DWORD dwCRC;\r
+       UINT uFlag;\r
+       UINT uOSType;\r
+       WORD wRatio;\r
+       WORD wDate;\r
+       WORD wTime;\r
+       wchar_t szFileName[FNAME_MAX32 + 1];\r
+       wchar_t dummy1[3];\r
+       wchar_t szAttribute[8];\r
+       wchar_t szMode[8];\r
+}      INDIVIDUALINFOW, * LPINDIVIDUALINFOW;\r
+\r
+typedef struct EXTRACTINGINFO\r
+{\r
+       DWORD dwFileSize;\r
+       DWORD dwWriteSize;\r
+       char szSourceFileName[FNAME_MAX32 + 1];\r
+       char dummy1[3];\r
+       char szDestFileName[FNAME_MAX32 + 1];\r
+       char dummy[3];\r
+}      EXTRACTINGINFO, * LPEXTRACTINGINFO;\r
+\r
+typedef struct EXTRACTINGINFOW\r
+{\r
+       DWORD dwFileSize;\r
+       DWORD dwWriteSize;\r
+       wchar_t szSourceFileName[FNAME_MAX32 + 1];\r
+       wchar_t dummy1[3];\r
+       wchar_t szDestFileName[FNAME_MAX32 + 1];\r
+       wchar_t dummy[3];\r
+}      EXTRACTINGINFOW, * LPEXTRACTINGINFOW;\r
+\r
+typedef struct EXTRACTINGINFOEX\r
+{\r
+       EXTRACTINGINFO exinfo;\r
+       DWORD dwCompressedSize;\r
+       DWORD dwCRC;\r
+       UINT uOSType;\r
+       WORD wRatio;\r
+       WORD wDate;\r
+       WORD wTime;\r
+       char szAttribute[8];\r
+       char szMode[8];\r
+}      EXTRACTINGINFOEX, * LPEXTRACTINGINFOEX;\r
+\r
+typedef struct EXTRACTINGINFOEXW\r
+{\r
+       EXTRACTINGINFOW exinfo;\r
+       DWORD dwCompressedSize;\r
+       DWORD dwCRC;\r
+       UINT uOSType;\r
+       WORD wRatio;\r
+       WORD wDate;\r
+       WORD wTime;\r
+       wchar_t szAttribute[8];\r
+       wchar_t szMode[8];\r
+}      EXTRACTINGINFOEXW, * LPEXTRACTINGINFOEXW;\r
+\r
+typedef struct EXTRACTINGINFOEX64\r
+{\r
+       DWORD dwStructSize;\r
+       EXTRACTINGINFO exinfo;\r
+       UINT64 llFileSize;\r
+       UINT64 llCompressedSize;\r
+       UINT64 llWriteSize;\r
+       DWORD dwAttributes;\r
+       DWORD dwCRC;\r
+       UINT uOSType;\r
+       WORD wRatio;\r
+       FILETIME ftCreateTime;\r
+       FILETIME ftAccessTime;\r
+       FILETIME ftWriteTime;\r
+       char szMode[8];\r
+       char szSourceFileName[FNAME_MAX32 + 1];\r
+       char dummy1[3];\r
+       char szDestFileName[FNAME_MAX32 + 1];\r
+       char dummy2[3];\r
+}      EXTRACTINGINFOEX64, * LPEXTRACTINGINFOEX64;\r
+\r
+typedef struct EXTRACTINGINFOEX64W\r
+{\r
+       DWORD dwStructSize;\r
+       EXTRACTINGINFOW exinfo;\r
+       UINT64 llFileSize;\r
+       UINT64 llCompressedSize;\r
+       UINT64 llWriteSize;\r
+       DWORD dwAttributes;\r
+       DWORD dwCRC;\r
+       UINT uOSType;\r
+       WORD wRatio;\r
+       FILETIME ftCreateTime;\r
+       FILETIME ftAccessTime;\r
+       FILETIME ftWriteTime;\r
+       wchar_t szMode[8];\r
+       wchar_t szSourceFileName[FNAME_MAX32 + 1];\r
+       wchar_t dummy1[3];\r
+       wchar_t szDestFileName[FNAME_MAX32 + 1];\r
+       wchar_t dummy2[3];\r
+}      EXTRACTINGINFOEX64W, * LPEXTRACTINGINFOEX64W;\r
+\r
+typedef BOOL(CALLBACK * ARCHIVERPROC)(HWND, unsigned int, unsigned int, void *);\r
+\r
+#pragma pack()\r
diff --git a/src/plugin/calLibrary/calLibrary.vcproj b/src/plugin/calLibrary/calLibrary.vcproj
new file mode 100644 (file)
index 0000000..89a554f
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="shift_jis"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="calLibrary"\r
+       ProjectGUID="{3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}"\r
+       RootNamespace="calLibrary"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\..\bin\lib"\r
+                       IntermediateDirectory="..\..\tmp\calLibrary"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CALLIBRARY_EXPORTS"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               WarningLevel="4"\r
+                               DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4819"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="wxmsw28u_core.lib wxbase28u.lib wxbase28u_xml.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxexpat.lib imagehlp.lib comctl32.lib"\r
+                               OutputFile="$(OutDir)/calLibrary.dll"\r
+                               LinkIncremental="1"\r
+                               GenerateManifest="false"\r
+                               ModuleDefinitionFile="..\..\common\header\plugin.def"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="del $(TargetDir)$(TargetName).exp $(TargetDir)$(TargetName).lib"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <File\r
+                       RelativePath=".\calLibrary.cpp"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath=".\calLibrary.h"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath="..\..\common\library\library.cpp"\r
+                       >\r
+                       <FileConfiguration\r
+                               Name="Release|Win32"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                                       ObjectFile="$(IntDir)\..\common\"\r
+                               />\r
+                       </FileConfiguration>\r
+               </File>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/src/plugin/cuiWrapper/Makefile b/src/plugin/cuiWrapper/Makefile
new file mode 100644 (file)
index 0000000..78dd585
--- /dev/null
@@ -0,0 +1,28 @@
+# Makefile.\r
+# $Id: Makefile,v 1.2 2009/08/22 13:31:54 sirakaba Exp $\r
+\r
+# Define compilers.\r
+CC = g++\r
+CPPFLAGS = -c -g -O3 -Wall -W -fPIC `wx-config --cppflags`\r
+LDFLAGS  = -shared -Wl,-Bsymbolic `wx-config --libs` -lwine\r
+\r
+# Define i/o files.\r
+DIR_OBJ  = ../../tmp/cuiWrapper\r
+OBJS     = cuiWrapper.o ../../common/library/library.o\r
+IN_DEF   = ../../common/header/plugin.def\r
+OUT_LIB  = ../../../bin/lib/cuiWrapper.so\r
+\r
+.PHONY: all clean\r
+.SUFFIXES: .cpp .o\r
+\r
+all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+       $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+\r
+clean:\r
+       rm -f -r $(DIR_OBJ) $(OUT_LIB)\r
+\r
+$(DIR_OBJ):\r
+       mkdir $(DIR_OBJ)\r
+\r
+$(DIR_OBJ)/%.o: %.cpp\r
+       $(CC) $(CPPFLAGS) -o $@ $<\r
diff --git a/src/plugin/cuiWrapper/cuiWrapper.cpp b/src/plugin/cuiWrapper/cuiWrapper.cpp
new file mode 100644 (file)
index 0000000..85b39d5
--- /dev/null
@@ -0,0 +1,559 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: cuiWrapper.cpp,v 1.26 2009/09/27 13:41:02 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Includes\r
+//******************************************************************************\r
+\r
+#include "../../common/header/plugin.h"\r
+#include "../../common/header/plugin-extra.h"\r
+#include "../../common/library/library.h"\r
+#include <wx/config.h>\r
+#include <wx/stdpaths.h>\r
+#include <wx/xml/xml.h>\r
+#include <wx/tokenzr.h>\r
+#include <windows.h>\r
+#include "cuiWrapper.h"\r
+\r
+//******************************************************************************\r
+//    Global varients\r
+//******************************************************************************\r
+\r
+struct g_LibInfo\r
+{\r
+       wxString szExeFile;\r
+       wxString szExeFileAlt;\r
+       wxString szListCommand;\r
+       int nLibIndex;\r
+       wxXmlNode node;\r
+}      g_LibInfo;\r
+\r
+TPI_PROC g_prProc;\r
+wxString g_szAppPath;\r
+wxArrayString g_asOutput;\r
+\r
+//******************************************************************************\r
+//    Entry\r
+//******************************************************************************\r
+\r
+#ifdef __LINUX__\r
+void __attribute__((constructor)) Attach(void)\r
+{\r
+       wxStandardPaths p;\r
+//     g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+}\r
+\r
+void __attribute__((destructor)) Detach(void)\r
+{\r
+}\r
+#else\r
+BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *)\r
+{\r
+       switch (fdwReason)\r
+       {\r
+       case DLL_PROCESS_ATTACH:\r
+       {\r
+               wxStandardPaths p;\r
+               g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+               break;\r
+       }\r
+       case DLL_PROCESS_DETACH:\r
+               break;\r
+       }\r
+       return TRUE;\r
+}\r
+#endif\r
+\r
+//******************************************************************************\r
+//    Inside Functions\r
+//******************************************************************************\r
+\r
+DWORD myExecute(wxString szCommandLine, wxString * szOutput, wxString szCwd, bool bCheckExist = false)\r
+{\r
+#ifdef __LINUX__\r
+       wxString sz = ::wxGetCwd();\r
+       ::wxSetWorkingDirectory(szCwd);\r
+       FILE * fp = popen(szCommandLine.char_str(), "r");\r
+       ::wxSetWorkingDirectory(sz);\r
+       if (fp == NULL)\r
+       {\r
+//             wxMessageBox(wxString::Format(wxT("Error :\n\nCommandLine:\n%s"), szCommandLine.c_str()));\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+#else\r
+       SECURITY_ATTRIBUTES sa;\r
+       memset(& sa, 0, sizeof(SECURITY_ATTRIBUTES));\r
+       sa.bInheritHandle = TRUE;\r
+       sa.nLength = sizeof(SECURITY_ATTRIBUTES);\r
+       HANDLE hRead, hWrite;\r
+       if (! ::CreatePipe(& hRead, & hWrite, & sa, 65537))\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+       STARTUPINFO si;\r
+       memset(& si, 0, sizeof(STARTUPINFO));\r
+       si.cb = sizeof(STARTUPINFO);\r
+       si.dwFlags = STARTF_USESTDHANDLES;\r
+       si.hStdOutput = hWrite;\r
+       si.hStdError = hWrite;\r
+       PROCESS_INFORMATION pi;\r
+       if (! ::CreateProcess(NULL, szCommandLine.wchar_str(), NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, szCwd.IsEmpty() ? NULL : szCwd.wchar_str(), & si, & pi))\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+#endif\r
+\r
+       // \8eÀ\8ds\82Å\82«\82é\82±\82Æ\82ð\8am\94F\82µ\82½\82¢\82¾\82¯\82Ì\8fê\8d\87\82Í\8fI\97¹\81B\r
+       if (bCheckExist)\r
+       {\r
+               return TPI_ERROR_SUCCESS;\r
+       }\r
+\r
+#ifdef __LINUX__\r
+       if (szOutput != NULL)\r
+       {\r
+               char sz[32769];\r
+               memset(sz, 0, sizeof(sz));\r
+               while (! feof(fp))\r
+               {\r
+                       fread(sz, sizeof(char), sizeof(sz) - 1, fp);\r
+                       * szOutput += MB2String(sz);\r
+               }\r
+//             ::wxMessageBox(* szOutput);\r
+       }\r
+       pclose(fp);\r
+       return TPI_ERROR_SUCCESS;\r
+#else\r
+       ::WaitForInputIdle(pi.hProcess, INFINITE);\r
+       ::WaitForSingleObject(pi.hProcess, INFINITE);\r
+\r
+       DWORD nErrorCode = 0;\r
+       ::GetExitCodeProcess(pi.hProcess, & nErrorCode);\r
+       ::CloseHandle(pi.hThread);\r
+       ::CloseHandle(pi.hProcess);\r
+\r
+       if (szOutput != NULL)\r
+       {\r
+               DWORD dwSize = 0;\r
+               char sz[32769];\r
+               memset(sz, 0, sizeof(sz));\r
+               for (wxULongLong llSize = 0; llSize < ::GetFileSize(hRead, NULL); llSize += dwSize)\r
+               {\r
+                       dwSize = 0;\r
+                       ::ReadFile(hRead, sz, sizeof(sz) - 1, & dwSize, NULL);\r
+                       * szOutput += MB2String(sz);\r
+//                     ::MessageBoxA(NULL, sz, NULL, 0);\r
+               }\r
+       }\r
+       ::CloseHandle(hRead);\r
+       ::CloseHandle(hWrite);\r
+\r
+       return nErrorCode == 0 ? TPI_ERROR_SUCCESS : TPI_ERROR_UNDEFINED;\r
+#endif\r
+}\r
+\r
+//******************************************************************************\r
+//    Functions\r
+//******************************************************************************\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif\r
+\r
+int __stdcall GetPluginInformation\r
+(\r
+       unsigned int _uInfoId,\r
+       wxULongLong _llSubOption,\r
+       void * _pPtr\r
+)\r
+{\r
+       // \83p\83X\90Ý\92è\81BTODO : \8dí\8f\9c\81B\r
+       wxStandardPaths p;\r
+       g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+\r
+       if (_pPtr == NULL)\r
+       {\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       switch (LOWORD(_uInfoId))\r
+       {\r
+       case TPI_INFO_VERSION_MAJOR:\r
+       case TPI_INFO_VERSION_MINOR:\r
+               * (int *) _pPtr = 0;\r
+               break;\r
+       case TPI_INFO_VERSION_API:\r
+               * (int *) _pPtr = 2;\r
+               break;\r
+       case TPI_INFO_SUPPORTED_TYPE:\r
+       case TPI_INFO_SUPPORTED_SUFFIX:\r
+       {\r
+               // xml\89ð\90Í\8aJ\8en\81B\r
+               wxXmlDocument config(g_szAppPath + wxT("/lib/cuiWrapper.xml"));\r
+               // \88ê\8bC\82É\90æ\93ª\82Ì\83\89\83C\83u\83\89\83\8a\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B\r
+               wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren();\r
+\r
+               // \93K\93\96\82È\88Ê\92u\82Ü\82Å\88Ú\93®\81B\r
+               for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL;)\r
+               {\r
+                       xmlLibrary = xmlLibrary->GetNext();\r
+                       if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix")) && myExecute(xmlLibrary->GetPropVal(wxT("name"), wxEmptyString), NULL, wxEmptyString, true) == TPI_ERROR_SUCCESS)\r
+                       {\r
+                               i++;\r
+                       }\r
+               }\r
+               if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library"))\r
+               {\r
+                       // xml\95\96@\83G\83\89\81[\81B\r
+                       return TPI_ERROR_UNDEFINED;\r
+               }\r
+\r
+               * (wxString *) _pPtr = xmlLibrary->GetPropVal(LOWORD(_uInfoId) == TPI_INFO_SUPPORTED_TYPE ? wxT("typename") : wxT("suffix"), wxEmptyString);\r
+               break;\r
+       }\r
+       default:\r
+               return TPI_ERROR_D_UNSUPPORTED;\r
+       }\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall LoadPlugin\r
+(\r
+       const wxString & _szArcName,\r
+       wxULongLong _llSubOption\r
+)\r
+{\r
+       // \83p\83X\90Ý\92è\81B\r
+       wxStandardPaths p;\r
+       g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+\r
+       // xml\89ð\90Í\8aJ\8en\81B\r
+       wxXmlDocument config(g_szAppPath + wxT("/lib/cuiWrapper.xml"));\r
+       if (! config.IsOk())\r
+       {\r
+               return TPI_ERROR_UNDEFINED;\r
+       }\r
+       // \88ê\8bC\82É\90æ\93ª\82Ì\83\89\83C\83u\83\89\83\8a\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B\r
+       wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren();\r
+\r
+       // \91Î\8fÛ\82ª\91\8dÝ\82·\82é\82È\82ç\82Î\91Î\89\9e\82·\82é\83\89\83C\83u\83\89\83\8a\82ð\92²\8d¸\81A\r
+       // \91Î\8fÛ\82ª\91\8dÝ\82µ\82È\82¢\82È\82ç\82Î\8ew\8e¦\82³\82ê\82½\83\89\83C\83u\83\89\83\8a\82ð\83\8d\81[\83h\81B\r
+       if (! ::wxFileExists(_szArcName))\r
+       {\r
+               // \93K\93\96\82È\88Ê\92u\82Ü\82Å\88Ú\93®\81B\r
+               int u = 0;\r
+               for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL; u++)\r
+               {\r
+                       xmlLibrary = xmlLibrary->GetNext();\r
+                       // \8eÀ\8ds\83t\83@\83C\83\8b\82Ì\91\8dÝ\82ð\8am\94F\81B\r
+                       if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix")) && myExecute(xmlLibrary->GetPropVal(wxT("name"), wxEmptyString), NULL, wxEmptyString, true) == TPI_ERROR_SUCCESS)\r
+                       {\r
+                               i++;\r
+                       }\r
+               }\r
+               if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library"))\r
+               {\r
+                       // xml\95\96@\83G\83\89\81[\81B\r
+                       return TPI_ERROR_UNDEFINED;\r
+               }\r
+               g_LibInfo.nLibIndex = u;\r
+               g_LibInfo.szExeFile = xmlLibrary->GetPropVal(wxT("name"), wxEmptyString);\r
+               g_LibInfo.szExeFileAlt = xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString);\r
+               g_LibInfo.node = * xmlLibrary;\r
+\r
+               return TPI_ERROR_SUCCESS;\r
+       }\r
+\r
+       // \96³\8cÀ\83\8b\81[\83v\82É\8a×\82ç\82È\82¢\82æ\82¤\8fã\8cÀ\82ð\90Ý\92è\81B\r
+       for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++)\r
+       {\r
+               // \83\89\83C\83u\83\89\83\8a\82ð\83\8d\81[\83h\81B\r
+               g_LibInfo.szExeFile = xmlLibrary->GetPropVal(wxT("name"), wxEmptyString);\r
+               g_LibInfo.szExeFileAlt = xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString);\r
+               g_LibInfo.node = * xmlLibrary;\r
+\r
+               // \8f\91\8cÉ\82É\91Î\89\9e\82µ\82Ä\82¢\82é\82©\83`\83F\83b\83N\81B\r
+               if (CheckArchive(_szArcName, NULL) == TPI_ERROR_SUCCESS)\r
+               {\r
+                       // \91Î\89\9e\82µ\82Ä\82¢\82ê\82Î\8f\88\97\9d\82ð\8fI\97¹\81B\r
+                       return TPI_ERROR_SUCCESS;\r
+               }\r
+\r
+               xmlLibrary = xmlLibrary->GetNext();\r
+       }\r
+\r
+       return TPI_ERROR_U_LOAD_LIBRARY;\r
+}\r
+\r
+int __stdcall FreePlugin\r
+(\r
+       void * // _pReserved\r
+)\r
+{\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall CheckArchive\r
+(\r
+       const wxString & _szArcName,\r
+       int * _nFileCount\r
+)\r
+{\r
+       wxFileName fnArchive(_szArcName);\r
+       wxArrayString asExt = ::wxStringTokenize(g_LibInfo.node.GetPropVal(wxT("suffix"), wxEmptyString), wxT(";"));\r
+       if (! g_LibInfo.node.HasProp(wxT("list")))\r
+       {\r
+               return TPI_ERROR_ARC_UNSUPPORTED;\r
+       }\r
+\r
+       for (size_t i = 0; i < asExt.GetCount(); i++)\r
+       {\r
+               // .tar.XXX\82È\82Ç\93ñ\8fd\94»\92è\82Ö\82Ì\91Î\89\9e\81B\r
+//             if (asExt[i].IsSameAs(fnArchive.GetExt(), false))\r
+               if (fnArchive.GetFullName().EndsWith(wxT('.') + asExt[i]))\r
+               {\r
+                       // \91Î\89\9e\81B\r
+                       if (_nFileCount != NULL)\r
+                       {\r
+                               // \83t\83@\83C\83\8b\90\94\82Í\93K\93\96\82É\81B\r
+                               * _nFileCount = 1;\r
+                       }\r
+\r
+                       // \8eÀ\8ds\82µ\82Ä\8am\94F\81B\r
+                       return myExecute(g_LibInfo.szExeFile + wxT(" ") + MakeCommandLineSend(g_LibInfo.node.GetPropVal(wxT("list"), wxEmptyString), _szArcName, NULL, NULL, wxEmptyString), NULL, wxEmptyString);\r
+               }\r
+       }\r
+\r
+       return TPI_ERROR_ARC_UNSUPPORTED;\r
+}\r
+\r
+int __stdcall OpenArchive\r
+(\r
+       const wxString & _szArcName,\r
+       void * * _hArchive\r
+)\r
+{\r
+       wxString szOutput;\r
+       if (myExecute(g_LibInfo.szExeFile + wxT(" ") + MakeCommandLineSend(g_LibInfo.node.GetPropVal(wxT("list"), wxEmptyString), _szArcName, NULL, NULL, wxEmptyString), & szOutput, wxEmptyString) != TPI_ERROR_SUCCESS)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+       g_asOutput = ::wxStringTokenize(szOutput, wxT("\r\n"));\r
+       * _hArchive = & g_asOutput;\r
+       return g_asOutput.Count() == 0 ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall CloseArchive\r
+(\r
+       void * _hArchive\r
+)\r
+{\r
+       ((wxArrayString *) _hArchive)->Clear();\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall GetFileInformation\r
+(\r
+       void * _hArchive,\r
+       TPI_FILEINFO * _fiInfo,\r
+       bool _bFirst\r
+)\r
+{\r
+       static size_t s_uCurrentLine;\r
+       static wxULongLong s_llFileID;\r
+       if (_hArchive == NULL)\r
+       {\r
+               return TPI_ERROR_UNDEFINED;\r
+       }\r
+       wxArrayString asOutput = * (wxArrayString *) _hArchive;\r
+\r
+       wxString szStartLine = g_LibInfo.node.GetPropVal(wxT("list-line-s"), wxEmptyString);\r
+       if (_bFirst)\r
+       {\r
+               s_llFileID = 0;\r
+               if (! szStartLine.IsEmpty())\r
+               {\r
+                       for (s_uCurrentLine = 0; s_uCurrentLine < asOutput.Count(); s_uCurrentLine++)\r
+                       {\r
+                               if (asOutput[s_uCurrentLine] == szStartLine)\r
+                               {\r
+                                       // \8e\9f\82Ì\8ds\82Ö\90i\82ñ\82Å\8fI\97¹\81B\r
+                                       s_uCurrentLine++;\r
+                                       break;\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+       if (s_uCurrentLine >= asOutput.Count())\r
+       {\r
+               // \8f\91\8cÉ\82ª\93Ç\82Ý\8d\9e\82ß\82È\82©\82Á\82½\81H\r
+               return TPI_ERROR_ARC_UNSUPPORTED;\r
+       }\r
+\r
+       // \8dÅ\8fI\8ds\82©\82Ç\82¤\82©\8am\94F\81B\r
+       if (asOutput[s_uCurrentLine] == g_LibInfo.node.GetPropVal(wxT("list-line-e"), szStartLine))\r
+       {\r
+               return TPI_ERROR_UNDEFINED;\r
+       }\r
+\r
+       // \83t\83@\83C\83\8b\96¼\82ð\8eæ\93¾\81B\r
+       unsigned long nStartPos = 0, nEndPos = 0, nLine = 0;\r
+       g_LibInfo.node.GetPropVal(wxT("list-fname-s"), wxEmptyString).ToULong(& nStartPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-fname-c"), wxEmptyString).ToULong(& nEndPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-fname-l"), wxT("0")).ToULong(& nLine);\r
+       _fiInfo->szStoredName = nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos);\r
+       _fiInfo->szStoredName.Trim();\r
+       _fiInfo->fnFileName = wxFileName::wxFileName(_fiInfo->szStoredName);\r
+\r
+       // \88³\8fk\8cã\83T\83C\83Y\8eæ\93¾\81B\r
+       wxULongLong_t nTemp;\r
+       nStartPos = 0, nEndPos = 0;\r
+       g_LibInfo.node.GetPropVal(wxT("list-psize-s"), wxEmptyString).ToULong(& nStartPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-psize-c"), wxEmptyString).ToULong(& nEndPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-psize-l"), wxT("0")).ToULong(& nLine);\r
+       if (nStartPos != 0 || nEndPos != 0)\r
+       {\r
+               wxString sz = nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos);\r
+               sz.ToULongLong(& nTemp);\r
+               _fiInfo->llPackedSize = nTemp;\r
+       }\r
+\r
+       // \88³\8fk\91O\83T\83C\83Y\8eæ\93¾\81B\r
+       nStartPos = 0, nEndPos = 0;\r
+       g_LibInfo.node.GetPropVal(wxT("list-usize-s"), wxEmptyString).ToULong(& nStartPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-usize-c"), wxEmptyString).ToULong(& nEndPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-usize-l"), wxT("0")).ToULong(& nLine);\r
+       if (nStartPos != 0 || nEndPos != 0)\r
+       {\r
+               wxString sz = nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos);\r
+               sz.ToULongLong(& nTemp);\r
+               _fiInfo->llUnpackedSize = nTemp;\r
+       }\r
+\r
+       // \8dX\90V\8e\9e\8d\8f\8eæ\93¾\81B\r
+       nStartPos = 0, nEndPos = 0;\r
+       g_LibInfo.node.GetPropVal(wxT("list-date-s"), wxEmptyString).ToULong(& nStartPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-date-c"), wxEmptyString).ToULong(& nEndPos);\r
+       g_LibInfo.node.GetPropVal(wxT("list-date-l"), wxT("0")).ToULong(& nLine);\r
+       if (nStartPos != 0 || nEndPos != 0)\r
+       {\r
+               _fiInfo->tmModified.ParseFormat(nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos), g_LibInfo.node.GetPropVal(wxT("list-date-f"), wxDefaultDateTimeFormat));\r
+       }\r
+\r
+       // \8dÅ\8cã\82É\8e\9f\82Ì\8ds\82Ö\90i\82ß\82Ä\82¨\82­\81B\r
+       _fiInfo->llFileID = s_llFileID++;\r
+       g_LibInfo.node.GetPropVal(wxT("list-line-c"), wxT("1")).ToULong(& nStartPos);\r
+       s_uCurrentLine += nStartPos;\r
+\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall GetArchiveInformation\r
+(\r
+       void *,\r
+       TPI_ARCHIVEINFO *\r
+)\r
+{\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall Command\r
+(\r
+       unsigned int _uCommand,\r
+       TPI_SWITCHES * _swInfo,\r
+       const wxString & _szArcName,\r
+       const wxArrayString & _szFiles\r
+)\r
+{\r
+       // xml\82©\82ç\83R\83}\83\93\83h\83\89\83C\83\93\82ð\8eæ\93¾\81B\r
+       wxString szPath, szCommandLine;\r
+\r
+       // API\83A\83h\83\8c\83X\8eæ\93¾\81B\r
+       if (! g_LibInfo.node.GetPropVal(\r
+                       _uCommand == TPI_COMMAND_ADD     ? wxT("add") :\r
+                       _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract") : \r
+                       _uCommand == TPI_COMMAND_DELETE  ? wxT("delete") : \r
+                       _uCommand == TPI_COMMAND_UPDATE  ? wxT("update") : \r
+                       _uCommand == TPI_COMMAND_TEST    ? wxT("test") : \r
+                       _uCommand == TPI_COMMAND_REPAIR  ? wxT("repair") : \r
+                       _uCommand == TPI_COMMAND_MOVE    ? wxT("move") : \r
+                       _uCommand == TPI_COMMAND_SFX     ? wxT("sfx") : \r
+                       _uCommand == TPI_COMMAND_UNSFX   ? wxT("unsfx") : wxEmptyString, & szCommandLine))\r
+       {\r
+               g_LibInfo.node.GetPropVal(\r
+                       _uCommand == TPI_COMMAND_ADD     ? wxT("add-alt") :\r
+                       _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract-alt") : \r
+                       _uCommand == TPI_COMMAND_DELETE  ? wxT("delete-alt") : \r
+                       _uCommand == TPI_COMMAND_UPDATE  ? wxT("update-alt") : \r
+                       _uCommand == TPI_COMMAND_TEST    ? wxT("test-alt") : \r
+                       _uCommand == TPI_COMMAND_REPAIR  ? wxT("repair-alt") : \r
+                       _uCommand == TPI_COMMAND_MOVE    ? wxT("move-alt") : \r
+                       _uCommand == TPI_COMMAND_SFX     ? wxT("sfx-alt") : \r
+                       _uCommand == TPI_COMMAND_UNSFX   ? wxT("unsfx-alt") : wxEmptyString, & szCommandLine);\r
+       }\r
+\r
+       if (szCommandLine.IsEmpty())\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       // \83R\83}\83\93\83h\83\89\83C\83\93\81E\83\8c\83X\83|\83\93\83X\83t\83@\83C\83\8b\8dì\90¬\81B\r
+       wxString\r
+               szResponceFileName = MakeResponceFile(_szFiles, g_LibInfo.node.GetPropVal(wxT("quote-resp"), wxT("1")) == wxT("1")),\r
+               szCommandLineSend  = MakeCommandLineSend(szCommandLine, _szArcName, _swInfo, _szFiles, szResponceFileName);\r
+\r
+       // \83R\83}\83\93\83h\83\89\83C\83\93\8eÀ\8ds\81B\r
+       wxString szOutput;\r
+       DWORD nErrorCode = myExecute(g_LibInfo.szExeFile + wxT(" ") + szCommandLineSend, & szOutput, _swInfo->fnDestinationDirectory.GetFullPath());\r
+\r
+       // \83\8c\83X\83|\83\93\83X\83t\83@\83C\83\8b\8dí\8f\9c\81B\r
+       ::wxRemoveFile(szResponceFileName);\r
+\r
+       if (nErrorCode != TPI_ERROR_SUCCESS)\r
+       {\r
+#ifdef __LINUX__\r
+               ::wxMessageBox(wxString::Format(wxT("Error :\n%d\n\nCommandLine:\n%s\n\nOutput:\n%s"), nErrorCode, szCommandLineSend.c_str(), szOutput.c_str()));\r
+#else\r
+               MessageBox(NULL, wxString::Format(wxT("Error :\n%d\n\nCommandLine:\n%s\n\nOutput:\n%s"), nErrorCode, szCommandLineSend.c_str(), szOutput.c_str()), NULL, 0);\r
+#endif\r
+       }\r
+       return nErrorCode;\r
+}\r
+\r
+int __stdcall SetCallbackProc\r
+(\r
+       TPI_PROC _prArcProc\r
+)\r
+{\r
+       // \83|\83C\83\93\83^\82ð\95Û\91\81B\r
+       if (_prArcProc == NULL)\r
+       {\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       g_prProc = * _prArcProc;\r
+\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
diff --git a/src/plugin/cuiWrapper/cuiWrapper.h b/src/plugin/cuiWrapper/cuiWrapper.h
new file mode 100644 (file)
index 0000000..0e0a67a
--- /dev/null
@@ -0,0 +1,181 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: cuiWrapper.h,v 1.1 2009/08/15 07:22:27 sirakaba Exp $
+*******************************************************************************/
+
+//******************************************************************************
+//    Defines
+//******************************************************************************
+
+#ifndef FNAME_MAX32
+#define FNAME_MAX32 512
+#endif
+
+// Window Message
+#define        WM_ARCEXTRACT           wxT("wm_arcextract")
+#define        ARCEXTRACT_BEGIN                0
+#define        ARCEXTRACT_INPROCESS    1
+#define        ARCEXTRACT_END                  2
+#define ARCEXTRACT_OPEN                        3
+#define ARCEXTRACT_COPY                        4
+
+// Warning Code
+#ifndef ERROR_START
+#define ERROR_START                            0x8000
+#define ERROR_DISK_SPACE               0x8005
+#define ERROR_READ_ONLY                        0x8006
+#define ERROR_USER_SKIP                        0x8007
+#define ERROR_UNKNOWN_TYPE             0x8008
+#define ERROR_METHOD                   0x8009
+#define ERROR_PASSWORD_FILE            0x800A
+#define ERROR_VERSION                  0x800B
+#define ERROR_FILE_CRC                 0x800C
+#define ERROR_FILE_OPEN                        0x800D
+#define ERROR_MORE_FRESH               0x800E
+#define ERROR_NOT_EXIST                        0x800F
+#define ERROR_ALREADY_EXIST            0x8010
+#define ERROR_TOO_MANY_FILES   0x8011
+// Error Code
+#define ERROR_MAKEDIRECTORY            0x8012
+#define ERROR_CANNOT_WRITE             0x8013
+#define ERROR_HUFFMAN_CODE             0x8014
+#define ERROR_COMMENT_HEADER   0x8015
+#define ERROR_HEADER_CRC               0x8016
+#define ERROR_HEADER_BROKEN            0x8017
+#define ERROR_ARC_FILE_OPEN            0x8018
+#define ERROR_NOT_ARC_FILE             0x8019
+#define ERROR_CANNOT_READ              0x801A
+#define ERROR_FILE_STYLE               0x801B
+#define ERROR_COMMAND_NAME             0x801C
+#define ERROR_MORE_HEAP_MEMORY 0x801D
+#define ERROR_ENOUGH_MEMORY            0x801E
+#define ERROR_ALREADY_RUNNING  0x801F
+#define ERROR_USER_CANCEL              0x8020
+#define ERROR_HARC_ISNOT_OPENED        0x8021
+#define ERROR_NOT_SEARCH_MODE  0x8022
+#define ERROR_NOT_SUPPORT              0x8023
+#define ERROR_TIME_STAMP               0x8024
+#define ERROR_TMP_OPEN                 0x8025
+#define ERROR_LONG_FILE_NAME   0x8026
+#define ERROR_ARC_READ_ONLY            0x8027
+#define ERROR_SAME_NAME_FILE   0x8028
+#define ERROR_NOT_FIND_ARC_FILE        0x8029
+#define ERROR_RESPONSE_READ            0x802A
+#define ERROR_NOT_FILENAME             0x802B
+#define ERROR_TMP_COPY                 0x802C
+#define ERROR_EOF                              0x802D
+#define ERROR_ADD_TO_LARC              0x802E
+#define ERROR_TMP_BACK_SPACE    0x802F
+#define ERROR_SHARING                  0x8030
+#define ERROR_NOT_FIND_FILE            0x8031
+#define ERROR_LOG_FILE                 0x8032
+#define        ERROR_NO_DEVICE                 0x8033
+#define ERROR_GET_ATTRIBUTES    0x8034
+#define ERROR_SET_ATTRIBUTES   0x8035
+#define ERROR_GET_INFORMATION   0x8036
+#define ERROR_GET_POINT                        0x8037
+#define ERROR_SET_POINT                        0x8038
+#define ERROR_CONVERT_TIME             0x8039
+#define ERROR_GET_TIME                 0x803A
+#define ERROR_SET_TIME                 0x803B
+#define ERROR_CLOSE_FILE               0x803C
+#define ERROR_HEAP_MEMORY              0x803D
+#define ERROR_HANDLE                   0x803E
+#define ERROR_TIME_STAMP_RANGE  0x803F
+#define ERROR_MAKE_ARCHIVE             0x8040
+#define ERROR_NOT_CONFIRM_NAME 0x8041
+#define ERROR_UNEXPECTED_EOF   0x8042
+#define ERROR_INVALID_END_MARK 0x8043
+#define ERROR_INVOLVED_LZH             0x8044
+#define ERROR_NO_END_MARK              0x8045
+#define ERROR_HDR_INVALID_SIZE 0x8046
+#define ERROR_UNKNOWN_LEVEL            0x8047
+#define ERROR_BROKEN_DATA              0x8048
+#define ERROR_INVALID_PATH             0x8049
+#define ERROR_TOO_BIG                  0x804A
+#define ERROR_EXECUTABLE_FILE  0x804B
+#define ERROR_INVALID_VALUE            0x804C
+#define ERROR_END                              ERROR_INVALID_VALUE
+#endif
+
+#pragma pack(1)
+
+typedef struct _tagINDIVIDUALINFO
+{
+       DWORD dwOriginalSize;
+       DWORD dwCompressedSize;
+       DWORD dwCRC;
+       UINT uFlag;
+       UINT uOSType;
+       WORD wRatio;
+       WORD wDate;
+       WORD wTime;
+       char szFileName[FNAME_MAX32 + 1];
+       char dummy1[3];
+       char szAttribute[8];
+       char szMode[8];
+}      INDIVIDUALINFO, * LPINDIVIDUALINFO;
+
+typedef struct EXTRACTINGINFO
+{
+       DWORD dwFileSize;
+       DWORD dwWriteSize;
+       char szSourceFileName[FNAME_MAX32 + 1];
+       char dummy1[3];
+       char szDestFileName[FNAME_MAX32 + 1];
+       char dummy[3];
+}      EXTRACTINGINFO, * LPEXTRACTINGINFO;
+
+typedef struct EXTRACTINGINFOEX
+{
+       EXTRACTINGINFO exinfo;
+       DWORD dwCompressedSize;
+       DWORD dwCRC;
+       UINT uOSType;
+       WORD wRatio;
+       WORD wDate;
+       WORD wTime;
+       char szAttribute[8];
+       char szMode[8];
+}      EXTRACTINGINFOEX, * LPEXTRACTINGINFOEX;
+
+typedef struct EXTRACTINGINFOEX64
+{
+       DWORD dwStructSize;
+       EXTRACTINGINFO exinfo;
+       UINT64 llFileSize;
+       UINT64 llCompressedSize;
+       UINT64 llWriteSize;
+       DWORD dwAttributes;
+       DWORD dwCRC;
+       UINT uOSType;
+       WORD wRatio;
+       FILETIME ftCreateTime;
+       FILETIME ftAccessTime;
+       FILETIME ftWriteTime;
+       char szMode[8];
+       char szSourceFileName[FNAME_MAX32 + 1];
+       char dummy1[3];
+       char szDestFileName[FNAME_MAX32 + 1];
+       char dummy2[3];
+}      EXTRACTINGINFOEX64, * LPEXTRACTINGINFOEX64;
+
+typedef BOOL(CALLBACK * ARCHIVERPROC)(HWND, unsigned int, unsigned int, void *);
+
+#pragma pack()
diff --git a/src/plugin/cuiWrapper/cuiWrapper.vcproj b/src/plugin/cuiWrapper/cuiWrapper.vcproj
new file mode 100644 (file)
index 0000000..1a8a078
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="shift_jis"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="cuiWrapper"\r
+       ProjectGUID="{B01B0D18-68C4-4A83-B816-B9D722D38619}"\r
+       RootNamespace="cuiWrapper"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\..\bin\lib"\r
+                       IntermediateDirectory="..\..\tmp\cuiWrapper"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;cuiWrapper_EXPORTS"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               WarningLevel="4"\r
+                               DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4819"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="wxmsw28u_core.lib wxbase28u.lib wxbase28u_xml.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxexpat.lib imagehlp.lib comctl32.lib"\r
+                               OutputFile="$(OutDir)/cuiWrapper.dll"\r
+                               LinkIncremental="1"\r
+                               GenerateManifest="false"\r
+                               ModuleDefinitionFile="..\..\common\header\plugin.def"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="del $(TargetDir)$(TargetName).exp $(TargetDir)$(TargetName).lib"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <File\r
+                       RelativePath=".\cuiWrapper.cpp"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath=".\cuiWrapper.h"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath="..\..\common\library\library.cpp"\r
+                       >\r
+                       <FileConfiguration\r
+                               Name="Release|Win32"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                                       ObjectFile="$(IntDir)\..\common\"\r
+                               />\r
+                       </FileConfiguration>\r
+               </File>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/src/plugin/spiLibrary/Makefile b/src/plugin/spiLibrary/Makefile
new file mode 100644 (file)
index 0000000..ab4d05d
--- /dev/null
@@ -0,0 +1,29 @@
+# Makefile.\r
+# $Id: Makefile,v 1.6 2009/08/23 04:25:53 sirakaba Exp $\r
+\r
+# Define compilers.\r
+CC = g++\r
+CPPFLAGS = -c -O3 -Wall -W -fPIC `wx-config --cppflags`\r
+LDFLAGS  = -shared -Wl,-Bsymbolic -s `wx-config --libs`\r
+# -lwinecaller\r
+\r
+# Define i/o files.\r
+DIR_OBJ  = ../../tmp/spiLibrary\r
+OBJS     = spiLibrary-wx.o ../../common/library/library.o\r
+IN_DEF   = ../../common/header/plugin.def\r
+OUT_LIB  = ../../../bin/lib/spiLibrary.so\r
+\r
+.PHONY: all clean\r
+.SUFFIXES: .cpp .o\r
+\r
+all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+       $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(addprefix $(DIR_OBJ)/,$(OBJS))\r
+\r
+clean:\r
+       rm -f -r $(DIR_OBJ) $(OUT_LIB)\r
+\r
+$(DIR_OBJ):\r
+       mkdir $(DIR_OBJ)\r
+\r
+$(DIR_OBJ)/%.o: %.cpp\r
+       $(CC) $(CPPFLAGS) -o $@ $<\r
diff --git a/src/plugin/spiLibrary/spiLibrary.cpp b/src/plugin/spiLibrary/spiLibrary.cpp
new file mode 100644 (file)
index 0000000..68c0116
--- /dev/null
@@ -0,0 +1,507 @@
+/*******************************************************************************\r
+  TPI - flexible but useless plug-in framework.\r
+  Copyright (C) 2002-2009 Silky\r
+\r
+  This library is free software; you can redistribute it and/or modify it under\r
+  the terms of the GNU Lesser General Public License as published by the Free\r
+  Software Foundation; either version 2.1 of the License, or (at your option)\r
+  any later version.\r
+\r
+  This library is distributed in the hope that it will be useful, but WITHOUT\r
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or \r
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License\r
+  for more details.\r
+\r
+  You should have received a copy of the GNU Lesser General Public License along\r
+  with this library; if not, write to the Free Software Foundation, Inc.,\r
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+  $Id: spiLibrary.cpp,v 1.9 2009/08/23 04:25:53 sirakaba Exp $\r
+*******************************************************************************/\r
+\r
+//******************************************************************************\r
+//    Includes\r
+//******************************************************************************\r
+\r
+#include "../../common/header/plugin.h"\r
+#include "../../common/header/plugin-extra.h"\r
+#include "../../common/library/library.h"\r
+#include <wx/dynlib.h>\r
+#include <wx/file.h>\r
+#include <wx/config.h>\r
+#include <wx/wfstream.h>\r
+#include <wx/stdpaths.h>\r
+#include <wx/filesys.h>\r
+#include <wx/dir.h>\r
+#include <windows.h>\r
+#include <imagehlp.h>\r
+#include "spiLibrary.h"\r
+\r
+//******************************************************************************\r
+//    Global varients\r
+//******************************************************************************\r
+\r
+HMODULE g_hLib;\r
+TPI_PROC g_prProc;\r
+unsigned int g_uFileCount;\r
+unsigned int g_uFilePointer;\r
+wxString g_szAppPath;\r
+\r
+//******************************************************************************\r
+//    Entry\r
+//******************************************************************************\r
+\r
+#ifdef __LINUX__\r
+void __attribute__((constructor)) Attach(void)\r
+{\r
+       wxStandardPaths p;\r
+       g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
+}\r
+\r
+void __attribute__((destructor)) Detach(void)\r
+{\r
+       ::FreeLibrary(g_hLib);\r
+}\r
+\r
+#else\r
+BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *)\r
+{\r
+       switch (fdwReason)\r
+       {\r
+       case DLL_PROCESS_ATTACH:\r
+       {\r
+               wxStandardPaths p;\r
+               g_szAppPath = ::wxPathOnly(p.GetExecutablePath());\r
+               break;\r
+       }\r
+       case DLL_PROCESS_DETACH:\r
+               ::FreeLibrary(g_hLib);\r
+               break;\r
+       }\r
+       return TRUE;\r
+}\r
+#endif\r
+\r
+//******************************************************************************\r
+//    Callback Wrapper\r
+//******************************************************************************\r
+\r
+int __stdcall CallbackProc(int _nNow, int _nMax, long _lData)\r
+{\r
+       // \8d\\91¢\91Ì\82ð\8f\89\8aú\89»\81B\r
+       TPI_PROCESSINFO piInfo;\r
+       piInfo.uMessage = TPI_MESSAGE_STATUS;\r
+       piInfo.uStatus  = _nNow == 0     ? TPI_STATUS_BEGINPROCESS\r
+                                       : _nNow == _nMax ? TPI_STATUS_ENDPROCESS\r
+                                       : _nNow <  0     ? TPI_STATUS_OPENARCHIVE : TPI_STATUS_INPROCESS;\r
+       piInfo.llProcessedSize       = _nNow;\r
+       piInfo.fiInfo.llUnpackedSize = _nMax;\r
+       piInfo.fiInfo.fnFileName = * (wxFileName *) _lData;\r
+\r
+       // \83R\81[\83\8b\83o\83b\83N\8aÖ\90\94\82É\91\97\90M\81B\r
+       if (g_prProc == NULL)\r
+       {\r
+               return TRUE;\r
+       }\r
+\r
+       return g_prProc(TPI_NOTIFY_COMMON, & piInfo) == TPI_CALLBACK_CANCEL;\r
+}\r
+\r
+//******************************************************************************\r
+//    Inside Functions\r
+//******************************************************************************\r
+\r
+int SpiErrorCodeConvert(int nSpiErrorCode)\r
+{\r
+       switch (nSpiErrorCode)\r
+       {\r
+       case -1: return TPI_ERROR_U_USE_LIBRARY;\r
+       case 0:  return TPI_ERROR_SUCCESS;\r
+       case 1:  return TPI_ERROR_D_SKIPPED;\r
+       case 2:  return TPI_ERROR_ARC_UNSUPPORTED;\r
+       case 3:  return TPI_ERROR_ARC_BROKEN_MISC;\r
+       case 4:  return TPI_ERROR_D_OUTOFMEMORY;\r
+       case 5:  return TPI_ERROR_D_USEMEMORY;\r
+       case 6:  return TPI_ERROR_IO_ARC_READ;\r
+       default: return TPI_ERROR_UNDEFINED;\r
+       }\r
+}\r
+\r
+//******************************************************************************\r
+//    Functions\r
+//******************************************************************************\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif\r
+\r
+int __stdcall GetPluginInformation\r
+(\r
+       unsigned int _uInfoId,\r
+       wxULongLong,\r
+       void * _pPtr\r
+)\r
+{\r
+       if (_pPtr == NULL)\r
+       {\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       switch (LOWORD(_uInfoId))\r
+       {\r
+       case TPI_INFO_VERSION_MAJOR:\r
+       case TPI_INFO_VERSION_MINOR:\r
+               * (int *) _pPtr = 0;\r
+               break;\r
+       case TPI_INFO_VERSION_API:\r
+               * (int *) _pPtr = 2;\r
+               break;\r
+       default:\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall LoadPlugin\r
+(\r
+       const wxString & _szArcName,\r
+       wxULongLong\r
+)\r
+{\r
+       wxDir fs(g_szAppPath + wxT("/lib/"));\r
+       wxString szSPIName = wxEmptyString;\r
+       bool b = fs.GetFirst(& szSPIName, wxT("*.spi"));\r
+       while (b)\r
+       {\r
+               // SPI\82ð\83\8d\81[\83h\81B\r
+               wxString szLibName = g_szAppPath + wxT("/lib/") + szSPIName;\r
+               g_hLib = ::LoadLibraryA(szLibName.char_str());\r
+               if (g_hLib == NULL)\r
+               {\r
+                       b = fs.GetNext(& szSPIName);\r
+                       continue;\r
+               }\r
+\r
+               // GetPluginInfo\82ð\8eÀ\8ds\81B\r
+               FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPluginInfo");\r
+               char szPluginType[5]; // \8eí\97Þ4bytes + NULL\r
+               if (fpProc == NULL\r
+                       || ((int (PASCAL *)(int, char *, int)) fpProc)(0, szPluginType, sizeof(szPluginType)) < 0\r
+                       || szPluginType[2] != 'A' || szPluginType[3] != 'M')\r
+               {\r
+                       ::FreeLibrary(g_hLib);\r
+                       b = fs.GetNext(& szSPIName);\r
+                       continue;\r
+               }\r
+\r
+               // \8f\91\8cÉ\82É\91Î\89\9e\82µ\82Ä\82¢\82é\82©\83`\83F\83b\83N\81B\r
+               if (CheckArchive(_szArcName, NULL) == TPI_ERROR_SUCCESS)\r
+               {\r
+                       // \91Î\89\9e\82µ\82Ä\82¢\82ê\82Î\8f\88\97\9d\82ð\8fI\97¹\81B\r
+                       return TPI_ERROR_SUCCESS;\r
+               }\r
+\r
+               b = fs.GetNext(& szSPIName);\r
+       }\r
+       return TPI_ERROR_U_LOAD_LIBRARY;\r
+}\r
+\r
+int __stdcall FreePlugin\r
+(\r
+       void * // _pReserved\r
+)\r
+{\r
+       ::FreeLibrary(g_hLib);\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall CheckArchive\r
+(\r
+       const wxString & _szArcName,\r
+       int * _nFileCount\r
+)\r
+{\r
+       FARPROC fpProc = ::GetProcAddress(g_hLib, "IsSupported");\r
+       if (fpProc == NULL)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       wxFile hFile(_szArcName, wxFile::read);\r
+       if (! hFile.IsOpened())\r
+       {\r
+               return TPI_ERROR_IO_ARC_OPEN;\r
+       }\r
+\r
+       char buffer[2050];\r
+       ::ZeroMemory(buffer, sizeof(buffer));\r
+       if (hFile.Read(buffer, sizeof(buffer)) == wxInvalidOffset)\r
+       {\r
+               hFile.Close();\r
+               return TPI_ERROR_IO_ARC_READ;\r
+       }\r
+\r
+       if (! ((BOOL (PASCAL *)(const char *, unsigned long)) fpProc)(_szArcName.char_str(), (unsigned long) buffer))\r
+       {\r
+               hFile.Close();\r
+               return TPI_ERROR_D_UNSUPPORTED;\r
+       }\r
+       hFile.Close();\r
+\r
+       fpProc = ::GetProcAddress(g_hLib, "GetArchiveInfo");\r
+       if (fpProc == NULL)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       HLOCAL hMemory;\r
+       int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.char_str(), 0, 0, & hMemory));\r
+       if (nReturnCode == TPI_ERROR_SUCCESS)\r
+       {\r
+               if (_nFileCount != NULL)\r
+               {\r
+                       * _nFileCount = int(::LocalSize(hMemory) / sizeof(fileInfo));\r
+               }\r
+               ::LocalFree(hMemory);\r
+       }\r
+\r
+       return nReturnCode;\r
+}\r
+\r
+int __stdcall OpenArchive\r
+(\r
+       const wxString & _szArcName,\r
+       void * * _hArchive\r
+)\r
+{\r
+       FARPROC fpProc = ::GetProcAddress(g_hLib, "GetArchiveInfo");\r
+       if (fpProc == NULL)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.char_str(), 0, 0, _hArchive));\r
+       if (nReturnCode != TPI_ERROR_SUCCESS)\r
+       {\r
+               return nReturnCode;\r
+       }\r
+\r
+       g_uFilePointer = 0;\r
+       g_uFileCount = (unsigned int) (::LocalSize(* _hArchive) / sizeof(fileInfo));\r
+\r
+       return * _hArchive == NULL ? TPI_ERROR_IO_ARC_OPEN : nReturnCode;\r
+}\r
+\r
+int __stdcall CloseArchive\r
+(\r
+       void * _hArchive\r
+)\r
+{\r
+       return ::LocalFree(_hArchive) == NULL ? TPI_ERROR_SUCCESS : TPI_ERROR_IO_ARC_CLOSE;\r
+}\r
+\r
+int __stdcall GetFileInformation\r
+(\r
+       void * _hArchive,\r
+       TPI_FILEINFO * _fiInfo,\r
+       bool _bFirst\r
+)\r
+{\r
+       if (_bFirst)\r
+       {\r
+               g_uFilePointer = 0;\r
+       }\r
+\r
+       if (g_uFilePointer > g_uFileCount)\r
+       {\r
+               return TPI_ERROR_UNDEFINED;\r
+       }\r
+\r
+       fileInfo pfiInfo = ((fileInfo *) ::LocalLock(_hArchive))[g_uFilePointer];\r
+       if (pfiInfo.method[0] == 0)\r
+       {\r
+               // \92\9a\94J\82È\83v\83\89\83O\83C\83\93\82Ì\82½\82ß\82Ì\90\94\8d\87\82í\82¹ (^^;\r
+               g_uFileCount = g_uFilePointer;\r
+               return TPI_ERROR_UNDEFINED;\r
+       }\r
+\r
+       _fiInfo->dwAttribute    = 0;\r
+       _fiInfo->dwCRC32        = pfiInfo.crc;\r
+       _fiInfo->llPackedSize   = pfiInfo.compsize;\r
+       _fiInfo->llUnpackedSize = pfiInfo.filesize;\r
+       _fiInfo->wCompressRatio = pfiInfo.compsize >= pfiInfo.filesize ? 1000 : (WORD) (1000 * pfiInfo.compsize / pfiInfo.filesize);\r
+       _fiInfo->llFileID       = g_uFilePointer++;\r
+       _fiInfo->tmModified     = pfiInfo.timestamp;\r
+       _fiInfo->pCustomInfo    = NULL;\r
+       _fiInfo->szStoredName   = MB2String(pfiInfo.path) + MB2String(pfiInfo.filename);\r
+       _fiInfo->fnFileName     = wxFileName::FileName(_fiInfo->szStoredName);\r
+       _fiInfo->szMethod       = MB2String((char *) pfiInfo.method);\r
+       _fiInfo->pCustomInfo    = (void *) pfiInfo.position;\r
+       ::LocalUnlock(_hArchive);\r
+\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall GetArchiveInformation\r
+(\r
+       void *, // _hArchive,\r
+       TPI_ARCHIVEINFO * // _aiInfo\r
+)\r
+{\r
+       // TODO : wxFileName\82©\82ç\8fî\95ñ\8eæ\93¾\81B\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+int __stdcall Command\r
+(\r
+       unsigned int _uCommand,\r
+       TPI_SWITCHES * _swInfo,\r
+       const wxString & _szArcName,\r
+       const wxArrayString & _szFiles\r
+)\r
+{\r
+       if (_uCommand != TPI_COMMAND_EXTRACT)\r
+       {\r
+               return TPI_ERROR_D_UNSUPPORTED;\r
+       }\r
+\r
+       // \93W\8aJ\8f\88\97\9d\82Ì\82Ý\82ð\8ds\82¤\81B\r
+       FARPROC fpProc = ::GetProcAddress(g_hLib, "GetFile");\r
+       if (fpProc == NULL)\r
+       {\r
+               return TPI_ERROR_U_USE_LIBRARY;\r
+       }\r
+\r
+       // \8f\91\8cÉ\83n\83\93\83h\83\8b\82ð\8eæ\93¾\81B\r
+       void * hArchive;\r
+       int nResult = OpenArchive(_szArcName, & hArchive);\r
+       if (nResult != TPI_ERROR_SUCCESS)\r
+       {\r
+               return nResult;\r
+       }\r
+\r
+       // \83R\81[\83\8b\83o\83b\83N\82ð\91\97\90M\81B\95Ö\8bX\8fã-1\82ð\91\97\90M\81B\r
+       wxFileName _fnArcName(_szArcName);\r
+       if (CallbackProc(-1, 0, (long) & _fnArcName))\r
+       {\r
+               return TPI_ERROR_D_SKIPPED;\r
+       }\r
+\r
+       // \8f\88\97\9d\8eÀ\8ds\81B\r
+       TPI_FILEINFO fiInfo;\r
+       nResult = GetFileInformation(hArchive, & fiInfo, TRUE);\r
+       if (nResult == TPI_ERROR_SUCCESS)\r
+       {\r
+               do\r
+               {\r
+                       // \83R\81[\83\8b\83o\83b\83N\82ð\91\97\90M\81B\r
+                       if (CallbackProc(0, fiInfo.llUnpackedSize.ToULong(), (long) & fiInfo.fnFileName))\r
+                       {\r
+                               nResult = TPI_ERROR_D_SKIPPED;\r
+                               break;\r
+                       }\r
+\r
+                       // \8f\88\97\9d\91Î\8fÛ\82©\82Ç\82¤\82©\94»\92è\81B\r
+                       if (_szFiles.Count() != 0)\r
+                       {\r
+                               size_t i;\r
+                               for (i = 0; i < _szFiles.Count(); i++)\r
+                               {\r
+                                       if (_szFiles[i] == fiInfo.szStoredName)\r
+                                       {\r
+                                               break;\r
+                                       }\r
+                               }\r
+                               if (i == _szFiles.Count())\r
+                               {\r
+                                       continue;\r
+                               }\r
+                       }\r
+\r
+                       // \8fo\97Í\96¼\8dì\90¬\81B\r
+                       wxString szTargetPath = _swInfo->fnDestinationDirectory.GetPathWithSep();\r
+                       if (_swInfo->fStoreDirectoryPathes)\r
+                       {\r
+                               // \93W\8aJ\90æ\83f\83B\83\8c\83N\83g\83\8a\82ð\8dì\90¬\81B\r
+                               szTargetPath += fiInfo.fnFileName.GetFullPath();\r
+                               wxFileName fnDest(szTargetPath);\r
+                               if (! fnDest.Mkdir(0777, wxPATH_MKDIR_FULL) || ::wxDirExists(fnDest.GetFullPath()))\r
+                               {\r
+                                       nResult = TPI_ERROR_IO_DIR_WRITE;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       else\r
+                       {\r
+                               szTargetPath += fiInfo.fnFileName.GetFullName();\r
+                       }\r
+\r
+                       // \83t\83@\83C\83\8b\8fo\97Í\82É\82Í\91Î\89\9e\82µ\82Ä\82È\82¢\82Ì\82Å\83\81\83\82\83\8a\8fo\97Í\82Å\91ã\8ds\81B\r
+                       HLOCAL hMemory = NULL;\r
+                       nResult = SpiErrorCodeConvert(((int (PASCAL *)(char *, long, char *, unsigned int, FARPROC, long)) fpProc)(_szArcName.char_str(), (long) fiInfo.pCustomInfo, (char *) & hMemory, 0x0100, (FARPROC) CallbackProc, (long) & fiInfo.fnFileName));\r
+                       if (nResult == TPI_ERROR_SUCCESS && hMemory == NULL)\r
+                       {\r
+                               nResult = TPI_ERROR_UNDEFINED;\r
+                       }\r
+                       if (nResult != TPI_ERROR_SUCCESS)\r
+                       {\r
+                               break;\r
+                       }\r
+\r
+                       // \93W\8aJ\90æ\82É\8fo\97Í\81B\r
+                       wxFile hFile;\r
+                       // \8b­\90§\8fã\8f\91\82«\82·\82é\82Ì\82Å\92\8d\88Ó\81B\r
+                       if (! hFile.Create(szTargetPath, true))\r
+                       {\r
+                               nResult = TPI_ERROR_IO_FILE_OPEN;\r
+                               break;\r
+                       }\r
+\r
+                       bool bErrorOccured = hFile.Write(::LocalLock(hMemory), (size_t) fiInfo.llUnpackedSize.GetValue()) != fiInfo.llUnpackedSize;\r
+                       ::LocalUnlock(hMemory);\r
+                       ::LocalFree(hMemory);\r
+                       hFile.Close();\r
+                       if (bErrorOccured)\r
+                       {\r
+                               nResult = TPI_ERROR_IO_FILE_WRITE;\r
+                               break;\r
+                       }\r
+                       nResult = TPI_ERROR_SUCCESS;\r
+\r
+                       // \83R\81[\83\8b\83o\83b\83N\82ð\91\97\90M\81B\r
+                       if (CallbackProc(fiInfo.llUnpackedSize.ToULong(), fiInfo.llUnpackedSize.ToULong(), (long) & fiInfo.fnFileName))\r
+                       {\r
+                               nResult = TPI_ERROR_D_SKIPPED;\r
+                               break;\r
+                       }\r
+               }\r
+               while ((nResult = GetFileInformation(hArchive, & fiInfo, FALSE)) != TPI_ERROR_UNDEFINED);\r
+               if (nResult == TPI_ERROR_UNDEFINED)\r
+               {\r
+                       // \8fI\92[\82É\92B\82µ\82½\8fê\8d\87\81B\r
+                       nResult = TPI_ERROR_SUCCESS;\r
+               }\r
+       }\r
+       CloseArchive(hArchive);\r
+\r
+       return nResult;\r
+}\r
+\r
+int __stdcall SetCallbackProc\r
+(\r
+       TPI_PROC _prArcProc\r
+)\r
+{\r
+       // \83|\83C\83\93\83^\82ð\95Û\91\81B\r
+       if (_prArcProc == NULL)\r
+       {\r
+               return TPI_ERROR_D_PARAMETER;\r
+       }\r
+       g_prProc = * _prArcProc;\r
+\r
+       return TPI_ERROR_SUCCESS;\r
+}\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
diff --git a/src/plugin/spiLibrary/spiLibrary.h b/src/plugin/spiLibrary/spiLibrary.h
new file mode 100644 (file)
index 0000000..84533a7
--- /dev/null
@@ -0,0 +1,38 @@
+/*******************************************************************************
+  TPI - flexible but useless plug-in framework.
+  Copyright (C) 2002-2009 Silky
+
+  This library is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the Free
+  Software Foundation; either version 2.1 of the License, or (at your option)
+  any later version.
+
+  This library is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  for more details.
+
+  You should have received a copy of the GNU Lesser General Public License along
+  with this library; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+  $Id: spiLibrary.h,v 1.1 2009/05/01 11:42:18 sirakaba Exp $
+*******************************************************************************/
+
+//******************************************************************************
+//    Defines
+//******************************************************************************
+
+#pragma pack(1)
+
+typedef struct fileInfo
+{
+       unsigned char method[8];
+       unsigned long position;
+       unsigned long compsize;
+       unsigned long filesize;
+       unsigned long timestamp;/* time_t */
+       char path[200];
+       char filename[200];
+       unsigned long crc;
+}      fileInfo;
diff --git a/src/plugin/spiLibrary/spiLibrary.vcproj b/src/plugin/spiLibrary/spiLibrary.vcproj
new file mode 100644 (file)
index 0000000..6e1fd7e
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="spiLibrary"
+       ProjectGUID="{E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}"
+       RootNamespace="spiLibrary"
+       Keyword="Win32Proj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="..\..\..\bin\lib"
+                       IntermediateDirectory="..\..\tmp\spiLibrary"
+                       ConfigurationType="2"
+                       CharacterSet="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SPILIBRARY_EXPORTS"
+                               RuntimeLibrary="2"
+                               WarningLevel="4"
+                               DebugInformationFormat="3"
+                               DisableSpecificWarnings="4819"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib imagehlp.lib comctl32.lib"
+                               OutputFile="$(OutDir)/spiLibrary.dll"
+                               GenerateManifest="false"
+                               ModuleDefinitionFile="..\..\common\header\plugin.def"
+                               SubSystem="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                               CommandLine="del $(TargetDir)$(TargetName).exp $(TargetDir)$(TargetName).lib"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <File
+                       RelativePath="..\..\common\library\library.cpp"
+                       >
+                       <FileConfiguration
+                               Name="Release|Win32"
+                               >
+                               <Tool
+                                       Name="VCCLCompilerTool"
+                                       ObjectFile="$(IntDir)\..\common\"
+                               />
+                       </FileConfiguration>
+               </File>
+               <File
+                       RelativePath=".\spiLibrary.cpp"
+                       >
+               </File>
+               <File
+                       RelativePath=".\spiLibrary.h"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/src/tpi.sln b/src/tpi.sln
new file mode 100644 (file)
index 0000000..617d503
--- /dev/null
@@ -0,0 +1,52 @@
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugin", "plugin", "{0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199}"\r
+       ProjectSection(SolutionItems) = preProject\r
+               common\header\plugin-extra.h = common\header\plugin-extra.h\r
+               common\header\plugin.def = common\header\plugin.def\r
+               common\header\plugin.h = common\header\plugin.h\r
+       EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "handle", "handle", "{7A8E3A4A-C2D7-40FD-89E4-2E8621B16A4B}"\r
+       ProjectSection(SolutionItems) = preProject\r
+               common\handle\TPIHandle.cpp = common\handle\TPIHandle.cpp\r
+               common\handle\TPIHandle.h = common\handle\TPIHandle.h\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frontend", "frontend\frontend.vcproj", "{50F13951-5698-4418-8353-BFDFC5A6BC13}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calLibrary-wx", "plugin\calLibrary\calLibrary.vcproj", "{3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spiLibrary-wx", "plugin\spiLibrary\spiLibrary.vcproj", "{E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cuiWrapper", "plugin\cuiWrapper\cuiWrapper.vcproj", "{B01B0D18-68C4-4A83-B816-B9D722D38619}"\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{85B58984-94CB-4847-A275-C75000AC6E3A}"\r
+       ProjectSection(SolutionItems) = preProject\r
+               common\library\library.cpp = common\library\library.cpp\r
+               common\library\library.h = common\library\library.h\r
+       EndProjectSection\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {50F13951-5698-4418-8353-BFDFC5A6BC13}.Release|Win32.ActiveCfg = Release|Win32\r
+               {50F13951-5698-4418-8353-BFDFC5A6BC13}.Release|Win32.Build.0 = Release|Win32\r
+               {3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}.Release|Win32.ActiveCfg = Release|Win32\r
+               {3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}.Release|Win32.Build.0 = Release|Win32\r
+               {E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}.Release|Win32.Build.0 = Release|Win32\r
+               {B01B0D18-68C4-4A83-B816-B9D722D38619}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B01B0D18-68C4-4A83-B816-B9D722D38619}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+       GlobalSection(NestedProjects) = preSolution\r
+               {3AC2C4C6-6D2D-4774-829F-BA043A49FEAF} = {0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199}\r
+               {E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D} = {0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199}\r
+               {B01B0D18-68C4-4A83-B816-B9D722D38619} = {0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199}\r
+       EndGlobalSection\r
+EndGlobal\r