--- AE/Installer/trunk/source/main_window.cpp 2009/06/29 19:23:42 379 +++ AE/Installer/trunk/source/main_window.cpp 2009/07/17 01:55:31 436 @@ -1,3 +1,15 @@ +#ifndef NTDDI_VERSION +#define NTDDI_VERSION NTDDI_WIN7 +#endif +#ifdef WIN32 + #include +#include +HWND Handle; + +ITaskbarList *pTaskbarList; +ITaskbarList3 *pTaskbarList3; +#endif + /* AE/Mod Installer by Gumby and Iritscen @@ -30,7 +42,7 @@ #include #endif -//const string strInstallerVersion = "1.0"; + const bool SPLIT = 1; const bool NOT_SPLIT = 0; bool splitInstances = SPLIT; @@ -58,6 +70,17 @@ using namespace std; #include "boost/date_time/date_parsing.hpp" #include "boost/date_time/posix_time/posix_time.hpp" +string escapePath(string input) { + + string output; + string escape_me = "& ;()|<>\"'\\#*?$"; + for(int i = 0; i < input.size(); i++) { + for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '\\'; + output += input[i]; + } + return output; +} + int globalizeData(void) { busy = 1; @@ -98,7 +121,7 @@ int globalizeData(void) path TRAM = Animations / "level0_TRAM"; vector GDFPaths; - GDFPaths.push_back(Characters); + //GDFPaths.push_back(Characters); GDFPaths.push_back(Particles); GDFPaths.push_back(Textures); GDFPaths.push_back(Sounds); @@ -106,17 +129,17 @@ int globalizeData(void) GDFPaths.push_back(TRAM); - path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni"; - path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni"; - path VanillaTextures = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni"; - path VanillaSounds = "packages/VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni"; - path VanillaAnimations = "packages/VanillaDats/level0_Final/level0_Animations/level0_Animations.oni"; - path VanillaTRAC = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni"; - path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni"; + path VanillaCharacters = "VanillaDats/level0_Final/level0_Characters/level0_Characters.oni"; + path VanillaParticles = "VanillaDats/level0_Final/level0_Particles/level0_Particles.oni"; + path VanillaTextures = "VanillaDats/level0_Final/level0_Textures/level0_Textures.oni"; + path VanillaSounds = "VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni"; + path VanillaAnimations = "VanillaDats/level0_Final/level0_Animations/level0_Animations.oni"; + path VanillaTRAC = "VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni"; + path VanillaTRAM = "VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni"; vector VanillaPaths; - VanillaPaths.push_back(VanillaCharacters); + //VanillaPaths.push_back(VanillaCharacters); VanillaPaths.push_back(VanillaParticles); VanillaPaths.push_back(VanillaTextures); VanillaPaths.push_back(VanillaSounds); @@ -146,12 +169,11 @@ int globalizeData(void) create_directory( "packages" ); - if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats"); - create_directory( "packages/VanillaDats" ); - - create_directory( "packages/VanillaDats/level0_Final/" ); + if (exists("VanillaDats")) remove_all("VanillaDats"); + create_directory( "VanillaDats" ); + create_directory( "VanillaDats/level0_Final/" ); //blah blah finish this. - //logfile << "packages/VanillaDats/level0_Final/ created"; + //logfile << "VanillaDats/level0_Final/ created"; create_directory( Characters ); create_directory( Particles ); create_directory( Archive ); @@ -183,8 +205,8 @@ int globalizeData(void) create_directory( "../GameDataFolder/level" + levels[i] + "_Final" ); // setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat"); system((strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat").c_str()); - create_directory( "packages/VanillaDats/level" + levels[i] + "_Final" ); - create_directory( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" ); + create_directory( "VanillaDats/level" + levels[i] + "_Final" ); + create_directory( "VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" ); directory_iterator end_iter; for ( directory_iterator dir_itr( "../GameDataFolder/level" + levels[i] + "_Final" ); dir_itr != end_iter; ++dir_itr ) @@ -207,7 +229,7 @@ int globalizeData(void) else remove(dir_itr->path()); } else if (dir_itr->path().filename().substr(0,4) == "TRAC" - || dir_itr->path().filename().substr(0,4) == "ONVL") { + ) { cout <path().filename() << "\n"; if(!exists( TRAC / dir_itr->filename())) rename(dir_itr->path(), TRAC / dir_itr->filename()); else remove(dir_itr->path()); @@ -227,6 +249,7 @@ int globalizeData(void) else if (dir_itr->path().filename().substr(0,4) == "ONCC" || dir_itr->path().filename().substr(0,4) == "TRBS" || dir_itr->path().filename().substr(0,4) == "ONCV" + || dir_itr->path().filename().substr(0,4) == "ONVL" || dir_itr->path().filename().substr(0,4) == "TRMA" || dir_itr->path().filename().substr(0,4) == "TRSC" || dir_itr->path().filename().substr(0,4) == "TRAS") { @@ -261,11 +284,18 @@ int globalizeData(void) if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename()); else remove(dir_itr->path()); } + else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding + cout <path().filename() << "\n"; + + if(!exists( "VanillaDats/level0_Final/level0_Final/" + dir_itr->filename())) rename(dir_itr->path(), "VanillaDats/level0_Final/level0_Final/" + dir_itr->filename()); + else remove(dir_itr->path()); + } + if (exists(dir_itr->path())) { } else { - //logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; + logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; } } @@ -287,12 +317,15 @@ int globalizeData(void) //printf(levels[i],"%d",levels[i]); //printf(Step_x_x,"Step %d/%d: reimporting level", parts_done + 1, 7 + 2 * num_levels); setStatusArea((string)Step_x_x + levels[i] + (string)"_Final.dat"); setStatusArea("Step " + lexical_cast(parts_done + 1) + "/" + lexical_cast(total_steps) + " reimporting level" + levels[i]+"_Final.oni"); - system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" - + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str()); + logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level" + + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n'; + string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level" + + levels[i] + "_Final/level" + levels[i] + "_Final.oni"); + system(sys_str.c_str() ); setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); parts_done++; } - create_directory( VanillaCharacters.parent_path() ); + //create_directory( VanillaCharacters.parent_path() ); create_directory( VanillaParticles.parent_path() ); create_directory( VanillaTextures.parent_path() ); create_directory( VanillaSounds.parent_path() ); @@ -305,6 +338,9 @@ int globalizeData(void) parts_done++; setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); } + logfile << "\nMoving level0_Characters\n"; + setStatusArea("Step " + lexical_cast(parts_done + 1) + "/" + lexical_cast(total_steps) + ": moving level0_Characters" ); + copy((path)"../GameDataFolder/level0_Characters", (path)("VanillaDats/level0_Final")); /* printf(Step_x_x,"Step %d/%d: reimporting level0_Characters", parts_done,7 + 2 * num_levels); setStatusArea((string)Step_x_x);setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) )); system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str()); @@ -325,28 +361,30 @@ int globalizeData(void) create_directory((path)"../GameDataFolder/IGMD"); copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); setProgressBar( 1000 ); - - // CIP:last of all, set up the edition folder as a playable Oni installation by placing the latest application (+ Daodan DLL on Windows) in edition/ - - // CIP:then copy persist.dat and keyconfig.txt into edition/ as well + + if(exists("../../persist.dat")) if(!exists("../persist.dat")) + copy("../../persist.dat",".."); + if(exists("../../key_config.txt"))if(!exists("../key_config.txt")) + copy("../../key_config.txt",".."); #ifndef WIN32 /* On Mac only, set the current GDF to the AE GDF by writing to Oni's global preferences file (thankfully a standard OS X ".plist" XML file). - If there are no Oni prefs (only possible if Oni has not been run even once), then the above line will fail silently, no harm done, - and when the user does run Oni for the first time, using the copy of the app in the AE GDF, Oni will set the prefs to use that GDF at that point */ - path fullAEpath = system_complete("."); // get full path for Installer - char prefsCommand[300] = "defaults write com.godgames.oni RetailInstallationPath -string '"; - strcat(prefsCommand, fullAEpath.parent_path().parent_path().string().c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) + Tests for presence of prefs with [ -f ] before doing anything so it doesn't create a partial prefs file -- just in case user has never + run Oni before :-p */ + string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for edition/ + char prefsCommand[300] = "[ -f ~/Library/Preferences/com.godgames.oni.plist ] && defaults write com.godgames.oni RetailInstallationPath -string '"; + strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters system(prefsCommand); #endif + setStatusArea((string)"Done! Now select your mod packages and click install."); // while(1) Sleep(-1); } - catch (exception ex) { + catch (exception & ex) { setStatusArea("Warning, handled exception: " + (string)ex.what()); } @@ -507,29 +545,34 @@ ModPackage fileToModPackage(fstream &fil } void recompileAll(vector installedMods) -{ +{try { busy = 1; using namespace boost::gregorian; using namespace boost::posix_time; using boost::lexical_cast; using boost::bad_lexical_cast; - - setStatusArea("Importing levels..."); - //setStatusArea("Recompiling Data..."); - path vanilla_dir = "./packages/VanillaDats/"; + path vanilla_dir = "./VanillaDats/"; string importCommand = ""; char statusString[128]; int numberOfDats = 0; int j = 1; string datString; + + + setStatusArea("Importing levels..."); + //setStatusArea("Recompiling Data..."); + std::stringstream out; ptime start_time(second_clock::local_time()); clearOldDats(); - remove("Install.log"); + + if(exists("Install.log")) remove("Install.log"); ofstream logfile("Install.log"); logfile << "Mod Installation started " << to_simple_string(start_time) << endl; logfile.close(); + + if(splitInstances == SPLIT){ recursive_directory_iterator end_iter; @@ -543,17 +586,22 @@ void recompileAll(vector install numberOfDats++; } } - catch(exception ex) { + catch(exception & ex) { + remove("Install.log"); + ofstream logfile("Install.log"); + + logfile << "Warning, exception " << ex.what() << "!"; + setStatusArea("Warning, exception " + (string)ex.what() + "!"); + logfile.close(); } } - + try { //recursive_directory_iterator end_iter; - + out << numberOfDats; datString = out.str(); - try { for ( recursive_directory_iterator dir_itr( vanilla_dir ); dir_itr != end_iter; ++dir_itr ) @@ -567,7 +615,7 @@ void recompileAll(vector install if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename() )) importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename(); - //else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/"; + //else cout << " VanillaDats/" + installedMods[i] + "/oni/"; } importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; @@ -635,8 +683,7 @@ void recompileAll(vector install { if ( is_directory( dir_itr->status() ) ) { - importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename() - + ".dat"; + importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " "; for (int i = 0; i < installedMods.size(); ++i) { if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename() )) importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename(); @@ -685,8 +732,20 @@ void recompileAll(vector install Sleep(1000); setProgressBar(0); - busy = 0; + } + catch(exception & ex) { + remove("Install.log"); + ofstream logfile("Install.log"); + + + logfile << "Warning, exception " << ex.what() << "!"; + setStatusArea("Warning, exception " + (string)ex.what() + "!"); + logfile.close(); + } + busy = 0; +} + void writeInstalledMods(vector installedMods) { @@ -797,13 +856,14 @@ vector globalPackages; #endif ////@begin includes -#include "about_window.h" +#include "about.h" ////@end includes #include "main_window.h" ////@begin XPM images -#include "redo.xpm" +#include "aelogosmall.xpm" +#include "undo.xpm" #include "fileopen.xpm" #include "filesaveas.xpm" #include "quit.xpm" @@ -826,36 +886,36 @@ IMPLEMENT_CLASS( MainWindow, wxFrame ) BEGIN_EVENT_TABLE( MainWindow, wxFrame ) ////@begin MainWindow event table entries -EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick ) + EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick ) -EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick ) + EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick ) -EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected ) -EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled ) + EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected ) + EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled ) -EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate ) + EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate ) -EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick ) + EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick ) -EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected ) + EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected ) -EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected ) + EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected ) -EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected ) + EVT_RADIOBUTTON( Seperated_RadioButton, MainWindow::OnSeperatedRadioButtonSelected ) -EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected ) + EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected ) -EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick ) + EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick ) -EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick ) + EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick ) -EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick ) + EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick ) -EVT_MENU( wxID_EXIT, MainWindow::OnExitClick ) + EVT_MENU( wxID_EXIT, MainWindow::OnExitClick ) -EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick ) + EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick ) -EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick ) + EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick ) ////@end MainWindow event table entries @@ -885,13 +945,11 @@ MainWindow::MainWindow( wxWindow* parent bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { ////@begin MainWindow creation - wxFrame::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - SetIcon(GetIconResource(wxT("oni_special.ico"))); - Centre(); - + wxFrame::Create( parent, id, caption, pos, size, style ); + CreateControls(); + SetIcon(GetIconResource(wxT("aelogosmall.png"))); + Centre(); ////@end MainWindow creation return true; } @@ -915,22 +973,22 @@ MainWindow::~MainWindow() void MainWindow::Init() { ////@begin MainWindow member initialisation - MainSplitter = NULL; - SelectAll = NULL; - RefreshButton = NULL; - Mods_CheckboxList = NULL; - titleText = NULL; - creatorText = NULL; - descriptionText = NULL; - StatusArea = NULL; - ProgressBar = NULL; - InstallButton = NULL; - OptionsPanel = NULL; - SepRadio = NULL; - NoSepRadio = NULL; - SeparatedRadio = NULL; - CompleteRadio = NULL; - ReglobalizeButton = NULL; + MainSplitter = NULL; + SelectAll = NULL; + RefreshButton = NULL; + Mods_CheckboxList = NULL; + titleText = NULL; + creatorText = NULL; + descriptionText = NULL; + StatusArea = NULL; + ProgressBar = NULL; + InstallButton = NULL; + OptionsPanel = NULL; + SepRadio = NULL; + NoSepRadio = NULL; + SeperatedRadio = NULL; + CompleteRadio = NULL; + ReglobalizeButton = NULL; ////@end MainWindow member initialisation } @@ -945,180 +1003,204 @@ wxGauge* TheProgressBar; void MainWindow::CreateControls() { ////@begin MainWindow content construction - // Generated by DialogBlocks, 31/05/2009 19:03:55 (unregistered) + MainWindow* itemFrame1 = this; - MainWindow* itemFrame1 = this; - - wxMenuBar* menuBar = new wxMenuBar; - wxMenu* itemMenu37 = new wxMenu; - { - wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL); - wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm"))); - menuItem->SetBitmap(bitmap); - itemMenu37->Append(menuItem); - } - { - wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL); - wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm"))); - menuItem->SetBitmap(bitmap); - itemMenu37->Append(menuItem); - } - itemMenu37->AppendSeparator(); - { - wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL); - wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm"))); - menuItem->SetBitmap(bitmap); - itemMenu37->Append(menuItem); - } - menuBar->Append(itemMenu37, _("&File")); - wxMenu* itemMenu42 = new wxMenu; - itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); - menuBar->Append(itemMenu42, _("Options")); - wxMenu* itemMenu44 = new wxMenu; - itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL); + wxMenuBar* menuBar = new wxMenuBar; + wxMenu* itemMenu37 = new wxMenu; + { + wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL); + wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm"))); + menuItem->SetBitmap(bitmap); + itemMenu37->Append(menuItem); + } + { + wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL); + wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm"))); + menuItem->SetBitmap(bitmap); + itemMenu37->Append(menuItem); + } + itemMenu37->AppendSeparator(); + { + wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL); + wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm"))); + menuItem->SetBitmap(bitmap); + itemMenu37->Append(menuItem); + } + menuBar->Append(itemMenu37, _("&File")); + wxMenu* itemMenu42 = new wxMenu; + itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); + menuBar->Append(itemMenu42, _("Options")); + wxMenu* itemMenu44 = new wxMenu; +#ifdef WIN32 itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); menuBar->Append(itemMenu44, _("Help")); - itemFrame1->SetMenuBar(menuBar); - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemFrame1->SetSizer(itemBoxSizer2); +#else + itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); +#endif + + itemFrame1->SetMenuBar(menuBar); - MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER ); - MainSplitter->SetMinimumPaneSize(150); - MainSplitter->SetName(_T("MainSplitter")); - - wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); - itemPanel4->SetSizer(itemBoxSizer5); - - wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); - SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE ); - SelectAll->SetValue(false); - SelectAll->SetName(_T("SelectAll_Checkbox")); - itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); - RefreshButton->SetName(_T("RefreshButton")); - itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5); - - wxArrayString Mods_CheckboxListStrings; - Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL ); - Mods_CheckboxList->SetName(_T("Mods_CheckboxList")); - itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0); - - wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - itemPanel10->SetName(_T("DescriptionHolder_Panel")); - wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); - itemPanel10->SetSizer(itemBoxSizer11); - - wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0); - wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); - titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - titleText->SetName(_T("Title_Text")); - titleText->SetBackgroundColour(wxColour(240, 240, 240)); - itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5); - - wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0); - creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT ); - creatorText->SetName(_T("Author_Text")); - creatorText->SetBackgroundColour(wxColour(240, 240, 240)); - itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5); - - wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - itemStaticLine17->Show(false); - itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); - - descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL ); - descriptionText->SetName(_T("DescriptionName")); - descriptionText->SetBackgroundColour(wxColour(240, 240, 240)); - itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5); - - MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150); - itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0); - - StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 ); - StatusArea->SetName(_T("StatusArea")); - StatusArea->SetFieldsCount(1); - StatusArea->SetStatusText(_("Status Area"), 0); - itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0); - - wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0); - - ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxSize(-1, 30), wxGA_SMOOTH ); - ProgressBar->SetValue(0); - itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0); - - InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxSize(-1, 30), 0 ); - itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0); - - wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0); - - OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0); - - wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); - OptionsPanel->SetSizer(itemBoxSizer25); - - wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); - - SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - SepRadio->SetValue(false); - if (MainWindow::ShowToolTips()) - SepRadio->SetToolTip(_("For PC Demo and Mac")); - itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5); - - NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 ); - NoSepRadio->SetValue(false); - if (MainWindow::ShowToolTips()) - NoSepRadio->SetToolTip(_("For PC Retail")); - itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5); - - wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5); - - wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5); - - SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - SeparatedRadio->SetValue(false); - SeparatedRadio->SetName(_T("Separated_RadioButton")); - itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5); - - CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 ); - CompleteRadio->SetValue(false); - CompleteRadio->SetName(_T("Complete_RadioButton")); - itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5); - - wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); - - wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 ); - ReglobalizeButton->SetName(_T("Reglobalize_Button")); - itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5); + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + itemFrame1->SetSizer(itemBoxSizer2); - // Connect events and objects - Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); + MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER ); + MainSplitter->SetMinimumPaneSize(1); + MainSplitter->SetName(_T("MainSplitter")); + + wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); + itemPanel4->SetSizer(itemBoxSizer5); + + wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); + SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE ); + SelectAll->SetValue(false); + SelectAll->SetName(_T("SelectAll_Checkbox")); + itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("undo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + RefreshButton->SetName(_T("RefreshButton")); + itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5); + + wxArrayString Mods_CheckboxListStrings; + Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL ); + Mods_CheckboxList->SetName(_T("Mods_CheckboxList")); + itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0); + + wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + itemPanel10->SetName(_T("DescriptionHolder_Panel")); + wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); + itemPanel10->SetSizer(itemBoxSizer11); + + wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0); + wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); + titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + titleText->SetName(_T("Title_Text")); + titleText->SetBackgroundColour(wxColour(240, 240, 240)); + itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5); + + wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0); + creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT ); + creatorText->SetName(_T("Author_Text")); + creatorText->SetBackgroundColour(wxColour(240, 240, 240)); + itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5); + + wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + itemStaticLine17->Show(false); + itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); + + descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 ); + descriptionText->SetName(_T("DescriptionName")); + descriptionText->SetBackgroundColour(wxColour(240, 240, 240)); + itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5); + + MainSplitter->SplitVertically(itemPanel4, itemPanel10, 200); + itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0); + + StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 ); + StatusArea->SetName(_T("StatusArea")); + StatusArea->SetFieldsCount(1); + StatusArea->SetStatusText(_("AE Installer v1.0.1"), 0); + itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0); + + wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0); + + ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH ); + ProgressBar->SetValue(0); + itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0); + + InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0); + + wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0); + + OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0); + + wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); + OptionsPanel->SetSizer(itemBoxSizer25); + + wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); + + SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + SepRadio->SetValue(false); + if (MainWindow::ShowToolTips()) + SepRadio->SetToolTip(_("For PC Demo and Mac")); + itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5); + + NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 ); + NoSepRadio->SetValue(false); + if (MainWindow::ShowToolTips()) + NoSepRadio->SetToolTip(_("For PC Retail")); + itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5); + + wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5); + + wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5); + + SeperatedRadio = new wxRadioButton( OptionsPanel, Seperated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + SeperatedRadio->SetValue(false); + SeperatedRadio->SetName(_T("Seperated_RadioButton")); + itemBoxSizer30->Add(SeperatedRadio, 0, wxALIGN_LEFT|wxALL, 5); + + CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 ); + CompleteRadio->SetValue(false); + CompleteRadio->SetName(_T("Complete_RadioButton")); + itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5); + + wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); + + wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 ); + ReglobalizeButton->SetName(_T("Reglobalize_Button")); + itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5); + + // Connect events and objects + Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); ////@end MainWindow content construction +#ifdef WIN32 + Handle = (HWND)GetHWND(); + ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList); +#endif - if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { - static_cast("-import:sep"); + + /*if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { + strImportOption = "-import:sep"; splitInstances = NOT_SPLIT; } else { - static_cast("-import:nosep"); + strImportOption = "-import:nosep"; splitInstances = SPLIT; - } + }*/ + +#ifndef WIN32 + strImportOption = "-import:sep"; + splitInstances = NOT_SPLIT; +#else + strImportOption = "-import:nosep"; + splitInstances = SPLIT; +#endif + +#ifndef WIN32 + strImportOption = "-import:sep"; + splitInstances = NOT_SPLIT; +#else + strImportOption = "-import:nosep"; + splitInstances = SPLIT; +#endif + globalPackages = getPackages(); globalInstalledMods = getInstallString(); for (int i = 0; i < globalPackages.size(); i++) { @@ -1130,11 +1212,14 @@ void MainWindow::CreateControls() TheInstallButton = InstallButton; TheProgressBar = ProgressBar; OptionsPanel->Hide(); - if(splitInstances == SPLIT) SeparatedRadio->SetValue(true); + +//#ifndef WIN32 +// itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); + +//#endif + + if(splitInstances == SPLIT) SeperatedRadio->SetValue(true); else CompleteRadio->SetValue(true); - - - if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true); else SepRadio->SetValue(true); @@ -1202,28 +1287,28 @@ wxBitmap MainWindow::GetBitmapResource( { // Bitmap retrieval ////@begin MainWindow bitmap retrieval - wxUnusedVar(name); - if (name == _T("redo.xpm")) - { - wxBitmap bitmap(redo_xpm); - return bitmap; - } - else if (name == _T("fileopen.xpm")) - { - wxBitmap bitmap( fileopen_xpm); - return bitmap; - } - else if (name == _T("filesaveas.xpm")) - { - wxBitmap bitmap( filesaveas_xpm); - return bitmap; - } - else if (name == _T("quit.xpm")) - { - wxBitmap bitmap( quit_xpm); - return bitmap; - } - return wxNullBitmap; + wxUnusedVar(name); + if (name == _T("undo.xpm")) + { + wxBitmap bitmap( undo_xpm); + return bitmap; + } + else if (name == _T("fileopen.xpm")) + { + wxBitmap bitmap( fileopen_xpm); + return bitmap; + } + else if (name == _T("filesaveas.xpm")) + { + wxBitmap bitmap( filesaveas_xpm); + return bitmap; + } + else if (name == _T("quit.xpm")) + { + wxBitmap bitmap( quit_xpm); + return bitmap; + } + return wxNullBitmap; ////@end MainWindow bitmap retrieval } @@ -1236,13 +1321,13 @@ wxIcon MainWindow::GetIconResource( cons // Icon retrieval ////@begin MainWindow icon retrieval - wxUnusedVar(name); - if (name == _T("oni_special.ico")) - { - // wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO); - // return icon; - } - return wxNullIcon; + wxUnusedVar(name); + if (name == _T("aelogosmall.png")) + { + wxIcon icon(aelogosmall_xpm); + return icon; + } + return wxNullIcon; ////@end MainWindow icon retrieval } @@ -1292,6 +1377,7 @@ void MainWindow::OnOptionsClick( wxComma { if (!event.GetInt() ) { OptionsPanel->Hide(); + this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());} else { // Uncomment this when we release, it gets annoying if you are testing globalization a lot ;) @@ -1328,19 +1414,29 @@ struct recompile TheInstallButton->Disable(); recompileAll(thePackages); TheInstallButton->Enable(); + } vector thePackages; }; +void globalize2(void) { + TheInstallButton->Disable(); + globalizeData(); + TheInstallButton->Enable(); +} + + + void MainWindow::OnInstallButtonClick( wxCommandEvent& event ) { vector localPackages; - localPackages.push_back("Globalize"); + localPackages.push_back("00000Globalize"); for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); if ( !localPackages.empty() ) { - + sort(localPackages.begin(), localPackages.end()); + localPackages[0] = "Globalize"; //MainWindow::MainWindow().Hide(); // boost::thread thrd2(recompileAll(localPackages) ); //MainWindow::MainWindow().Show(); @@ -1374,7 +1470,22 @@ void MainWindow::OnInstallButtonClick( w void setProgressBar( int i ) { //TheProgressBar->SetValue( +#ifdef WIN32 + + +if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3))) +{ + + pTaskbarList3->SetProgressValue(Handle,i, 1000); + if ( i == 0 ) { + + pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS); + } +} + + +#endif TheProgressBar->SetValue(i); } @@ -1387,8 +1498,8 @@ void setProgressBar( int i ) { void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event ) { ////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. } @@ -1400,10 +1511,10 @@ void MainWindow::OnStatusbarUpdate( wxUp void MainWindow::OnAboutClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. - // Before editing this code, remove the block markers. - About* window = new About(this); - int returnValue = window->ShowModal(); - window->Destroy(); + // Before editing this code, remove the block markers. + About* window = new About(this); + int returnValue = window->ShowModal(); + window->Destroy(); ////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. } @@ -1432,13 +1543,6 @@ void MainWindow::OnSepRadioButtonSelecte * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton */ -void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event ) -{ - splitInstances = SPLIT; - -} - - /* * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton */ @@ -1600,3 +1704,13 @@ event.Skip(); ////@end wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton in MainWindow. }*/ + +/* + * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton + */ + +void MainWindow::OnSeperatedRadioButtonSelected( wxCommandEvent& event ) +{ +splitInstances = SPLIT; +} +