[Scummvm-cvs-logs] SF.net SVN: scummvm:[42629] tools/branches/gsoc2009-gui
Remere at users.sourceforge.net
Remere at users.sourceforge.net
Mon Jul 20 19:39:40 CEST 2009
Revision: 42629
http://scummvm.svn.sourceforge.net/scummvm/?rev=42629&view=rev
Author: Remere
Date: 2009-07-20 17:39:39 +0000 (Mon, 20 Jul 2009)
Log Message:
-----------
*Extensions are now case-insensitive for matching.
*Fixed bug with wizard always ending on the 'fail page'.
*Added ExtractScummMac
Modified Paths:
--------------
tools/branches/gsoc2009-gui/gui/pages.cpp
tools/branches/gsoc2009-gui/gui/pages.h
tools/branches/gsoc2009-gui/gui/tools.cpp
tools/branches/gsoc2009-gui/tool.cpp
Modified: tools/branches/gsoc2009-gui/gui/pages.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.cpp 2009-07-20 17:34:19 UTC (rev 42628)
+++ tools/branches/gsoc2009-gui/gui/pages.cpp 2009-07-20 17:39:39 UTC (rev 42629)
@@ -288,7 +288,7 @@
panel, wxID_ANY, wxEmptyString, wxT("Select a file"),
wxT("*.*"),
wxDefaultPosition, wxSize(300, -1),
- wxFLP_USE_TEXTCTRL | wxDIRP_DIR_MUST_EXIST, wxDefaultValidator,
+ wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator,
wxT("InputPicker"));
sizer->Add(picker);
panel->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(ChooseIOPage::onSelectFile), NULL, this);
@@ -1075,7 +1075,9 @@
// Check if thread finished
if (_thread && _thread->_finished) {
- // It's done, Wait deallocates resources
+ // Tool has finished
+ _success = _thread->_success;
+ // Wait deallocates thread resources
_thread->Wait();
delete _thread;
_thread = NULL;
@@ -1140,6 +1142,7 @@
{
_tool = tool;
_finished = false;
+ _success = false;
_tool->_backend->setPrintFunction(writeToOutput, reinterpret_cast<void *>(this));
_tool->_backend->setProgressFunction(gaugeProgress, reinterpret_cast<void *>(this));
@@ -1150,6 +1153,7 @@
try {
_tool->run(_configuration);
_output.buffer += "\nTool finished without errors!\n";
+ _success = true;
} catch (ToolException &err) {
wxMutexLocker lock(_output.mutex);
_output.buffer = _output.buffer + "\nFatal Error Occured: " + err.what() + "\n";
@@ -1223,6 +1227,7 @@
wxCheckBox *displayOut = new wxCheckBox(panel, wxID_ANY, wxT("Open output folder"), wxDefaultPosition, wxDefaultSize,
0, wxDefaultValidator, wxT("DisplayOutput"));
+ displayOut->SetValue(true);
sizer->Add(displayOut);
SetAlignedSizer(panel, sizer);
Modified: tools/branches/gsoc2009-gui/gui/pages.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.h 2009-07-20 17:34:19 UTC (rev 42628)
+++ tools/branches/gsoc2009-gui/gui/pages.h 2009-07-20 17:39:39 UTC (rev 42629)
@@ -368,6 +368,7 @@
static int spawnSubprocess(void *udata, const char *cmd);
bool _finished;
+ bool _success;
protected:
/** The current configuration */
Modified: tools/branches/gsoc2009-gui/gui/tools.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/tools.cpp 2009-07-20 17:34:19 UTC (rev 42628)
+++ tools/branches/gsoc2009-gui/gui/tools.cpp 2009-07-20 17:39:39 UTC (rev 42629)
@@ -58,6 +58,7 @@
#include "../extract_mm_c64.h"
#include "../extract_mm_nes.h"
#include "../extract_parallaction.h"
+#include "../extract_scumm_mac.h"
#include "../extract_zak_c64.h"
@@ -94,123 +95,8 @@
addTool(new ToolGUI(new ExtractMMC64()));
addTool(new ToolGUI(new ExtractMMNes()));
addTool(new ToolGUI(new ExtractParallaction()));
+ addTool(new ToolGUI(new ExtractScummMac()));
addTool(new ToolGUI(new ExtractZakC64()));
-
- /* "Old" tool list, will be converted incrementally
- // Compression tools
-
- // Compress agos also has a --mac parameter, need to add an additional page / option for this
- Tool compress_agos(wxT("compress_agos"), main_compress_agos, wxT("*."));
- compress_agos.addGame(wxT("Feeble Files")),
- compress_agos.addGame(wxT("Simon the Sorcerer I/II")),
- addTool(compress_agos);
-
- // compress_gob
- Tool compress_gob(wxT("compress_gob"), main_compress_gob, wxT("*.*"));
- addTool(compress_gob);
-
- // compress_kyra
- Tool compress_kyra(wxT("compress_kyra"), main_compress_kyra, wxT("*.*"));
- compress_kyra.addGame(wxT("The Legend of Kyrandia")),
- compress_kyra.addGame(wxT("The Legend of Kyrandia: Hand of Fate")),
- compress_kyra.addGame(wxT("The Legend of Kyrandia: Malcolm's Revenge")),
- compress_kyra.addGame(wxT("Lands of Lore: The Throne of Chaos")),
- addTool(compress_kyra);
-
- // compress_queen
- Tool compress_queen(wxT("compress_queen"), main_compress_queen, wxT("queen.1"));
- compress_queen.addGame(wxT("Flight of the Amazon Queen")),
- addTool(compress_queen);
-
- // compress_saga
- Tool compress_saga(wxT("compress_saga"), main_compress_saga, wxT("*.*"));
- compress_saga.addGame(wxT("SAGA: Inherit The Earth")),
- compress_saga.addGame(wxT("I Have No Mouth and I Must Scream")),
- addTool(compress_saga);
-
- // compress_scumm_bun
- Tool compress_scumm_bun(wxT("compress_scumm_bun"), main_compress_scumm_bun, wxT("*.*"));
- compress_scumm_bun.addGame(wxT("The Secret of Monkey Island")),
- compress_scumm_bun.addGame(wxT("Monkey Island 2: LeChuck's Revenge")),
- compress_scumm_bun.addGame(wxT("The Curse of Monkey Island")),
- addTool(compress_scumm_bun);
-
- // compress_scumm_san
- Tool compress_scumm_san(wxT("compress_scumm_san"), main_compress_scumm_san, wxT("*.*"));
- // Unsure of exact games...
- addTool(compress_scumm_san);
-
- // compress_scumm_sou
- Tool compress_scumm_sou(wxT("compress_scumm_sou"), main_compress_scumm_sou, wxT("*.*"));
- // Unsure of exact games...
- addTool(compress_scumm_sou);
-
- // compress_sword1
- Tool compress_sword1(wxT("compress_sword1"), main_compress_sword1, wxT("*.*"));
- compress_sword1.addGame(wxT("Broken Sword 1")),
- addTool(compress_sword1);
-
- // compress_sword2
- Tool compress_sword2(wxT("compress_sword2"), main_compress_sword2, wxT("*.*"));
- compress_sword2.addGame(wxT("Broken Sword 2")),
- addTool(compress_sword2);
-
- // compress_touche
- Tool compress_touche(wxT("compress_touche"), main_compress_touche, wxT("*.*"));
- compress_touche.addGame(wxT("Touche: The Adventures of the Fifth Musketeer")),
- addTool(compress_touche);
-
- // compress_tucker
- Tool compress_tucker(wxT("compress_tucker"), main_compress_tucker, wxT("*.*"));
- compress_tucker.addGame(wxT("Bud Tucker in Double Trouble")),
- addTool(compress_tucker);
-
- // Extraction tools
-
- // extract_kyra
- Tool extract_kyra(wxT("extract_kyra"), main_extract_kyra, wxT("*.*"));
- extract_kyra.addGame(wxT("The Legend of Kyrandia")),
- extract_kyra.addGame(wxT("The Legend of Kyrandia: Hand of Fate")),
- extract_kyra.addGame(wxT("The Legend of Kyrandia: Malcolm's Revenge")),
- extract_kyra.addGame(wxT("Lands of Lore: The Throne of Chaos")),
- addTool(extract_kyra);
-
- // extract_loom_tg16
- Tool extract_loom_tg16(wxT("extract_loom_tg16"), main_extract_loom_tg16, wxT("*.iso")); // Unsure of extension?
- extract_loom_tg16.addGame(wxT("Loom")),
- addTool(extract_loom_tg16);
-
- // extract_mm_apple
- Tool extract_mm_apple(wxT("extract_mm_apple"), main_extract_mm_apple, wxT("*.dsk"));
- extract_mm_apple.addGame(wxT("Maniac Mansion (Apple)")),
- addTool(extract_mm_apple);
-
- // extract_mm_nes
- Tool extract_mm_c64(wxT("extract_mm_c64"), main_extract_mm_c64, wxT("*.d64"));
- extract_mm_c64.addGame(wxT("Maniac Mansion (Commodore 64)")),
- addTool(extract_mm_c64);
-
- // extract_mm_nes
- Tool extract_mm_nes(wxT("extract_mm_nes"), main_extract_mm_nes, wxT("*.PRG"));
- extract_mm_nes.addGame(wxT("Maniac Mansion (NES)")),
- addTool(extract_mm_nes);
-
- // extract_sword2
- Tool extract_parallaction(wxT("extract_parallaction"), main_extract_parallaction, wxT("*.*"));
- extract_parallaction.addGame(wxT("Parallaction")),
- addTool(extract_parallaction);
-
- // extract_scumm_mac
- Tool extract_scumm_mac(wxT("extract_scumm_mac"), main_extract_scumm_mac);
- // Required for alot of games, but as ScummVM 0.6 + can read
- // these files natively, it can remain an advanced option
- addTool(extract_scumm_mac);
-
- // extract_zak_c64
- Tool extract_zak_c64(wxT("extract_zak_c64"), main_extract_zak_c64, wxT(".d64"));
- extract_zak_c64.addGame(wxT("Bud Tucker in Double Trouble")),
- addTool(extract_zak_c64);
- */
}
Tools::~Tools() {
Modified: tools/branches/gsoc2009-gui/tool.cpp
===================================================================
--- tools/branches/gsoc2009-gui/tool.cpp 2009-07-20 17:34:19 UTC (rev 42628)
+++ tools/branches/gsoc2009-gui/tool.cpp 2009-07-20 17:39:39 UTC (rev 42629)
@@ -141,7 +141,7 @@
if (cmp_filename.getExtension() == "*")
// Match anything!
return true;
- else if (cmp_filename.getExtension() == filename.getExtension())
+ else if (scumm_stricmp(cmp_filename.getExtension().c_str(), filename.getExtension().c_str()) == 0)
// Extensions are the same
return true;
} else {
@@ -149,7 +149,7 @@
if (cmp_filename.getName() == filename.getName()) {
if (cmp_filename.getExtension() == "*")
return true;
- else if (cmp_filename.getExtension() == filename.getExtension())
+ else if (scumm_stricmp(cmp_filename.getExtension().c_str(), filename.getExtension().c_str()) == 0)
// Filenames are identical
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list