OSDN Git Service

書庫化可能な形式かどうかを表すTPI_FORMATINFO::fArchiveを追加。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sat, 21 Nov 2009 11:19:22 +0000 (11:19 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sat, 21 Nov 2009 11:19:22 +0000 (11:19 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@132 9df91469-1e22-0410-86e7-ea8537beb833

bin/lib/cuiWrapper.xml
doc/history.html
src/common/handle/TPIHandle.cpp
src/common/header/plugin.h
src/common/library/library.h
src/lychee/dlg_make.cpp
src/plugin/eggArc/eggArc.cpp
src/plugin/rarArc/rarArc.cpp

index da772ae..5d27128 100644 (file)
@@ -32,7 +32,7 @@
         add     ='-c -f "%90" -T "%92"'
         extract ='-x %a0{|--xform=&apos;s|.*/\([^/]*\)|\1|&apos;} -f "%90" -C "%91" -T "%92"'
         delete  ='--delete -f "%90" -T "%92"' />
- <library name="gzip" typename="GZip" suffix="gz;Z" quote-resp="0"
+ <library name="gzip" typename="GZip" suffix="gz;Z" quote-resp="0" archive="no"
         list    ='-l -v "%90"'
         list-line-s ='method  crc     date  time           compressed        uncompressed  ratio uncompressed_name' list-line-c = "1"
         list-fname-s="75"
index 8b9158c..bf9e497 100644 (file)
@@ -18,6 +18,7 @@
      <dd>\r
       <ul>\r
        <li class="add">TPI_FILEINFO::szCommentを追加。</li>\r
+       <li class="add">書庫化可能な形式かどうかを表すTPI_FORMATINFO::fArchiveを追加。</li>\r
       </ul>\r
      </dd>\r
      <dt>Lychee</dt>\r
index 7d18f55..d2184c4 100644 (file)
@@ -104,6 +104,7 @@ bool TPIHandle::GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
        }\r
 \r
        // Initialization.\r
+       _fiInfo->fArchive           = false;\r
        _fiInfo->fComment           = false;\r
        _fiInfo->fEncryptKeyFile    = false;\r
        _fiInfo->fEncryptPassword   = false;\r
@@ -172,6 +173,7 @@ bool TPIHandle::GetFileInformation(TPI_FILEINFO * _fiInfo, bool _bFirst)
        _fiInfo->llUnpackedSize = 0;\r
        _fiInfo->szStoredName   = wxEmptyString;\r
        _fiInfo->szMethod       = wxEmptyString;\r
+       _fiInfo->szComment      = wxEmptyString;\r
        _fiInfo->wCompressRatio = 0;\r
        _fiInfo->llFileID       = 0;\r
        _fiInfo->pCustomInfo    = NULL;\r
index e16f9b5..1a9c97d 100644 (file)
 /** 対応形式についての情報を格納する構造体。 */\r
 typedef struct _TPI_tagFORMATINFO\r
 {\r
+       bool            fArchive;           /**< 複数ファイル格納対応ならtrue */\r
        bool            fComment;           /**< コメント付加対応ならtrue */\r
        bool            fEncryptKeyFile;    /**< キーファイルによるデータ暗号化に対応しているならtrue */\r
        bool            fEncryptPassword;   /**< パスワードによるデータ暗号化に対応しているならtrue */\r
index 7d7f473..28314a6 100644 (file)
@@ -50,6 +50,7 @@ inline short GetNumValue(wxXmlNode * node, wxString szValue)
 \r
 inline void MakeFormatInfo(wxString szTPIName, TPI_FORMATINFO * _fiInfo, wxXmlNode * xmlLibrary, wxULongLong llId)\r
 {\r
+       _fiInfo->fArchive     = xmlLibrary->GetPropVal(wxT("archive"), wxT("1")) == wxT("1");\r
        _fiInfo->szTypeName   = xmlLibrary->GetPropVal(wxT("typename"),wxEmptyString);\r
        _fiInfo->szSuffix     = xmlLibrary->GetPropVal(wxT("suffix"),  wxEmptyString);\r
        _fiInfo->szEngineName = xmlLibrary->GetPropVal(wxT("name"),    wxEmptyString);\r
index 6b9d636..2ee8135 100644 (file)
@@ -146,7 +146,7 @@ void MakeDialog::OnInit(wxInitDialogEvent&)
                        {
                                do
                                {
-                                       if (fiInfo.llSupportedCommand & TPI_COMMAND_ADD)
+                                       if (fiInfo.llSupportedCommand & TPI_COMMAND_ADD && (this->files.GetCount() == 1 || fiInfo.fArchive))
                                        {
                                                fiInfo.szTPIName = szTPIName;
                                                this->afInfo.Add(fiInfo);
index ca9901a..eaa4789 100644 (file)
@@ -193,6 +193,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
        _fiInfo->szTPIName    = wxT("eggArc");\r
        _fiInfo->llTypeId     = 0;\r
        _fiInfo->llSupportedCommand = TPI_COMMAND_EXTRACT;\r
+       _fiInfo->fArchive     = true;\r
        _fiInfo->fComment     = true;\r
        _fiInfo->fSFX         = true;\r
        _fiInfo->fSolid       = true;\r
index eacb5b0..1653128 100644 (file)
@@ -176,6 +176,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
        _fiInfo->szTPIName    = wxT("rarArc");\r
        _fiInfo->llTypeId     = 0;\r
        _fiInfo->llSupportedCommand = TPI_COMMAND_EXTRACT | TPI_COMMAND_TEST;\r
+       _fiInfo->fArchive     = true;\r
        _fiInfo->fComment     = true;\r
        _fiInfo->fSFX         = true;\r
        _fiInfo->fSolid       = true;\r