From: sirakaba Date: Sat, 21 Nov 2009 11:19:22 +0000 (+0000) Subject: 書庫化可能な形式かどうかを表すTPI_FORMATINFO::fArchiveを追加。 X-Git-Tag: 0.01beta5~22 X-Git-Url: http://git.osdn.net/view?p=tpi%2Flychee.git;a=commitdiff_plain;h=ea869c3eb8eb26b5336a32e5417dcd352bf88e8e 書庫化可能な形式かどうかを表すTPI_FORMATINFO::fArchiveを追加。 git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@132 9df91469-1e22-0410-86e7-ea8537beb833 --- diff --git a/bin/lib/cuiWrapper.xml b/bin/lib/cuiWrapper.xml index da772ae..5d27128 100644 --- a/bin/lib/cuiWrapper.xml +++ b/bin/lib/cuiWrapper.xml @@ -32,7 +32,7 @@ add ='-c -f "%90" -T "%92"' extract ='-x %a0{|--xform='s|.*/\([^/]*\)|\1|'} -f "%90" -C "%91" -T "%92"' delete ='--delete -f "%90" -T "%92"' /> -
Lychee
diff --git a/src/common/handle/TPIHandle.cpp b/src/common/handle/TPIHandle.cpp index 7d18f55..d2184c4 100644 --- a/src/common/handle/TPIHandle.cpp +++ b/src/common/handle/TPIHandle.cpp @@ -104,6 +104,7 @@ bool TPIHandle::GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst) } // Initialization. + _fiInfo->fArchive = false; _fiInfo->fComment = false; _fiInfo->fEncryptKeyFile = false; _fiInfo->fEncryptPassword = false; @@ -172,6 +173,7 @@ bool TPIHandle::GetFileInformation(TPI_FILEINFO * _fiInfo, bool _bFirst) _fiInfo->llUnpackedSize = 0; _fiInfo->szStoredName = wxEmptyString; _fiInfo->szMethod = wxEmptyString; + _fiInfo->szComment = wxEmptyString; _fiInfo->wCompressRatio = 0; _fiInfo->llFileID = 0; _fiInfo->pCustomInfo = NULL; diff --git a/src/common/header/plugin.h b/src/common/header/plugin.h index e16f9b5..1a9c97d 100644 --- a/src/common/header/plugin.h +++ b/src/common/header/plugin.h @@ -242,6 +242,7 @@ /** 対応形式についての情報を格納する構造体。 */ typedef struct _TPI_tagFORMATINFO { + bool fArchive; /**< 複数ファイル格納対応ならtrue */ bool fComment; /**< コメント付加対応ならtrue */ bool fEncryptKeyFile; /**< キーファイルによるデータ暗号化に対応しているならtrue */ bool fEncryptPassword; /**< パスワードによるデータ暗号化に対応しているならtrue */ diff --git a/src/common/library/library.h b/src/common/library/library.h index 7d7f473..28314a6 100644 --- a/src/common/library/library.h +++ b/src/common/library/library.h @@ -50,6 +50,7 @@ inline short GetNumValue(wxXmlNode * node, wxString szValue) inline void MakeFormatInfo(wxString szTPIName, TPI_FORMATINFO * _fiInfo, wxXmlNode * xmlLibrary, wxULongLong llId) { + _fiInfo->fArchive = xmlLibrary->GetPropVal(wxT("archive"), wxT("1")) == wxT("1"); _fiInfo->szTypeName = xmlLibrary->GetPropVal(wxT("typename"),wxEmptyString); _fiInfo->szSuffix = xmlLibrary->GetPropVal(wxT("suffix"), wxEmptyString); _fiInfo->szEngineName = xmlLibrary->GetPropVal(wxT("name"), wxEmptyString); diff --git a/src/lychee/dlg_make.cpp b/src/lychee/dlg_make.cpp index 6b9d636..2ee8135 100644 --- a/src/lychee/dlg_make.cpp +++ b/src/lychee/dlg_make.cpp @@ -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); diff --git a/src/plugin/eggArc/eggArc.cpp b/src/plugin/eggArc/eggArc.cpp index ca9901a..eaa4789 100644 --- a/src/plugin/eggArc/eggArc.cpp +++ b/src/plugin/eggArc/eggArc.cpp @@ -193,6 +193,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst) _fiInfo->szTPIName = wxT("eggArc"); _fiInfo->llTypeId = 0; _fiInfo->llSupportedCommand = TPI_COMMAND_EXTRACT; + _fiInfo->fArchive = true; _fiInfo->fComment = true; _fiInfo->fSFX = true; _fiInfo->fSolid = true; diff --git a/src/plugin/rarArc/rarArc.cpp b/src/plugin/rarArc/rarArc.cpp index eacb5b0..1653128 100644 --- a/src/plugin/rarArc/rarArc.cpp +++ b/src/plugin/rarArc/rarArc.cpp @@ -176,6 +176,7 @@ int __stdcall GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst) _fiInfo->szTPIName = wxT("rarArc"); _fiInfo->llTypeId = 0; _fiInfo->llSupportedCommand = TPI_COMMAND_EXTRACT | TPI_COMMAND_TEST; + _fiInfo->fArchive = true; _fiInfo->fComment = true; _fiInfo->fSFX = true; _fiInfo->fSolid = true;