// Includes\r
//******************************************************************************\r
\r
+#define MYUSE_LIBPATH 1\r
#include "../../common/header/plugin.h"\r
#include "../../common/header/plugin-extra.h"\r
#include "../../common/library/library.h"\r
case TPI_INFO_VERSION_API:\r
* (int *) _pPtr = 2;\r
break;\r
+ case TPI_INFO_HANDLE_ON_COMMAND:\r
+ * (int *) _pPtr = 0;\r
+ break;\r
default:\r
return TPI_ERROR_D_UNSUPPORTED;\r
}\r
\r
MakeFormatInfo(xmlLibrary, wxT("cuiWrapper"), _fiInfo, s_nFileId++);\r
wxString szExeFile = xmlLibrary->GetAttribute(wxT("name"), wxEmptyString);\r
- if (myExecute(szExeFile, NULL, wxEmptyString, szExeFile.EndsWith(wxT(".exe"))) != TPI_ERROR_SUCCESS)\r
+ if (myExecute(szExeFile, NULL, wxEmptyString, szExeFile.MakeLower().EndsWith(wxT(".exe"))) != TPI_ERROR_SUCCESS)\r
{\r
_fiInfo->eSupportedCommand = 0;\r
}\r
{\r
// .tar.XXXなど二重判定への対応。\r
// if (asExt[i].IsSameAs(fnArchive.GetExt(), false))\r
- if (fnArchive.GetFullName().EndsWith(wxT('.') + asExt[i]))\r
+ if (fnArchive.GetFullName().MakeLower().EndsWith(wxT('.') + asExt[i].MakeLower()))\r
{\r
// ライブラリをロード。\r
g_LibInfo.szExeFile = xmlLibrary->GetAttribute(wxT("name"), wxEmptyString);\r
)\r
{\r
wxString szOutput;\r
- if (myExecute(g_LibInfo.szExeFile + wxT(" ") + MakeCommandLineSend(g_LibInfo.node.GetAttribute(wxT("list"), wxEmptyString), _szArcName), & szOutput, wxEmptyString, g_LibInfo.szExeFile.EndsWith(wxT(".exe"))) != TPI_ERROR_SUCCESS)\r
+ TPI_SWITCHES swInfo;\r
+ swInfo.szArcName = _szArcName;\r
+ if (myExecute(g_LibInfo.szExeFile + wxT(" ") + MakeCommandLineSend(g_LibInfo.node.GetAttribute(wxT("list"), wxEmptyString), & swInfo), & szOutput, wxEmptyString, g_LibInfo.szExeFile.MakeLower().EndsWith(wxT(".exe"))) != TPI_ERROR_SUCCESS)\r
{\r
return TPI_ERROR_U_USE_LIBRARY;\r
}\r
}\r
\r
wxString szStartLine = g_LibInfo.node.GetAttribute(wxT("list-line-s"), wxEmptyString);\r
- if (! szStartLine.IsEmpty() && as->Index(szStartLine) == wxNOT_FOUND)\r
+ if ((! szStartLine.IsEmpty() && as->Index(szStartLine) == wxNOT_FOUND) || as->IsEmpty())\r
{\r
// 書庫が読み込めなかった?\r
+ delete as;\r
return TPI_ERROR_ARC_UNSUPPORTED;\r
}\r
\r
- return as->IsEmpty() ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS;\r
+ return TPI_ERROR_SUCCESS;\r
}\r
\r
int __stdcall CloseArchive\r
(\r
wxULongLong_t _eCommand,\r
TPI_SWITCHES * _swInfo,\r
- const wxString & _szArcName,\r
+ void *,// _hArchive,\r
const wxArrayString & _szFiles\r
)\r
{\r
// コマンドライン・レスポンスファイル作成。\r
wxString\r
szResponceFileName = MakeResponceFile(_szFiles, myGetAttributeBool(& g_LibInfo.node, wxT("quote-resp"), true)),\r
- szCommandLineSend = MakeCommandLineSend(szCommandLine, _szArcName, _swInfo, _szFiles, szResponceFileName);\r
+ szCommandLineSend = MakeCommandLineSend(szCommandLine, _swInfo, _szFiles, szResponceFileName);\r
\r
// コマンドライン実行。\r
wxString szOutput;\r
- int nErrorCode = myExecute(g_LibInfo.szExeFile + wxT(" ") + szCommandLineSend, & szOutput, _swInfo->fnDestinationDirectory.GetFullPath(), g_LibInfo.szExeFile.EndsWith(wxT(".exe")));\r
+ int nErrorCode = myExecute(g_LibInfo.szExeFile + wxT(" ") + szCommandLineSend, & szOutput, _swInfo->fnDestinationDirectory.GetFullPath(), g_LibInfo.szExeFile.MakeLower().EndsWith(wxT(".exe")));\r
\r
// レスポンスファイル削除。\r
::wxRemoveFile(szResponceFileName);\r