From 76ce62fd0e5547287122eb9317f63085282b5e95 Mon Sep 17 00:00:00 2001 From: sirakaba Date: Wed, 30 Sep 2009 12:57:30 +0000 Subject: [PATCH] Added. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@1 9df91469-1e22-0410-86e7-ea8537beb833 --- bin/association-sample.reg | Bin 0 -> 3388 bytes bin/frontend.desktop | 11 + bin/frontend.exe.manifest | 18 + bin/lib/calLibrary.xml | 60 + bin/lib/cuiWrapper.xml | 92 ++ doc/files.html | 92 ++ doc/history.html | 121 ++ doc/license.txt | 504 +++++++ doc/readme.html | 71 + doc/style.css | 60 + share/ico/16/add.png | Bin 0 -> 703 bytes share/ico/16/close.png | Bin 0 -> 579 bytes share/ico/16/create.png | Bin 0 -> 3427 bytes share/ico/16/delete.png | Bin 0 -> 899 bytes share/ico/16/extract.png | Bin 0 -> 3389 bytes share/ico/16/open.png | Bin 0 -> 3469 bytes share/ico/16/repair.png | Bin 0 -> 3363 bytes share/ico/16/sfx.png | Bin 0 -> 494 bytes share/ico/16/test.png | Bin 0 -> 3321 bytes share/ico/16/unsfx.png | Bin 0 -> 3277 bytes share/ico/24/add.png | Bin 0 -> 1490 bytes share/ico/24/close.png | Bin 0 -> 900 bytes share/ico/24/create.png | Bin 0 -> 1121 bytes share/ico/24/delete.png | Bin 0 -> 1638 bytes share/ico/24/extract.png | Bin 0 -> 1090 bytes share/ico/24/open.png | Bin 0 -> 964 bytes share/ico/24/repair.png | Bin 0 -> 3861 bytes share/ico/24/sfx.png | Bin 0 -> 933 bytes share/ico/24/test.png | Bin 0 -> 1042 bytes share/ico/24/unsfx.png | Bin 0 -> 3731 bytes share/ico/app.png | Bin 0 -> 2548 bytes share/ico/archive.ico | Bin 0 -> 15086 bytes share/ico/archive.png | Bin 0 -> 4099 bytes share/ico/exe.png | Bin 0 -> 2166 bytes share/ico/file.png | Bin 0 -> 3816 bytes share/ico/folder_closed.png | Bin 0 -> 579 bytes share/ico/folder_open.png | Bin 0 -> 611 bytes src/Makefile | 18 + src/common/handle/TPIHandle.cpp | 242 ++++ src/common/handle/TPIHandle.h | 53 + src/common/header/Doxyfile | 1473 ++++++++++++++++++++ src/common/header/Makefile | 10 + src/common/header/plugin-extra.h | 102 ++ src/common/header/plugin.def | 14 + src/common/header/plugin.h | 462 +++++++ src/common/library/library.cpp | 185 +++ src/common/library/library.h | 36 + src/frontend/Makefile | 27 + src/frontend/cls_filedroptarget.cpp | 49 + src/frontend/cls_filedroptarget.h | 43 + src/frontend/cls_listctrl.cpp | 137 ++ src/frontend/cls_listctrl.h | 45 + src/frontend/dlg_make.cpp | 278 ++++ src/frontend/dlg_make.h | 81 ++ src/frontend/dlg_process.cpp | 135 ++ src/frontend/dlg_process.h | 46 + src/frontend/frm_main.cpp | 849 ++++++++++++ src/frontend/frm_main.h | 72 + src/frontend/frontend.cpp | 66 + src/frontend/frontend.h | 55 + src/frontend/frontend.vcproj | 180 +++ src/frontend/functions.cpp | 258 ++++ src/frontend/functions.h | 42 + src/frontend/ui/dlg_make.fbp | 2212 +++++++++++++++++++++++++++++++ src/frontend/ui/dlg_process.fbp | 429 ++++++ src/frontend/ui/frm_main.fbp | 894 +++++++++++++ src/plugin/calLibrary/Makefile | 28 + src/plugin/calLibrary/calLibrary.cpp | 920 +++++++++++++ src/plugin/calLibrary/calLibrary.h | 241 ++++ src/plugin/calLibrary/calLibrary.vcproj | 125 ++ src/plugin/cuiWrapper/Makefile | 28 + src/plugin/cuiWrapper/cuiWrapper.cpp | 559 ++++++++ src/plugin/cuiWrapper/cuiWrapper.h | 181 +++ src/plugin/cuiWrapper/cuiWrapper.vcproj | 125 ++ src/plugin/spiLibrary/Makefile | 29 + src/plugin/spiLibrary/spiLibrary.cpp | 507 +++++++ src/plugin/spiLibrary/spiLibrary.h | 38 + src/plugin/spiLibrary/spiLibrary.vcproj | 119 ++ src/tpi.sln | 52 + 79 files changed, 12474 insertions(+) create mode 100644 bin/association-sample.reg create mode 100644 bin/frontend.desktop create mode 100644 bin/frontend.exe.manifest create mode 100644 bin/lib/calLibrary.xml create mode 100644 bin/lib/cuiWrapper.xml create mode 100644 doc/files.html create mode 100644 doc/history.html create mode 100644 doc/license.txt create mode 100644 doc/readme.html create mode 100644 doc/style.css create mode 100644 share/ico/16/add.png create mode 100644 share/ico/16/close.png create mode 100644 share/ico/16/create.png create mode 100644 share/ico/16/delete.png create mode 100644 share/ico/16/extract.png create mode 100644 share/ico/16/open.png create mode 100644 share/ico/16/repair.png create mode 100644 share/ico/16/sfx.png create mode 100644 share/ico/16/test.png create mode 100644 share/ico/16/unsfx.png create mode 100644 share/ico/24/add.png create mode 100644 share/ico/24/close.png create mode 100644 share/ico/24/create.png create mode 100644 share/ico/24/delete.png create mode 100644 share/ico/24/extract.png create mode 100644 share/ico/24/open.png create mode 100644 share/ico/24/repair.png create mode 100644 share/ico/24/sfx.png create mode 100644 share/ico/24/test.png create mode 100644 share/ico/24/unsfx.png create mode 100644 share/ico/app.png create mode 100644 share/ico/archive.ico create mode 100644 share/ico/archive.png create mode 100644 share/ico/exe.png create mode 100644 share/ico/file.png create mode 100644 share/ico/folder_closed.png create mode 100644 share/ico/folder_open.png create mode 100644 src/Makefile create mode 100644 src/common/handle/TPIHandle.cpp create mode 100644 src/common/handle/TPIHandle.h create mode 100644 src/common/header/Doxyfile create mode 100644 src/common/header/Makefile create mode 100644 src/common/header/plugin-extra.h create mode 100644 src/common/header/plugin.def create mode 100644 src/common/header/plugin.h create mode 100644 src/common/library/library.cpp create mode 100644 src/common/library/library.h create mode 100644 src/frontend/Makefile create mode 100644 src/frontend/cls_filedroptarget.cpp create mode 100644 src/frontend/cls_filedroptarget.h create mode 100644 src/frontend/cls_listctrl.cpp create mode 100644 src/frontend/cls_listctrl.h create mode 100644 src/frontend/dlg_make.cpp create mode 100644 src/frontend/dlg_make.h create mode 100644 src/frontend/dlg_process.cpp create mode 100644 src/frontend/dlg_process.h create mode 100644 src/frontend/frm_main.cpp create mode 100644 src/frontend/frm_main.h create mode 100644 src/frontend/frontend.cpp create mode 100644 src/frontend/frontend.h create mode 100644 src/frontend/frontend.vcproj create mode 100644 src/frontend/functions.cpp create mode 100644 src/frontend/functions.h create mode 100644 src/frontend/ui/dlg_make.fbp create mode 100644 src/frontend/ui/dlg_process.fbp create mode 100644 src/frontend/ui/frm_main.fbp create mode 100644 src/plugin/calLibrary/Makefile create mode 100644 src/plugin/calLibrary/calLibrary.cpp create mode 100644 src/plugin/calLibrary/calLibrary.h create mode 100644 src/plugin/calLibrary/calLibrary.vcproj create mode 100644 src/plugin/cuiWrapper/Makefile create mode 100644 src/plugin/cuiWrapper/cuiWrapper.cpp create mode 100644 src/plugin/cuiWrapper/cuiWrapper.h create mode 100644 src/plugin/cuiWrapper/cuiWrapper.vcproj create mode 100644 src/plugin/spiLibrary/Makefile create mode 100644 src/plugin/spiLibrary/spiLibrary.cpp create mode 100644 src/plugin/spiLibrary/spiLibrary.h create mode 100644 src/plugin/spiLibrary/spiLibrary.vcproj create mode 100644 src/tpi.sln diff --git a/bin/association-sample.reg b/bin/association-sample.reg new file mode 100644 index 0000000000000000000000000000000000000000..c5aca9a760dbfddece466a5a4c87d395336ba909 GIT binary patch literal 3388 zcmb`JTT8=06oltl@IRD-ufZxJ2!dh@76nB`DMpG(dWobLHnFz;cy-RE#rDZdhOjid z+x;?U_UuVMKOT@`j06+BAx8~2=wZOI90eQ}9BFYjWpBcM4fmXPoK4vuvwwg9yS%os z<=Z39althmba94DoZ^;Oi>*uc6|Xyl9Ce5>BxOe4lV5p)W7Ii&jW)TP|EO2uhiLLC zeLUk886#=)*`|K|xlJ5VSIEd_oUywCQ|c?nhFt5&uwLp{+ntSlM-eP%s%p*YOOHCU zr9N}^KdxFVD^kdKr=+f8)-pry$Ot1kV!8BNUn4qJdflg!wj+htm@ub$n6uUBaveKp z_}{-e8{iP{8)~X$RlxYxW2;V!8KaiyK`))0mjoKP+M72hB?J2|x=gggbY3>*?l@b?>xgjNLce(sR I`RTjt3(J)3@Bjb+ literal 0 HcmV?d00001 diff --git a/bin/frontend.desktop b/bin/frontend.desktop new file mode 100644 index 0000000..c4bf410 --- /dev/null +++ b/bin/frontend.desktop @@ -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 index 0000000..ae72c95 --- /dev/null +++ b/bin/frontend.exe.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bin/lib/calLibrary.xml b/bin/lib/calLibrary.xml new file mode 100644 index 0000000..d02cdbb --- /dev/null +++ b/bin/lib/calLibrary.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + diff --git a/bin/lib/cuiWrapper.xml b/bin/lib/cuiWrapper.xml new file mode 100644 index 0000000..4f10b56 --- /dev/null +++ b/bin/lib/cuiWrapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + diff --git a/doc/files.html b/doc/files.html new file mode 100644 index 0000000..880a62c --- /dev/null +++ b/doc/files.html @@ -0,0 +1,92 @@ + + + + + TPI Frontend + + + + +

TPI Frontend

+

Files

+ 

主要なファイルについてのみ紹介しています。

+
+
xxx
Linux上で使用されるファイル
+
xxx
Windows上で使用されるファイル
+
xxx
いずれの環境でも使用されるファイル
+
+
+
(root)
+
+
+
bin
+
+ TPI Frontend本体を含みます。 +
+
lib
+
+ TPIとその関連ファイルを含みます。 +
+
calLibrary.dll
統合アーカイバライブラリに対応するTPIです。
+
calLibrary.xml
calLibraryの設定ファイルです。
+
cuiWrapper.dll
CUIアプリに対応するTPIです。
+
cuiWrapper.so
CUIアプリに対応するTPIです。
+
cuiWrapper.xml
cuiWrapperの設定ファイルです。
+
spiLibrary.dll
Susie Plug-In(SPI)に対応するTPIです。
+
+
+
association-sample.reg
関連付けを行うためのサンプルファイルです。
+
frontend
TPI Frontendの実行ファイルです。
+
frontend.conf
TPI Frontendの設定ファイルです。
+
frontend.desktop
関連付けを行うためのサンプルファイルです。
+
frontend.exe
TPI Frontendの実行ファイルです。
+
frontend.exe.manifest
TPI Frontendのマニフェストファイルです。
+
+
+
doc
+
+ TPI Frontendの説明書を含みます。 +
+
api
+
+
+
index.html
TPI仕様の解説書です。
+
+
+
files.html
このファイルです。
+
history.html
TPI Frontendの更新履歴です。
+
license.txt
GNU 劣等一般公衆利用許諾契約書2.1(GNU LGPL 2.1)です。
+
readme.html
TPI Frontendの説明書です。
+
+
+
share
+
+ TPI Frontendで必要な各種ファイルを含みます。 +
+
ico
+
+ TPI Frontendで使用する画像を含みます。 +
+
app.png
TPI Frontendのアイコンです。
+
archive.ico
関連付け用に使用できる書庫のアイコンです。
+
archive.png
TPI Frontendで使用される書庫のアイコンです。
+
+
+
xrc
TPI Frontendで使用するUI定義を含みます。
+
+
+
src
+
+ TPI Projectのソースを含みます。 +
+
common
TPI Projectで共用するソースを含みます。
+
frontend-wx
TPI Frontendのソースを含みます。
+
plugin
各種TPIのソースを含みます。
+
tmp
コンパイルの際に中間ファイルが生成されます。
+
+
+
+
+
+ + \ No newline at end of file diff --git a/doc/history.html b/doc/history.html new file mode 100644 index 0000000..a3d69c1 --- /dev/null +++ b/doc/history.html @@ -0,0 +1,121 @@ + + + + + TPI Frontend + + + + +

TPI Frontend

+

History

+
+
2009/09/30
+
+ Ver.0.01β2 +
+
Frontend
+
+
    +
  • frontend.desktopを追加。
  • +
  • readme.txtをhtml化し分割。
  • +
+
+
calLibrary
+
+
    +
  • Unicodeに対応。
  • +
+
+
cuiWrapper
+
+
    +
  • Unicodeに対応。
  • +
  • gzipに対応。
  • +
  • tarでパス情報を無視した展開に対応。
  • +
+
+
+
+
2009/08/29
+
+ Ver.0.01β +
+
TPI
+
+
    +
  • 暗号化、分割書庫、リカバリーレコードなど格納時の設定に対応。
  • +
+
+
cuiWrapper
+
+
    +
  • Linux上の動作を可能にした。
  • +
  • unrar, innounp, tarへの対応。
  • +
+
+
+
+
2009/08/22
+
+ Ver.0.00.20090822 +
+
Frontend
+
+
    +
  • 仮想リストビューを採用し高速化。
  • +
  • 説明書を作成。
  • +
+
+
cuiWrapper
+
+
    +
  • コンソール版アプリケーションからのデータ取得に対応。
  • +
+
+
+
+
2009/08/13
+
+ Ver.0.00.20090813 +
+
TPI
+
+
    +
  • Unicode化。
  • +
+
+
Frontend
+
+
    +
  • 格納/展開ダイアログを統合。
  • +
  • 書庫へのファイル追加機能を実装。
  • +
+
+
calLibrary
+
+
    +
  • zip32j.dllを代替ライブラリとして登録。
  • +
  • tar32.dllを使用できるよう変更。
  • +
  • UnAceV2J.dllへの対応。
  • +
+
+
+
+
2009/04/29
+
+ Ver.0.00.20090429 +
    +
  • wxWidgetsを使用するよう変更。
  • +
+
+
2006/11/20
+
+ Ver.0.00.20061120 +
    +
  • wxWidgets使用前の最終版。
  • +
+
+
+ + \ No newline at end of file diff --git a/doc/license.txt b/doc/license.txt new file mode 100644 index 0000000..602bfc9 --- /dev/null +++ b/doc/license.txt @@ -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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 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 index 0000000..b9bc182 --- /dev/null +++ b/doc/readme.html @@ -0,0 +1,71 @@ + + + + + TPI Frontend + + + + +

TPI Frontend

+ +
+ Silky(sirakaba@gmail.com)
+ http://tpi.sourceforge.jp/ +
+ + + +

About

+

TPI Frontendは、TPIという仕様に対応したプラグインを利用することでさまざまな書庫を操作することができるアーカイバです。TPI Frontendには、統合アーカイバDLLやSusie Plugin(SPI)に対応するTPIなどが同封されています。

+ +

Feature

+
    +
  • + 統合アーカイバDLL, SPI, CUI Applicationによる書庫操作。 +
      +
    • 書庫の作成、ファイルの追加、展開、削除、検査、修復機能。
    • +
    • 書庫とSFXの相互変換機能。
    • +
    +
  • +
  • wxWidgetsを採用することでWindows/Linux双方で動作。
  • +
  • Unicodeへの対応。
  • +
  • 仮想リストビューを用いた高速動作。
  • +
+
※但し、実際の動作はTPIの実装に依存する部分があります。
+ +

Customize

+

対応する書庫形式を増やす。

+

calLibraryとcuiWrapperは、それぞれcalLibrary.xmlとcuiWrapper.xmlを編集することで対応する書庫形式を増やせます。詳細はxmlファイルの記述を参照してください。

+

また、bin/lib以下にSPIを配置することにより、spiLibraryが対応する書庫形式を増やせます。

+ +

TPIの動作を変更する。

+

calLibraryとcuiWrapperはxmlファイルを編集することで、ライブラリや実行ファイルに渡すコマンドラインを変更できます。

+ +

TPI Frontendの設定を変更する。

+

confファイルを編集することで動作を変更できます。

+ +

TPI FrontendのUIを変更する。

+

share/ico以下の画像を差し替えることで、UIで使用するアイコンを変更できます。また、share/xrc以下のXRCを編集することで、UIをさまざまに変更できます。

+ +

TPI Frontendを書庫に関連付ける。

+

Windows

+

association-sample.regを参考にregファイルを編集し、実行してください。association-sample.regはあくまでもサンプルなので、決してそのまま実行しないでください。

+ +

Linux

+

frontend.desktopを参考にdesktop ファイルを編集し、~/.local/share/applications/(現在のユーザのみ)または /usr/share/applications/(全ユーザ)のいずれかにコピーしてください。その後、update-desktop-database (コピー先フォルダ)を実行してください。

+ +

Tips

+

NSISやInno Setupのインストーラを展開するには?

+

7z.exeやinnounp.exe を用意した上で、ファイルの拡張子をそれぞれ'.nsis'や'.inno'に変更してから開いてください。

+ +

Notes

+

TPI FrontendはGNU LGPL 2.1の下で配布されています。再配布、改変などの条件についてはlicense.txtを参照してください。また、TPI Frontendに使用されている画像は、Crystal Projectの画像を使用しています。Crystal Project はGNU LGPL 2.1で配布されている画像集で、Everaldo.comから入手できます。

+

TPI Frontendは正式版ではありません。未完成の部分や欠陥が存在することをご承知の上ご利用ください。また、TPI Frontendを使用したことにより生じたいかなる損害に対しても、開発者は一切の補償を致しません。しかしながら、バグや要望などが有りましたら、TPI Projectのウェブサイトもしくはメールにてご連絡いただければ対応するかもしれません。

+ + \ No newline at end of file diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 0000000..e004c52 --- /dev/null +++ b/doc/style.css @@ -0,0 +1,60 @@ + +body +{ + margin: auto 15%; + border-left: 1px solid #ccffcc; + border-right:1px solid #ccffcc; +} + +h1, h2, h3, h4 +{ + font-size:medium; + color: gray; +} +h2 +{ + border-top: 1px solid #ccccff; + border-bottom: 1px solid #ccccff; +} +h3{ text-decoration: underline; } + +#menu +{ + position:absolute; + left: 5px; + float: left; + padding: 10px; + background-color: white; + border: 1px solid #ccccff; + list-style-type: none; +} + +address, .sub +{ + position:absolute; + right: 5px; + float: right; + padding: 10px; + background-color: white; + border: 1px solid #ffcccc; +} + +p{ text-indent: 1em; } +a{ color: blue; } + +.dir{ quotes: '[ ' '/ ]'; } +.dir:before{ content: open-quote; } +.dir:after { content: close-quote; } +#history dl dt, +.file_win{ background-color: #f5f5ff; } +.file_lin{ background-color: #fff5f5; } +dt{ background-color: #f5fff5; display: inline;} +.file_win:after{ font-size: xx-small; content: ' (W)' } +.file_lin:after{ font-size: xx-small; content: ' (L)' } + +dt a +{ + color: black; + text-decoration: none; + border-bottom: 1px dashed blue; +} diff --git a/share/ico/16/add.png b/share/ico/16/add.png new file mode 100644 index 0000000000000000000000000000000000000000..43253432082aa6795ce8e39442b7ebeadb053f43 GIT binary patch literal 703 zcmV;w0zmzVP)Q9JTMIc725)5(WA|VJ0 z!8EBL3ygAO7b%q}qp})J$N4VjeCMMpzy$v2jfF8kNpKuYZ$JqDVr4`FWUR~ zF3pW?OBGa=#*YyW3R12DAh4R$y!@@v(7MH5YfWEIH(SbU(E)+2z*cGRs{(Q}@+c0* z7kbZg0gyh}5*%r8(gM;MG_=-*J>f*Al9OuBx(XbUI9dbXI4(&$IS0@<3bgWZm0kph z5V>2;_D{R>%O`i1rfzr&{9-j31HZ7Nj*m16V;FBEP|GFvo zYh>&r0A)`bX>MpklQwKS9*!%SN+}XaZ_&bhb)J9ps;{Rz`^NoC05o50!x)29X@FJ^ zDJR6wq{NjPtU18$q9OqZC*_*9_Ev6P=ps8a2Pq{|NsKWR6cjKz`j+8988G)DtwjqK zu*nLEoaSrS>$1Y@k*o-Rt5nR{B7=sXkf#?1FnD~C@;o$hUSDCS#nVIRK zjuWA))$tl3mTqH7VPPN;2$Y_zudhEGuf8;YUQk#Z%HOq1W`-KYQA50OlV9`~ll^F2f%G!4v=h002ovPDHLkV1oGu5XCY{U7Jj49v`8^Lq#uz*_27|$4#@JKNdFA-{__^!4H6nU3olZ-a zmzVGOp-bcO_(P>qc~dHt&fD$wGtT*`>$*HmQ*5_eFvhT6uYUr-LBQGB+1qlt{Bk#z zBncLa1w7A#>$=FYECm4P5I{;91Aw&_0FY%FZf%wR>`qgT+)b;iC$6BrSyI!x0IF7&gzW;SN98RvTuF_tw zH;JNXe0O*Eso(Ff0D$iM&YR5!v)K#)aB^~jYPE_^r*p29N^Wm&*8o67_yfIcJKHY} REx!N&002ovPDHLkV1oOD3}gTR literal 0 HcmV?d00001 diff --git a/share/ico/16/create.png b/share/ico/16/create.png new file mode 100644 index 0000000000000000000000000000000000000000..3f484cf085d9c063271c4023e410dd9db0cd430d GIT binary patch literal 3427 zcmV-p4V?0cP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_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7o8(@rKegYxHACR#) z?GVPGjQtz1<#hMWZ{g(X&gKoB>)JcGcIFz+xw%yw+E{d~5mpn$=5K(^CQckVco=}@ zp|;-+=4&}N7#zNE6iO8dizLo4Ln0lJNC(`1^?-$c#5qS8#gt=BAyoXF1IV6}Jx-aJ zYA=c3>XE2R05Cc<%*E>$DNZ;~P>z&c#=xByTt2mzdml8TlMw=kQF9WN(u)!hLSU>RHVWUD*jS-!VuUA{ zDgnMmdLWz)0Hmh`kMBOkwrbL%fwmnD07QL~nsgdF?dY!Urn)+b5E`Wv)3GZ}n%Y4C z`R?{x0npLj-ZFFc=hynW3Se*~&;3h}2*VI#%uwHx$1kVKo!fgq$IlAW#rN8)y0IvQ z+{ce&6a>Z5km6{FX9f9u{=BtzQ-6Pd$G!sx4=F1qCnm;U(|h^)m#bUH0K~$mI*zY* zCRuS(pUQIQ+${l+N~LIOYGT9Ioh??yrQGZ1KjwRW4FI{_Jc;4CkY)e?002ovPDHLk FV1iHCWJUl0 literal 0 HcmV?d00001 diff --git a/share/ico/16/delete.png b/share/ico/16/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..dc5d79cfe187e6ccf83b530a083fb33eff3f7731 GIT binary patch literal 899 zcmV-}1AP36P)mmLpc>mRtZ`?X` z;UZegL5PF_z%XzY7nmCw;S|e@ou+@}m+p+~4Qe}5a;&BPj!*Tmn40JQ)FZxGNMG&@1qT4` z#bZqR11Ds`NE+EJ+uK=!T7ZVe`hm>iiqL?!UhoH*NzG%q4t)#h%fP@nY4cGi05DOV zsBSlNIcEI%fC{jt17uZ zp8g^3*l(ZG)Y@jvho`AmlpRI1{%w}nv@BLirJvh$tqea*tFpbcyUVg)=gX(t{lJHD zSKeNil4qt#KyXOQOYEE?NI5prm4rh&IPOD3cpbuaC{+ZwkvIDhqUWINf~JPjnnuXA z*a1&5UGGuCrxJ5K>SED%f#0L9?7(&L6qO&1Qa{ks=_#m=Lgq}54D3R2I;dzO5{n$E3i=6VHmE6;81dlqoY@JCl`o(Db~}Gbi${jeM?whC^O4Wx z8Q;orV|^?8onfBx3vOG_x$*=y1QaAlsI{Q!fS^0!^Bt4Gnq{ZvVK4xH7GWbIATRg0 Ze*v7Ycc*=Pu($vK002ovPDHLkV1jZxw7>uW literal 0 HcmV?d00001 diff --git a/share/ico/16/extract.png b/share/ico/16/extract.png new file mode 100644 index 0000000000000000000000000000000000000000..6e4b157b81217ee784a364fba118ee47a6112417 GIT binary patch literal 3389 zcmV-D4Z`w?P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$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4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}00075Nkl{{~`@?3yv>Z*!)|dfZ8 z?g8+8&2|TdQsubq3*rifXl%EX^OuB{!I*eEI?y6)A8l8YwS6*0pMw1l0Km-`Kh6V) z7PJVm?S-SUavnL`XT$O;0~Aoz(?!c*tZX8Hh>*^EY^dm(;kku1u)JY+x0p?aV3cW>U0ww!(aI{(8`VO z2v0|IEUY>x1nq52p?PkZQuc2d>$NqYAhnoeY`DFo)lei-0)~%iDnLR2=7*tEJ<+y4 z6KM8wsk)1I9*yrT)&hotXgG*c3fJ|>WF()mLeu4cV9kzr(YC$}qMHy%FD3c>pq-yt zo6W3^r}e`4%<@Dsb>PCxq%-EE?I{uC`K~Egvm^09q$c()?Q-{0@crCs`tAIhb>9~` z^JZ+WedyY`>#j$lu%3?D@mG&uKRXmJeH1PKz4vwYH%2?|)y0-KS=h)TBK#TvA_!ZD TDG2cn00000NkvXXu0mjft~6Jp literal 0 HcmV?d00001 diff --git a/share/ico/16/open.png b/share/ico/16/open.png new file mode 100644 index 0000000000000000000000000000000000000000..2bf5dd903bc03104ef8b12cbd8ca72fee3ee3265 GIT binary patch literal 3469 zcmV;84RZ2{P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^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#t=_ z@xkujMnv8R+*)5>|E^xI-vr97tu1M_S~Y+{;d$PDOW_rtEY~?a%Ttr*`4vEn@w2tH zwY$}7^-AA4&o2-E<@${pH=6T!z&dY?_x^oA$n!i_t5tn@T?~Pf?tl1LQd_u&7syNS z5ixRc_qYWax22TAhkzHMq68N}0*HbT1>>y67{h2=j3X@~D5WkyfYJ&dpezHT5+Z`` z9v)(?MMMZ8Tmf7{M1&|ph~P@$+&T&uv8A9x2po62*rIqBmWwgQE5jm!AjBvP&K=fz z`h{m`16nDC_nz$RjFmfgs4Xn0@$DlW1zS4GGElfcx92E)L<4B8DT;!SGZfmV4(los}91al?oO2@!N-4C~h)M`$gcwLPXpuw%8Sn;Z3$$a5 zmCN9gBq2!>l-5ko&d_WwlIVm%?$|%Eyy@9914Q7Jhzx8GRX{`I3DUdUwQEAuYoV2tTFYlqw0+snq7TZ6%1KI`@Fzdb$O zZ7eSSnkaSu!SBDV46@~Kk6!N_x&5ENp7`|3M`rA0hd}3#ot=mMESqaKo6{e!tUOUk vVwHm2!^`st>HYcr<4T!*lcbZoApAc7r+}$kVdzrk00000NkvXXu0mjfRxW^^ literal 0 HcmV?d00001 diff --git a/share/ico/16/repair.png b/share/ico/16/repair.png new file mode 100644 index 0000000000000000000000000000000000000000..6fbea02bc75553af29dd4c217dd9352c0be14fc4 GIT binary patch literal 3363 zcmV+;4czjHP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7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82}L!48p$5QK!2pyPZ8U6;F9-dv{5YpY-YXr&o`Kg{g6 zS#m2m8gv7NVu5>??o(sckaRDwRotrl2LSm}o{jtln}to%Eq8cuCBu%tOG8yXVKL(M zk5|O2;->(o47|8UXR;GJw7GpTO;C!6hjDfb1zvoANpH57l$WY(AR_poPv&}t{^@?6 zElRW>KT* z7z~Dphy!y#T*oU^5U5Yolb1X(J4Qr^U6nw9La>L{8cSIyQ6Lp6%srdKu^dWK3CBJ> tRa@C;r71^clv2Rqwc6OkbPRys0|1>FE-}{<@0kDq002ovPDHLkV1oXyK&Su! literal 0 HcmV?d00001 diff --git a/share/ico/16/sfx.png b/share/ico/16/sfx.png new file mode 100644 index 0000000000000000000000000000000000000000..cc98ea7d8706a45e0d8946a79f5158bd4eb43c49 GIT binary patch literal 494 zcmVfB(DVlP62Xv9x2CIRR94 zI-Yjy^6cb9&qO~6NhadFTH9cDa-!9~m0Y2ueM==A8eWZ9%sLv&6-rw7eeH!GTRXb6 zx~admcO#$Yd73MfG~TQ5!m}4#8ahYjl+FCicxV3r982)DxX!)l8=OCzA>*c~eEH7s z<)J9vXcz!20Hf_=c$8b_*2on^gvET3)Igkz7Y6zK^;?u9B8LRl{^bC+)xb>-@UHxU zeD)6c<#hnIws%?xI3(zV>)N<>lKHv2RBJwSw@3N2`xikm#-OUv47#@P_~8^QuQ#au z^GT&oQ?2dssq&H0YgaL<7*!5lbRDAO*gTjT;pLn6oJoXKJtcepCNZliSoTju5C$P( z5Vnz|9h>aTbwmVJMF4NlYs$8SFbJ9i_1`~-pRcY}x+&?0dJv3>F{aHa9UJL~u3PAY k>ha&@h=N{-=FwvR1FF2w-KY>bMF0Q*07*qoM6N<$g1XD^CjbBd literal 0 HcmV?d00001 diff --git a/share/ico/16/test.png b/share/ico/16/test.png new file mode 100644 index 0000000000000000000000000000000000000000..deed6a8f35a5a37665a55ef8ce165088425d0da5 GIT binary patch literal 3321 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb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EEz8OW%dCl_@?HlTfCr!kpag(xtt*VNzLoIUWSi+V z?c7y^AP6{sCII$8@{ZQpD^BvDwb9#Qz`tF_7(Aup^M<*FaRllXOvRc^E~r)>I%BJxPVgX&EetU>;3)x zU)t^Vhl`7gFK%vb&H!9cO26OO*tpG8RB+J&5R^)#->$B%-fVAg|171HmzS67{QUgt zQ52mEA-pWh{yaWD{?32{02#FNecvZaDL0Pe z&eGD-Vx!S$GRA(Nn3zcVf&nZqFMl~THTC4^=;+(My}hjXZXm&bJqrs96(IyWI5^PUA#D;(qtH_|ms*O@TQMc{B)t~eUV7@GRSx$ex^zidA;PMtb+uA`%4yHaZ1 ze^>+yAt7cU<+*stRWR0qSrh;`8xe$IxF?&=ldq3Biq^WVRe9r0WMNGL!vaGLW?;5rkr-YX@ij)P)T$Ysb5Qn5uqk>~ zYrSfk8sNqlL~(+_-8*pq{sVLdE@nyzN}+);ftSm>ieR9>-%-AT8@PzP5XxKaWM)Q^ zB#7e}p69`FT==fQ;|OyVgT>H5h+!>(mY0zp`t%K{qKY8nLw)E-2JPzKsEA^D4zV(L z|Kt($qKCmiC6OOYV}&|S42EZwL;@`8#dNM(FH$xNa; zRK~*9Dy}W$(b1lRScUCv+n#5j6oMdt5)Vo#E{CRcYpU{3u}bsPi^ zd30{MGT}bHrm1-S8Le*F#C n6oY#YWW?5zJ9qywt!MuMX7i}qCBe)^00000NkvXXu0mjfr;-v( literal 0 HcmV?d00001 diff --git a/share/ico/24/delete.png b/share/ico/24/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..d64d8a66ebc7f512f5a44dd30f9ba88b9eb4d81c GIT binary patch literal 1638 zcmV-s2ATPZP)S54zJI5e!u&= za$o=4;(*pHSK`m7um^`QUV9mNTw&os;M_GiAJW0sx8B(K;`R63gVE6emV;Iys1OhcX@F@! z5D;EG&)FAWqJQAj9$(5IUfsd91P^_-Z`Tv+@4ORjnCQBTa_f}xdFIPylvX674(W6T z)3%YRG=_lj!++q=8-IGH90d0*3%JIJKDT4%wkKM9dT_@l&?s_~)BNT1X-T8 z&Y(ryc2<9?yk-K|0$3gHnzULdGi)>=P!b3 zGCn%Y!FNv9CMwkj&co|-aQQyKsaKN?Ln8x)c(T2e%i$FY$V8k?Z5#RM$mmlSE({+A z1_4ZKFo)sT0DHHrZ((9&oPrPpg?XMkF>vEdln=tXs3MP_N+Urcl`o=Q0uG^c3m*Jgun|Z4L3e&(ysY`uOo#Q=j@N!1{zK z86FyD&NK+3G0rZOzQYpyi?#ua`}o*wbL!#w!Zc#iMK@-6BbVd&xr_g}L8_a!Dvi$P z$q0=v_@wOT71Lkb~$B)?@i zCFethAxVagvl+rWEZC<4p9Kvu(xU(vLbC zECa+{TBDZIG!SgvmWaOlt+a!v)EQEmpfQaXaj3g>ECq&PVcHh)r~`pZI6XzP?_ot9 zUMP9|s#4$W!}9=+*8h{HCl8iuUz3P~yH_;OB_w&}W7sCiRV_s97*Yy?P*E)x@$z+I zi5Lqy$_sO4o~^o%umlH4UX`ZH^}Dx9)t#eWaO5lLWNLf!N*Y%;V`eiDi-QzcwHo$Z zgre*7?n0GU3q=mQ{=G3Fp1T@$^@tb&)@T?5CoScJ+b#3^T@9(&=4>PBL>z>mSgtTM zH^)Bj47> znx!l(C`BE(mcRs%OJ5gx6e1dAA4C9Sa1g7#Jv8BjarEd3+20R0l6gk7nG;@wq_MECjbBd07*qoM6N<$f>OgCM*si- literal 0 HcmV?d00001 diff --git a/share/ico/24/extract.png b/share/ico/24/extract.png new file mode 100644 index 0000000000000000000000000000000000000000..f17a2f7da523842c8e049f2f62309849b5c7e3e1 GIT binary patch literal 1090 zcmV-I1ikx-P)7la6vuyeX5L3%Ukel(K7+9&)PMp8qsW42Vq(J97`t*|h(?qS1&#OR=>;`^ak_uW#nf%)RHhn10YN`VuFzm~-dO{hfRM|8p}& zRrx>Hi3@)R#eC3i4DFsVo7a_#+l^-)4XyXs&jaJyXK{9MS)!y@$79Arp^y)7Y6w$EtdcrqMSwa{ zD>`p+QAJd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3FF4I9(sr6sRAORgg0H)daBkl@ z5_STuHDJ)%ya!;GwwEymH*`7LbChG-jxjU;7x!P>ryP~ZZqL#?&`YKll;%IEFhgqqqRl~iPDO^pGO&0tCKMrv#3@Q zfg_WMP^>V?(q{7B3t1Q??k-F=DP^rrnisz{Bnger@yT9jEV1mx^ytj2ZRhTaICTD_qb(*KV^LIM-;2*CH;BwW_(a~Np0ag z)Z?^SFw3Tj-#Hu$-m(J2FskmRsrWR8Vn-`%GT76FS(fnneZ*(yQA{TKjyJzGMN+jF zTCv27)EbH8BE4Nr3`E*7DGCK$q9x>Eu)CF&tjg2mGFdfWm7r?m_Z}y3)w%hk|0GMV za;#)Fn3$L(U)Uu2aSz??4GesE6pKY+{MLOwJ=uxfYT3U6iW;fZDmI&$7pYfVx_FU} z!!G(e8~Nk+D~wOZsdd^&t*&EHv7b`~DQ%oR}mKZXoFQvb3t=b;@Pu0Forp-PO*_+%lSB(9(2- z->%)PsGuT2cUK$NuU=+$Zi!}}1B=VE>kL}U5ZNb=~AAGck> zUE{!Hl32;+nOjV=n9fk^wA0%b=1ACI@hGoKV6$2niuR#y#83>4pMQ;UxUre0hI($q zCJ2W^D!4^pvGd^J z^j>1#3G!TWzW!?L&eHpEzVLD-EZ*f-@!yNU+py;%|6lwI01;6RQgNsy00000NkvXX Hu0mjf>h02P literal 0 HcmV?d00001 diff --git a/share/ico/24/test.png b/share/ico/24/test.png new file mode 100644 index 0000000000000000000000000000000000000000..378aaccc49a7d16dcccc2d69c3ac9a3d060705ce GIT binary patch literal 1042 zcmV+t1nv8YP)=t2P>-#si`Y&(dJa0N=+Rb8-y-QG`3=c8NNx>~#vxKSObR5C zmXY;YMP=o?k+nB65dZ{1xJ?v=%|*Lwo2siS*8><2n@a)yRDc8sAwt0K;N00sk)m~oPn_K+tokZpbBke5_R)>PMwG&VMmIvm3jBo9Z+VEzEG#%Rzt+3iQK zbaZyhJp-d^M`yQOS6}Z0Ucj&r-?sAe#%4;hvn|upfrP~X3;w16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(R{ zsqX6flUvv6=)we{U^t1-ST3U zr{lQ_G%JB%mo8w@tynEqn?*FuqD0e_XmZ8@(?kpt5^=*wsCYb%B9Y=DVj#v?YGlkS9fsa`pOXiGRO{n1}T!1HN|jVb-!uJbZgx;yKT`un>5{)o|0@! zMbnZI-2sv$nx-R~j))rc$wlqNl&j?;jyDX3?O`2ljM# z|7lfs_tS!Q%AxBgEdX|%ZaqoXiAUC%4uPQ18#XjCWBRF3Ojk;*i0C4k711v*(6YE{)4FrCguj|+~9ZgREfd2*~QhUz%`(AAT0000< KMNUMnLSTaRrTcFH literal 0 HcmV?d00001 diff --git a/share/ico/archive.ico b/share/ico/archive.ico new file mode 100644 index 0000000000000000000000000000000000000000..07bdfc9133350b856e4502ee2d0fbbcc1e93199a GIT binary patch literal 15086 zcmeHOc~n$ao+c;V{YR&Brq7%?Gt*~gPCLD%Gg<8zjWLN!Cv8TJ(L`fw)Wj9z5;PJK z322OpQQQ@b3r0aB3K$g>Py|%=rPzw4*q5q;s-l2mUo_u*zgIj{p^38O^mLz-I_KlQ z<=*%E?(hBXeed1xhm+GoP7gZ`AMV6*m{ZX2ot#EFIXMj**0cXhC#NzV`z1>`|G`h3 zoV;1#an@lIrv-!@|MB;u2mY2G_}R~X_RytEm#Y6BAY2C8_eURn^rul#QK^afrAW{g z-$Np|RV3w=K#AVu2uz7dT7r*%F_3PJD(~ByRN^XKQa#E45D~F1Vq6!E!ta}f%t?5B#Nfok6t0AS*URTDp zL=mqcVBa*wY|HbS5-IK5Srs)94#H(H{I6ZRmSX2$dXKl*S9wdRa<`Y2+^22f(gWeF z@|QlS?H${xb<^^TktzKw)gyz~PSqAdI1GtDeV8WqzX#$g6@76~`PxhIxgFVMdSsKA z@bBGD>ZX%>vL;(8v+4Krf)b?WbA_cy&CY{{WfuD?*A@=KWiatCZ8PaN)xT2q#aD?9+RI_xyh($0@)pj;2Lm}*7)?lH90Z15#?>3QP*kahv96wIK$(&KV14_&vBy+eE@MXG zCbvMjSHfTJ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7V4FEVac7D z=YIq5os7eT&jOU3y{G1`!8otuN{)}z?cH9UQSl`vzE>w=RcNY`^R+TKUHQiOlh+aE zpDo7}pI{VILzlXL)t-8IVwsiip?TQJJO__!<@hA31he^WKKsZG%-}osJA4O~9HTDQ z?cKh;`x_)x*{~zgV$W5HGr&93hAk-u<`d-by_UI77c?lcwm|CkZZ9!wYiUJpZ4<(& ze|z01#79v@SQS=)9r2a8!1u6py^XmBcAd4a_Ud!B_xvhzl+2-yzrNb5&n3rsS?0Ok pZRI+BwO8#rKARoe%5nAAS9|qbf6CtNWq+WM@%!mR$0rO0{|862>fZnW literal 0 HcmV?d00001 diff --git a/share/ico/archive.png b/share/ico/archive.png new file mode 100644 index 0000000000000000000000000000000000000000..5a52ef838a0292f0697a3b7852e6817ec3662a78 GIT binary patch literal 4099 zcmV+e5d80nP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI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an6&Oj50HP@{ilB4F&`sMs%8l4S~Ec+_}F)RR<0ZTV6ZYCu+n-C2B-fPw$GS zb)dD5rnWR~OWiv9Wr?+(rm-}wrEMER@PrV^Mc7#Fu(n)KS1ot$?vO%!E=HW%6Y7|< z);Vl)WHB2p*6CCVBp8Bs>{`cz&%WlTSI;x(XBbm(akI~`t^kNJp4Ag7NfX|CY+aLO zIkVtJ41&OMLRtU)bBZ%TlMM*Ujj3dL)yR z)Zm>b8HmYaTSsNVn`N%Q^ILv?{nuRDx=d$ z|H}Oj-e*uerN7)^Z}%%IYZz=?<;E|6$D7xG#^%M#D&Q(6JBDV2PE( zn4B!{aQXE&*}C!*-u?X_`25p*e02NITzh?m8^8Dsn-{-_$#T@UL|?JD`#(Zd)>pcy zrqheyIQFZOj)Rj!q9?irF&SCj;f)`^#SgB&J&HOh;@Ts;Ye#zkOI<_j5_RKPDvL8( zfhtK7X_An@=-VXFNQ@qF^;i){fhopFjEcwzbT&@Styf|^gDajC6qq!!N0DPDlIl!~ zrsJ?{#s!Fu?+-C1d{CBq`NHyUAp_mA#AL<%8c#rYKD-)Zh^lCeBS7Q%z23-VCpvKI zgyipcKK+xb%5-k{vfOb|kva`N&7nYEb$R~(0RZ+vZBJ|$iJbrd002ovPDHLkV1h(V Byx#x- literal 0 HcmV?d00001 diff --git a/share/ico/exe.png b/share/ico/exe.png new file mode 100644 index 0000000000000000000000000000000000000000..85c6f85bc9a928eb1c971d096053f181efb916d7 GIT binary patch literal 2166 zcmV-+2#NQJP)oD5hhAiCVu<6N6fL zB;Xg*p<2>VWLiN7AAmG5*oG9OBO@>}FesujgEIqn?mhRMdtSRA?w!Lp3{ac2J6T`$ z*=PO#d;Qm1dvBqX;+u{Q8#erM+O%oE@?5v1fOI--Zr;3k{iaQu{_;(I$#0AfSeA8P z^SpU;i^U?krjgBN*|lp|Kk)w{Fr3dP3WWl$>!Rxt!zp3gcH+PBB`zhwLk~T)X6e$U zcXV}iJAp}zD7>2>glP8NG960b=5Co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__^!4H6nU3olZ-a zmzVGOp-bcO_(P>qc~dHt&fD$wGtT*`>$*HmQ*5_eFvhT6uYUr-LBQGB+1qlt{Bk#z zBncLa1w7A#>$=FYECm4P5I{;91Aw&_0FY%FZf%wR>`qgT+)b;iC$6BrSyI!x0IF7&gzW;SN98RvTuF_tw zH;JNXe0O*Eso(Ff0D$iM&YR5!v)K#)aB^~jYPE_^r*p29N^Wm&*8o67_yfIcJKHY} REx!N&002ovPDHLkV1oOD3}gTR literal 0 HcmV?d00001 diff --git a/share/ico/folder_open.png b/share/ico/folder_open.png new file mode 100644 index 0000000000000000000000000000000000000000..66704bdf38ae48dd970e73e4fe0993404e30d73e GIT binary patch literal 611 zcmV-p0-XJcP)q5|KYg?11sZEPF&HXcH<{TI84K4jc2WBy6=KSXSzG0Mz;Ih$ZG{$}3pA3TFei)YT z6^kR2@QV|F{`P`rvoke_$eFpgxVW&fv9Z_fcGEbHogoqtk%3{^jahm|q`9(6A_D)s zTPu~y(`vOka>! z)}C5tL;x7%fS3SJ80l32%nZ--j*0?gmcb;@&Vih}nu1}tV32dL89_54$u0*--ptIy zEYj4%DM6qF`vbZdz|1-aD5Zu<`f&#B1&A!;-!b6KE6mN!eW=&#*G}eOi~(DR%}yWt z1B1<80%J}9rY9!6samaYdu+@fEtj8^N+mewKtza>1WGB)PJ3WS*xHSeBnFO7XK)?B zO{G*uL|OnONiqyjYYnXxdWQsE_S^E8orCProuyydPSihKW54j`RER&< z*SCws;>yDO{QE|uvDzEACuV-pY&LH_fB9;hSkqp&{T)khU$@`QECYbL=sQPI xgjTBs5kVM+s8lMLdhqz6INJaH +#include "TPIHandle.h" + +//****************************************************************************** +// Class (TPIHandle) +//****************************************************************************** + +TPIHandle::~TPIHandle(void) +{ + this->FreeLibrary(); +} + +bool TPIHandle::InitLibrary(const wxString & _szLibName, const wxString & _szArcName, wxULongLong _llSubOption) +{ + this->lib.Load(_szLibName); + if (! this->lib.IsLoaded()) + { + return false; + } + + if (_szArcName.IsEmpty()) + { + return true; + } + + if (! this->lib.HasSymbol(wxT("LoadPlugin"))) + { + return false; + } + void * p = this->lib.GetSymbol(wxT("LoadPlugin")); + if (! p) + { + return false; + } + + return ((int (__stdcall *)(const wxString &, wxULongLong)) p)(_szArcName, _llSubOption) == TPI_ERROR_SUCCESS; +} + +bool TPIHandle::FreeLibrary(void) +{ + if (! this->lib.IsLoaded()) + { + return false; + } + + if (! this->lib.HasSymbol(wxT("FreePlugin"))) + { + return false; + } + void * p = this->lib.GetSymbol(wxT("FreePlugin")); + if (! p) + { + return false; + } + ((int (__stdcall *)(void *)) p)(NULL); + + this->lib.Unload(); + return true; +} + +int TPIHandle::GetPluginInformation(unsigned int _uInfoId, wxULongLong _llSubOption, void * _pPtr) +{ + if (! this->lib.HasSymbol(wxT("GetPluginInformation"))) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("GetPluginInformation")); + if (! p) + { + return -1; + } + + return ((int (__stdcall *)(unsigned int, wxULongLong, void *)) p)(_uInfoId, _llSubOption, _pPtr); +} + +int TPIHandle::CheckArchive(const wxString & _szArcName, int * _nFileCount) +{ + if (! this->lib.HasSymbol(wxT("CheckArchive"))) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("CheckArchive")); + if (! p) + { + return -1; + } + + return ((int (__stdcall *)(const wxString &, int *)) p)(_szArcName, _nFileCount); +} + +int TPIHandle::OpenArchive(const wxString & _szArcName, void * * _hArchive) +{ + if (! this->lib.HasSymbol(wxT("OpenArchive"))) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("OpenArchive")); + if (! p) + { + return -1; + } + + return ((int (__stdcall *)(const wxString &, void * *)) p)(_szArcName, _hArchive); +} + +int TPIHandle::CloseArchive(void * _hArchive) +{ + if (! this->lib.HasSymbol(wxT("CloseArchive"))) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("CloseArchive")); + if (! p) + { + return -1; + } + + return ((int (__stdcall *)(void *)) p)(_hArchive); +} + +int TPIHandle::GetFileInformation(void * _hArchive, TPI_FILEINFO * _fiInfo, bool _bFirst) +{ + if (! this->lib.HasSymbol(wxT("GetFileInformation")) || ! _fiInfo) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("GetFileInformation")); + if (! p) + { + return -1; + } + + // Initialization. + _fiInfo->dwAttribute = 0; + _fiInfo->dwCRC32 = 0; + _fiInfo->tmAccess = 0; + _fiInfo->tmCreate = 0; + _fiInfo->tmModified = 0; + _fiInfo->uOSType = 0; + _fiInfo->llPackedSize = 0; + _fiInfo->llUnpackedSize = 0; + _fiInfo->szStoredName = wxEmptyString; + _fiInfo->szMethod = wxEmptyString; + _fiInfo->wCompressRatio = 0; + _fiInfo->llFileID = 0; + _fiInfo->pCustomInfo = NULL; + + return ((int (__stdcall *)(void *, TPI_FILEINFO *, bool)) p)(_hArchive, _fiInfo, _bFirst); +} + +int TPIHandle::GetArchiveInformation(void * _hArchive, TPI_ARCHIVEINFO * _aiInfo) +{ + if (! this->lib.HasSymbol(wxT("GetArchiveInformation")) || ! _aiInfo) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("GetArchiveInformation")); + if (! p) + { + return -1; + } + + // Initialization. + _aiInfo->fSolid = false; + _aiInfo->fMMOptimize = false; + _aiInfo->fEncryptData = false; + _aiInfo->fEncryptHeader = false; + _aiInfo->sCompressLevel = 0; + _aiInfo->sRecoveryRecord= 0; + _aiInfo->tmAccess = 0; + _aiInfo->tmCreate = 0; + _aiInfo->tmModified = 0; + _aiInfo->nSFXType = 0; + _aiInfo->uOSType = 0; + _aiInfo->llFileSize = 0; + _aiInfo->llPackedSize = 0; + _aiInfo->llReadSize = 0; + _aiInfo->llUnpackedSize = 0; + _aiInfo->llSplitSize = 0; + _aiInfo->szComment = wxEmptyString; + _aiInfo->wCompressRatio = 0; + _aiInfo->pCustomInfo = NULL; + + return ((int (__stdcall *)(void *, TPI_ARCHIVEINFO *)) p)(_hArchive, _aiInfo); +} + +int TPIHandle::Command(unsigned int _uCommand, TPI_SWITCHES * _swInfo, const wxString & _szArcName, const wxArrayString & _szFiles) +{ + if (! this->lib.HasSymbol(wxT("Command"))) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("Command")); + if (! p) + { + return -1; + } + + return ((int (__stdcall *)(unsigned int, TPI_SWITCHES *, const wxString &, const wxArrayString &)) p)(_uCommand, _swInfo, _szArcName, _szFiles); +} + +int TPIHandle::SetCallbackProc(TPI_PROC _prProc) +{ + if (! this->lib.HasSymbol(wxT("SetCallbackProc"))) + { + return -1; + } + void * p = this->lib.GetSymbol(wxT("SetCallbackProc")); + if (! p) + { + return -1; + } + + return ((int (__stdcall *)(TPI_PROC)) p)(_prProc); +} diff --git a/src/common/handle/TPIHandle.h b/src/common/handle/TPIHandle.h new file mode 100644 index 0000000..aea42f4 --- /dev/null +++ b/src/common/handle/TPIHandle.h @@ -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 + +//****************************************************************************** +// 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 index 0000000..d834932 --- /dev/null +++ b/src/common/header/Doxyfile @@ -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 , where is the value of +# the FILE_VERSION_FILTER tag, and 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 , where +# is the value of the INPUT_FILTER tag, and 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 +# Qt Help Project / Namespace. + +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 +# Qt Help Project / Virtual Folders. + +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 index 0000000..f71799d --- /dev/null +++ b/src/common/header/Makefile @@ -0,0 +1,10 @@ +# Makefile. +# $Id: Makefile,v 1.3 2009/08/22 07:18:18 sirakaba Exp $ + +.PHONY: all clean + +all: Doxyfile plugin.h + doxygen $^ + +clean: + rm -f -r ../../../doc/api diff --git a/src/common/header/plugin-extra.h b/src/common/header/plugin-extra.h new file mode 100644 index 0000000..8eda0e8 --- /dev/null +++ b/src/common/header/plugin-extra.h @@ -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 index 0000000..e6627b1 --- /dev/null +++ b/src/common/header/plugin.def @@ -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 index 0000000..01c1ccd --- /dev/null +++ b/src/common/header/plugin.h @@ -0,0 +1,462 @@ +/** + * @file plugin.h + * @brief プラグインで読み込むTPI共通ヘッダ。 + * @version $Id: plugin.h,v 1.5 2009/08/28 12:41:29 sirakaba Exp $ + * + * @mainpage TPI reference manual + * TPIは簡易でマルチプラットフォームなプラグイン仕様です。仕様は現在策定中であるため、今後改訂される可能性があります。 + */ +/******************************************************************************* + 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 +*******************************************************************************/ + +#define wxUSE_UNICODE 1 +#include +#include + +#ifndef __TPI_API_SPEC +#define __TPI_API_SPEC + +#ifdef __GNUC__ +#define __stdcall __attribute__((__stdcall__)) +#endif + +// ***************************************************************************** +/// @defgroup constants 定数 +/// @{ +// ***************************************************************************** + +/** + * @defgroup c_error エラーコード + * 各APIを実行した場合に返される、異常の理由を表す一意の数値。 + * @{ + */ +/** 異常が発生せず、正常に処理を終了した。 */ +#define TPI_ERROR_SUCCESS TRUE + +/** + * @defgroup c_error_undefined 未定義エラー + * TPIとしては未定義の、各プラグイン独自のエラーを表す。 + * @{ + */ +/** 未定義エラーの基本値。 */ +#define TPI_ERROR_UNDEFINED 2000 +#define TPI_ERROR_U_LOAD_LIBRARY TPI_ERROR_UNDEFINED + 1 /**< 処理ライブラリの初期化に失敗した。 */ +#define TPI_ERROR_U_USE_LIBRARY TPI_ERROR_UNDEFINED + 2 /**< 処理ライブラリの使用時に問題が発生した。 */ +#define TPI_ERROR_U_FREE_LIBRARY TPI_ERROR_UNDEFINED + 3 /**< 処理ライブラリの解放に失敗した。 */ +/** @} c_error_undefined */ + +/** + * @defgroup c_error_defined 定義済エラー + * TPIとして定義されたエラーを表す。 + * @{ + */ +/** 定義済みエラーの基本値。 */ +#define TPI_ERROR_DEFINED 3000 +#define TPI_ERROR_D_PARAMETER TPI_ERROR_DEFINED + 1 /**< APIに渡された引数が不正であった。 */ +#define TPI_ERROR_D_UNSUPPORTED TPI_ERROR_DEFINED + 2 /**< 対応していないAPIである。もしくは、APIの動作のうち対応していないものを実行しようとした。 */ +#define TPI_ERROR_D_SKIPPED TPI_ERROR_DEFINED + 3 /**< コールバック関数が、APIに処理を中止するよう指示した。 */ +#define TPI_ERROR_D_OUTOFMEMORY TPI_ERROR_DEFINED + 4 /**< 処理中にメモリが不足し、確保できなくなった。 */ +#define TPI_ERROR_D_USEMEMORY TPI_ERROR_DEFINED + 5 /**< メモリを使用/解放する際に問題が発生した。 */ + +/** + * @defgroup c_error_defined_io I/Oエラー + * 各種I/Oエラーを表す。実際に返される数値は plugin-extra.h に定義されている定数を参照。 + * @{ + * @defgroup c_error_defined_io_target I/O対象ファイル + * I/Oエラーの対象となったファイルを表す。 + * @{ + */ +#define TPI_ERROR_T_IO_MISC 0 /**< 不明 */ +#define TPI_ERROR_T_IO_ARCHIVE TPI_ERROR_T_IO_MISC + 100 /**< 書庫 */ +#define TPI_ERROR_T_IO_FILE TPI_ERROR_T_IO_MISC + 200 /**< 通常ファイル */ +#define TPI_ERROR_T_IO_WORKING TPI_ERROR_T_IO_MISC + 300 /**< 中間ファイル */ +#define TPI_ERROR_T_IO_DIRECTORY TPI_ERROR_T_IO_MISC + 400 /**< ディレクトリ */ +/** @} c_error_defined_io_target */ + +#define TPI_ERROR_IO_MISC 4000 /**< その他/不明なI/Oエラー。 */ +#define TPI_ERROR_IO_NOTFOUND TPI_ERROR_IO_MISC + 1 /**< ファイルが存在しない。 */ +#define TPI_ERROR_IO_ACCESS TPI_ERROR_IO_MISC + 2 /**< ファイルにアクセスできない。共有違反が発生した。 */ +#define TPI_ERROR_IO_OPEN TPI_ERROR_IO_MISC + 3 /**< ファイルを開くことに失敗した。 */ +#define TPI_ERROR_IO_CLOSE TPI_ERROR_IO_MISC + 4 /**< ファイルを閉じることに失敗した。 */ +#define TPI_ERROR_IO_READ TPI_ERROR_IO_MISC + 5 /**< ファイルからデータを読み込めない。 */ +#define TPI_ERROR_IO_WRITE TPI_ERROR_IO_MISC + 6 /**< ファイルにデータを書き込めない。 */ +#define TPI_ERROR_IO_GETINFO TPI_ERROR_IO_MISC + 7 /**< ファイルから各種の情報を取得することに失敗した。 */ +#define TPI_ERROR_IO_POINT TPI_ERROR_IO_MISC + 8 /**< ファイル内のポインタ移動に失敗した。 */ +#define TPI_ERROR_IO_COPY TPI_ERROR_IO_MISC + 9 /**< ファイルのコピーに失敗した。 */ +#define TPI_ERROR_IO_MOVE TPI_ERROR_IO_MISC + 10 /**< ファイルの移動に失敗した。 */ +#define TPI_ERROR_IO_DELETE TPI_ERROR_IO_MISC + 11 /**< ファイルの削除に失敗した。 */ +#define TPI_ERROR_IO_SETINFO TPI_ERROR_IO_MISC + 12 /**< ファイルに各種の情報を設定することに失敗した。 */ + +#define TPI_ERROR_ARC_MISC TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + 20 /**< 書庫に関するエラーの基本値。 */ +#define TPI_ERROR_ARC_UNSUPPORTED TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_MISC + 1 /**< 書庫に対応していない。 */ +#define TPI_ERROR_ARC_ENCRYPTED TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_MISC + 2 /**< 書庫が暗号化されている。 */ +#define TPI_ERROR_ARC_BROKEN_MISC TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + 30 /**< 書庫の破損に関するエラーの基本値。 */ +#define TPI_ERROR_ARC_BROKEN_SUM TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_BROKEN_MISC + 1 /**< チェックサムが一致しない。 */ +#define TPI_ERROR_ARC_BROKEN_SIZE TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_BROKEN_MISC + 2 /**< ファイルサイズが一致しない。 */ +#define TPI_ERROR_ARC_BROKEN_HEADER TPI_ERROR_IO_MISC + TPI_ERROR_T_IO_ARCHIVE + TPI_ERROR_ARC_BROKEN_MISC + 3 /**< ヘッダが破損している。 */ +/** @} c_error_defined_io */ +/** @} c_error_defined */ +/** @} c_error */ + +/** + * @defgroup c_info 情報コード + * GetPluginInformation() で、プラグインに関する情報を取得する時に用いる、情報を表す一意の数値。 + * @{ + */ +#define TPI_INFO_VERSION_MAJOR 0x0001 /**< プラグインのメジャーバージョン */ +#define TPI_INFO_VERSION_MINOR 0x0002 /**< プラグインのマイナーバージョン */ +#define TPI_INFO_VERSION_API 0x0003 /**< プラグインが対応するAPIのバージョン */ +#define TPI_INFO_SUPPORTED_TYPE 0x0004 /**< プラグインが格納に対応している形式名 */ +#define TPI_INFO_SUPPORTED_SUFFIX 0x0005 /**< プラグインが格納に対応している拡張子 */ +/** @} c_info */ + +/** + * @defgroup c_command コマンドコード + * Command() で処理する内容を指定する一意の数値。 + * @{ + */ +#define TPI_COMMAND_ADD 0x0001 /**< 書庫にファイルを格納する */ +#define TPI_COMMAND_EXTRACT 0x0002 /**< 書庫からファイルを展開する */ +#define TPI_COMMAND_DELETE 0x0003 /**< 書庫からファイルを削除する */ +#define TPI_COMMAND_UPDATE 0x0004 /**< 書庫のファイルを更新する */ +#define TPI_COMMAND_TEST 0x0005 /**< 書庫のファイルを検査する */ +#define TPI_COMMAND_REPAIR 0x0006 /**< 書庫のファイルを修復する */ +#define TPI_COMMAND_MOVE 0x0007 /**< 書庫のファイルを移動する */ +#define TPI_COMMAND_SFX 0x0011 /**< 書庫をSFXに変換する */ +#define TPI_COMMAND_UNSFX 0x0012 /**< 書庫をSFXから通常の書庫に変換する */ +/** @} c_command */ + +/** + * @defgroup c_process 処理コード + * コールバック関数にて対象となる処理を通知する一意の数値。 + * @sa TPI_PROC + * @{ + */ +/** 共通メッセージ。通常の処理に対して送信される。 */ +/** @sa c_process_common */ +#define TPI_NOTIFY_COMMON 0x0001 +#define TPI_NOTIFY_SETPARAM 0x0002 /**< パラメータ設定。任意のパラメータが要求する場合に送信される。 */ +/** @} c_process */ + +/** + * @defgroup c_process_common イベントコード + * TPI_NOTIFY_COMMON 送信時に、TPI_PROCESSINFO 構造体の uMessage に格納される値。 + * @sa TPI_NOTIFY_COMMON + * @sa TPI_PROCESSINFO::uMessage + * @{ + */ +/** 進捗状況についての情報を TPI_PROCESSINFO に格納。 */ +/** @sa c_process_common_status */ +/** @sa TPI_PROCESSINFO */ +#define TPI_MESSAGE_STATUS 0x0001 +/** 処理中に続行不可能なエラーが発生した。 */ +/** @sa c_error */ +#define TPI_MESSAGE_ERROR 0x0002 +#define TPI_MESSAGE_WARNING 0x0003 /**< 処理中に続行可能な警告が発生した。 */ +/** @} c_process_common */ + +/** + * @defgroup c_process_common_status 進捗状況コード + * TPI_MESSAGE_STATUS が送信された時に、TPI_PROCESSINFO 構造体の uStatus に格納される値。 + * @sa TPI_MESSAGE_STATUS + * @sa TPI_PROCESSINFO::uStatus + * @{ + */ +#define TPI_STATUS_OPENARCHIVE 0x0001 /**< 書庫を開いた。 */ +#define TPI_STATUS_CLOSEARCHIVE 0x0002 /**< 書庫を閉じた。 */ +#define TPI_STATUS_SEEKFILE 0x0003 /**< 対象ファイルを検索している。 */ +#define TPI_STATUS_BEGINPROCESS 0x0004 /**< 処理を開始した。 */ +#define TPI_STATUS_INPROCESS 0x0005 /**< 処理中である。 */ +#define TPI_STATUS_ENDPROCESS 0x0006 /**< 処理を終了した。 */ +#define TPI_STATUS_TESTARCHIVE 0x0007 /**< 書庫を検査中。 */ +#define TPI_STATUS_COPYARCHIVE 0x0008 /**< 書庫を移動/複製中。 */ +/** @} c_process_common_status */ + +/** + * @defgroup c_callback_return コールバック関数の返し値 + * コールバック関数の終了時に、返し値として指定し、処理の続行について指示する値。 + * @sa TPI_PROC + * @{ + */ +#define TPI_CALLBACK_CONTINUE TRUE /**< 処理を続行する。 */ +#define TPI_CALLBACK_CANCEL 0x1000 /**< 処理を中断する。 */ +#define TPI_CALLBACK_UNSUPPORTED 0x1001 /**< 処理を無視した。不明な処理である。 */ +/** @} c_callback_return */ + +/** + * @defgroup c_file_attribute ファイル属性コード + * TPI_FILEINFO 構造体の dwAttribute に格納される、ファイルの属性を表す値。 + * @sa TPI_FILEINFO::dwAttribute + * @{ + */ +#define TPI_ATTRIBUTE_READONLY 0x00000001 /**< 読み取り専用。 */ +#define TPI_ATTRIBUTE_HIDDEN 0x00000002 /**< 隠しファイル。 */ +#define TPI_ATTRIBUTE_SYSTEM 0x00000004 /**< システムファイル。 */ +#define TPI_ATTRIBUTE_DIRECTORY 0x00000010 /**< ディレクトリ。 */ +#define TPI_ATTRIBUTE_ARCHIVE 0x00000020 /**< アーカイブ。 */ +#define TPI_ATTRIBUTE_ENCRYPTED 0x00004000 /**< 暗号化ファイル。 */ +/** @} c_file_attribute */ +/// @} constants + +// ***************************************************************************** +/// @defgroup structures 構造体 +/// @{ +// ***************************************************************************** + +#pragma pack(1) +/** ライブラリについての情報を格納する構造体。 */ +typedef struct _TPI_tagLIBINFO +{ + wxFileName fnLibrary; /**< ファイル名 */ + wxString szTypeName; /**< 形式名 */ + wxString szSuffix; /**< 拡張子 */ + wxULongLong llFileId; /**< 一意のファイルID */ +} TPI_LIBINFO; + +/** 特定ファイルについての情報を格納する構造体。 */ +typedef struct _TPI_tagFILEINFO +{ + /** 属性。 */ + /** @sa c_file_attribute */ + unsigned long dwAttribute; + unsigned long dwCRC32; /**< CRC32。 */ + wxDateTime tmAccess; /**< 最終参照日時 */ + wxDateTime tmCreate; /**< 作成日時 */ + wxDateTime tmModified; /**< 最終更新日時 */ + unsigned int uOSType; /**< 作成元OS */ + wxULongLong llPackedSize; /**< 格納後のサイズ */ + wxULongLong llUnpackedSize; /**< 格納前のサイズ */ + wxFileName fnFileName; /**< ファイル名 */ + wxString szStoredName; /**< 格納された名前 */ + wxString szMethod; /**< 格納メソッド */ + unsigned short wCompressRatio; /**< 圧縮率 */ + wxULongLong llFileID; /**< 一意のファイルID */ + void * pCustomInfo; /**< 任意の情報を格納 */ +} TPI_FILEINFO; + +/** 書庫についての情報を格納する構造体。 */ +typedef struct _TPI_tagARCHIVEINFO +{ + bool fSolid; /**< Solid圧縮されているならtrue */ + bool fMMOptimize; /**< マルチメディアファイルに最適化されているならtrue */ + bool fEncryptData; /**< データが暗号化されているならtrue */ + bool fEncryptHeader; /**< ヘッダが暗号化されているならtrue */ + short sCompressLevel; /**< 圧縮レベル(0-9) */ + short sRecoveryRecord; /**< リカバリーレコード(0-100) */ + wxDateTime tmAccess; /**< 最終参照日時 */ + wxDateTime tmCreate; /**< 作成日時 */ + wxDateTime tmModified; /**< 最終更新日時 */ + int nSFXType; /**< SFXの種類を表す一意の値 */ + unsigned int uOSType; /**< 作成元OS */ + wxULongLong llFileSize; /**< ファイルサイズ */ + wxULongLong llPackedSize; /**< 格納後のサイズ */ + wxULongLong llReadSize; /**< 読み込み済みサイズ */ + wxULongLong llUnpackedSize; /**< 格納前のサイズ */ + wxULongLong llSplitSize; /**< 分割サイズ */ + wxFileName fnArchive; /**< ファイル名 */ + wxString szComment; /**< コメント */ + unsigned short wCompressRatio; /**< 圧縮率 */ + void * pCustomInfo; /**< 任意の情報を格納 */ +} TPI_ARCHIVEINFO; + +/** 処理についての基本情報を格納する構造体。 */ +typedef struct _TPI_tagSWITCHES +{ + bool fStoreDirectoryPathes; /**< パス情報を格納するならtrue */ + bool fMakeSFX; /**< SFXを作成するならtrue */ + bool fSolid; /**< Solid圧縮をするならtrue */ + bool fMMOptimize; /**< マルチメディアファイルに最適化するならtrue */ + bool fEncryptHeader; /**< ヘッダを暗号化するならtrue */ + wxFileName fnDestinationDirectory; /**< 出力先ディレクトリ */ + short sCompressLevel; /**< 圧縮レベル(0-9) */ + short sRecoveryRecord; /**< リカバリーレコード(0-100) */ + wxULongLong llSplitSize; /**< 分割サイズ(0のときは分割しない) */ + wxString szPassword; /**< パスワード */ + wxString szKeyFile; /**< キーファイル */ + wxString szComment; /**< コメント */ + int eArchiveType; /**< 書庫形式を表す一意の数値 */ + void * pCustomSwitches; /**< 任意の情報を格納 */ +} TPI_SWITCHES; + +/** 処理についての通知情報を格納する構造体。 */ +typedef struct _TPI_tagPROCESSINFO +{ + /** イベントコード。 */ + /** @sa c_process_common */ + unsigned int uMessage; + /** 進捗状況コード。 */ + /** @sa c_process_common_status */ + unsigned int uStatus; + TPI_FILEINFO fiInfo; /**< 処理中のファイルに関する情報 */ + wxULongLong llProcessedSize; /**< 処理済サイズ */ + wxFileName fnDestination; /**< 出力先ファイル */ + void * pCustomInfo; /**< 任意の情報を格納 */ +} TPI_PROCESSINFO; + +/// @} structures + +// ***************************************************************************** +/// @defgroup callback コールバック関数 +/// @{ +// ***************************************************************************** + +/** コールバック関数 + * @param _uMsg 処理コード。 + * @param _pInfo 処理コードにより異なる。 + * @return コールバック関数の返し値。 + * @sa c_process + * @sa c_callback_return + */ +typedef int(__stdcall * TPI_PROC)(unsigned int _uMsg, void * _pInfo); + +/// @} callback + +#pragma pack() + +// ***************************************************************************** +/// @defgroup functions API +/// @{ +// ***************************************************************************** + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** プラグインに関する情報を取得。 + * @param _uInfoId 取得する情報を示す数値(情報コード)。 + * @param _llSubOption 情報コードにより異なる。 + * @param _pPtr 結果を格納するバッファへのポインタ。 + * @return エラーコード。 + * @sa c_info + */ +int __stdcall GetPluginInformation +( + unsigned int _uInfoId, + wxULongLong _llSubOption, + void * _pPtr +); + +/** プラグインを使用するための初期化を行う。 + * @param _szArcName これから操作する対象となる書庫名。不明な場合はNULLを指定。 + * @param _llSubOption 書庫を作成する場合には、その格納形式IDを指定。それ以外の場合は0。 + * @return エラーコード。 + */ +int __stdcall LoadPlugin +( + const wxString & _szArcName, + wxULongLong _llSubOption +); + +/** プラグインを解放する。 + * @param _pReserved 予約済み。現状では常にNULL。 + * @return エラーコード。 + */ +int __stdcall FreePlugin +( + void * _pReserved +); + +/** プラグインが対応しているファイルかどうか確認する。 + * @param _szArcName 確認する対象となる書庫名。 + * @param _nFileCount 書庫に格納されているファイル数を格納するためのポインタ。情報が不要ならばNULLを指定。 + * @return エラーコード。 + */ +int __stdcall CheckArchive +( + const wxString & _szArcName, + int * _nFileCount +); + +/** 書庫のハンドルを取得する。 + * @param _szArcName 操作する対象となる書庫名。 + * @param _hArchive 取得したハンドルを格納するためのポインタ。 + * @return エラーコード。 + */ +int __stdcall OpenArchive +( + const wxString & _szArcName, + void * * _hArchive +); + +/** 書庫のハンドルを解放する。 + * @param _hArchive 操作する対象となる書庫ハンドル。 + * @return エラーコード。 + */ +int __stdcall CloseArchive +( + void * _hArchive +); + +/** 書庫に格納されているファイルの情報を順に取得する。 + * @param _hArchive 操作する対象となる書庫ハンドル。 + * @param _fiInfo 取得した情報を格納するためのポインタ。 + * @param _bFirst 最初のファイルから情報を取得する場合にはTRUE。 + * @return エラーコード。 + */ +int __stdcall GetFileInformation +( + void * _hArchive, + TPI_FILEINFO * _fiInfo, + bool _bFirst +); + +/** 書庫の情報を順に取得する。 + * @param _hArchive 操作する対象となる書庫ハンドル。 + * @param _aiInfo 取得した情報を格納するためのポインタ。 + * @return エラーコード。 + */ +int __stdcall GetArchiveInformation +( + void * _hArchive, + TPI_ARCHIVEINFO * _aiInfo +); + +/** 各種の書庫操作を行う。 + * @param _uCommand 書庫操作の種類を表すコマンドコード。 + * @param _swInfo 書庫操作に必要な情報を格納した構造体へのポインタ。 + * @param _szArcName 操作する対象となる書庫名。 + * @param _szFiles ファイル名を指定する改行(Â¥n)区切りリスト。 + * @return エラーコード。 + * @sa c_command + */ +int __stdcall Command +( + unsigned int _uCommand, + TPI_SWITCHES * _swInfo, + const wxString & _szArcName, + const wxArrayString & _szFiles +); + +/** Command() 実行中に処理の進捗状況を送信するコールバック関数を指定する。 + * @param _prArcProc コールバック関数へのポインタ。 + * @return エラーコード。 + */ +int __stdcall SetCallbackProc +( + TPI_PROC _prArcProc +); + +#ifdef __cplusplus +} +#endif + +/// @} functions + +#endif /* __TPI_API_SPEC */ diff --git a/src/common/library/library.cpp b/src/common/library/library.cpp new file mode 100644 index 0000000..69e8f24 --- /dev/null +++ b/src/common/library/library.cpp @@ -0,0 +1,185 @@ +/******************************************************************************* + 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: library.cpp,v 1.10 2009/09/27 13:42:33 sirakaba Exp $ +*******************************************************************************/ + +//****************************************************************************** +// Includes +//****************************************************************************** + +#include "library.h" + +//****************************************************************************** +// Functions +//****************************************************************************** + +wxString ProcessBoolLoop(bool b, wxString szCommandLine, size_t * nPos, wxString szVal, bool fIf) +{ + wxString szCommandLineSend; + size_t i = * nPos; + for (i++; i < szCommandLine.Len() && szCommandLine[i] != (fIf ? wxT('|') : wxT('}')); i++) + { + if (fIf ? b : ! b) + { + szCommandLineSend += szCommandLine[i] == wxT('#') ? szVal : szCommandLine[i]; + } + } + * nPos = i; + return szCommandLineSend; +} + +wxString ProcessBool(bool b, wxString szCommandLine, size_t * nPos, wxString szVal = wxEmptyString) +{ + wxString szCommandLineSend; + size_t i = * nPos; + if (szCommandLine[++i] == wxT('{')) + { + // ðŒ”»•ÊB + szCommandLineSend += ProcessBoolLoop(b, szCommandLine, & i, szVal, true); + szCommandLineSend += ProcessBoolLoop(b, szCommandLine, & i, szVal, false); + } + else + { + // bool’l‚ð•Ô‹pB + szCommandLineSend += b ? wxT('1') : wxT('0'); + i--; + } + * nPos = i; + return szCommandLineSend; +} + +wxString MakeCommandLineSend(wxString szCommandLine, wxString szArcName, TPI_SWITCHES * swInfo, wxArrayString asFiles, wxString szResponceFileName) +{ + // ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“•Ï”‚ð·‚µ‘Ö‚¦B + wxString szCommandLineSend; + for (size_t i = 0; i < szCommandLine.Len(); i++) + { + if (szCommandLine[i] == wxT('%')) + { + // •Ï”‰ðÍŠJŽnB + switch (szCommandLine[++i]) + { + case wxT('%'): + // “ÁŽê•¶ŽšB + szCommandLineSend += szCommandLine[i]; + break; + case wxT('9'): + switch (szCommandLine[++i]) + { + // 0: ‘ŒÉ–¼ + // 1: o—͐æ + // 2: ƒŒƒXƒ|ƒ“ƒXƒtƒ@ƒCƒ‹ + // 3: ƒtƒ@ƒCƒ‹ƒŠƒXƒg + // 4: ˆ³kƒŒƒxƒ‹ + // 5: ƒŠƒJƒoƒŠ[ƒŒƒR[ƒh + // 6: ƒRƒƒ“ƒg + case wxT('0'): szCommandLineSend += szArcName; break; + case wxT('1'): szCommandLineSend += swInfo->fnDestinationDirectory.GetPathWithSep(); break; + case wxT('2'): szCommandLineSend += szResponceFileName; break; + case wxT('3'): + for (size_t j = 0; j < asFiles.GetCount(); j++) + { + szCommandLineSend += wxT("\"") + asFiles[j] + wxT("\" "); + } + break; + case wxT('4'): szCommandLineSend += wxString::Format(wxT("%d"), swInfo->sCompressLevel); break; + case wxT('5'): szCommandLineSend += wxString::Format(wxT("%d"), swInfo->sRecoveryRecord); break; + case wxT('6'): szCommandLineSend += swInfo->szComment; break; + } + break; + case wxT('a'): + switch (szCommandLine[++i]) + { + // 0: ƒpƒX‚ð—LŒø‚É‚·‚é‚© + // 1: SFX‚ðì¬‚·‚é‚© + // 2: Solidˆ³k + // 3: MMÅ“K‰» + // 4: ƒwƒbƒ_ˆÃ†‰» + // 5: ƒpƒXƒ[ƒh + // 6: ƒL[ƒtƒ@ƒCƒ‹ + // 7: •ªŠ„ƒTƒCƒY + case wxT('0'): szCommandLineSend += ProcessBool(swInfo->fStoreDirectoryPathes, szCommandLine, & i); break; + case wxT('1'): szCommandLineSend += ProcessBool(swInfo->fMakeSFX, szCommandLine, & i); break; + case wxT('2'): szCommandLineSend += ProcessBool(swInfo->fSolid, szCommandLine, & i); break; + case wxT('3'): szCommandLineSend += ProcessBool(swInfo->fMMOptimize, szCommandLine, & i); break; + case wxT('4'): szCommandLineSend += ProcessBool(swInfo->fEncryptHeader, szCommandLine, & i); break; + case wxT('5'): szCommandLineSend += ProcessBool(swInfo->szPassword != wxEmptyString,szCommandLine, & i, swInfo->szPassword); break; + case wxT('6'): szCommandLineSend += ProcessBool(swInfo->szKeyFile != wxEmptyString,szCommandLine, & i, swInfo->szKeyFile); break; + case wxT('7'): szCommandLineSend += ProcessBool(swInfo->llSplitSize != 0, szCommandLine, & i, swInfo->llSplitSize.ToString()); break; + } + break; + } + } + else + { + szCommandLineSend += szCommandLine[i]; + } + } + + return szCommandLineSend; +} + +wxString MakeResponceFile(wxArrayString asFiles, bool bQuote) +{ + wxFile fListFile; + wxString szFileName = wxFileName::CreateTempFileName(wxT("__listfile"), & fListFile); + if (szFileName.IsEmpty()) + { + return wxEmptyString; + } + + // ƒtƒ@ƒCƒ‹ƒŠƒXƒg‘‚«ž‚ݏˆ—B + if (asFiles.GetCount() == 0) + { + fListFile.Write(wxT("*")); + } + else + { + // –ˆ‰ñˆø—p•„‚ÅŠ‡‚Á‚ďˆ—‚·‚éB + for (size_t i = 0; i < asFiles.GetCount(); i++) + { + // ÅŒã‚ɉüs‚ª‚ ‚é‚Æ“®ì‚ª‚¨‚©‚µ‚­‚È‚éê‡‚ª‚ ‚é–Í—lB + if (i != 0) + { +#ifdef __WINDOWS__ + fListFile.Write(wxT("\r\n")); +#else + fListFile.Write(wxT("\n")); +#endif + } + fListFile.Write((bQuote ? wxT("\"") : wxEmptyString) + asFiles[i] + (bQuote ? wxT("\"") : wxEmptyString)); + } + } + fListFile.Close(); + + return szFileName; +} + +wxString MB2String(const char * sz) +{ +// wxString szTemp(sz, wxConvLibc); + wxString szTemp(sz, wxConvUTF8); + return szTemp; +} + +wxString WC2String(const wchar_t * sz) +{ + wxString szTemp((wchar_t *) sz, wxConvUTF8); + return szTemp; +} diff --git a/src/common/library/library.h b/src/common/library/library.h new file mode 100644 index 0000000..53d0cd9 --- /dev/null +++ b/src/common/library/library.h @@ -0,0 +1,36 @@ +/******************************************************************************* + 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: library.h,v 1.5 2009/09/27 10:11:13 sirakaba Exp $ +*******************************************************************************/ + +//****************************************************************************** +// Includes +//****************************************************************************** + +#include "../header/plugin.h" +#include + +//****************************************************************************** +// Functions +//****************************************************************************** + +wxString MakeCommandLineSend(wxString szCommandLine, wxString szArcName, TPI_SWITCHES * swInfo, wxArrayString asFiles, wxString szResponceFileName); +wxString MakeResponceFile(wxArrayString asFiles, bool bQuote); +wxString MB2String(const char * sz); +wxString WC2String(const wchar_t * sz); diff --git a/src/frontend/Makefile b/src/frontend/Makefile new file mode 100644 index 0000000..d62259c --- /dev/null +++ b/src/frontend/Makefile @@ -0,0 +1,27 @@ +# Makefile. +# $Id: Makefile,v 1.5 2009/08/22 13:31:54 sirakaba Exp $ + +# Define compilers. +CC = g++ +CPPFLAGS = -c -O3 -Wall -W `wx-config --cppflags` +LDFLAGS = -s `wx-config --libs` + +# Define i/o files. +DIR_OBJ = ../tmp +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 +OUT_EXE = ../../bin/frontend + +.PHONY: all clean +.SUFFIXES: .cpp .o + +all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS)) + $(CC) $(LDFLAGS) -o $(OUT_EXE) $(addprefix $(DIR_OBJ)/,$(OBJS)) + +clean: + rm -f -r $(DIR_OBJ) $(OUT_EXE) + +$(DIR_OBJ): + mkdir $(DIR_OBJ) + +$(DIR_OBJ)/%.o: %.cpp + $(CC) $(CPPFLAGS) -o $@ $< diff --git a/src/frontend/cls_filedroptarget.cpp b/src/frontend/cls_filedroptarget.cpp new file mode 100644 index 0000000..ba9b68a --- /dev/null +++ b/src/frontend/cls_filedroptarget.cpp @@ -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) +{ + // Å‰‚̃tƒ@ƒCƒ‹‚µ‚©ˆ—‚µ‚È‚¢B + // ‘ŒÉ‚ðŠJ‚­B + 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 index 0000000..e7f44f6 --- /dev/null +++ b/src/frontend/cls_filedroptarget.h @@ -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 + +//****************************************************************************** +// 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 index 0000000..1d5d7bc --- /dev/null +++ b/src/frontend/cls_listctrl.cpp @@ -0,0 +1,137 @@ +/******************************************************************************* + 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.cpp,v 1.6 2009/08/23 03:00:34 sirakaba Exp $ +*******************************************************************************/ + +#include "frontend.h" + +#include "cls_listctrl.h" +#include "dlg_make.h" +#include "frm_main.h" +#include "functions.h" + +//****************************************************************************** +// myListCtrl +//****************************************************************************** + +IMPLEMENT_DYNAMIC_CLASS(myListCtrl, wxListView) + +//****************************************************************************** +// Event Table. +//****************************************************************************** + +BEGIN_EVENT_TABLE(myListCtrl, wxListCtrl) + // ListView + EVT_LIST_COL_CLICK(XRCID("ListView"), myListCtrl::OnColClick) +END_EVENT_TABLE() + +//****************************************************************************** +// Event handler. +//****************************************************************************** + +wxString myListCtrl::OnGetItemText(long i, long column) const +{ + // ƒŠƒXƒgƒrƒ…[‚ɍ€–Ú‚ð’ljÁB + switch (column) + { + case 0: + return this->showFileInfo[i].fnFileName.GetFullName(); + case 1: + return this->showFileInfo[i].llUnpackedSize.ToString(); + case 2: + return this->showFileInfo[i].llPackedSize.ToString(); + case 3: + return wxString::Format(wxT("%3.1f%%"), this->showFileInfo[i].wCompressRatio / 10.0); + case 4: + return this->showFileInfo[i].szMethod; + case 5: + { + wxString szTemp = wxT("---w-"); + szTemp[0] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_DIRECTORY ? wxT('d') : + this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_ARCHIVE ? wxT('a') : wxT('-'); + szTemp[1] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_SYSTEM ? wxT('s') : wxT('-'); + szTemp[2] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_HIDDEN ? wxT('h') : wxT('-'); + szTemp[3] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_READONLY ? wxT('r') : wxT('w'); + szTemp[4] = this->showFileInfo[i].dwAttribute & TPI_ATTRIBUTE_ENCRYPTED ? wxT('g') : wxT('-'); + return szTemp; + } + case 6: + return this->showFileInfo[i].tmModified.Format(wxT("%Y/%m/%d %H:%M:%S")); + case 7: + return this->showFileInfo[i].fnFileName.GetPath(); + case 8: + return GetFileTypeName(this->showFileInfo[i].fnFileName); + case 9: + return wxString::Format(wxT("%d"), this->showFileInfo[i].llFileID.ToULong()); + default: + return wxEmptyString; + } +} + +int myListCtrl::OnGetItemImage(long i) const +{ + wxIcon icon = GetFileTypeIcon(this->showFileInfo[i].fnFileName); + g_hIconLL.Add(icon); + // wxGTK‚Å16x16‚̃AƒCƒRƒ“‚ª•\Ž¦‚Å‚«‚é‚悤ƒŠƒTƒCƒY‚µ‚Ä‚¨‚­B +#ifdef __WINDOWS__ + return g_hIconLS.Add(icon); +#else + return g_hIconLS.Add(icon.ConvertToImage().Rescale(16, 16)); +#endif +} + +void myListCtrl::OnColClick(wxListEvent& e) +{ + g_nSortingColumn = e.GetColumn(); + + // ƒ\[ƒgB + this->showFileInfo.Sort(& ListCtrlCompareProc); + this->SetItemCount(this->showFileInfo.Count()); + this->RefreshItems(0, this->showFileInfo.Count() - 1); +} + +//****************************************************************************** +// ”ˆ—ŠÖ” +//****************************************************************************** + +int ListCtrlCompareProc(TPI_FILEINFO ** pItem1, TPI_FILEINFO ** pItem2) +{ + TPI_FILEINFO * item1 = * pItem1, * item2 = * pItem2; + switch (g_nSortingColumn) + { + case 0:// Filename + return ::wxStricmp(item1->fnFileName.GetFullName(), item2->fnFileName.GetFullName()); + case 1:// Unpacked + return (item1->llUnpackedSize < item2->llUnpackedSize) ? -1 : ((item1->llUnpackedSize > item2->llUnpackedSize) ? 1 : 0); + case 2:// Packed + return (item1->llPackedSize < item2->llPackedSize) ? -1 : ((item1->llPackedSize > item2->llPackedSize) ? 1 : 0); + case 3:// Ratio + return (item1->wCompressRatio < item2->wCompressRatio) ? -1 : ((item1->wCompressRatio > item2->wCompressRatio) ? 1 : 0); + case 6:// Last Modified + return (item1->tmModified < item2->tmModified) ? -1 : ((item1->tmModified > item2->tmModified) ? 1 : 0); + case 7:// Path + return ::wxStricmp(item1->fnFileName.GetPath(), item2->fnFileName.GetPath()); + case 8:// Type + return ::wxStricmp(GetFileTypeName(item1->fnFileName), GetFileTypeName(item2->fnFileName)); + case 9:// No + return (item1->llFileID < item2->llFileID) ? -1 : ((item1->llFileID > item2->llFileID) ? 1 : 0); + default: + return 0; + } +} diff --git a/src/frontend/cls_listctrl.h b/src/frontend/cls_listctrl.h new file mode 100644 index 0000000..cb47652 --- /dev/null +++ b/src/frontend/cls_listctrl.h @@ -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 index 0000000..83e36b0 --- /dev/null +++ b/src/frontend/dlg_make.cpp @@ -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 + +//****************************************************************************** +// 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‚ÆŒ‹‚т‚¯B + // "General"ƒ^ƒu + 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"ƒ^ƒu + 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"ƒ^ƒu + this->tcComment = XRCCTRL(* this, "tcComment", wxTextCtrl); + // "Files"ƒ^ƒu + this->lcFiles = XRCCTRL(* this, "lcFiles", wxListCtrl); + + if (! this->cbDir->GetValue().IsEmpty()) + { + return; + } + + // ListCtrl‚É—ñ‚ð’ljÁB + 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")); + + // “WŠJŽž‚ÍŠeŽíƒRƒ“ƒgƒ[ƒ‹‚̏ó‘Ô‚ð•ÏX‚·‚éB + 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); + + // ‰Šú’l‚ðÝ’èB + wxFileName fnArchive(((MainFrame *) this->GetParent())->statusbar->GetStatusText(5)); + this->cbDir->SetValue(fnArchive.GetPath()); + this->cbFileName->SetValue(fnArchive.GetFullName()); + + // “WŠJæ‚ð—\‘ªB‚½‚¾‚µDTVƒXƒLƒƒƒ“‚ÉŽžŠÔ‚ª‚©‚©‚éê‡‚̓XƒLƒbƒv‰Â”\B + 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; + } + + // ƒ‰ƒCƒuƒ‰ƒŠ‚ðŒŸõB + TPIHandle tpi; + wxFileSystem fs; + fs.ChangePathTo(FE_DIR_B_LIB, true); + wxString szTPIName = fs.FindFirst(wxT("*" TPI_EXT), wxFILE); + while (! szTPIName.IsEmpty()) + { + // ƒ[ƒhB + if (tpi.InitLibrary(szTPIName, wxEmptyString, 0)) + { + // ‘Ήž‚·‚éŒ`Ž®–¼‚ðŽæ“¾B + 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"ƒ^ƒu‚Ì‚Æ‚«‚͏ˆ—B + bool bReallyShow = e.GetSelection() == 3; + if (abs(e.GetSelection()) != 3) + { + return; + } + + // "Files"ƒ^ƒu‚ð•\Ž¦‚·‚鏉‰ñ‚©‚Ç‚¤‚©B + if (bReallyShow && this->lcFiles->GetItemCount() == 0) + { + // ƒtƒ@ƒCƒ‹ƒŠƒXƒg‚ð’ljÁB + for (size_t i = 0; i < this->files.Count(); i++) + { + this->lcFiles->InsertItem(i, this->files[i]); + } + } + + if (bIsMake) + { + // Ši”[ƒpƒX‚𐄑ªB + for (size_t i = 0; i < this->files.Count(); i++) + { + if (bReallyShow) + { + this->lcFiles->SetItem(i, 1, this->files[i]); + } + } + } + else + { + // ƒtƒ@ƒCƒ‹‚̏o—͐æ‚𐄑ªB + wxString szOutputRootDir = WillMakeDirByArcName((MainFrame *) this->GetParent(), this) ? MakeDirPath(wxFileName::DirName(this->cbDir->GetValue()), this->cbFileName->GetValue(), false).GetPath() : this->cbDir->GetValue(); + + // Šeƒtƒ@ƒCƒ‹‚ɃpƒX‚ð•t‰ÁB + 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 index 0000000..5c4fd93 --- /dev/null +++ b/src/frontend/dlg_make.h @@ -0,0 +1,81 @@ +/******************************************************************************* + 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.h,v 1.8 2009/08/28 12:52:38 sirakaba Exp $ +*******************************************************************************/ + +#ifndef H_LOADED_DLG_MAKE +#define H_LOADED_DLG_MAKE + +#include +#include + +//****************************************************************************** +// Class (MakeDialog) +//****************************************************************************** + +class MakeDialog: public wxDialog { +public: + // "General"ƒ^ƒu + wxComboBox* cbDir; + wxComboBox* cbFileName; + wxCheckBox* cbOpenAfter; + wxCheckBox* cbIgnorePath; + wxCheckBox* cbExitAfter; + wxChoice* chType; + wxChoice* chDirMake; + // "Config"ƒ^ƒu + wxSpinCtrl* scLevel; + wxSpinCtrl* scRR; + wxTextCtrl* tcPassword; + wxTextCtrl* tcKeyfile; + wxComboBox* cbSplitSize; + wxCheckBox* cbUnmask; + wxCheckBox* cbEncryptHeader; + wxCheckBox* cbSolid; + wxCheckBox* cbMMOptimize; + wxCheckBox* cbMakeSFX; + // "Comment"ƒ^ƒu + wxTextCtrl* tcComment; + // "Files"ƒ^ƒu + wxListCtrl* lcFiles; + + wxArrayString libname; + wxArrayString defext; + wxArrayString files; + int nLibNum[513]; + bool bIsMake; + + MakeDialog(); + + // Event handler. + void OnInit( wxInitDialogEvent&); + void OnBtnDefault( wxCommandEvent&); + void OnBtnDesktop( wxCommandEvent&); + void OnBtnCurrent( wxCommandEvent&); + void OnBtnBrowse( wxCommandEvent&); + void OnBtnBrowseKF( wxCommandEvent&); + void OnBtnOK( wxCommandEvent&); + void OnBtnCancel( wxCommandEvent&); + void OnCbUnmask( wxCommandEvent&); + void OnTabChanged( wxNotebookEvent&); + + DECLARE_EVENT_TABLE() +}; + +#endif diff --git a/src/frontend/dlg_process.cpp b/src/frontend/dlg_process.cpp new file mode 100644 index 0000000..02e0497 --- /dev/null +++ b/src/frontend/dlg_process.cpp @@ -0,0 +1,135 @@ +/******************************************************************************* + 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.cpp,v 1.6 2009/09/01 12:20:49 sirakaba Exp $ +*******************************************************************************/ + +#include "frontend.h" +#include "dlg_process.h" + +bool g_fCancel = false; +ProcessDialog * g_procDlg = NULL; + +//****************************************************************************** +// ProcessDialog +//****************************************************************************** + +ProcessDialog::ProcessDialog(): wxDialog() +{ +} + +ProcessDialog::~ProcessDialog() +{ + g_procDlg = NULL; + g_fCancel = false; +} + +//****************************************************************************** +// Event table. +//****************************************************************************** + +BEGIN_EVENT_TABLE(ProcessDialog, wxDialog) + EVT_INIT_DIALOG( ProcessDialog::OnInit) + EVT_BUTTON(XRCID("btnCancel"), ProcessDialog::OnBtnCancel) +END_EVENT_TABLE() + +//****************************************************************************** +// Event handler. +//****************************************************************************** + +void ProcessDialog::OnInit(wxInitDialogEvent &) +{ + // XRC‚ÆŒ‹‚т‚¯B + this->ebSource = XRCCTRL(* this, "ebSource", wxTextCtrl); + this->ebTarget = XRCCTRL(* this, "ebTarget", wxTextCtrl); + this->gauge = XRCCTRL(* this, "gauge", wxGauge); + g_procDlg = this; + + ::wxXmlResource::Get()->Unload(FE_DIR_S_XRC wxT("dlg_process.xrc")); +} + +void ProcessDialog::OnBtnCancel(wxCommandEvent &) +{ + g_fCancel = true; + this->Close(true); +} + +//****************************************************************************** +// ƒ_ƒCƒAƒƒOƒvƒƒV[ƒWƒƒ +//****************************************************************************** + +int __stdcall TPICallbackProc(unsigned int _uMsg, void * _pStructure) +{ + if (_uMsg != TPI_NOTIFY_COMMON) + { + return TPI_CALLBACK_UNSUPPORTED; + } + + TPI_PROCESSINFO * piInfo = (TPI_PROCESSINFO *) _pStructure; + if (g_procDlg == NULL || piInfo == NULL || piInfo->uMessage != TPI_MESSAGE_STATUS || ! g_procDlg->IsShown()) + { + return TPI_CALLBACK_CONTINUE; + } + + static int s_nGaugeCounter = 0; + switch (piInfo->uStatus) + { + case TPI_STATUS_OPENARCHIVE: + g_procDlg->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath()); + break; + case TPI_STATUS_BEGINPROCESS: +// g_procDlg->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath()); + g_procDlg->ebTarget->ChangeValue(piInfo->fnDestination.GetFullPath()); + g_procDlg->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong()); + g_procDlg->gauge->SetValue(0); + g_procDlg->Update(); + break; + case TPI_STATUS_INPROCESS: + if (piInfo->fiInfo.llUnpackedSize > 10000 && s_nGaugeCounter++ > 100) + { + g_procDlg->gauge->SetValue(piInfo->llProcessedSize.ToULong()); + s_nGaugeCounter = 0; + } + break; + case TPI_STATUS_ENDPROCESS: + g_procDlg->gauge->SetValue(piInfo->fiInfo.llUnpackedSize.ToULong()); + break; + // ‘ŒÉƒ[ƒhŽž—p‚Ì“ÆŽ©Žd—lB + case 0x1000: + g_procDlg->ebSource->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath()); + g_procDlg->gauge->SetRange(piInfo->fiInfo.llUnpackedSize.ToULong()); + g_procDlg->gauge->SetValue(0); + break; + case 0x1001: + // XV‚µ‚·‚¬‚邃ᑬ‚È‚Ì‚Å100ƒtƒ@ƒCƒ‹–ˆ‚ɍXV‚·‚éB + if (piInfo->llProcessedSize > g_procDlg->gauge->GetValue() + 100) + { + g_procDlg->ebTarget->ChangeValue(piInfo->fiInfo.fnFileName.GetFullPath()); + g_procDlg->Update(); + } + break; + case 0x1002: + if (piInfo->llProcessedSize > g_procDlg->gauge->GetValue() + 100) + { + g_procDlg->gauge->SetValue(piInfo->llProcessedSize.ToULong()); + } + break; + } + + return g_fCancel ? TPI_CALLBACK_CANCEL : TPI_CALLBACK_CONTINUE; +} diff --git a/src/frontend/dlg_process.h b/src/frontend/dlg_process.h new file mode 100644 index 0000000..a6611c9 --- /dev/null +++ b/src/frontend/dlg_process.h @@ -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() +}; + +//****************************************************************************** +// ƒvƒƒV[ƒWƒƒ +//****************************************************************************** + +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 index 0000000..0d21d2d --- /dev/null +++ b/src/frontend/frm_main.cpp @@ -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 +#include + +WX_DEFINE_OBJARRAY(ArrayTPI_FILEINFO); + +#define SetMenuToolState(id, state) this->toolbar->EnableTool(XRCID(id), state); this->menubar->Enable(XRCID(id), state) + +//****************************************************************************** +// ƒOƒ[ƒoƒ‹•Ï” +//****************************************************************************** + +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); + + // Ý’è‚ð‹L˜^B + 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‚ÆŒ‹‚т‚¯B + 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); + + // Ý’è‚ð“ǂݍž‚݁B + 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); + + // ‰Šú’lÝ’èB + { + 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‚Å‚Í’¼ÚwxLC_VIRTUAL‚ðŽw’肵‚È‚¢‚Æ”½‰f‚³‚ê‚È‚¢B + 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); + + // ƒRƒ}ƒ“ƒhƒ‰ƒCƒ““ǂݍž‚݁B + 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"))) + { + // ‘ŒÉ‚ð“WŠJB + wxFileName fnArchive(this->cmdLine.GetParam(0)); + fnArchive.Normalize(wxPATH_NORM_ALL, this->szCurrentPath); + this->LoadArc(fnArchive.GetFullPath()); + this->OnArcExtract(e); + this->Close(true); + } + else + { + // ‘ŒÉ‚ðŠJ‚­B + 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) +{ + // ˆ—‘Ώۂ̃tƒ@ƒCƒ‹‚ð‘I‘ðB + 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; + } + // ‚±‚±‚ÅwxFileName::FileName‚ð—p‚¢‚Ä‚¢‚é‚̂́AŒã‚ŃfƒBƒŒƒNƒgƒŠ–¼‚ð•K—v‚Æ‚·‚éê‡‚ª‚ ‚邽‚߁B + // ‚ ‚Ü‚è‚æ‚¢Žd—l‚Å‚Í‚È‚¢‚ª“®‚­‚Ì‚Å‚Æ‚è‚ ‚¦‚¸•ú’uB + this->fnLastOpenPath = wxFileName::FileName(fdDlg.GetDirectory()); + + // ŠeŽíÝ’èB + TPI_SWITCHES swInfo; + swInfo.fnDestinationDirectory = wxFileName::DirName(this->fnLastOpenPath.GetFullPath()); + swInfo.pCustomSwitches = NULL; + this->statusbar->SetStatusText(swInfo.fnDestinationDirectory.GetFullPath(), 5); + + // ì¬ƒ_ƒCƒAƒƒO‚ðÝ’èB + 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()); + // ‘ŒÉ–¼‚̓tƒ@ƒCƒ‹–¼‚ÌŠg’£Žq‚æ‚è‘OA‚à‚µ‚­‚̓fƒBƒŒƒNƒgƒŠ–¼B + mkDlg.cbFileName->SetValue(mkDlg.files.GetCount() == 1 ? wxFileName::FileName(mkDlg.files[0]).GetName() : this->fnLastOpenPath.GetFullName()); + + // ƒ_ƒCƒAƒƒO‚ð•\Ž¦B + if (mkDlg.ShowModal() == wxID_CANCEL) + { + this->statusbar->SetStatusText(wxEmptyString, 5); + return; + } + this->statusbar->SetStatusText(wxEmptyString, 5); + + // ŠeŽíÝ’èB + 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‚ð“ǂݍž‚݁B + 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; + } + + // ˆ—‚ðs‚¤B + 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()) + { + // ì¬æ‚ðŠJ‚­B +#ifdef __WINDOWS__ + ::wxExecute(wxT("explorer ") + swInfo.fnDestinationDirectory.GetFullPath()); +#endif + } + + if (mkDlg.cbExitAfter->IsChecked()) + { + // I—¹B + this->Close(true); + } + + // I—¹‚µ‚È‚¢ê‡‚͏‘ŒÉ‚ðŠJ‚­B + this->OnArcClose(e); + this->LoadArc(fnArchive.GetFullPath()); +} + +void MainFrame::OnArcOpen(wxCommandEvent& e) +{ + // ‘ŒÉ‚ð‘I‘ðB + 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(); + } + + // ‘ŒÉ‚ð“ǂݍž‚݁B + this->OnArcClose(e); + this->LoadArc(szFileName); +} + +void MainFrame::OnArcClose(wxCommandEvent&) +{ + // ƒcƒŠ[ƒrƒ…[EƒŠƒXƒgƒrƒ…[Ý’èB + this->tree_ctrl->DeleteAllItems(); + this->list_ctrl->DeleteAllItems(); + this->list_ctrl->showFileInfo.Clear(); + + // ƒc[ƒ‹ƒo[Eƒƒjƒ…[ƒo[Ý’èB + 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) +{ + // ˆ—‘Ώۂ̃tƒ@ƒCƒ‹‚ð‘I‘ðB + 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); + + // ŠeŽíÝ’èB + 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); + + // ‘ŒÉ‚ðÄ“ǂݍž‚݁B + this->OnArcClose(e); + this->LoadArc(szArcName); +} + +void MainFrame::OnArcSFX(wxCommandEvent&) +{ + this->ConvertArc(true); +} + +void MainFrame::OnArcUnSFX(wxCommandEvent&) +{ + this->ConvertArc(false); +} + +void MainFrame::OnArcExtract(wxCommandEvent&) +{ + // “WŠJƒ_ƒCƒAƒƒO‚ðì¬B + 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; + } + + // ŠeŽíÝ’èB + 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; + + // •K—v‚Ȃ珑ŒÉ–¼‚ŃfƒBƒŒƒNƒgƒŠ‚ðì¬‚·‚éB + 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()) + { + // “WŠJæ‚ðŠJ‚­B +#ifdef __WINDOWS__ + ::wxExecute(wxT("explorer ") + swInfo.fnDestinationDirectory.GetFullPath()); +#endif + } + + if (mkDlg.cbExitAfter->IsChecked()) + { + // I—¹B + this->Close(true); + } +} + +void MainFrame::OnArcDelete(wxCommandEvent& e) +{ + // ‘Sƒtƒ@ƒCƒ‹íœ‚͊댯‚Å‚Í‚È‚¢‚©‚ƁB + 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; + } + + // ŠeŽíÝ’èB + 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); + + // ‘ŒÉ‚ðÄ“ǂݍž‚Ý‚·‚éB + this->OnArcClose(e); + this->LoadArc(szArcName); +} + +void MainFrame::OnArcTest(wxCommandEvent&) +{ + // ŠeŽíÝ’èB + 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&) +{ + // ŠeŽíÝ’èB + 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) +{ + // ƒcƒŠ[ƒrƒ…[‚©‚çƒpƒX‚ðŽæ“¾B + wxString szNodePath = TreeView_GetItemPath(this->tree_ctrl, e.GetItem()); + // ƒŠƒXƒgƒrƒ…[‚ð‰Šú‰»B + this->list_ctrl->showFileInfo.Clear(); + g_hIconLL.RemoveAll(); + g_hIconLS.RemoveAll(); + + // ƒAƒCƒRƒ“Ý’èB + this->list_ctrl->SetImageList(& g_hIconLL, wxIMAGE_LIST_NORMAL); + this->list_ctrl->SetImageList(& g_hIconLS, wxIMAGE_LIST_SMALL); + + // ”z—ñ‚Æ”äŠr‚µAƒpƒX‚ªˆê’v‚µ‚È‚¯‚ê‚ΏÁ‚·B + for (size_t i = 0; i < this->fileinfo.GetCount(); i++) + { + // ƒpƒX‚ð”äŠrB + if (szNodePath == wxT("*") || szNodePath == this->fileinfo[i].fnFileName.GetPath()) + { + // €–Ú‚ªƒtƒHƒ‹ƒ_‚Å‚ ‚é‚È‚ç–³Ž‹B + 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]); + } + } + // ƒ\[ƒg‚µ‚Ä•\Ž¦B + this->list_ctrl->showFileInfo.Sort(& ListCtrlCompareProc); + this->list_ctrl->SetItemCount(this->list_ctrl->showFileInfo.Count()); +} + +// ListView + +void MainFrame::OnListItemDClick(wxListEvent&) +{ + // “WŠJ‘ÎÛ‚ðŒˆ’èB + wxArrayString files = MakeTargetFileList(this, true); + + // ƒRƒ}ƒ“ƒh‚ðŽæ“¾B + wxFileType * ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(wxFileName::FileName(files[0]).GetExt()); + if (! ftFile) + { + ::wxMessageBox(wxT("Fault: Unable to get the file type!")); + return; + } + + // ŠeŽíÝ’èB + 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); + + // ƒRƒ}ƒ“ƒh‚ðŽÀsB + wxString s = swInfo.fnDestinationDirectory.GetPathWithSep() + wxFileName::FileName(files[0]).GetFullName(); + if (nErrorCode == TPI_ERROR_SUCCESS) + { + ::wxExecute(ftFile->GetOpenCommand(s), wxEXEC_SYNC); + } + + // ˆêŽžƒfƒBƒŒƒNƒgƒŠ‚ðíœB + ::wxRemoveFile(s); + ::wxRmdir(swInfo.fnDestinationDirectory.GetFullPath()); +} + +void MainFrame::OnListBeginDrag(wxListEvent&) +{ + if (this->list_ctrl->GetSelectedItemCount() == 0) + { + // ƒAƒCƒeƒ€‚ð‘I‘ð‚¹‚¸ƒhƒ‰ƒbƒO‚µ‚悤‚Æ‚µ‚½ê‡B + return; + } + + // ŠeŽíÝ’èB + 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; + } + + // “WŠJ‘ÎÛ‚ðŒˆ’èB + wxFileDataObject objFile; + wxArrayString files = MakeTargetFileList(this, false); + for (size_t i = 0; i < files.Count(); i++) + { + // ƒŠƒXƒg‚ɒljÁB + 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‚Å‚Í‚Ü‚¾ˆ—‚ªI‚í‚Á‚Ä‚¢‚È‚¢(ƒRƒ“ƒeƒLƒXƒgƒƒjƒ…[‚ª•\Ž¦‚³‚ê‚Ä‚¢‚é)‚̂ŁA‚Æ‚è‚ ‚¦‚¸3•b‚¾‚¯‘҂B + sleep(3); +#endif + // ˆêŽžƒfƒBƒŒƒNƒgƒŠ‚ðíœB + wxArrayString szFileNames = objFile.GetFilenames(); + for (size_t i = 0; i < szFileNames.GetCount(); i++) + { + ::wxRemoveFile(szFileNames[i]); + } + ::wxRmdir(swInfo.fnDestinationDirectory.GetFullPath()); + } +} + +// ƒCƒxƒ“ƒgƒnƒ“ƒhƒ‰ˆÈŠOB + +void MainFrame::LoadArc(wxString szFileName) +{ + if (szFileName.IsEmpty()) + { + return; + } + + // TPI‚ð“ǂݍž‚݁B + wxFileSystem fs; + fs.ChangePathTo(FE_DIR_B_LIB, true); + wxString szTPIName = fs.FindFirst(wxT("*" TPI_EXT), wxFILE); + int nFileCount = -1; + while (! szTPIName.IsEmpty()) + { + // ‘ΉžŠm”FB + 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; + } + + // i’»ƒ_ƒCƒAƒƒO•\Ž¦B‚½‚¾‚µAƒtƒ@ƒCƒ‹”‚ª‘½‚¢‚Æ‚«‚Í‘¬“x‚ð—Dæ‚µ‚Ä•\Ž¦‚µ‚È‚¢B + 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); + + // Å‰‚̃R[ƒ‹ƒoƒbƒN‚𑗐MB + 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); + + // ‘ŒÉ‚ðŠJ‚­B + void * hArc = NULL; + if (tpi.OpenArchive(szFileName, & hArc) != TPI_ERROR_SUCCESS) + { + procDlg.Show(false); + tpi.FreeLibrary(); + ::wxMessageBox(wxT("Fault : OpenArchive()!")); + return; + } + + // ‰æ‘œƒŠƒXƒg‚ðì¬B + this->tree_ctrl->SetImageList(& g_hIconT); + this->tree_ctrl->AddRoot(wxEmptyString); + + // ‘ŒÉ‚̃AƒCƒRƒ“‚ðŽæ“¾‚µA‘ŒÉƒ‹[ƒg‚ðì¬B + 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 + + // ƒ‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚ðì¬B + 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); + + // ”z—ñ‚̃TƒCƒY‚ðŠm•ÛB + this->fileinfo.Alloc(nFileCount); + + // ƒtƒ@ƒCƒ‹î•ñ‚ðƒ[ƒhB + if (tpi.GetFileInformation(hArc, & piInfo.fiInfo, true) == TPI_ERROR_SUCCESS) + { + do + { + piInfo.uStatus = 0x1001; + piInfo.llProcessedSize++; + TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo); + + // ƒcƒŠ[ƒrƒ…[‚É”½‰fB + TreeView_CheckNewerItem(this->tree_ctrl, idArcRoot, piInfo.fiInfo.fnFileName.GetPath(wxPATH_GET_VOLUME), true); + + // ƒfƒBƒŒƒNƒgƒŠ‘®«‚ðŠÜ‚Þ‚à‚̂ɂ‚¢‚Ă͏œ‹ŽB + if (piInfo.fiInfo.dwAttribute & TPI_ATTRIBUTE_DIRECTORY) + { + continue; + } + + // î•ñ‚ð•Û‘¶‚µ‚ăJƒEƒ“ƒgƒAƒbƒvB + 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); + + // ‘ŒÉ‚̏î•ñ‚ðŽæ“¾B + 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); + + // ‘ŒÉ‚ð•Â‚¶‚éB + if (tpi.CloseArchive(hArc) != TPI_ERROR_SUCCESS) + { + ::wxMessageBox(wxT("Fault : CloseArchive()!")); + } + + // ƒR[ƒ‹ƒoƒbƒNŠÖ”‚ðÝ’èB + if (tpi.SetCallbackProc(TPICallbackProc) != TPI_ERROR_SUCCESS) + { + ::wxMessageBox(wxT("Fault : SetCallbackProc()!")); + } + + // UIŠeŽíÝ’èB + { + // ƒc[ƒ‹ƒo[Eƒƒjƒ…[ƒo[Ý’èB + 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) +{ + // •Û‘¶æ‚ðq‚Ë‚éB + 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 index 0000000..83c7553 --- /dev/null +++ b/src/frontend/frm_main.h @@ -0,0 +1,72 @@ +/******************************************************************************* + 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.h,v 1.10 2009/08/30 09:28:27 sirakaba Exp $ +*******************************************************************************/ + +#include +#include + +#ifndef H_LOADED_FRM_MAIN +#define H_LOADED_FRM_MAIN + +class MainFrame: public wxFrame { +public: + wxStatusBar* statusbar; + wxTreeCtrl* tree_ctrl; + myListCtrl* list_ctrl; + ArrayTPI_FILEINFO fileinfo; + TPIHandle tpi; + wxString szCurrentPath; + wxFileName fnLastOpenPath; + wxCmdLineParser cmdLine; + + // Event handler. + void OnInit( wxInitDialogEvent&); + void OnExit( wxCommandEvent&); + void OnArcCreate( wxCommandEvent&); + void OnArcOpen( wxCommandEvent&); + void OnArcClose( wxCommandEvent&); + void OnArcAdd( wxCommandEvent&); + void OnArcSFX( wxCommandEvent&); + void OnArcUnSFX( wxCommandEvent&); + void OnArcExtract( wxCommandEvent&); + void OnArcDelete( wxCommandEvent&); + void OnArcTest( wxCommandEvent&); + void OnArcRepair( wxCommandEvent&); + void OnViewMode( wxCommandEvent&); + void OnSelectAll( wxCommandEvent&); + void OnTreeChanged( wxTreeEvent&); + void OnListItemDClick(wxListEvent&); + void OnListBeginDrag( wxListEvent&); + + void LoadArc(wxString); + void ConvertArc(bool); + int ErrorCheck(int); + + MainFrame(); + ~MainFrame(); + +protected: + wxMenuBar* menubar; + wxToolBar* toolbar; + wxSplitterWindow* window_splitter; + DECLARE_EVENT_TABLE() +}; + +#endif diff --git a/src/frontend/frontend.cpp b/src/frontend/frontend.cpp new file mode 100644 index 0000000..5531085 --- /dev/null +++ b/src/frontend/frontend.cpp @@ -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(); + + // ì‹ÆƒpƒX‚ðÝ’èB + { + 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 index 0000000..990cba4 --- /dev/null +++ b/src/frontend/frontend.h @@ -0,0 +1,55 @@ +/******************************************************************************* + 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.h,v 1.9 2009/08/29 08:13:09 sirakaba Exp $ +*******************************************************************************/ + +#ifndef H_LOADED_FRONTEND +#define H_LOADED_FRONTEND + +#define wxUSE_UNICODE 1 +#include "../common/header/plugin.h" +#include +#include +#include +#include +#include +#include +#include + +#include "../common/handle/TPIHandle.h" + +WX_DECLARE_OBJARRAY(TPI_FILEINFO, ArrayTPI_FILEINFO); + +#include "cls_listctrl.h" + +#ifdef __WINDOWS__ +#define TPI_EXT wxT(".dll") +#define EXE_EXT wxT(".exe") +#else +#define TPI_EXT wxT(".so") +#define EXE_EXT wxEmptyString +#endif + +#define FE_DIR_BIN wxT("./") +#define FE_DIR_SHR wxT("../share/") +#define FE_DIR_B_LIB FE_DIR_BIN wxT("lib/") +#define FE_DIR_S_XRC FE_DIR_SHR wxT("xrc/") +#define FE_DIR_S_ICO FE_DIR_SHR wxT("ico/") + +#endif diff --git a/src/frontend/frontend.vcproj b/src/frontend/frontend.vcproj new file mode 100644 index 0000000..da13975 --- /dev/null +++ b/src/frontend/frontend.vcproj @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/frontend/functions.cpp b/src/frontend/functions.cpp new file mode 100644 index 0000000..387a234 --- /dev/null +++ b/src/frontend/functions.cpp @@ -0,0 +1,258 @@ +/******************************************************************************* + 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: functions.cpp,v 1.17 2009/09/02 11:18:49 sirakaba Exp $ +*******************************************************************************/ + +//****************************************************************************** +// ƒtƒ@ƒCƒ‹“ǂݍž‚Ý +//****************************************************************************** + +#include "frontend.h" +#include "frm_main.h" +#include "dlg_make.h" +#include "functions.h" + +//****************************************************************************** +// ƒRƒ“ƒgƒ[ƒ‹ˆ—ŒnŠÖ” +//****************************************************************************** + +bool TreeView_CheckNewerItem(wxTreeCtrl * tree_ctrl, wxTreeItemId idParent, const wxString & szDirPath, bool bReallyMake) +{ + // Å‰‚ÌŽqƒAƒCƒeƒ€‚ðŽæ“¾B + wxTreeItemIdValue idv; + wxTreeItemId idChild = tree_ctrl->GetFirstChild(idParent, idv); + wxChar cSep = wxFileName::GetPathSeparator(); + if (idChild.IsOk()) + { + do + { + // ƒAƒCƒeƒ€‚Æ–¼‘O‚ª“¯‚¶‚È‚çOKB + if (tree_ctrl->GetItemText(idChild) == szDirPath.BeforeFirst(cSep)) + { + // ‚±‚êˆÈ‰º‚ÌŠK‘w‚ª–³‚¢ê‡B + if (szDirPath.Find(cSep) == wxNOT_FOUND) + { + return bReallyMake; + } + + // ‚Ü‚¾ŠK‘w‚ª—L‚éê‡AÄ‹AB + return TreeView_CheckNewerItem(tree_ctrl, idChild, szDirPath.AfterFirst(cSep), bReallyMake); + } + + idChild = tree_ctrl->GetNextSibling(idChild); + } + while (idChild.IsOk()); + } + + // ‘Ώۂª–³‚¢ê‡‚ɂ͍쐬B + if (! szDirPath.IsEmpty()) + { + if (! bReallyMake) + { + // Šm”F‚·‚邾‚¯‚Ȃ炱‚±‚ŏI—¹B + return true; + } + + // 2ŠK‘wˆÈã[‚¢ê‡‚É‚à‘ΉžB + wxString szTemp = szDirPath; + wxTreeItemId idTemp = idParent; + do + { + // “WŠJ‚µ‚Ä‚©‚çì¬B + idTemp = tree_ctrl->AppendItem(idTemp, szTemp.BeforeFirst(cSep), 1, 2); + szTemp = szTemp.AfterFirst(cSep); + } + while (szTemp.Find(cSep) != wxNOT_FOUND); + + // ÅŒã‚É‹ó‚Å‚È‚¢ê‡‚É‚Í‚à‚¤1ŠK‘wì¬B + if (! szTemp.IsEmpty()) + { + tree_ctrl->AppendItem(idTemp, szTemp, 1, -1); + } + } + + return false; +} + +wxString TreeView_GetItemPath(wxTreeCtrl * tree_ctrl, wxTreeItemId idItem) +{ + wxString szItemName, szNodePath = wxEmptyString; + wxChar cSep = wxFileName::GetPathSeparator(); + + // ƒAƒCƒeƒ€‚Ì–¼‘O‚ðŽæ“¾B + while ((szItemName = tree_ctrl->GetItemText(idItem))) + { + if (szItemName == wxT("-----")) + { + break; + } + + // ƒpƒX‚ɒljÁB + szNodePath = szItemName + cSep + szNodePath; + + // eƒAƒCƒeƒ€‚É‘k‚éB + idItem = tree_ctrl->GetItemParent(idItem); + if (idItem == tree_ctrl->GetRootItem()) + { + // ‚±‚±‚É‚­‚é‚̂͏‘ŒÉ“à‘S•\Ž¦ŽžB + szNodePath = wxT("*"); + break; + } + } + + return (szNodePath.Find(cSep) == wxNOT_FOUND) ? szNodePath : szNodePath.BeforeLast(cSep); +} + +//****************************************************************************** +// ”ˆ—ŠÖ” +//****************************************************************************** + +// ƒfƒBƒŒƒNƒgƒŠ‚ðV‹K‚ɍ쐬B +wxFileName MakeDirPath(wxFileName fnPath, wxString szBase, bool bAct) +{ + // ‚Æ‚è‚ ‚¦‚¸ì‚Á‚Ä‚Ý‚éB + wxFileName fnDir = fnPath; + fnDir.AppendDir(szBase); + if (! fnDir.DirExists() && ! ::wxFileExists(fnDir.GetPath())) + { + if (! bAct || fnDir.Mkdir()) + { + return fnDir; + } + } + + // ƒ_ƒ‚È‚ç"_%d"‚ð•t‰Á‚µ‚ÄŽŽsB + for (int i = 0; i < 255; i++) + { + fnDir = fnPath; + fnDir.AppendDir(szBase + wxString::Format(wxT("_%d"), i)); + if (! fnDir.DirExists() && ! ::wxFileExists(fnDir.GetPath())) + { + if (! bAct || fnDir.Mkdir()) + { + return fnDir; + } + } + } + + // ƒGƒ‰[I—¹B + fnDir.Clear(); + return fnDir; +} + +wxArrayString MakeTargetFileList(MainFrame * frm, bool fOnlyOneFile) +{ + wxArrayString as; + for (int i = 0; i < frm->list_ctrl->GetItemCount(); i++) + { + if (((as.GetCount() < (unsigned) frm->list_ctrl->GetSelectedItemCount()) && (frm->list_ctrl->GetItemState(i, wxLIST_STATE_SELECTED) & wxLIST_STATE_SELECTED)) || frm->list_ctrl->GetSelectedItemCount() == 0) + { + as.Add(frm->list_ctrl->showFileInfo[i].szStoredName); + if (fOnlyOneFile) + { + return as; + } + } + } + + return as; +} + +bool WillMakeDirByArcName(MainFrame * frm, MakeDialog * mk) +{ + if (mk->chDirMake->GetSelection() != 2) + { + return mk->chDirMake->GetSelection() == 1; + } + + // ƒ‹[ƒg‚ɃfƒBƒŒƒNƒgƒŠ‚ƃtƒ@ƒCƒ‹‡‚킹‚Ä2ŒÂˆÈã‚ ‚é‚Æ‚«AƒfƒBƒŒƒNƒgƒŠ‚ðì¬B + switch (frm->tree_ctrl->GetChildrenCount(frm->tree_ctrl->GetLastChild(frm->tree_ctrl->GetRootItem()), false)) + { + case 0: + { + // ƒfƒBƒŒƒNƒgƒŠ‚ª‚È‚¢‚̂ŁAƒ‹[ƒg‚Ƀtƒ@ƒCƒ‹‚ª2ŒÂˆÈã‚ ‚é‚©‚Ç‚¤‚©‚ð”»’èB + bool fFlag = false; + for (size_t i = 0; i < frm->fileinfo.GetCount(); i++) + { + if (frm->fileinfo[i].fnFileName.GetPath().IsEmpty()) + { + // ƒtƒ@ƒCƒ‹‚̓‹[ƒg‚É‚ ‚éB + if (fFlag) + { + return true; + } + + fFlag = true; + } + } + break; + } + case 1: + // ƒfƒBƒŒƒNƒgƒŠ‚ª1ŒÂ‚Ȃ̂ŁAƒ‹[ƒg‚Ƀtƒ@ƒCƒ‹‚ª‚È‚¢‚©‚Ç‚¤‚©‚ð”»’èB + for (size_t i = 0; i < frm->fileinfo.GetCount(); i++) + { + if (frm->fileinfo[i].fnFileName.GetPath().IsEmpty()) + { + return true; + } + } + break; + default: + // ƒfƒBƒŒƒNƒgƒŠ‚¾‚¯‚Å2ŒÂˆÈã‚ ‚é‚̂ŁAŽ©“®“I‚É“WŠJæƒfƒBƒŒƒNƒgƒŠ‚ðì¬B + return true; + } + + return false; +} + +wxString GetFileTypeName(wxFileName fn) +{ + wxString szExt = fn.GetExt().MakeUpper(); + wxString sz = szExt + (szExt.IsEmpty() ? wxT("file") : wxT(" file")); + wxFileType * ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(szExt); + if (ftFile) + { + ftFile->GetDescription(& sz); + } + return sz; +} + +wxIcon GetFileTypeIcon(wxFileName fn) +{ + wxIcon icon; + wxIconLocation ilFile; + wxFileType * ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(fn.GetExt()); + if (ftFile && ftFile->GetIcon(& ilFile)) + { + if (! ::wxFileExists(ilFile.GetFileName())) + { + 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)); + } + else + { + wxIcon i(ilFile); + icon = i; + } + } + else + { + icon.CopyFromBitmap(wxBitmap(FE_DIR_S_ICO wxT("file.png"), wxBITMAP_TYPE_ANY)); + } + return icon; +} diff --git a/src/frontend/functions.h b/src/frontend/functions.h new file mode 100644 index 0000000..6296b53 --- /dev/null +++ b/src/frontend/functions.h @@ -0,0 +1,42 @@ +/******************************************************************************* + 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: functions.h,v 1.7 2009/08/23 10:59:56 sirakaba Exp $ +*******************************************************************************/ + +#ifndef H_LOADED_FUNCTIONS +#define H_LOADED_FUNCTIONS + +//****************************************************************************** +// ƒRƒ“ƒgƒ[ƒ‹ˆ—ŒnŠÖ” +//****************************************************************************** + +bool TreeView_CheckNewerItem(wxTreeCtrl *, wxTreeItemId, const wxString &, bool); +wxString TreeView_GetItemPath(wxTreeCtrl *, wxTreeItemId); + +//****************************************************************************** +// ”ˆ—ŠÖ” +//****************************************************************************** + +wxFileName MakeDirPath(wxFileName, wxString, bool); +wxArrayString MakeTargetFileList(MainFrame *, bool); +bool WillMakeDirByArcName(MainFrame *, MakeDialog *); +wxString GetFileTypeName(wxFileName); +wxIcon GetFileTypeIcon(wxFileName); + +#endif diff --git a/src/frontend/ui/dlg_make.fbp b/src/frontend/ui/dlg_make.fbp new file mode 100644 index 0000000..b719485 --- /dev/null +++ b/src/frontend/ui/dlg_make.fbp @@ -0,0 +1,2212 @@ + + + + + + XRC + 1 + UTF-8 + connect + dlg_make + 1000 + none + 0 + dlg_make + + ../../../share/xrc + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + dlg_make + + 490,210 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Create/Extract an archive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wxVERTICAL + none + + 2 + wxEXPAND | wxALL + 7 + + + + + 1 + + + 0 + wxID_ANY + + + nbTabs + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 0 + wxEXPAND + 0 + + + bSizer2 + wxHORIZONTAL + none + + 3 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + + wxID_ANY + Destination directory/filename: + + + + protected + + -1,-1 + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 3 + wxALIGN_CENTER_VERTICAL + 0 + + + + + 1 + + + + wxID_ANY + Default + + + btnDefault + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + + 1 + + + + wxID_ANY + Desktop + + + btnDesktop + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL + 0 + + + + + 1 + + + + wxID_ANY + Current + + + btnCurrent + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + + + + 1 + + + + wxID_ANY + Browse + + + btnBrowse + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 0 + + + bSizer3 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + + + + 1 + + + + wxID_ANY + + -1,-1 + cbDir + protected + + 320,22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + + + + 1 + + + + wxID_ANY + + + cbFileName + protected + + 140,22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Options + + sbSizer1 + wxHORIZONTAL + none + + + 5 + wxEXPAND + 1 + + + bSizer24 + wxVERTICAL + none + + 0 + wxEXPAND + 1 + + + bSizer5 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + + + 1 + + + + wxID_ANY + Archive type: + + + + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxEXPAND|wxLEFT|wxRIGHT + 1 + + + + + 1 + + + 0 + wxID_ANY + + + chType + protected + + 0 + -1,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT + 0 + + + "Don't make directory" "Make DIR by the archive name" "Make DIR if needed" + + 0 + + + 0 + wxID_ANY + + + chDirMake + protected + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 1 + + + bSizer7 + wxVERTICAL + none + + 3 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + + 0 + + 1 + + + + wxID_ANY + Open the destination afterward + + + cbOpenAfter + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + + + + 1 + + + + wxID_ANY + Ignore file pathes + + + cbIgnorePath + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + + + + 1 + + + + wxID_ANY + Exit afterward + + + cbExitAfter + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Config + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel2 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer11 + wxHORIZONTAL + none + + 5 + wxLEFT|wxRIGHT + 2 + + + bSizer21 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + wxID_ANY + Compression Level + + sbSizer11 + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + 5 + 9 + + 0 + + scLevel + protected + + + wxSP_ARROW_KEYS|wxSP_WRAP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Multivolume + + sbSizer2 + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + + "1.44MB" "650MB" "700MB" + + 1 + + + 0 + wxID_ANY + + + cbSplitSize + protected + + + + + + Don't split. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Recovery Record + + sbSizer5 + wxHORIZONTAL + none + + + 5 + wxEXPAND|wxLEFT|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + 0 + 100 + + 0 + + scRR + protected + + + wxSP_ARROW_KEYS|wxSP_WRAP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER + 0 + + + + 1 + + + 0 + wxID_ANY + % + + + + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxRIGHT + 3 + + + bSizer31 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + wxID_ANY + Encryption + + sbSizer3 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Password: + + + + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_BOTTOM|wxLEFT|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + tcPassword + protected + + -1,20 + wxTE_PASSWORD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Unmask + + + cbUnmask + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + Keyfile: + + + + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + tcKeyfile + protected + + -1,20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Browse + + + btnBrowseKF + protected + + 70,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Header encryption + + + cbEncryptHeader + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Misc. + + sbSizer4 + wxVERTICAL + none + + + 5 + wxEXPAND|wxLEFT + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Solid compression + + + cbSolid + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Multimedia optimization + + + cbMMOptimize + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT + 0 + + + 0 + + 1 + + + + wxID_ANY + Self-extracting archive + + + cbMakeSFX + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Comment + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel3 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer211 + wxVERTICAL + none + + 5 + wxALIGN_CENTER|wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + tcComment + protected + + -1,-1 + wxTE_MULTILINE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Files + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel5 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer13 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + lcFiles + protected + + + wxLC_REPORT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer23 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + + + 1 + + + + wxID_ANY + OK + + + btnOK + protected + + -1,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxLEFT|wxRIGHT + 0 + + + + + 1 + + + + wxID_ANY + Cancel + + + btnCancel + protected + + -1,25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + + + diff --git a/src/frontend/ui/dlg_process.fbp b/src/frontend/ui/dlg_process.fbp new file mode 100644 index 0000000..1bcfb41 --- /dev/null +++ b/src/frontend/ui/dlg_process.fbp @@ -0,0 +1,429 @@ + + + + + + XRC + 1 + UTF-8 + connect + dlg_process + 1000 + none + 0 + dlg_process + + ../../../share/xrc + + 1 + 0 + 0 + + + + + 1 + + + + + wxID_ANY + + + dlg_process + + + wxDEFAULT_DIALOG_STYLE + ProcessDialog + Frontend is processing ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer10 + wxVERTICAL + none + + 0 + wxEXPAND + 1 + + + bSizer11 + wxHORIZONTAL + none + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 1 + + + + wxID_ANY + Source: + + + label_3 + protected + + 50, 14 + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 0 + + + + wxID_ANY + + 0 + + ebSource + protected + + 300, 22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 1 + + + bSizer12 + wxHORIZONTAL + none + + 3 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + + wxID_ANY + Target: + + + label_4 + protected + + 50, 14 + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 0 + + + + wxID_ANY + + 0 + + ebTarget + protected + + 300, 22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 1 + + + bSizer13 + wxHORIZONTAL + none + + 8 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 2 + + + + 1 + + + + wxID_ANY + + + gauge + protected + + 10 + 246, 20 + wxGA_HORIZONTAL + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + + + + 1 + + + + wxID_ANY + Cancel + + + btnCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/frontend/ui/frm_main.fbp b/src/frontend/ui/frm_main.fbp new file mode 100644 index 0000000..394914b --- /dev/null +++ b/src/frontend/ui/frm_main.fbp @@ -0,0 +1,894 @@ + + + + + + XRC + 1 + UTF-8 + connect + frm_main + 1000 + none + 0 + frm_main + + ../../../share/xrc + + 1 + 0 + 0 + + + + + 1 + + + + + wxID_ANY + + + frame_main + + 800, 400 + wxDEFAULT_FRAME_STYLE + MainFrame + Frontend + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 0 + wxID_ANY + + + + menubar + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File + m_menu1 + protected + + ../share/ico/16/create.png; Load From File + 0 + 1 + + wxID_NEW + wxITEM_NORMAL + Create archive + Arc_Create + none + + + + + + + ../share/ico/16/open.png; Load From File + 0 + 1 + + wxID_OPEN + wxITEM_NORMAL + Open archive + Arc_Open + none + + + + + + + ../share/ico/16/close.png; Load From File + 0 + 0 + + wxID_CLOSE + wxITEM_NORMAL + Close archive + Arc_Close + none + + + + + + + none + + + ../share/ico/16/add.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + Add files + Arc_Add + none + + + + + + + ../share/ico/16/sfx.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + Make SFX + Arc_SFX + none + + + + + + + ../share/ico/16/unsfx.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + UnSFX + Arc_UnSFX + none + + + + + + + none + + + + 0 + 1 + + wxID_EXIT + wxITEM_NORMAL + Exit + Exe_Exit + none + Ctrl+Q + + + + + + + Archive + m_menu2 + protected + + ../share/ico/16/extract.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + Extract + Arc_Extract + none + + + + + + + ../share/ico/16/delete.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + Delete + Arc_Delete + none + + + + + + + ../share/ico/16/test.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + Test + Arc_Test + none + + + + + + + ../share/ico/16/repair.png; Load From File + 0 + 0 + + wxID_ANY + wxITEM_NORMAL + Repair + Arc_Repair + none + + + + + + + + View + m_menu3 + protected + + + 0 + 1 + + wxID_ANY + wxITEM_RADIO + Icons + Exe_View_Icons + none + Ctrl+1 + + + + + + + 1 + 1 + + wxID_ANY + wxITEM_RADIO + Details + Exe_View_Details + none + Ctrl+2 + + + + + + none + + + + 0 + 1 + + wxID_SELECTALL + wxITEM_NORMAL + Select All + Exe_View_SelectAll + none + Ctrl+A + + + + + + + + + + 1 + + 1 + + + wxID_ANY + + + statusbar + protected + + + wxST_SIZEGRIP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 32, 32 + + 1 + + + + wxID_ANY + + + + toolbar + 0 + protected + + 0 + + wxTB_HORIZONTAL|wxTB_TEXT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ../share/ico/24/create.png; Load From File + wxID_NEW + wxITEM_NORMAL + Create + Arc_Create + + Create new archive + + + + + + + + ../share/ico/24/open.png; Load From File + wxID_OPEN + wxITEM_NORMAL + Open + Arc_Open + + Open archive + + + + + + + + ../share/ico/24/close.png; Load From File + wxID_CLOSE + wxITEM_NORMAL + Close + Arc_Close + + Close archive + + + + + + + + + ../share/ico/24/add.png; Load From File + wxID_ANY + wxITEM_NORMAL + Add + Arc_Add + + Add files or a folder to this archive + + + + + + + + ../share/ico/24/sfx.png; Load From File + wxID_ANY + wxITEM_NORMAL + Make SFX + Arc_SFX + + Convert to self-extract archive + + + + + + + + ../share/ico/24/unsfx.png; Load From File + wxID_ANY + wxITEM_NORMAL + UnSFX + Arc_UnSFX + + Convert to normal archive + + + + + + + + + ../share/ico/24/extract.png; Load From File + wxID_ANY + wxITEM_NORMAL + Extract + Arc_Extract + + Extract selected files or whole archive + + + + + + + + ../share/ico/24/delete.png; Load From File + wxID_ANY + wxITEM_NORMAL + Delete + Arc_Delete + + Delete selected files from this archive + + + + + + + + ../share/ico/24/test.png; Load From File + wxID_ANY + wxITEM_NORMAL + Test + Arc_Test + + Test selected files or whole archive + + + + + + + + ../share/ico/24/repair.png; Load From File + wxID_ANY + wxITEM_NORMAL + Repair + Arc_Repair + + Repair selected files or whole archive + + + + + + + + + + bSizer14 + wxVERTICAL + none + + 0 + wxEXPAND + 1 + + + + 1 + + + + wxID_ANY + + 0 + + window_splitter + protected + + 0.0 + 162 + -1 + + wxSPLIT_VERTICAL + wxSP_3D|wxSP_BORDER|wxSP_LIVE_UPDATE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer19 + wxVERTICAL + none + + 1 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + TreeView + protected + + + wxTR_DEFAULT_STYLE|wxTR_HAS_BUTTONS|wxTR_HIDE_ROOT + + + + + wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 0 + wxID_ANY + + + m_panel2 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer20 + wxVERTICAL + none + + 1 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + ListView + protected + + + wxLC_REPORT|wxLC_VIRTUAL + myListCtrl; + + + + wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugin/calLibrary/Makefile b/src/plugin/calLibrary/Makefile new file mode 100644 index 0000000..a347003 --- /dev/null +++ b/src/plugin/calLibrary/Makefile @@ -0,0 +1,28 @@ +# Makefile. +# $Id: Makefile,v 1.5 2009/08/02 03:41:44 sirakaba Exp $ + +# Define compilers. +CC = g++ +CPPFLAGS = -c -g -O3 -Wall -W -fPIC `wx-config --cppflags` +LDFLAGS = -shared -Wl,-Bsymbolic `wx-config --libs` -lwine + +# Define i/o files. +DIR_OBJ = ../../tmp/calLibrary +OBJS = calLibrary-wx.o +IN_DEF = ../../common/header/plugin.def +OUT_LIB = ../../../bin/lib/calLibrary.so + +.PHONY: all clean +.SUFFIXES: .cpp .o + +all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS)) + $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(addprefix $(DIR_OBJ)/,$(OBJS)) + +clean: + rm -f -r $(DIR_OBJ) $(OUT_LIB) + +$(DIR_OBJ): + mkdir $(DIR_OBJ) + +$(DIR_OBJ)/%.o: %.cpp + $(CC) $(CPPFLAGS) -o $@ $< diff --git a/src/plugin/calLibrary/calLibrary.cpp b/src/plugin/calLibrary/calLibrary.cpp new file mode 100644 index 0000000..98c4249 --- /dev/null +++ b/src/plugin/calLibrary/calLibrary.cpp @@ -0,0 +1,920 @@ +/******************************************************************************* + 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: calLibrary.cpp,v 1.23 2009/09/27 13:44:12 sirakaba Exp $ +*******************************************************************************/ + +//****************************************************************************** +// Includes +//****************************************************************************** + +#include "../../common/header/plugin.h" +#include "../../common/header/plugin-extra.h" +#include "../../common/library/library.h" +#include +#include +#include +#include +#include +#include "calLibrary.h" + +//****************************************************************************** +// Global varients +//****************************************************************************** + +struct g_LibInfo +{ + HMODULE hLib; + HMODULE hLibAlt; + wxString szPrefix; + wxString szPrefixAlt; + int nLibIndex; + unsigned long nExFlag; + wxXmlNode node; + bool fUnicode; + bool fUnicodeAlt; +} g_LibInfo; + +TPI_PROC g_prProc; +bool g_fCallback32bit; +bool g_fExistUnicodeMode; +wxString g_szAppPath; + +//****************************************************************************** +// Entry +//****************************************************************************** + +#ifdef __LINUX__ +void __attribute__((constructor)) Attach(void) +{ + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); +} + +void __attribute__((destructor)) Detach(void) +{ + ::FreeLibrary(g_LibInfo.hLib); +} +#else +BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); + break; + } + case DLL_PROCESS_DETACH: + ::FreeLibrary(g_LibInfo.hLib); + break; + } + return TRUE; +} +#endif + +wxDateTime FileTimeToWxDateTime(FILETIME * pft) +{ +#ifdef __WINDOWS__ + FILETIME ftLocal; + SYSTEMTIME st; + if (! ::FileTimeToLocalFileTime(pft, & ftLocal) || ! ::FileTimeToSystemTime(& ftLocal, & st)) + { + return (time_t) 0; + } + wxDateTime dt(st.wDay, wxDateTime::Month(st.wMonth - 1), st.wYear, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds); + return dt; +#else + return (time_t) 0; +#endif +} + +//****************************************************************************** +// Callback Wrapper +//****************************************************************************** + +BOOL __stdcall CallbackProc(HWND, unsigned int _uMsg, unsigned int _uState, void * _lpEis) +{ + if (_uMsg != ::RegisterWindowMessage((const wchar_t *) WM_ARCEXTRACT)) + { + // “ÆŽ©Žd—l‚Ȃǂɑ΂·‚é—\”õƒR[ƒhB + return TRUE; + } + + // \‘¢‘Ì‚ð‰Šú‰»B + TPI_PROCESSINFO piInfo; + piInfo.uMessage = TPI_MESSAGE_STATUS; + + if (_lpEis != NULL) + { + if (g_fCallback32bit) + { + if (g_LibInfo.fUnicode) + { + // ‰Šú‰»B + EXTRACTINGINFOEXW * ex = (EXTRACTINGINFOEXW *) _lpEis; + + // EXTRACTINGINFOEXW -> TPI_FILEINFO•ÏŠ·B + piInfo.fiInfo.dwCRC32 = ex->dwCRC; + piInfo.fiInfo.tmModified.SetFromDOS(ex->wTime | (ex->wDate << 16)); + piInfo.fiInfo.llPackedSize = ex->dwCompressedSize; + piInfo.fiInfo.llUnpackedSize = ex->exinfo.dwFileSize; + piInfo.fiInfo.uOSType = ex->uOSType; + piInfo.fiInfo.wCompressRatio = ex->wRatio; + piInfo.fiInfo.szStoredName = WC2String(ex->exinfo.szSourceFileName); + piInfo.fiInfo.szMethod = WC2String(ex->szMode); + + // EXTRACTINGINFOEXW -> TPI_PROCESSINFO•ÏŠ·B + piInfo.llProcessedSize = ex->exinfo.dwWriteSize; + piInfo.fnDestination = wxFileName::FileName(WC2String(ex->exinfo.szDestFileName)); + } + else + { + // ‰Šú‰»B + EXTRACTINGINFOEX * ex = (EXTRACTINGINFOEX *) _lpEis; + + // EXTRACTINGINFOEX -> TPI_FILEINFO•ÏŠ·B + piInfo.fiInfo.dwCRC32 = ex->dwCRC; + piInfo.fiInfo.tmModified.SetFromDOS(ex->wTime | (ex->wDate << 16)); + piInfo.fiInfo.llPackedSize = ex->dwCompressedSize; + piInfo.fiInfo.llUnpackedSize = ex->exinfo.dwFileSize; + piInfo.fiInfo.uOSType = ex->uOSType; + piInfo.fiInfo.wCompressRatio = ex->wRatio; + piInfo.fiInfo.szStoredName = MB2String(ex->exinfo.szSourceFileName); + piInfo.fiInfo.szMethod = MB2String(ex->szMode); + + // EXTRACTINGINFOEX -> TPI_PROCESSINFO•ÏŠ·B + piInfo.llProcessedSize = ex->exinfo.dwWriteSize; + piInfo.fnDestination = wxFileName::FileName(MB2String(ex->exinfo.szDestFileName)); + } + piInfo.fiInfo.dwAttribute = 0; + } + else + { + if (g_LibInfo.fUnicode) + { + // ‰Šú‰»B + EXTRACTINGINFOEX64W * ex = (EXTRACTINGINFOEX64W *) _lpEis; + + // EXTRACTINGINFOEX64W -> TPI_FILEINFO•ÏŠ·B + piInfo.fiInfo.dwAttribute = ex->dwAttributes; + piInfo.fiInfo.dwCRC32 = ex->dwCRC; + piInfo.fiInfo.tmAccess = FileTimeToWxDateTime(& ex->ftAccessTime); + piInfo.fiInfo.tmCreate = FileTimeToWxDateTime(& ex->ftCreateTime); + piInfo.fiInfo.tmModified = FileTimeToWxDateTime(& ex->ftWriteTime); + piInfo.fiInfo.llPackedSize = ex->llCompressedSize; + piInfo.fiInfo.llUnpackedSize = ex->llFileSize; + piInfo.fiInfo.uOSType = ex->uOSType; + piInfo.fiInfo.wCompressRatio = ex->wRatio; + piInfo.fiInfo.szStoredName = WC2String(ex->exinfo.szSourceFileName); + piInfo.fiInfo.szMethod = WC2String(ex->szMode); + + // EXTRACTINGINFOEX64 -> TPI_PROCESSINFO•ÏŠ·B + piInfo.llProcessedSize = ex->llWriteSize; + piInfo.fnDestination = wxFileName::FileName(WC2String(ex->exinfo.szDestFileName)); + } + else + { + // ‰Šú‰»B + EXTRACTINGINFOEX64 * ex = (EXTRACTINGINFOEX64 *) _lpEis; + + // EXTRACTINGINFOEX64 -> TPI_FILEINFO•ÏŠ·B + piInfo.fiInfo.dwAttribute = ex->dwAttributes; + piInfo.fiInfo.dwCRC32 = ex->dwCRC; + piInfo.fiInfo.tmAccess = FileTimeToWxDateTime(& ex->ftAccessTime); + piInfo.fiInfo.tmCreate = FileTimeToWxDateTime(& ex->ftCreateTime); + piInfo.fiInfo.tmModified = FileTimeToWxDateTime(& ex->ftWriteTime); + piInfo.fiInfo.llPackedSize = ex->llCompressedSize; + piInfo.fiInfo.llUnpackedSize = ex->llFileSize; + piInfo.fiInfo.uOSType = ex->uOSType; + piInfo.fiInfo.wCompressRatio = ex->wRatio; + piInfo.fiInfo.szStoredName = MB2String(ex->exinfo.szSourceFileName); + piInfo.fiInfo.szMethod = MB2String(ex->szMode); + + // EXTRACTINGINFOEX64 -> TPI_PROCESSINFO•ÏŠ·B + piInfo.llProcessedSize = ex->llWriteSize; + piInfo.fnDestination = wxFileName::FileName(MB2String(ex->exinfo.szDestFileName)); + } + } + piInfo.fiInfo.fnFileName = wxFileName::FileName(piInfo.fiInfo.szStoredName); + } + + // ”Žš‚̏‡‚Å‚È‚­ˆ—‚̏‡‚Å•À‚ñ‚Å‚¢‚邱‚Æ‚É’ˆÓB + switch (_uState) + { + case ARCEXTRACT_OPEN: + // “–ŠY‘ŒÉ‚̏ˆ—‚ðŠJŽnB + piInfo.uStatus = TPI_STATUS_OPENARCHIVE; + break; + case 5: + // “–ŠYƒtƒ@ƒCƒ‹‚ÌŒŸõ’†B + piInfo.uStatus = TPI_STATUS_SEEKFILE; + break; + case ARCEXTRACT_BEGIN: + // “–ŠYƒtƒ@ƒCƒ‹‚̏ˆ—‚ðŠJŽnB + piInfo.uStatus = TPI_STATUS_BEGINPROCESS; + break; + case ARCEXTRACT_INPROCESS: + // “–ŠYƒtƒ@ƒCƒ‹‚̏ˆ—‚ðŽÀs’†B + piInfo.uStatus = TPI_STATUS_INPROCESS; + break; + case 6: + // “–ŠYƒtƒ@ƒCƒ‹‚̏ˆ—‚ðI—¹B + piInfo.uStatus = TPI_STATUS_ENDPROCESS; + break; + case 7: + // “–ŠY‘ŒÉ‚ÌŒŸ¸’†B + piInfo.uStatus = TPI_STATUS_TESTARCHIVE; + break; + case ARCEXTRACT_COPY: + // “–ŠY‘ŒÉ‚̏‘‚«–ß‚µ’†B + piInfo.uStatus = TPI_STATUS_COPYARCHIVE; + break; + case ARCEXTRACT_END: + // “–ŠY‘ŒÉ‚̏ˆ—‚ðI—¹B + piInfo.uStatus = TPI_STATUS_CLOSEARCHIVE; + break; + } + + // ƒR[ƒ‹ƒoƒbƒNŠÖ”‚É‘—MB + if (g_prProc == NULL) + { + return TRUE; + } + + // Šg’£ƒtƒ‰ƒO‚Ì’l‚É‚æ‚è‹t“]‚³‚¹‚éB + bool bRetVal = g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CANCEL; + return g_LibInfo.nExFlag == 1 ? ! bRetVal : bRetVal; +} + +//****************************************************************************** +// Inside Functions +//****************************************************************************** + +int CalErrorCodeConvert(int nCalErrorCode) +{ + switch (nCalErrorCode) + { + case 0: return TPI_ERROR_SUCCESS; + case ERROR_DISK_SPACE: return TPI_ERROR_IO_ARC_WRITE; + case ERROR_READ_ONLY: return TPI_ERROR_IO_FILE_WRITE; + case ERROR_USER_SKIP: return TPI_ERROR_D_SKIPPED; + case ERROR_UNKNOWN_TYPE: return TPI_ERROR_IO_MISC; + case ERROR_METHOD: return TPI_ERROR_ARC_UNSUPPORTED; + case ERROR_PASSWORD_FILE: return TPI_ERROR_ARC_ENCRYPTED; + case ERROR_VERSION: return TPI_ERROR_ARC_UNSUPPORTED; + case ERROR_FILE_CRC: return TPI_ERROR_ARC_BROKEN_SUM; + case ERROR_FILE_OPEN: return TPI_ERROR_IO_FILE_OPEN; + case ERROR_MORE_FRESH: return TPI_ERROR_IO_FILE_MISC; + case ERROR_NOT_EXIST: return TPI_ERROR_IO_FILE_ACCESS; + case ERROR_ALREADY_EXIST: return TPI_ERROR_IO_FILE_ACCESS; + case ERROR_TOO_MANY_FILES: return TPI_ERROR_IO_ARC_MISC; + case ERROR_MAKEDIRECTORY: return TPI_ERROR_IO_DIR_OPEN; + case ERROR_CANNOT_WRITE: return TPI_ERROR_IO_FILE_WRITE; + case ERROR_HUFFMAN_CODE: return TPI_ERROR_ARC_BROKEN_MISC; + case ERROR_COMMENT_HEADER: return TPI_ERROR_ARC_BROKEN_HEADER; + case ERROR_HEADER_CRC: return TPI_ERROR_ARC_BROKEN_SUM; + case ERROR_HEADER_BROKEN: return TPI_ERROR_ARC_BROKEN_HEADER; + case ERROR_ARC_FILE_OPEN: return TPI_ERROR_IO_ARC_OPEN; + case ERROR_NOT_ARC_FILE: return TPI_ERROR_D_UNSUPPORTED; + case ERROR_CANNOT_READ: return TPI_ERROR_IO_ARC_READ; + case ERROR_FILE_STYLE: return TPI_ERROR_D_UNSUPPORTED; + case ERROR_COMMAND_NAME: return TPI_ERROR_UNDEFINED; + case ERROR_MORE_HEAP_MEMORY:return TPI_ERROR_D_OUTOFMEMORY; + case ERROR_ENOUGH_MEMORY: return TPI_ERROR_D_OUTOFMEMORY; + case ERROR_ALREADY_RUNNING: return TPI_ERROR_UNDEFINED; + case ERROR_USER_CANCEL: return TPI_ERROR_D_SKIPPED; + case ERROR_HARC_ISNOT_OPENED: return TPI_ERROR_D_PARAMETER; + case ERROR_NOT_SEARCH_MODE: return TPI_ERROR_D_PARAMETER; + case ERROR_NOT_SUPPORT: return TPI_ERROR_U_USE_LIBRARY; + case ERROR_TIME_STAMP: return TPI_ERROR_UNDEFINED; + case ERROR_TMP_OPEN: return TPI_ERROR_IO_TMP_OPEN; + case ERROR_LONG_FILE_NAME: return TPI_ERROR_IO_FILE_ACCESS; + case ERROR_ARC_READ_ONLY: return TPI_ERROR_IO_ARC_ACCESS; + case ERROR_SAME_NAME_FILE: return TPI_ERROR_UNDEFINED; + case ERROR_NOT_FIND_ARC_FILE: return TPI_ERROR_IO_ARC_NOTFOUND; + case ERROR_RESPONSE_READ: return TPI_ERROR_IO_MISC_READ; + case ERROR_NOT_FILENAME: return TPI_ERROR_IO_FILE_NOTFOUND; + case ERROR_TMP_COPY: return TPI_ERROR_IO_TMP_COPY; + case ERROR_EOF: return TPI_ERROR_ARC_BROKEN_SIZE; + case ERROR_ADD_TO_LARC: return TPI_ERROR_UNDEFINED; + case ERROR_TMP_BACK_SPACE: return TPI_ERROR_IO_TMP_MOVE; + case ERROR_SHARING: return TPI_ERROR_IO_FILE_ACCESS; + case ERROR_NOT_FIND_FILE: return TPI_ERROR_IO_NOTFOUND; + case ERROR_LOG_FILE: return TPI_ERROR_IO_MISC_WRITE; + case ERROR_NO_DEVICE: return TPI_ERROR_IO_FILE_ACCESS; + case ERROR_GET_ATTRIBUTES: return TPI_ERROR_IO_FILE_GETINFO; + case ERROR_SET_ATTRIBUTES: return TPI_ERROR_IO_FILE_SETINFO; + case ERROR_GET_INFORMATION: return TPI_ERROR_IO_FILE_GETINFO; + case ERROR_GET_POINT: return TPI_ERROR_IO_FILE_POINT; + case ERROR_SET_POINT: return TPI_ERROR_IO_FILE_POINT; + case ERROR_CONVERT_TIME: return TPI_ERROR_UNDEFINED; + case ERROR_GET_TIME: return TPI_ERROR_IO_FILE_GETINFO; + case ERROR_SET_TIME: return TPI_ERROR_IO_FILE_SETINFO; + case ERROR_CLOSE_FILE: return TPI_ERROR_IO_FILE_CLOSE; + case ERROR_HEAP_MEMORY: return TPI_ERROR_D_USEMEMORY; + case ERROR_HANDLE: return TPI_ERROR_UNDEFINED; + case ERROR_TIME_STAMP_RANGE:return TPI_ERROR_UNDEFINED; + case ERROR_MAKE_ARCHIVE: return TPI_ERROR_ARC_BROKEN_MISC; + case ERROR_NOT_CONFIRM_NAME:return TPI_ERROR_ARC_BROKEN_HEADER; + case ERROR_UNEXPECTED_EOF: return TPI_ERROR_ARC_BROKEN_HEADER; + case ERROR_INVALID_END_MARK:return TPI_ERROR_ARC_BROKEN_SIZE; + case ERROR_INVOLVED_LZH: return TPI_ERROR_ARC_BROKEN_MISC; + case ERROR_NO_END_MARK: return TPI_ERROR_ARC_BROKEN_SIZE; + case ERROR_HDR_INVALID_SIZE:return TPI_ERROR_ARC_BROKEN_HEADER; + case ERROR_UNKNOWN_LEVEL: return TPI_ERROR_ARC_UNSUPPORTED; + case ERROR_BROKEN_DATA: return TPI_ERROR_ARC_BROKEN_MISC; + case ERROR_INVALID_PATH: return TPI_ERROR_UNDEFINED; + case ERROR_TOO_BIG: return TPI_ERROR_IO_FILE_WRITE; + case ERROR_EXECUTABLE_FILE: return TPI_ERROR_UNDEFINED; + case ERROR_INVALID_VALUE: return TPI_ERROR_UNDEFINED; + default: return TPI_ERROR_UNDEFINED; + } +} + +#define GetAPIAddress(name, unicode) GetProcAddress(g_LibInfo.hLib, (g_LibInfo.szPrefix + wxT(name) + ((unicode && g_LibInfo.fUnicode) ? wxT("W") : wxEmptyString)).char_str()) + +//****************************************************************************** +// Functions +//****************************************************************************** + +#ifdef __cplusplus +extern "C" +{ +#endif + +int __stdcall GetPluginInformation +( + unsigned int _uInfoId, + wxULongLong _llSubOption, + void * _pPtr +) +{ + // ƒpƒXÝ’èBTODO : íœB + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); + + if (_pPtr == NULL) + { + return TPI_ERROR_D_PARAMETER; + } + switch (LOWORD(_uInfoId)) + { + case TPI_INFO_VERSION_MAJOR: + case TPI_INFO_VERSION_MINOR: + * (int *) _pPtr = 0; + break; + case TPI_INFO_VERSION_API: + * (int *) _pPtr = 2; + break; + case TPI_INFO_SUPPORTED_TYPE: + case TPI_INFO_SUPPORTED_SUFFIX: + { + // xml‰ðÍŠJŽnB + wxXmlDocument config(g_szAppPath + wxT("/lib/calLibrary.xml")); + // ˆê‹C‚ɐ擪‚̃‰ƒCƒuƒ‰ƒŠ‚̏î•ñ‚ðŽæ“¾B + wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren(); + + // “K“–‚Ȉʒu‚܂ňړ®B + for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL;) + { + xmlLibrary = xmlLibrary->GetNext(); + if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix"))) + { + i++; + } + } + if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library")) + { + // xml•¶–@ƒGƒ‰[B + return TPI_ERROR_UNDEFINED; + } + + * (wxString *) _pPtr = xmlLibrary->GetPropVal(LOWORD(_uInfoId) == TPI_INFO_SUPPORTED_TYPE ? wxT("typename") : wxT("suffix"), wxEmptyString); + break; + } + default: + return TPI_ERROR_D_UNSUPPORTED; + } + return TPI_ERROR_SUCCESS; +} + +int __stdcall LoadPlugin +( + const wxString & _szArcName, + wxULongLong _llSubOption +) +{ + // ƒpƒXÝ’èB + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); + + // xml‰ðÍŠJŽnB + wxXmlDocument config(g_szAppPath + wxT("/lib/calLibrary.xml")); + if (! config.IsOk()) + { + return TPI_ERROR_UNDEFINED; + } + // ˆê‹C‚ɐ擪‚̃‰ƒCƒuƒ‰ƒŠ‚̏î•ñ‚ðŽæ“¾B + wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren(); + + // ‘Ώۂª‘¶Ý‚·‚é‚È‚ç‚ΑΉž‚·‚郉ƒCƒuƒ‰ƒŠ‚𒲍¸A + // ‘Ώۂª‘¶Ý‚µ‚È‚¢‚È‚ç‚ÎŽwŽ¦‚³‚ꂽƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒhB + if (! ::wxFileExists(_szArcName)) + { + // “K“–‚Ȉʒu‚܂ňړ®B + int u = 0; + for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL; u++) + { + xmlLibrary = xmlLibrary->GetNext(); + if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix"))) + { + i++; + } + } + if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library")) + { + // xml•¶–@ƒGƒ‰[B + return TPI_ERROR_UNDEFINED; + } + g_LibInfo.nLibIndex = u; + g_LibInfo.node = * xmlLibrary; + + // ƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒhB + g_LibInfo.hLib = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name"), wxEmptyString).c_str()); + if (g_LibInfo.hLib == NULL) + { + return TPI_ERROR_U_LOAD_LIBRARY; + } + g_LibInfo.szPrefix = xmlLibrary->GetPropVal(wxT("prefix"), wxEmptyString); + g_LibInfo.fUnicode = xmlLibrary->GetPropVal(wxT("unicode"), wxT("0")) == wxT("1"); + g_LibInfo.node.GetPropVal(wxT("exflag"), wxT("0")).ToULong(& g_LibInfo.nExFlag); + + // ‘ã‘Öƒ‰ƒCƒuƒ‰ƒŠ‚àƒ[ƒhBƒ[ƒh‚Å‚«‚È‚­‚Ä‚àƒGƒ‰[‚É‚Í‚µ‚È‚¢B + g_LibInfo.szPrefixAlt = xmlLibrary->GetPropVal(wxT("prefix-alt"), wxEmptyString); + g_LibInfo.fUnicodeAlt = xmlLibrary->GetPropVal(wxT("unicode-alt"), wxT("0")) == wxT("1"); + g_LibInfo.hLibAlt = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString).c_str()); + + return TPI_ERROR_SUCCESS; + } + + // –³ŒÀƒ‹[ƒv‚Ɋׂç‚È‚¢‚悤ãŒÀ‚ðÝ’èB + for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++) + { + // ƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒhB + g_LibInfo.hLib = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name"), wxEmptyString).c_str()); + if (g_LibInfo.hLib == NULL) + { + xmlLibrary = xmlLibrary->GetNext(); + continue; + } + g_LibInfo.szPrefix = xmlLibrary->GetPropVal(wxT("prefix"), wxEmptyString); + g_LibInfo.fUnicode = xmlLibrary->GetPropVal(wxT("unicode"), wxT("0")) == wxT("1"); + g_LibInfo.node.GetPropVal(wxT("exflag"), wxT("0")).ToULong(& g_LibInfo.nExFlag); + + // ‘ã‘Öƒ‰ƒCƒuƒ‰ƒŠ‚àƒ[ƒhBƒ[ƒh‚Å‚«‚È‚­‚Ä‚àƒGƒ‰[‚É‚Í‚µ‚È‚¢B + g_LibInfo.szPrefixAlt = xmlLibrary->GetPropVal(wxT("prefix-alt"), wxEmptyString); + g_LibInfo.fUnicodeAlt = xmlLibrary->GetPropVal(wxT("unicode-alt"), wxT("0")) == wxT("1"); + g_LibInfo.hLibAlt = ::LoadLibrary((const WCHAR *) xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString).c_str()); + g_LibInfo.node = * xmlLibrary; + + // ‘ŒÉ‚ɑΉž‚µ‚Ä‚¢‚é‚©ƒ`ƒFƒbƒNB + if (CheckArchive(_szArcName, NULL) == TPI_ERROR_SUCCESS) + { + // ‘Ήž‚µ‚Ä‚¢‚ê‚Ώˆ—‚ðI—¹B + return TPI_ERROR_SUCCESS; + } + + ::FreeLibrary(g_LibInfo.hLib); + xmlLibrary = xmlLibrary->GetNext(); + } + + return TPI_ERROR_U_LOAD_LIBRARY; +} + +int __stdcall FreePlugin +( + void * // _pReserved +) +{ + ::FreeLibrary(g_LibInfo.hLib); + ::FreeLibrary(g_LibInfo.hLibAlt); + return TPI_ERROR_SUCCESS; +} + +int __stdcall CheckArchive +( + const wxString & _szArcName, + int * _nFileCount +) +{ + // Unicodeƒ‚[ƒh‚ɐݒèB + FARPROC fpProc = ::GetAPIAddress("SetUnicodeMode", false); + g_fExistUnicodeMode = fpProc != NULL; + if (g_fExistUnicodeMode) + { + ((BOOL (__stdcall *)(BOOL)) fpProc)(TRUE); + } + + fpProc = ::GetAPIAddress("CheckArchive", true); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + if (! (g_LibInfo.fUnicode + ? ((BOOL (__stdcall *)(const wchar_t *, const int)) fpProc)(_szArcName.wchar_str(), 0) + : ((BOOL (__stdcall *)(const char *, const int)) fpProc)(g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str(), 0) + )) + { + return TPI_ERROR_D_UNSUPPORTED; + } + + if (_nFileCount != NULL) + { + fpProc = ::GetAPIAddress("GetFileCount", true); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + * _nFileCount = g_LibInfo.fUnicode + ? ((int (__stdcall *)(const wchar_t *)) fpProc)(_szArcName.wchar_str()) + : ((int (__stdcall *)(const char *)) fpProc)(g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str()); + if (* _nFileCount == -1) + { + return TPI_ERROR_ARC_UNSUPPORTED; + } + } + + return TPI_ERROR_SUCCESS; +} + +int __stdcall OpenArchive +( + const wxString & _szArcName, + void * * _hArchive +) +{ + FARPROC fpProc = ::GetAPIAddress("OpenArchive", true); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + * _hArchive = g_LibInfo.fUnicode + ? ((void * (__stdcall *)(const HWND, const wchar_t *, const DWORD)) fpProc)(NULL, _szArcName.wchar_str(), 0) + : ((void * (__stdcall *)(const HWND, const char *, const DWORD)) fpProc)(NULL, g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str(), 0); + return _hArchive == NULL ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS; +} + +int __stdcall CloseArchive +( + void * _hArchive +) +{ + FARPROC fpProc = ::GetAPIAddress("CloseArchive", false); + return fpProc == NULL ? TPI_ERROR_U_USE_LIBRARY : CalErrorCodeConvert(((int (__stdcall *)(void *)) fpProc)(_hArchive)); +} + +int __stdcall GetFileInformation +( + void * _hArchive, + TPI_FILEINFO * _fiInfo, + bool _bFirst +) +{ + static unsigned int s_uFileID; + int nResult; + INDIVIDUALINFO iiInfo; + INDIVIDUALINFOW iiInfoW; + memset(& iiInfo, 0, sizeof(iiInfo)); + memset(& iiInfoW, 0, sizeof(iiInfoW)); + + if (_bFirst) + { + s_uFileID = 0; + FARPROC fpProc = ::GetAPIAddress("FindFirst", true); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + nResult = g_LibInfo.fUnicode + ? ((int (__stdcall *)(void *, const wchar_t *, LPINDIVIDUALINFOW)) fpProc)(_hArchive, L"*", & iiInfoW) + : ((int (__stdcall *)(void *, const char *, LPINDIVIDUALINFO)) fpProc)(_hArchive, "*", & iiInfo); + } + else + { + FARPROC fpProc = ::GetAPIAddress("FindNext", true); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + nResult = g_LibInfo.fUnicode + ? ((int (__stdcall *)(void *, LPINDIVIDUALINFOW)) fpProc)(_hArchive, & iiInfoW) + : ((int (__stdcall *)(void *, LPINDIVIDUALINFO)) fpProc)(_hArchive, & iiInfo); + } + + nResult = CalErrorCodeConvert(nResult); + if (nResult == TPI_ERROR_SUCCESS) + { + FARPROC fpProc = ::GetAPIAddress("GetAttribute", false); + _fiInfo->dwAttribute = (fpProc == NULL) ? 0 : ((int (__stdcall *)(void *)) fpProc)(_hArchive); + if ((signed) _fiInfo->dwAttribute == -1) + { + _fiInfo->dwAttribute = 0; + } + + if (g_LibInfo.fUnicode) + { + _fiInfo->dwCRC32 = iiInfoW.dwCRC; + _fiInfo->uOSType = iiInfoW.uOSType; + _fiInfo->llPackedSize = iiInfoW.dwCompressedSize; + _fiInfo->llUnpackedSize = iiInfoW.dwOriginalSize; + _fiInfo->tmModified.SetFromDOS(MAKELONG(iiInfoW.wTime, iiInfoW.wDate)); + _fiInfo->szStoredName = WC2String(iiInfoW.szFileName); + _fiInfo->szMethod = WC2String(iiInfoW.szMode); + _fiInfo->wCompressRatio = iiInfoW.wRatio; + } + else + { + _fiInfo->dwCRC32 = iiInfo.dwCRC; + _fiInfo->uOSType = iiInfo.uOSType; + _fiInfo->llPackedSize = iiInfo.dwCompressedSize; + _fiInfo->llUnpackedSize = iiInfo.dwOriginalSize; + _fiInfo->tmModified.SetFromDOS(MAKELONG(iiInfo.wTime, iiInfo.wDate)); + _fiInfo->szStoredName = MB2String(iiInfo.szFileName); + _fiInfo->szMethod = MB2String(iiInfo.szMode); + _fiInfo->wCompressRatio = iiInfo.wRatio; + } + _fiInfo->llFileID = s_uFileID++; + _fiInfo->fnFileName = wxFileName::FileName(_fiInfo->szStoredName); +// _fiInfo->ftAccessTime = 0; +// _fiInfo->ftCreateTime = 0; + } + + return nResult; +} + +int __stdcall GetArchiveInformation +( + void * _hArchive, + TPI_ARCHIVEINFO * _aiInfo +) +{ + FARPROC fpProc = ::GetAPIAddress("GetArcFileName", true); + if (fpProc != NULL) + { + // TODO : ƒtƒ@ƒCƒ‹–¼‚Ì•¶Žš”§ŒÀ‚ð“P”pB + wxString s; + if (g_LibInfo.fUnicode) + { + wchar_t sz[2049]; + ((int (__stdcall *)(void *, wchar_t *, const int)) fpProc)(_hArchive, sz, 2048); + s = WC2String(sz); + } + else + { + char sz[2049]; + ((int (__stdcall *)(void *, char *, const int)) fpProc)(_hArchive, sz, 2048); + s = MB2String(sz); + } + _aiInfo->fnArchive = wxFileName::FileName(s); + } + + fpProc = ::GetAPIAddress("GetArcFileSizeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llFileSize); + } + else + { + fpProc = ::GetAPIAddress("GetArcFileSize", false); + if (fpProc != NULL) + { + _aiInfo->llFileSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive); + } + } + + fpProc = ::GetAPIAddress("GetArcOriginalSizeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llUnpackedSize); + } + else + { + fpProc = ::GetAPIAddress("GetArcOriginalSize", false); + if (fpProc != NULL) + { + _aiInfo->llUnpackedSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive); + } + } + + fpProc = ::GetAPIAddress("GetArcCompressedSizeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llPackedSize); + } + else + { + fpProc = ::GetAPIAddress("GetArcCompressedSize", false); + if (fpProc != NULL) + { + _aiInfo->llPackedSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive); + } + } + + fpProc = ::GetAPIAddress("GetArcReadSizeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, LONGLONG *)) fpProc)(_hArchive, (LONGLONG *) & _aiInfo->llReadSize); + } + else + { + fpProc = ::GetAPIAddress("GetArcReadSize", false); + if (fpProc != NULL) + { + _aiInfo->llReadSize = ((DWORD (__stdcall *)(void *)) fpProc)(_hArchive); + } + } + + fpProc = ::GetAPIAddress("GetArcRatio", false); + if (fpProc != NULL) + { + _aiInfo->wCompressRatio = ((WORD (__stdcall *)(void *)) fpProc)(_hArchive); + } + + FILETIME ft; + fpProc = ::GetAPIAddress("GetArcAccessTimeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft); + _aiInfo->tmAccess = FileTimeToWxDateTime(& ft); + } + + fpProc = ::GetAPIAddress("GetArcCreatedTimeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft); + _aiInfo->tmCreate = FileTimeToWxDateTime(& ft); + } + + fpProc = ::GetAPIAddress("GetArcWriteTimeEx", false); + if (fpProc != NULL) + { + ((BOOL (__stdcall *)(void *, FILETIME *)) fpProc)(_hArchive, & ft); + _aiInfo->tmModified = FileTimeToWxDateTime(& ft); + } + + fpProc = ::GetAPIAddress("GetArcOSType", false); + if (fpProc != NULL) + { + _aiInfo->uOSType = ((UINT (__stdcall *)(void *)) fpProc)(_hArchive); + } + + fpProc = ::GetAPIAddress("IsSFXFile", false); + if (fpProc != NULL) + { + _aiInfo->nSFXType = ((int (__stdcall *)(void *)) fpProc)(_hArchive); + } + if (fpProc == NULL || _aiInfo->nSFXType < 0) + { + // ƒGƒ‰[‚̏ꍇ‚Í‚Æ‚è‚ ‚¦‚¸’ʏí‚̏‘ŒÉ‚Æ‚Ý‚È‚·B + _aiInfo->nSFXType = 0; + } + + return TPI_ERROR_SUCCESS; +} + +int __stdcall Command +( + unsigned int _uCommand, + TPI_SWITCHES * _swInfo, + const wxString & _szArcName, + const wxArrayString & _szFiles +) +{ + // Ini‚©‚çƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ðŽæ“¾B + wxString szPath, szCommandLine; + + // APIƒAƒhƒŒƒXŽæ“¾B + FARPROC fpProc + = g_LibInfo.node.GetPropVal( + _uCommand == TPI_COMMAND_ADD ? wxT("add") : + _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract") : + _uCommand == TPI_COMMAND_DELETE ? wxT("delete") : + _uCommand == TPI_COMMAND_UPDATE ? wxT("update") : + _uCommand == TPI_COMMAND_TEST ? wxT("test") : + _uCommand == TPI_COMMAND_REPAIR ? wxT("repair") : + _uCommand == TPI_COMMAND_MOVE ? wxT("move") : + _uCommand == TPI_COMMAND_SFX ? wxT("sfx") : + _uCommand == TPI_COMMAND_UNSFX ? wxT("unsfx") : wxEmptyString, & szCommandLine) + ? ::GetAPIAddress("", true) + : g_LibInfo.node.GetPropVal( + _uCommand == TPI_COMMAND_ADD ? wxT("add-alt") : + _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract-alt") : + _uCommand == TPI_COMMAND_DELETE ? wxT("delete-alt") : + _uCommand == TPI_COMMAND_UPDATE ? wxT("update-alt") : + _uCommand == TPI_COMMAND_TEST ? wxT("test-alt") : + _uCommand == TPI_COMMAND_REPAIR ? wxT("repair-alt") : + _uCommand == TPI_COMMAND_MOVE ? wxT("move-alt") : + _uCommand == TPI_COMMAND_SFX ? wxT("sfx-alt") : + _uCommand == TPI_COMMAND_UNSFX ? wxT("unsfx-alt") : wxEmptyString, & szCommandLine) + ? ::GetProcAddress(g_LibInfo.hLibAlt, g_LibInfo.szPrefixAlt.char_str()) : NULL; + + if (fpProc == NULL || szCommandLine.IsEmpty()) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + // ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“EƒŒƒXƒ|ƒ“ƒXƒtƒ@ƒCƒ‹ì¬B + wxString + szResponceFileName = MakeResponceFile(_szFiles, g_LibInfo.node.GetPropVal(wxT("quote-resp"), wxT("1")) == wxT("1")), + szCommandLineSend = MakeCommandLineSend(szCommandLine, _szArcName, _swInfo, _szFiles, szResponceFileName); + + // ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“ŽÀsB + int nErrorCode; + wxString szOutput; + if (g_LibInfo.fUnicode) + { + wchar_t szTmpOut[2049]; + nErrorCode = ((int (__stdcall *)(const HWND, const wchar_t *, wchar_t *, DWORD)) fpProc)(NULL, szCommandLineSend.wchar_str(), szTmpOut, 2048); + szOutput = WC2String(szTmpOut); + } + else + { + char szTmpOut[2049]; + nErrorCode = ((int (__stdcall *)(const HWND, const char *, char *, DWORD)) fpProc)(NULL, g_fExistUnicodeMode ? szCommandLineSend.ToUTF8() : szCommandLineSend.char_str(), szTmpOut, 2048); + szOutput = MB2String(szTmpOut); + } + + // ƒŒƒXƒ|ƒ“ƒXƒtƒ@ƒCƒ‹íœB + ::wxRemoveFile(szResponceFileName); + + if (nErrorCode != 0) + { +#ifdef __LINUX__ + ::wxMessageBox(wxString::Format(wxT("Error :\n%x\n\nCommandLine:\n%s\n\nOutput:\n%s"), nErrorCode, szCommandLineSend.c_str(), szOutput.c_str())); +#else + 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); +#endif + } + return CalErrorCodeConvert(nErrorCode); +} + +int __stdcall SetCallbackProc +( + TPI_PROC _prArcProc +) +{ + // ƒ|ƒCƒ“ƒ^‚ð•Û‘¶B + if (_prArcProc == NULL) + { + return TPI_ERROR_D_PARAMETER; + } + g_prProc = * _prArcProc; + g_fCallback32bit = FALSE; + + // API‚̃AƒhƒŒƒX‚ðŽæ“¾B + FARPROC fpProc = ::GetAPIAddress("SetOwnerWindowEx64", true); + + BOOL fResult = FALSE; + if (fpProc == NULL) + { + // SetOwnerWindowEx64‚ªŽÀ‘•‚³‚ê‚Ä‚¢‚È‚¢ê‡ASetOwnerWindowEx‚ð—˜—pB + fpProc = ::GetAPIAddress("SetOwnerWindowEx", true); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + g_fCallback32bit = TRUE; + fResult = ((BOOL (__stdcall *)(HWND, ARCHIVERPROC *)) fpProc)(NULL, (ARCHIVERPROC *) CallbackProc); + } + else + { + fResult = ((BOOL (__stdcall *)(HWND, ARCHIVERPROC *, DWORD)) fpProc)(NULL, (ARCHIVERPROC *) CallbackProc, g_LibInfo.fUnicode ? sizeof(EXTRACTINGINFOEX64W) : sizeof(EXTRACTINGINFOEX64)); + } + return fResult ? TPI_ERROR_SUCCESS : TPI_ERROR_UNDEFINED; +} + +#ifdef __cplusplus +} +#endif diff --git a/src/plugin/calLibrary/calLibrary.h b/src/plugin/calLibrary/calLibrary.h new file mode 100644 index 0000000..33cd53d --- /dev/null +++ b/src/plugin/calLibrary/calLibrary.h @@ -0,0 +1,241 @@ +/******************************************************************************* + 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: calLibrary.h,v 1.3 2009/09/27 10:11:13 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 _tagINDIVIDUALINFOW +{ + DWORD dwOriginalSize; + DWORD dwCompressedSize; + DWORD dwCRC; + UINT uFlag; + UINT uOSType; + WORD wRatio; + WORD wDate; + WORD wTime; + wchar_t szFileName[FNAME_MAX32 + 1]; + wchar_t dummy1[3]; + wchar_t szAttribute[8]; + wchar_t szMode[8]; +} INDIVIDUALINFOW, * LPINDIVIDUALINFOW; + +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 EXTRACTINGINFOW +{ + DWORD dwFileSize; + DWORD dwWriteSize; + wchar_t szSourceFileName[FNAME_MAX32 + 1]; + wchar_t dummy1[3]; + wchar_t szDestFileName[FNAME_MAX32 + 1]; + wchar_t dummy[3]; +} EXTRACTINGINFOW, * LPEXTRACTINGINFOW; + +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 EXTRACTINGINFOEXW +{ + EXTRACTINGINFOW exinfo; + DWORD dwCompressedSize; + DWORD dwCRC; + UINT uOSType; + WORD wRatio; + WORD wDate; + WORD wTime; + wchar_t szAttribute[8]; + wchar_t szMode[8]; +} EXTRACTINGINFOEXW, * LPEXTRACTINGINFOEXW; + +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 struct EXTRACTINGINFOEX64W +{ + DWORD dwStructSize; + EXTRACTINGINFOW exinfo; + UINT64 llFileSize; + UINT64 llCompressedSize; + UINT64 llWriteSize; + DWORD dwAttributes; + DWORD dwCRC; + UINT uOSType; + WORD wRatio; + FILETIME ftCreateTime; + FILETIME ftAccessTime; + FILETIME ftWriteTime; + wchar_t szMode[8]; + wchar_t szSourceFileName[FNAME_MAX32 + 1]; + wchar_t dummy1[3]; + wchar_t szDestFileName[FNAME_MAX32 + 1]; + wchar_t dummy2[3]; +} EXTRACTINGINFOEX64W, * LPEXTRACTINGINFOEX64W; + +typedef BOOL(CALLBACK * ARCHIVERPROC)(HWND, unsigned int, unsigned int, void *); + +#pragma pack() diff --git a/src/plugin/calLibrary/calLibrary.vcproj b/src/plugin/calLibrary/calLibrary.vcproj new file mode 100644 index 0000000..89a554f --- /dev/null +++ b/src/plugin/calLibrary/calLibrary.vcproj @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugin/cuiWrapper/Makefile b/src/plugin/cuiWrapper/Makefile new file mode 100644 index 0000000..78dd585 --- /dev/null +++ b/src/plugin/cuiWrapper/Makefile @@ -0,0 +1,28 @@ +# Makefile. +# $Id: Makefile,v 1.2 2009/08/22 13:31:54 sirakaba Exp $ + +# Define compilers. +CC = g++ +CPPFLAGS = -c -g -O3 -Wall -W -fPIC `wx-config --cppflags` +LDFLAGS = -shared -Wl,-Bsymbolic `wx-config --libs` -lwine + +# Define i/o files. +DIR_OBJ = ../../tmp/cuiWrapper +OBJS = cuiWrapper.o ../../common/library/library.o +IN_DEF = ../../common/header/plugin.def +OUT_LIB = ../../../bin/lib/cuiWrapper.so + +.PHONY: all clean +.SUFFIXES: .cpp .o + +all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS)) + $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(addprefix $(DIR_OBJ)/,$(OBJS)) + +clean: + rm -f -r $(DIR_OBJ) $(OUT_LIB) + +$(DIR_OBJ): + mkdir $(DIR_OBJ) + +$(DIR_OBJ)/%.o: %.cpp + $(CC) $(CPPFLAGS) -o $@ $< diff --git a/src/plugin/cuiWrapper/cuiWrapper.cpp b/src/plugin/cuiWrapper/cuiWrapper.cpp new file mode 100644 index 0000000..85b39d5 --- /dev/null +++ b/src/plugin/cuiWrapper/cuiWrapper.cpp @@ -0,0 +1,559 @@ +/******************************************************************************* + 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.cpp,v 1.26 2009/09/27 13:41:02 sirakaba Exp $ +*******************************************************************************/ + +//****************************************************************************** +// Includes +//****************************************************************************** + +#include "../../common/header/plugin.h" +#include "../../common/header/plugin-extra.h" +#include "../../common/library/library.h" +#include +#include +#include +#include +#include +#include "cuiWrapper.h" + +//****************************************************************************** +// Global varients +//****************************************************************************** + +struct g_LibInfo +{ + wxString szExeFile; + wxString szExeFileAlt; + wxString szListCommand; + int nLibIndex; + wxXmlNode node; +} g_LibInfo; + +TPI_PROC g_prProc; +wxString g_szAppPath; +wxArrayString g_asOutput; + +//****************************************************************************** +// Entry +//****************************************************************************** + +#ifdef __LINUX__ +void __attribute__((constructor)) Attach(void) +{ + wxStandardPaths p; +// g_szAppPath = wxPathOnly(p.GetExecutablePath()); +} + +void __attribute__((destructor)) Detach(void) +{ +} +#else +BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); + break; + } + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} +#endif + +//****************************************************************************** +// Inside Functions +//****************************************************************************** + +DWORD myExecute(wxString szCommandLine, wxString * szOutput, wxString szCwd, bool bCheckExist = false) +{ +#ifdef __LINUX__ + wxString sz = ::wxGetCwd(); + ::wxSetWorkingDirectory(szCwd); + FILE * fp = popen(szCommandLine.char_str(), "r"); + ::wxSetWorkingDirectory(sz); + if (fp == NULL) + { +// wxMessageBox(wxString::Format(wxT("Error :\n\nCommandLine:\n%s"), szCommandLine.c_str())); + return TPI_ERROR_U_USE_LIBRARY; + } +#else + SECURITY_ATTRIBUTES sa; + memset(& sa, 0, sizeof(SECURITY_ATTRIBUTES)); + sa.bInheritHandle = TRUE; + sa.nLength = sizeof(SECURITY_ATTRIBUTES); + HANDLE hRead, hWrite; + if (! ::CreatePipe(& hRead, & hWrite, & sa, 65537)) + { + return TPI_ERROR_U_USE_LIBRARY; + } + STARTUPINFO si; + memset(& si, 0, sizeof(STARTUPINFO)); + si.cb = sizeof(STARTUPINFO); + si.dwFlags = STARTF_USESTDHANDLES; + si.hStdOutput = hWrite; + si.hStdError = hWrite; + PROCESS_INFORMATION pi; + if (! ::CreateProcess(NULL, szCommandLine.wchar_str(), NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, szCwd.IsEmpty() ? NULL : szCwd.wchar_str(), & si, & pi)) + { + return TPI_ERROR_U_USE_LIBRARY; + } +#endif + + // ŽÀs‚Å‚«‚邱‚Æ‚ðŠm”F‚µ‚½‚¢‚¾‚¯‚̏ꍇ‚͏I—¹B + if (bCheckExist) + { + return TPI_ERROR_SUCCESS; + } + +#ifdef __LINUX__ + if (szOutput != NULL) + { + char sz[32769]; + memset(sz, 0, sizeof(sz)); + while (! feof(fp)) + { + fread(sz, sizeof(char), sizeof(sz) - 1, fp); + * szOutput += MB2String(sz); + } +// ::wxMessageBox(* szOutput); + } + pclose(fp); + return TPI_ERROR_SUCCESS; +#else + ::WaitForInputIdle(pi.hProcess, INFINITE); + ::WaitForSingleObject(pi.hProcess, INFINITE); + + DWORD nErrorCode = 0; + ::GetExitCodeProcess(pi.hProcess, & nErrorCode); + ::CloseHandle(pi.hThread); + ::CloseHandle(pi.hProcess); + + if (szOutput != NULL) + { + DWORD dwSize = 0; + char sz[32769]; + memset(sz, 0, sizeof(sz)); + for (wxULongLong llSize = 0; llSize < ::GetFileSize(hRead, NULL); llSize += dwSize) + { + dwSize = 0; + ::ReadFile(hRead, sz, sizeof(sz) - 1, & dwSize, NULL); + * szOutput += MB2String(sz); +// ::MessageBoxA(NULL, sz, NULL, 0); + } + } + ::CloseHandle(hRead); + ::CloseHandle(hWrite); + + return nErrorCode == 0 ? TPI_ERROR_SUCCESS : TPI_ERROR_UNDEFINED; +#endif +} + +//****************************************************************************** +// Functions +//****************************************************************************** + +#ifdef __cplusplus +extern "C" +{ +#endif + +int __stdcall GetPluginInformation +( + unsigned int _uInfoId, + wxULongLong _llSubOption, + void * _pPtr +) +{ + // ƒpƒXÝ’èBTODO : íœB + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); + + if (_pPtr == NULL) + { + return TPI_ERROR_D_PARAMETER; + } + switch (LOWORD(_uInfoId)) + { + case TPI_INFO_VERSION_MAJOR: + case TPI_INFO_VERSION_MINOR: + * (int *) _pPtr = 0; + break; + case TPI_INFO_VERSION_API: + * (int *) _pPtr = 2; + break; + case TPI_INFO_SUPPORTED_TYPE: + case TPI_INFO_SUPPORTED_SUFFIX: + { + // xml‰ðÍŠJŽnB + wxXmlDocument config(g_szAppPath + wxT("/lib/cuiWrapper.xml")); + // ˆê‹C‚ɐ擪‚̃‰ƒCƒuƒ‰ƒŠ‚̏î•ñ‚ðŽæ“¾B + wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren(); + + // “K“–‚Ȉʒu‚܂ňړ®B + for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL;) + { + xmlLibrary = xmlLibrary->GetNext(); + if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix")) && myExecute(xmlLibrary->GetPropVal(wxT("name"), wxEmptyString), NULL, wxEmptyString, true) == TPI_ERROR_SUCCESS) + { + i++; + } + } + if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library")) + { + // xml•¶–@ƒGƒ‰[B + return TPI_ERROR_UNDEFINED; + } + + * (wxString *) _pPtr = xmlLibrary->GetPropVal(LOWORD(_uInfoId) == TPI_INFO_SUPPORTED_TYPE ? wxT("typename") : wxT("suffix"), wxEmptyString); + break; + } + default: + return TPI_ERROR_D_UNSUPPORTED; + } + return TPI_ERROR_SUCCESS; +} + +int __stdcall LoadPlugin +( + const wxString & _szArcName, + wxULongLong _llSubOption +) +{ + // ƒpƒXÝ’èB + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); + + // xml‰ðÍŠJŽnB + wxXmlDocument config(g_szAppPath + wxT("/lib/cuiWrapper.xml")); + if (! config.IsOk()) + { + return TPI_ERROR_UNDEFINED; + } + // ˆê‹C‚ɐ擪‚̃‰ƒCƒuƒ‰ƒŠ‚̏î•ñ‚ðŽæ“¾B + wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren(); + + // ‘Ώۂª‘¶Ý‚·‚é‚È‚ç‚ΑΉž‚·‚郉ƒCƒuƒ‰ƒŠ‚𒲍¸A + // ‘Ώۂª‘¶Ý‚µ‚È‚¢‚È‚ç‚ÎŽwŽ¦‚³‚ꂽƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒhB + if (! ::wxFileExists(_szArcName)) + { + // “K“–‚Ȉʒu‚܂ňړ®B + int u = 0; + for (unsigned int i = 0; i < _llSubOption && xmlLibrary != NULL; u++) + { + xmlLibrary = xmlLibrary->GetNext(); + // ŽÀsƒtƒ@ƒCƒ‹‚Ì‘¶Ý‚ðŠm”FB + if (xmlLibrary != NULL && xmlLibrary->HasProp(wxT("suffix")) && myExecute(xmlLibrary->GetPropVal(wxT("name"), wxEmptyString), NULL, wxEmptyString, true) == TPI_ERROR_SUCCESS) + { + i++; + } + } + if (xmlLibrary == NULL || xmlLibrary->GetName() != wxT("library")) + { + // xml•¶–@ƒGƒ‰[B + return TPI_ERROR_UNDEFINED; + } + g_LibInfo.nLibIndex = u; + g_LibInfo.szExeFile = xmlLibrary->GetPropVal(wxT("name"), wxEmptyString); + g_LibInfo.szExeFileAlt = xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString); + g_LibInfo.node = * xmlLibrary; + + return TPI_ERROR_SUCCESS; + } + + // –³ŒÀƒ‹[ƒv‚Ɋׂç‚È‚¢‚悤ãŒÀ‚ðÝ’èB + for (g_LibInfo.nLibIndex = 0; g_LibInfo.nLibIndex < 300 && xmlLibrary != NULL; g_LibInfo.nLibIndex++) + { + // ƒ‰ƒCƒuƒ‰ƒŠ‚ðƒ[ƒhB + g_LibInfo.szExeFile = xmlLibrary->GetPropVal(wxT("name"), wxEmptyString); + g_LibInfo.szExeFileAlt = xmlLibrary->GetPropVal(wxT("name-alt"), wxEmptyString); + g_LibInfo.node = * xmlLibrary; + + // ‘ŒÉ‚ɑΉž‚µ‚Ä‚¢‚é‚©ƒ`ƒFƒbƒNB + if (CheckArchive(_szArcName, NULL) == TPI_ERROR_SUCCESS) + { + // ‘Ήž‚µ‚Ä‚¢‚ê‚Ώˆ—‚ðI—¹B + return TPI_ERROR_SUCCESS; + } + + xmlLibrary = xmlLibrary->GetNext(); + } + + return TPI_ERROR_U_LOAD_LIBRARY; +} + +int __stdcall FreePlugin +( + void * // _pReserved +) +{ + return TPI_ERROR_SUCCESS; +} + +int __stdcall CheckArchive +( + const wxString & _szArcName, + int * _nFileCount +) +{ + wxFileName fnArchive(_szArcName); + wxArrayString asExt = ::wxStringTokenize(g_LibInfo.node.GetPropVal(wxT("suffix"), wxEmptyString), wxT(";")); + if (! g_LibInfo.node.HasProp(wxT("list"))) + { + return TPI_ERROR_ARC_UNSUPPORTED; + } + + for (size_t i = 0; i < asExt.GetCount(); i++) + { + // .tar.XXX‚È‚Ç“ñd”»’è‚ւ̑ΉžB +// if (asExt[i].IsSameAs(fnArchive.GetExt(), false)) + if (fnArchive.GetFullName().EndsWith(wxT('.') + asExt[i])) + { + // ‘ΉžB + if (_nFileCount != NULL) + { + // ƒtƒ@ƒCƒ‹”‚Í“K“–‚ɁB + * _nFileCount = 1; + } + + // ŽÀs‚µ‚ÄŠm”FB + return myExecute(g_LibInfo.szExeFile + wxT(" ") + MakeCommandLineSend(g_LibInfo.node.GetPropVal(wxT("list"), wxEmptyString), _szArcName, NULL, NULL, wxEmptyString), NULL, wxEmptyString); + } + } + + return TPI_ERROR_ARC_UNSUPPORTED; +} + +int __stdcall OpenArchive +( + const wxString & _szArcName, + void * * _hArchive +) +{ + wxString szOutput; + if (myExecute(g_LibInfo.szExeFile + wxT(" ") + MakeCommandLineSend(g_LibInfo.node.GetPropVal(wxT("list"), wxEmptyString), _szArcName, NULL, NULL, wxEmptyString), & szOutput, wxEmptyString) != TPI_ERROR_SUCCESS) + { + return TPI_ERROR_U_USE_LIBRARY; + } + g_asOutput = ::wxStringTokenize(szOutput, wxT("\r\n")); + * _hArchive = & g_asOutput; + return g_asOutput.Count() == 0 ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS; +} + +int __stdcall CloseArchive +( + void * _hArchive +) +{ + ((wxArrayString *) _hArchive)->Clear(); + return TPI_ERROR_SUCCESS; +} + +int __stdcall GetFileInformation +( + void * _hArchive, + TPI_FILEINFO * _fiInfo, + bool _bFirst +) +{ + static size_t s_uCurrentLine; + static wxULongLong s_llFileID; + if (_hArchive == NULL) + { + return TPI_ERROR_UNDEFINED; + } + wxArrayString asOutput = * (wxArrayString *) _hArchive; + + wxString szStartLine = g_LibInfo.node.GetPropVal(wxT("list-line-s"), wxEmptyString); + if (_bFirst) + { + s_llFileID = 0; + if (! szStartLine.IsEmpty()) + { + for (s_uCurrentLine = 0; s_uCurrentLine < asOutput.Count(); s_uCurrentLine++) + { + if (asOutput[s_uCurrentLine] == szStartLine) + { + // ŽŸ‚̍s‚֐i‚ñ‚ŏI—¹B + s_uCurrentLine++; + break; + } + } + } + } + + if (s_uCurrentLine >= asOutput.Count()) + { + // ‘ŒÉ‚ª“ǂݍž‚ß‚È‚©‚Á‚½H + return TPI_ERROR_ARC_UNSUPPORTED; + } + + // ÅIs‚©‚Ç‚¤‚©Šm”FB + if (asOutput[s_uCurrentLine] == g_LibInfo.node.GetPropVal(wxT("list-line-e"), szStartLine)) + { + return TPI_ERROR_UNDEFINED; + } + + // ƒtƒ@ƒCƒ‹–¼‚ðŽæ“¾B + unsigned long nStartPos = 0, nEndPos = 0, nLine = 0; + g_LibInfo.node.GetPropVal(wxT("list-fname-s"), wxEmptyString).ToULong(& nStartPos); + g_LibInfo.node.GetPropVal(wxT("list-fname-c"), wxEmptyString).ToULong(& nEndPos); + g_LibInfo.node.GetPropVal(wxT("list-fname-l"), wxT("0")).ToULong(& nLine); + _fiInfo->szStoredName = nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos); + _fiInfo->szStoredName.Trim(); + _fiInfo->fnFileName = wxFileName::wxFileName(_fiInfo->szStoredName); + + // ˆ³kŒãƒTƒCƒYŽæ“¾B + wxULongLong_t nTemp; + nStartPos = 0, nEndPos = 0; + g_LibInfo.node.GetPropVal(wxT("list-psize-s"), wxEmptyString).ToULong(& nStartPos); + g_LibInfo.node.GetPropVal(wxT("list-psize-c"), wxEmptyString).ToULong(& nEndPos); + g_LibInfo.node.GetPropVal(wxT("list-psize-l"), wxT("0")).ToULong(& nLine); + if (nStartPos != 0 || nEndPos != 0) + { + wxString sz = nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos); + sz.ToULongLong(& nTemp); + _fiInfo->llPackedSize = nTemp; + } + + // ˆ³k‘OƒTƒCƒYŽæ“¾B + nStartPos = 0, nEndPos = 0; + g_LibInfo.node.GetPropVal(wxT("list-usize-s"), wxEmptyString).ToULong(& nStartPos); + g_LibInfo.node.GetPropVal(wxT("list-usize-c"), wxEmptyString).ToULong(& nEndPos); + g_LibInfo.node.GetPropVal(wxT("list-usize-l"), wxT("0")).ToULong(& nLine); + if (nStartPos != 0 || nEndPos != 0) + { + wxString sz = nEndPos == 0 ? asOutput[s_uCurrentLine + nLine].Mid(nStartPos) : asOutput[s_uCurrentLine + nLine].Mid(nStartPos, nEndPos); + sz.ToULongLong(& nTemp); + _fiInfo->llUnpackedSize = nTemp; + } + + // XVŽžŽæ“¾B + nStartPos = 0, nEndPos = 0; + g_LibInfo.node.GetPropVal(wxT("list-date-s"), wxEmptyString).ToULong(& nStartPos); + g_LibInfo.node.GetPropVal(wxT("list-date-c"), wxEmptyString).ToULong(& nEndPos); + g_LibInfo.node.GetPropVal(wxT("list-date-l"), wxT("0")).ToULong(& nLine); + if (nStartPos != 0 || nEndPos != 0) + { + _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)); + } + + // ÅŒã‚ÉŽŸ‚̍s‚֐i‚ß‚Ä‚¨‚­B + _fiInfo->llFileID = s_llFileID++; + g_LibInfo.node.GetPropVal(wxT("list-line-c"), wxT("1")).ToULong(& nStartPos); + s_uCurrentLine += nStartPos; + + return TPI_ERROR_SUCCESS; +} + +int __stdcall GetArchiveInformation +( + void *, + TPI_ARCHIVEINFO * +) +{ + return TPI_ERROR_SUCCESS; +} + +int __stdcall Command +( + unsigned int _uCommand, + TPI_SWITCHES * _swInfo, + const wxString & _szArcName, + const wxArrayString & _szFiles +) +{ + // xml‚©‚çƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ðŽæ“¾B + wxString szPath, szCommandLine; + + // APIƒAƒhƒŒƒXŽæ“¾B + if (! g_LibInfo.node.GetPropVal( + _uCommand == TPI_COMMAND_ADD ? wxT("add") : + _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract") : + _uCommand == TPI_COMMAND_DELETE ? wxT("delete") : + _uCommand == TPI_COMMAND_UPDATE ? wxT("update") : + _uCommand == TPI_COMMAND_TEST ? wxT("test") : + _uCommand == TPI_COMMAND_REPAIR ? wxT("repair") : + _uCommand == TPI_COMMAND_MOVE ? wxT("move") : + _uCommand == TPI_COMMAND_SFX ? wxT("sfx") : + _uCommand == TPI_COMMAND_UNSFX ? wxT("unsfx") : wxEmptyString, & szCommandLine)) + { + g_LibInfo.node.GetPropVal( + _uCommand == TPI_COMMAND_ADD ? wxT("add-alt") : + _uCommand == TPI_COMMAND_EXTRACT ? wxT("extract-alt") : + _uCommand == TPI_COMMAND_DELETE ? wxT("delete-alt") : + _uCommand == TPI_COMMAND_UPDATE ? wxT("update-alt") : + _uCommand == TPI_COMMAND_TEST ? wxT("test-alt") : + _uCommand == TPI_COMMAND_REPAIR ? wxT("repair-alt") : + _uCommand == TPI_COMMAND_MOVE ? wxT("move-alt") : + _uCommand == TPI_COMMAND_SFX ? wxT("sfx-alt") : + _uCommand == TPI_COMMAND_UNSFX ? wxT("unsfx-alt") : wxEmptyString, & szCommandLine); + } + + if (szCommandLine.IsEmpty()) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + // ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“EƒŒƒXƒ|ƒ“ƒXƒtƒ@ƒCƒ‹ì¬B + wxString + szResponceFileName = MakeResponceFile(_szFiles, g_LibInfo.node.GetPropVal(wxT("quote-resp"), wxT("1")) == wxT("1")), + szCommandLineSend = MakeCommandLineSend(szCommandLine, _szArcName, _swInfo, _szFiles, szResponceFileName); + + // ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“ŽÀsB + wxString szOutput; + DWORD nErrorCode = myExecute(g_LibInfo.szExeFile + wxT(" ") + szCommandLineSend, & szOutput, _swInfo->fnDestinationDirectory.GetFullPath()); + + // ƒŒƒXƒ|ƒ“ƒXƒtƒ@ƒCƒ‹íœB + ::wxRemoveFile(szResponceFileName); + + if (nErrorCode != TPI_ERROR_SUCCESS) + { +#ifdef __LINUX__ + ::wxMessageBox(wxString::Format(wxT("Error :\n%d\n\nCommandLine:\n%s\n\nOutput:\n%s"), nErrorCode, szCommandLineSend.c_str(), szOutput.c_str())); +#else + 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); +#endif + } + return nErrorCode; +} + +int __stdcall SetCallbackProc +( + TPI_PROC _prArcProc +) +{ + // ƒ|ƒCƒ“ƒ^‚ð•Û‘¶B + if (_prArcProc == NULL) + { + return TPI_ERROR_D_PARAMETER; + } + g_prProc = * _prArcProc; + + return TPI_ERROR_SUCCESS; +} + +#ifdef __cplusplus +} +#endif diff --git a/src/plugin/cuiWrapper/cuiWrapper.h b/src/plugin/cuiWrapper/cuiWrapper.h new file mode 100644 index 0000000..0e0a67a --- /dev/null +++ b/src/plugin/cuiWrapper/cuiWrapper.h @@ -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 index 0000000..1a8a078 --- /dev/null +++ b/src/plugin/cuiWrapper/cuiWrapper.vcproj @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugin/spiLibrary/Makefile b/src/plugin/spiLibrary/Makefile new file mode 100644 index 0000000..ab4d05d --- /dev/null +++ b/src/plugin/spiLibrary/Makefile @@ -0,0 +1,29 @@ +# Makefile. +# $Id: Makefile,v 1.6 2009/08/23 04:25:53 sirakaba Exp $ + +# Define compilers. +CC = g++ +CPPFLAGS = -c -O3 -Wall -W -fPIC `wx-config --cppflags` +LDFLAGS = -shared -Wl,-Bsymbolic -s `wx-config --libs` +# -lwinecaller + +# Define i/o files. +DIR_OBJ = ../../tmp/spiLibrary +OBJS = spiLibrary-wx.o ../../common/library/library.o +IN_DEF = ../../common/header/plugin.def +OUT_LIB = ../../../bin/lib/spiLibrary.so + +.PHONY: all clean +.SUFFIXES: .cpp .o + +all: $(DIR_OBJ) $(addprefix $(DIR_OBJ)/,$(OBJS)) + $(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(addprefix $(DIR_OBJ)/,$(OBJS)) + +clean: + rm -f -r $(DIR_OBJ) $(OUT_LIB) + +$(DIR_OBJ): + mkdir $(DIR_OBJ) + +$(DIR_OBJ)/%.o: %.cpp + $(CC) $(CPPFLAGS) -o $@ $< diff --git a/src/plugin/spiLibrary/spiLibrary.cpp b/src/plugin/spiLibrary/spiLibrary.cpp new file mode 100644 index 0000000..68c0116 --- /dev/null +++ b/src/plugin/spiLibrary/spiLibrary.cpp @@ -0,0 +1,507 @@ +/******************************************************************************* + 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.cpp,v 1.9 2009/08/23 04:25:53 sirakaba Exp $ +*******************************************************************************/ + +//****************************************************************************** +// Includes +//****************************************************************************** + +#include "../../common/header/plugin.h" +#include "../../common/header/plugin-extra.h" +#include "../../common/library/library.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "spiLibrary.h" + +//****************************************************************************** +// Global varients +//****************************************************************************** + +HMODULE g_hLib; +TPI_PROC g_prProc; +unsigned int g_uFileCount; +unsigned int g_uFilePointer; +wxString g_szAppPath; + +//****************************************************************************** +// Entry +//****************************************************************************** + +#ifdef __LINUX__ +void __attribute__((constructor)) Attach(void) +{ + wxStandardPaths p; + g_szAppPath = wxPathOnly(p.GetExecutablePath()); +} + +void __attribute__((destructor)) Detach(void) +{ + ::FreeLibrary(g_hLib); +} + +#else +BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + wxStandardPaths p; + g_szAppPath = ::wxPathOnly(p.GetExecutablePath()); + break; + } + case DLL_PROCESS_DETACH: + ::FreeLibrary(g_hLib); + break; + } + return TRUE; +} +#endif + +//****************************************************************************** +// Callback Wrapper +//****************************************************************************** + +int __stdcall CallbackProc(int _nNow, int _nMax, long _lData) +{ + // \‘¢‘Ì‚ð‰Šú‰»B + TPI_PROCESSINFO piInfo; + piInfo.uMessage = TPI_MESSAGE_STATUS; + piInfo.uStatus = _nNow == 0 ? TPI_STATUS_BEGINPROCESS + : _nNow == _nMax ? TPI_STATUS_ENDPROCESS + : _nNow < 0 ? TPI_STATUS_OPENARCHIVE : TPI_STATUS_INPROCESS; + piInfo.llProcessedSize = _nNow; + piInfo.fiInfo.llUnpackedSize = _nMax; + piInfo.fiInfo.fnFileName = * (wxFileName *) _lData; + + // ƒR[ƒ‹ƒoƒbƒNŠÖ”‚É‘—MB + if (g_prProc == NULL) + { + return TRUE; + } + + return g_prProc(TPI_NOTIFY_COMMON, & piInfo) == TPI_CALLBACK_CANCEL; +} + +//****************************************************************************** +// Inside Functions +//****************************************************************************** + +int SpiErrorCodeConvert(int nSpiErrorCode) +{ + switch (nSpiErrorCode) + { + case -1: return TPI_ERROR_U_USE_LIBRARY; + case 0: return TPI_ERROR_SUCCESS; + case 1: return TPI_ERROR_D_SKIPPED; + case 2: return TPI_ERROR_ARC_UNSUPPORTED; + case 3: return TPI_ERROR_ARC_BROKEN_MISC; + case 4: return TPI_ERROR_D_OUTOFMEMORY; + case 5: return TPI_ERROR_D_USEMEMORY; + case 6: return TPI_ERROR_IO_ARC_READ; + default: return TPI_ERROR_UNDEFINED; + } +} + +//****************************************************************************** +// Functions +//****************************************************************************** + +#ifdef __cplusplus +extern "C" +{ +#endif + +int __stdcall GetPluginInformation +( + unsigned int _uInfoId, + wxULongLong, + void * _pPtr +) +{ + if (_pPtr == NULL) + { + return TPI_ERROR_D_PARAMETER; + } + switch (LOWORD(_uInfoId)) + { + case TPI_INFO_VERSION_MAJOR: + case TPI_INFO_VERSION_MINOR: + * (int *) _pPtr = 0; + break; + case TPI_INFO_VERSION_API: + * (int *) _pPtr = 2; + break; + default: + return TPI_ERROR_D_PARAMETER; + } + return TPI_ERROR_SUCCESS; +} + +int __stdcall LoadPlugin +( + const wxString & _szArcName, + wxULongLong +) +{ + wxDir fs(g_szAppPath + wxT("/lib/")); + wxString szSPIName = wxEmptyString; + bool b = fs.GetFirst(& szSPIName, wxT("*.spi")); + while (b) + { + // SPI‚ðƒ[ƒhB + wxString szLibName = g_szAppPath + wxT("/lib/") + szSPIName; + g_hLib = ::LoadLibraryA(szLibName.char_str()); + if (g_hLib == NULL) + { + b = fs.GetNext(& szSPIName); + continue; + } + + // GetPluginInfo‚ðŽÀsB + FARPROC fpProc = ::GetProcAddress(g_hLib, "GetPluginInfo"); + char szPluginType[5]; // Ží—Þ4bytes + NULL + if (fpProc == NULL + || ((int (PASCAL *)(int, char *, int)) fpProc)(0, szPluginType, sizeof(szPluginType)) < 0 + || szPluginType[2] != 'A' || szPluginType[3] != 'M') + { + ::FreeLibrary(g_hLib); + b = fs.GetNext(& szSPIName); + continue; + } + + // ‘ŒÉ‚ɑΉž‚µ‚Ä‚¢‚é‚©ƒ`ƒFƒbƒNB + if (CheckArchive(_szArcName, NULL) == TPI_ERROR_SUCCESS) + { + // ‘Ήž‚µ‚Ä‚¢‚ê‚Ώˆ—‚ðI—¹B + return TPI_ERROR_SUCCESS; + } + + b = fs.GetNext(& szSPIName); + } + return TPI_ERROR_U_LOAD_LIBRARY; +} + +int __stdcall FreePlugin +( + void * // _pReserved +) +{ + ::FreeLibrary(g_hLib); + return TPI_ERROR_SUCCESS; +} + +int __stdcall CheckArchive +( + const wxString & _szArcName, + int * _nFileCount +) +{ + FARPROC fpProc = ::GetProcAddress(g_hLib, "IsSupported"); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + wxFile hFile(_szArcName, wxFile::read); + if (! hFile.IsOpened()) + { + return TPI_ERROR_IO_ARC_OPEN; + } + + char buffer[2050]; + ::ZeroMemory(buffer, sizeof(buffer)); + if (hFile.Read(buffer, sizeof(buffer)) == wxInvalidOffset) + { + hFile.Close(); + return TPI_ERROR_IO_ARC_READ; + } + + if (! ((BOOL (PASCAL *)(const char *, unsigned long)) fpProc)(_szArcName.char_str(), (unsigned long) buffer)) + { + hFile.Close(); + return TPI_ERROR_D_UNSUPPORTED; + } + hFile.Close(); + + fpProc = ::GetProcAddress(g_hLib, "GetArchiveInfo"); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + HLOCAL hMemory; + int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.char_str(), 0, 0, & hMemory)); + if (nReturnCode == TPI_ERROR_SUCCESS) + { + if (_nFileCount != NULL) + { + * _nFileCount = int(::LocalSize(hMemory) / sizeof(fileInfo)); + } + ::LocalFree(hMemory); + } + + return nReturnCode; +} + +int __stdcall OpenArchive +( + const wxString & _szArcName, + void * * _hArchive +) +{ + FARPROC fpProc = ::GetProcAddress(g_hLib, "GetArchiveInfo"); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.char_str(), 0, 0, _hArchive)); + if (nReturnCode != TPI_ERROR_SUCCESS) + { + return nReturnCode; + } + + g_uFilePointer = 0; + g_uFileCount = (unsigned int) (::LocalSize(* _hArchive) / sizeof(fileInfo)); + + return * _hArchive == NULL ? TPI_ERROR_IO_ARC_OPEN : nReturnCode; +} + +int __stdcall CloseArchive +( + void * _hArchive +) +{ + return ::LocalFree(_hArchive) == NULL ? TPI_ERROR_SUCCESS : TPI_ERROR_IO_ARC_CLOSE; +} + +int __stdcall GetFileInformation +( + void * _hArchive, + TPI_FILEINFO * _fiInfo, + bool _bFirst +) +{ + if (_bFirst) + { + g_uFilePointer = 0; + } + + if (g_uFilePointer > g_uFileCount) + { + return TPI_ERROR_UNDEFINED; + } + + fileInfo pfiInfo = ((fileInfo *) ::LocalLock(_hArchive))[g_uFilePointer]; + if (pfiInfo.method[0] == 0) + { + // ’š”J‚ȃvƒ‰ƒOƒCƒ“‚Ì‚½‚߂̐”‡‚킹 (^^; + g_uFileCount = g_uFilePointer; + return TPI_ERROR_UNDEFINED; + } + + _fiInfo->dwAttribute = 0; + _fiInfo->dwCRC32 = pfiInfo.crc; + _fiInfo->llPackedSize = pfiInfo.compsize; + _fiInfo->llUnpackedSize = pfiInfo.filesize; + _fiInfo->wCompressRatio = pfiInfo.compsize >= pfiInfo.filesize ? 1000 : (WORD) (1000 * pfiInfo.compsize / pfiInfo.filesize); + _fiInfo->llFileID = g_uFilePointer++; + _fiInfo->tmModified = pfiInfo.timestamp; + _fiInfo->pCustomInfo = NULL; + _fiInfo->szStoredName = MB2String(pfiInfo.path) + MB2String(pfiInfo.filename); + _fiInfo->fnFileName = wxFileName::FileName(_fiInfo->szStoredName); + _fiInfo->szMethod = MB2String((char *) pfiInfo.method); + _fiInfo->pCustomInfo = (void *) pfiInfo.position; + ::LocalUnlock(_hArchive); + + return TPI_ERROR_SUCCESS; +} + +int __stdcall GetArchiveInformation +( + void *, // _hArchive, + TPI_ARCHIVEINFO * // _aiInfo +) +{ + // TODO : wxFileName‚©‚çî•ñŽæ“¾B + return TPI_ERROR_SUCCESS; +} + +int __stdcall Command +( + unsigned int _uCommand, + TPI_SWITCHES * _swInfo, + const wxString & _szArcName, + const wxArrayString & _szFiles +) +{ + if (_uCommand != TPI_COMMAND_EXTRACT) + { + return TPI_ERROR_D_UNSUPPORTED; + } + + // “WŠJˆ—‚Ì‚Ý‚ðs‚¤B + FARPROC fpProc = ::GetProcAddress(g_hLib, "GetFile"); + if (fpProc == NULL) + { + return TPI_ERROR_U_USE_LIBRARY; + } + + // ‘ŒÉƒnƒ“ƒhƒ‹‚ðŽæ“¾B + void * hArchive; + int nResult = OpenArchive(_szArcName, & hArchive); + if (nResult != TPI_ERROR_SUCCESS) + { + return nResult; + } + + // ƒR[ƒ‹ƒoƒbƒN‚𑗐MB•Ö‹Xã-1‚𑗐MB + wxFileName _fnArcName(_szArcName); + if (CallbackProc(-1, 0, (long) & _fnArcName)) + { + return TPI_ERROR_D_SKIPPED; + } + + // ˆ—ŽÀsB + TPI_FILEINFO fiInfo; + nResult = GetFileInformation(hArchive, & fiInfo, TRUE); + if (nResult == TPI_ERROR_SUCCESS) + { + do + { + // ƒR[ƒ‹ƒoƒbƒN‚𑗐MB + if (CallbackProc(0, fiInfo.llUnpackedSize.ToULong(), (long) & fiInfo.fnFileName)) + { + nResult = TPI_ERROR_D_SKIPPED; + break; + } + + // ˆ—‘Ώۂ©‚Ç‚¤‚©”»’èB + if (_szFiles.Count() != 0) + { + size_t i; + for (i = 0; i < _szFiles.Count(); i++) + { + if (_szFiles[i] == fiInfo.szStoredName) + { + break; + } + } + if (i == _szFiles.Count()) + { + continue; + } + } + + // o—Í–¼ì¬B + wxString szTargetPath = _swInfo->fnDestinationDirectory.GetPathWithSep(); + if (_swInfo->fStoreDirectoryPathes) + { + // “WŠJæƒfƒBƒŒƒNƒgƒŠ‚ðì¬B + szTargetPath += fiInfo.fnFileName.GetFullPath(); + wxFileName fnDest(szTargetPath); + if (! fnDest.Mkdir(0777, wxPATH_MKDIR_FULL) || ::wxDirExists(fnDest.GetFullPath())) + { + nResult = TPI_ERROR_IO_DIR_WRITE; + break; + } + } + else + { + szTargetPath += fiInfo.fnFileName.GetFullName(); + } + + // ƒtƒ@ƒCƒ‹o—͂ɂ͑Ήž‚µ‚Ä‚È‚¢‚̂сƒ‚ƒŠo—Í‚Å‘ãsB + HLOCAL hMemory = NULL; + 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)); + if (nResult == TPI_ERROR_SUCCESS && hMemory == NULL) + { + nResult = TPI_ERROR_UNDEFINED; + } + if (nResult != TPI_ERROR_SUCCESS) + { + break; + } + + // “WŠJæ‚ɏo—́B + wxFile hFile; + // ‹­§ã‘‚«‚·‚é‚Ì‚Å’ˆÓB + if (! hFile.Create(szTargetPath, true)) + { + nResult = TPI_ERROR_IO_FILE_OPEN; + break; + } + + bool bErrorOccured = hFile.Write(::LocalLock(hMemory), (size_t) fiInfo.llUnpackedSize.GetValue()) != fiInfo.llUnpackedSize; + ::LocalUnlock(hMemory); + ::LocalFree(hMemory); + hFile.Close(); + if (bErrorOccured) + { + nResult = TPI_ERROR_IO_FILE_WRITE; + break; + } + nResult = TPI_ERROR_SUCCESS; + + // ƒR[ƒ‹ƒoƒbƒN‚𑗐MB + if (CallbackProc(fiInfo.llUnpackedSize.ToULong(), fiInfo.llUnpackedSize.ToULong(), (long) & fiInfo.fnFileName)) + { + nResult = TPI_ERROR_D_SKIPPED; + break; + } + } + while ((nResult = GetFileInformation(hArchive, & fiInfo, FALSE)) != TPI_ERROR_UNDEFINED); + if (nResult == TPI_ERROR_UNDEFINED) + { + // I’[‚É’B‚µ‚½ê‡B + nResult = TPI_ERROR_SUCCESS; + } + } + CloseArchive(hArchive); + + return nResult; +} + +int __stdcall SetCallbackProc +( + TPI_PROC _prArcProc +) +{ + // ƒ|ƒCƒ“ƒ^‚ð•Û‘¶B + if (_prArcProc == NULL) + { + return TPI_ERROR_D_PARAMETER; + } + g_prProc = * _prArcProc; + + return TPI_ERROR_SUCCESS; +} + +#ifdef __cplusplus +} +#endif diff --git a/src/plugin/spiLibrary/spiLibrary.h b/src/plugin/spiLibrary/spiLibrary.h new file mode 100644 index 0000000..84533a7 --- /dev/null +++ b/src/plugin/spiLibrary/spiLibrary.h @@ -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 index 0000000..6e1fd7e --- /dev/null +++ b/src/plugin/spiLibrary/spiLibrary.vcproj @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tpi.sln b/src/tpi.sln new file mode 100644 index 0000000..617d503 --- /dev/null +++ b/src/tpi.sln @@ -0,0 +1,52 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugin", "plugin", "{0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199}" + ProjectSection(SolutionItems) = preProject + common\header\plugin-extra.h = common\header\plugin-extra.h + common\header\plugin.def = common\header\plugin.def + common\header\plugin.h = common\header\plugin.h + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "handle", "handle", "{7A8E3A4A-C2D7-40FD-89E4-2E8621B16A4B}" + ProjectSection(SolutionItems) = preProject + common\handle\TPIHandle.cpp = common\handle\TPIHandle.cpp + common\handle\TPIHandle.h = common\handle\TPIHandle.h + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frontend", "frontend\frontend.vcproj", "{50F13951-5698-4418-8353-BFDFC5A6BC13}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calLibrary-wx", "plugin\calLibrary\calLibrary.vcproj", "{3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spiLibrary-wx", "plugin\spiLibrary\spiLibrary.vcproj", "{E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cuiWrapper", "plugin\cuiWrapper\cuiWrapper.vcproj", "{B01B0D18-68C4-4A83-B816-B9D722D38619}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{85B58984-94CB-4847-A275-C75000AC6E3A}" + ProjectSection(SolutionItems) = preProject + common\library\library.cpp = common\library\library.cpp + common\library\library.h = common\library\library.h + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {50F13951-5698-4418-8353-BFDFC5A6BC13}.Release|Win32.ActiveCfg = Release|Win32 + {50F13951-5698-4418-8353-BFDFC5A6BC13}.Release|Win32.Build.0 = Release|Win32 + {3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}.Release|Win32.ActiveCfg = Release|Win32 + {3AC2C4C6-6D2D-4774-829F-BA043A49FEAF}.Release|Win32.Build.0 = Release|Win32 + {E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}.Release|Win32.ActiveCfg = Release|Win32 + {E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D}.Release|Win32.Build.0 = Release|Win32 + {B01B0D18-68C4-4A83-B816-B9D722D38619}.Release|Win32.ActiveCfg = Release|Win32 + {B01B0D18-68C4-4A83-B816-B9D722D38619}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3AC2C4C6-6D2D-4774-829F-BA043A49FEAF} = {0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199} + {E3AEAFF4-3AC3-4C0E-87D4-CD537F3C5B8D} = {0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199} + {B01B0D18-68C4-4A83-B816-B9D722D38619} = {0E7CC57B-177A-4DFA-ADC7-1BCB89D0C199} + EndGlobalSection +EndGlobal -- 2.11.0