ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/main_window.cpp
(Generate patch)

Comparing AE/Installer/trunk/source/main_window.cpp (file contents):
Revision 358 by gumby, Fri Jun 19 22:25:08 2009 UTC vs.
Revision 400 by gumby, Mon Jul 6 23:53:24 2009 UTC

# Line 1 | Line 1
1 + #ifndef NTDDI_VERSION          
2 + #define NTDDI_VERSION NTDDI_WIN7
3 + #endif
4 + #ifdef WIN32
5 + #include <windows.h>
6 + #include <shobjidl.h>
7 + HWND Handle;
8 +
9 + ITaskbarList *pTaskbarList;
10 + ITaskbarList3 *pTaskbarList3;
11 + #endif
12 +
13   /*
14 < AE/Mod Installer
15 < by Gumby and Iritscen
14 > AE/Mod Installer
15 > by Gumby and Iritscen
16   */
17  
18 < // To-do: -
18 > // To-do: - Load credits from text resource file
19   //                - Institute lots of checks into file-handling
20 < //                - Clear mod info fields when mod is de-selected ???
20 > //                - Clear mod info fields when mod is de-selected
21  
22   #define DEBUG
23   #include <stdio.h>
# Line 30 | Line 42 | by Gumby and Iritscen
42   #include <dirent.h>
43   #endif
44  
45 < const string strInstallerVersion = "1.0";
45 > //const string strInstallerVersion = "1.0";
46   const bool SPLIT = 1;
47   const bool NOT_SPLIT = 0;
48   bool splitInstances = SPLIT;
# Line 58 | Line 70 | using namespace std;
70   #include "boost/date_time/date_parsing.hpp"
71   #include "boost/date_time/posix_time/posix_time.hpp"
72  
73 + string escapePath(string input) {
74 +        
75 +        string output;
76 +        string escape_me = "& ;()|<>\"'\\#*?$";
77 +        for(int i = 0; i < input.size(); i++)  {
78 +                for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '\\';
79 +                output += input[i];
80 +        }
81 +        return output;
82 + }
83 +
84   int globalizeData(void)
85   {
86          busy = 1;
# Line 106 | Line 129 | int globalizeData(void)
129                  GDFPaths.push_back(TRAM);
130  
131  
132 <                path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni";
133 <                path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni";
134 <                path VanillaTextures  = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni";
135 <                path VanillaSounds = "packages/VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni";
136 <                path VanillaAnimations = "packages/VanillaDats/level0_Final/level0_Animations/level0_Animations.oni";
137 <                path VanillaTRAC = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni";
138 <                path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni";
132 >                path VanillaCharacters = "VanillaDats/level0_Final/level0_Characters/level0_Characters.oni";
133 >                path VanillaParticles = "VanillaDats/level0_Final/level0_Particles/level0_Particles.oni";
134 >                path VanillaTextures  = "VanillaDats/level0_Final/level0_Textures/level0_Textures.oni";
135 >                path VanillaSounds = "VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni";
136 >                path VanillaAnimations = "VanillaDats/level0_Final/level0_Animations/level0_Animations.oni";
137 >                path VanillaTRAC = "VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni";
138 >                path VanillaTRAM = "VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni";
139  
140                  vector<path> VanillaPaths;
141  
# Line 146 | Line 169 | int globalizeData(void)
169  
170                  create_directory( "packages" );
171  
172 <                if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats");
173 <                create_directory( "packages/VanillaDats" );
174 <
152 <                create_directory( "packages/VanillaDats/level0_Final/" );
172 >                if (exists("VanillaDats")) remove_all("VanillaDats");
173 >                create_directory( "VanillaDats" );
174 >                create_directory( "VanillaDats/level0_Final/" );
175                  //blah blah finish this.
176 <                //logfile <<  "packages/VanillaDats/level0_Final/ created";
176 >                //logfile <<  "VanillaDats/level0_Final/ created";
177                  create_directory( Characters );
178                  create_directory( Particles );
179                  create_directory( Archive );
# Line 183 | Line 205 | int globalizeData(void)
205                                  create_directory( "../GameDataFolder/level" + levels[i] + "_Final" );
206                                  //                              setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat");
207                                  system((strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat").c_str());
208 <                                create_directory( "packages/VanillaDats/level" + levels[i] + "_Final" );
209 <                                create_directory( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" );
208 >                                create_directory( "VanillaDats/level" + levels[i] + "_Final" );
209 >                                create_directory( "VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" );
210  
211                                  directory_iterator end_iter;
212                                  for ( directory_iterator dir_itr( "../GameDataFolder/level" + levels[i] + "_Final" ); dir_itr != end_iter; ++dir_itr )
# Line 261 | Line 283 | int globalizeData(void)
283                                                                  if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename());
284                                                                  else remove(dir_itr->path());
285                                                  }
286 +                                                else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding
287 +                                                                cout <<dir_itr->path().filename() << "\n";
288 +
289 +                                                                if(!exists( "VanillaDats/level0_Final/level0_Final/" +  dir_itr->filename())) rename(dir_itr->path(), "VanillaDats/level0_Final/level0_Final/" +  dir_itr->filename());
290 +                                                                else remove(dir_itr->path());
291 +                                                }
292                                                  if (exists(dir_itr->path())) {
293  
294                                                  }
# Line 287 | Line 315 | int globalizeData(void)
315                          //printf(levels[i],"%d",levels[i]);
316                          //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");
317                          setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni");
318 <                        system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
319 <                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni > Globalize.oni").c_str());
318 >                        logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level"
319 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n';
320 >                        string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level"
321 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log");
322 >                                system(sys_str.c_str() );
323                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
324                          parts_done++;
325                  }
# Line 323 | Line 354 | int globalizeData(void)
354                  if (exists("../GameDataFolder/IGMD")) remove_all("../GameDataFolder/IGMD");
355                  */
356                  create_directory((path)"../GameDataFolder/IGMD");
357 <                copy((path)"packages/VanillaBSL/", (path)"../GameDataFolder");
358 <                setProgressBar( 1000 );
357 >                copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
358 >                setProgressBar( 1000 );
359 >
360 >                copy("../../persist.dat","..");
361 >                copy("../../key_config.txt","..");
362 >                
363 > #ifndef WIN32
364 >                /* 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).
365 >                   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
366 >                   run Oni before :-p */
367 >                string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for edition/
368 >                char prefsCommand[300] = "[ -f ~/Library/Preferences/com.godgames.oni.plist ] && defaults write com.godgames.oni RetailInstallationPath -string '";
369 >                strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF)
370 >                strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters
371 >                system(prefsCommand);
372 >                
373 > #endif
374 >                
375 >                
376                  setStatusArea((string)"Done! Now select your mod packages and click install.");
377                  //      while(1) Sleep(-1);
378  
379          }
380 <        catch (exception ex) {
380 >        catch (exception & ex) {
381                  setStatusArea("Warning, handled exception: " + (string)ex.what());
382          }
383  
# Line 499 | Line 547 | void recompileAll(vector<string> install
547          
548          setStatusArea("Importing levels...");
549          //setStatusArea("Recompiling Data...");
550 <        path vanilla_dir = "./packages/VanillaDats/";
550 >        path vanilla_dir = "./VanillaDats/";
551          string importCommand = "";
552          char statusString[128];
553          int numberOfDats = 0;
# Line 530 | Line 578 | void recompileAll(vector<string> install
578  
579                          }
580                  }
581 <
581 >                try {
582                  //recursive_directory_iterator end_iter;
583  
584  
585                  out << numberOfDats;
586                  datString = out.str();
539                try {
587                          for ( recursive_directory_iterator dir_itr( vanilla_dir );
588                                  dir_itr != end_iter;
589                                  ++dir_itr )
# Line 550 | Line 597 | void recompileAll(vector<string> install
597                                                          if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename()  ))
598                                                                  importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename();
599  
600 <                                                        //else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/";
600 >                                                        //else cout << " VanillaDats/" + installedMods[i] + "/oni/";
601                                                  }
602                                                  importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log";
603  
# Line 618 | Line 665 | void recompileAll(vector<string> install
665                          {
666                                  if ( is_directory( dir_itr->status() ) )
667                                  {
668 <                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
622 <                                                + ".dat";
668 >                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " ";
669                                          for (int i = 0; i < installedMods.size(); ++i) {
670                                                  if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename()  ))
671                                                          importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename();
# Line 780 | Line 826 | vector<ModPackage> globalPackages;
826   #endif
827  
828   ////@begin includes
829 < #include "about_window.h"
829 > #include "about.h"
830   ////@end includes
831  
832   #include "main_window.h"
833  
834   ////@begin XPM images
835 < #include "redo.xpm"
835 > #include "aelogosmall.xpm"
836 > #include "undo.xpm"
837   #include "fileopen.xpm"
838   #include "filesaveas.xpm"
839   #include "quit.xpm"
# Line 809 | Line 856 | IMPLEMENT_CLASS( MainWindow, wxFrame )
856   BEGIN_EVENT_TABLE( MainWindow, wxFrame )
857  
858   ////@begin MainWindow event table entries
859 < EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
859 >    EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
860  
861 < EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
861 >    EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
862  
863 < EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
864 < EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
863 >    EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
864 >    EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
865  
866 < EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
866 >    EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
867  
868 < EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
868 >    EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
869  
870 < EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
870 >    EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
871  
872 < EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
872 >    EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
873  
874 < EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected )
874 >    EVT_RADIOBUTTON( Seperated_RadioButton, MainWindow::OnSeperatedRadioButtonSelected )
875  
876 < EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
876 >    EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
877  
878 < EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
878 >    EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
879  
880 < EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
880 >    EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
881  
882 < EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
882 >    EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
883  
884 < EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
884 >    EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
885  
886 < EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
886 >    EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
887  
888 < EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
888 >    EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
889  
890   ////@end MainWindow event table entries
891  
# Line 868 | Line 915 | MainWindow::MainWindow( wxWindow* parent
915   bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
916   {
917          ////@begin MainWindow creation
918 <        wxFrame::Create( parent, id, caption, pos, size, style );
872 <
873 <        CreateControls();
874 <        SetIcon(GetIconResource(wxT("oni_special.ico")));
875 <        Centre();
876 <
918 >    wxFrame::Create( parent, id, caption, pos, size, style );
919  
920 +    CreateControls();
921 +    SetIcon(GetIconResource(wxT("aelogosmall.png")));
922 +    Centre();
923          ////@end MainWindow creation
924          return true;
925   }
# Line 898 | Line 943 | MainWindow::~MainWindow()
943   void MainWindow::Init()
944   {
945          ////@begin MainWindow member initialisation
946 <        MainSplitter = NULL;
947 <        SelectAll = NULL;
948 <        RefreshButton = NULL;
949 <        Mods_CheckboxList = NULL;
950 <        titleText = NULL;
951 <        creatorText = NULL;
952 <        descriptionText = NULL;
953 <        StatusArea = NULL;
954 <        ProgressBar = NULL;
955 <        InstallButton = NULL;
956 <        OptionsPanel = NULL;
957 <        SepRadio = NULL;
958 <        NoSepRadio = NULL;
959 <        SeparatedRadio = NULL;
960 <        CompleteRadio = NULL;
961 <        ReglobalizeButton = NULL;
946 >    MainSplitter = NULL;
947 >    SelectAll = NULL;
948 >    RefreshButton = NULL;
949 >    Mods_CheckboxList = NULL;
950 >    titleText = NULL;
951 >    creatorText = NULL;
952 >    descriptionText = NULL;
953 >    StatusArea = NULL;
954 >    ProgressBar = NULL;
955 >    InstallButton = NULL;
956 >    OptionsPanel = NULL;
957 >    SepRadio = NULL;
958 >    NoSepRadio = NULL;
959 >    SeperatedRadio = NULL;
960 >    CompleteRadio = NULL;
961 >    ReglobalizeButton = NULL;
962          ////@end MainWindow member initialisation
963  
964   }
# Line 928 | Line 973 | wxGauge* TheProgressBar;
973   void MainWindow::CreateControls()
974   {    
975          ////@begin MainWindow content construction
976 <        // Generated by DialogBlocks, 31/05/2009 19:03:55 (unregistered)
932 <
933 <        MainWindow* itemFrame1 = this;
976 >    MainWindow* itemFrame1 = this;
977  
978 <        wxMenuBar* menuBar = new wxMenuBar;
979 <        wxMenu* itemMenu37 = new wxMenu;
980 <        {
981 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
982 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
983 <                menuItem->SetBitmap(bitmap);
984 <                itemMenu37->Append(menuItem);
985 <        }
986 <        {
987 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
988 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
989 <                menuItem->SetBitmap(bitmap);
990 <                itemMenu37->Append(menuItem);
991 <        }
992 <        itemMenu37->AppendSeparator();
993 <        {
994 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
995 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
996 <                menuItem->SetBitmap(bitmap);
997 <                itemMenu37->Append(menuItem);
998 <        }
999 <        menuBar->Append(itemMenu37, _("&File"));
1000 <        wxMenu* itemMenu42 = new wxMenu;
1001 <        itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
1002 <        menuBar->Append(itemMenu42, _("Options"));
1003 <        wxMenu* itemMenu44 = new wxMenu;
1004 <        itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL);
978 >    wxMenuBar* menuBar = new wxMenuBar;
979 >    wxMenu* itemMenu37 = new wxMenu;
980 >    {
981 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
982 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
983 >        menuItem->SetBitmap(bitmap);
984 >        itemMenu37->Append(menuItem);
985 >    }
986 >    {
987 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
988 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
989 >        menuItem->SetBitmap(bitmap);
990 >        itemMenu37->Append(menuItem);
991 >    }
992 >    itemMenu37->AppendSeparator();
993 >    {
994 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
995 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
996 >        menuItem->SetBitmap(bitmap);
997 >        itemMenu37->Append(menuItem);
998 >    }
999 >    menuBar->Append(itemMenu37, _("&File"));
1000 >    wxMenu* itemMenu42 = new wxMenu;
1001 >    itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
1002 >    menuBar->Append(itemMenu42, _("Options"));
1003 >    wxMenu* itemMenu44 = new wxMenu;
1004 > #ifdef WIN32
1005          itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1006          menuBar->Append(itemMenu44, _("Help"));
1007 <        itemFrame1->SetMenuBar(menuBar);
1008 <        
1009 <        wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1010 <        itemFrame1->SetSizer(itemBoxSizer2);
1007 > #else
1008 >        itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1009 > #endif  
1010 >
1011 >    itemFrame1->SetMenuBar(menuBar);
1012  
1013 <        MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
1014 <        MainSplitter->SetMinimumPaneSize(150);
971 <        MainSplitter->SetName(_T("MainSplitter"));
972 <
973 <        wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
974 <        wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
975 <        itemPanel4->SetSizer(itemBoxSizer5);
976 <
977 <        wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
978 <        itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
979 <        SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
980 <        SelectAll->SetValue(false);
981 <        SelectAll->SetName(_T("SelectAll_Checkbox"));
982 <        itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
983 <
984 <        RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
985 <        RefreshButton->SetName(_T("RefreshButton"));
986 <        itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
987 <
988 <        wxArrayString Mods_CheckboxListStrings;
989 <        Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
990 <        Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
991 <        itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
992 <
993 <        wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
994 <        itemPanel10->SetName(_T("DescriptionHolder_Panel"));
995 <        wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
996 <        itemPanel10->SetSizer(itemBoxSizer11);
997 <
998 <        wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
999 <        itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
1000 <        wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
1001 <        itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
1002 <        titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
1003 <        titleText->SetName(_T("Title_Text"));
1004 <        titleText->SetBackgroundColour(wxColour(240, 240, 240));
1005 <        itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
1006 <
1007 <        wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
1008 <        itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
1009 <        creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
1010 <        creatorText->SetName(_T("Author_Text"));
1011 <        creatorText->SetBackgroundColour(wxColour(240, 240, 240));
1012 <        itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
1013 <
1014 <        wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1015 <        itemStaticLine17->Show(false);
1016 <        itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
1017 <
1018 <        descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL );
1019 <        descriptionText->SetName(_T("DescriptionName"));
1020 <        descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
1021 <        itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
1022 <
1023 <        MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150);
1024 <        itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
1025 <
1026 <        StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
1027 <        StatusArea->SetName(_T("StatusArea"));
1028 <        StatusArea->SetFieldsCount(1);
1029 <        StatusArea->SetStatusText(_("Status Area"), 0);
1030 <        itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
1031 <
1032 <        wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
1033 <        itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
1034 <
1035 <        ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxSize(-1, 30), wxGA_SMOOTH );
1036 <        ProgressBar->SetValue(0);
1037 <        itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
1038 <
1039 <        InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxSize(-1, 30), 0 );
1040 <        itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
1041 <
1042 <        wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
1043 <        itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
1044 <
1045 <        OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1046 <        itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
1047 <
1048 <        wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
1049 <        OptionsPanel->SetSizer(itemBoxSizer25);
1050 <
1051 <        wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
1052 <        itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
1053 <
1054 <        SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1055 <        SepRadio->SetValue(false);
1056 <        if (MainWindow::ShowToolTips())
1057 <                SepRadio->SetToolTip(_("For PC Demo and Mac"));
1058 <        itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1059 <
1060 <        NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
1061 <        NoSepRadio->SetValue(false);
1062 <        if (MainWindow::ShowToolTips())
1063 <                NoSepRadio->SetToolTip(_("For PC Retail"));
1064 <        itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1065 <
1066 <        wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1067 <        itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
1068 <
1069 <        wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
1070 <        itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
1071 <
1072 <        SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1073 <        SeparatedRadio->SetValue(false);
1074 <        SeparatedRadio->SetName(_T("Separated_RadioButton"));
1075 <        itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
1076 <
1077 <        CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
1078 <        CompleteRadio->SetValue(false);
1079 <        CompleteRadio->SetName(_T("Complete_RadioButton"));
1080 <        itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
1081 <
1082 <        wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1083 <        itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
1084 <
1085 <        wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
1086 <        itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1087 <
1088 <        ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
1089 <        ReglobalizeButton->SetName(_T("Reglobalize_Button"));
1090 <        itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
1013 >    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1014 >    itemFrame1->SetSizer(itemBoxSizer2);
1015  
1016 <        // Connect events and objects
1017 <        Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
1016 >    MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
1017 >    MainSplitter->SetMinimumPaneSize(1);
1018 >    MainSplitter->SetName(_T("MainSplitter"));
1019 >
1020 >    wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1021 >    wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
1022 >    itemPanel4->SetSizer(itemBoxSizer5);
1023 >
1024 >    wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
1025 >    itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
1026 >    SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
1027 >    SelectAll->SetValue(false);
1028 >    SelectAll->SetName(_T("SelectAll_Checkbox"));
1029 >    itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1030 >
1031 >    RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("undo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
1032 >    RefreshButton->SetName(_T("RefreshButton"));
1033 >    itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
1034 >
1035 >    wxArrayString Mods_CheckboxListStrings;
1036 >    Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
1037 >    Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
1038 >    itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
1039 >
1040 >    wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1041 >    itemPanel10->SetName(_T("DescriptionHolder_Panel"));
1042 >    wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
1043 >    itemPanel10->SetSizer(itemBoxSizer11);
1044 >
1045 >    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
1046 >    itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
1047 >    wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
1048 >    itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
1049 >    titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
1050 >    titleText->SetName(_T("Title_Text"));
1051 >    titleText->SetBackgroundColour(wxColour(240, 240, 240));
1052 >    itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
1053 >
1054 >    wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
1055 >    itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
1056 >    creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
1057 >    creatorText->SetName(_T("Author_Text"));
1058 >    creatorText->SetBackgroundColour(wxColour(240, 240, 240));
1059 >    itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
1060 >
1061 >    wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1062 >    itemStaticLine17->Show(false);
1063 >    itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
1064 >
1065 >    descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 );
1066 >    descriptionText->SetName(_T("DescriptionName"));
1067 >    descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
1068 >    itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
1069 >
1070 >    MainSplitter->SplitVertically(itemPanel4, itemPanel10, 200);
1071 >    itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
1072 >
1073 >    StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
1074 >    StatusArea->SetName(_T("StatusArea"));
1075 >    StatusArea->SetFieldsCount(1);
1076 >    StatusArea->SetStatusText(_("AE Installer v1.0"), 0);
1077 >    itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
1078 >
1079 >    wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
1080 >    itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
1081 >
1082 >    ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH );
1083 >    ProgressBar->SetValue(0);
1084 >    itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
1085 >
1086 >    InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 );
1087 >    itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
1088 >
1089 >    wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
1090 >    itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
1091 >
1092 >    OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1093 >    itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
1094 >
1095 >    wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
1096 >    OptionsPanel->SetSizer(itemBoxSizer25);
1097 >
1098 >    wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
1099 >    itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
1100 >
1101 >    SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1102 >    SepRadio->SetValue(false);
1103 >    if (MainWindow::ShowToolTips())
1104 >        SepRadio->SetToolTip(_("For PC Demo and Mac"));
1105 >    itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1106 >
1107 >    NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
1108 >    NoSepRadio->SetValue(false);
1109 >    if (MainWindow::ShowToolTips())
1110 >        NoSepRadio->SetToolTip(_("For PC Retail"));
1111 >    itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1112 >
1113 >    wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1114 >    itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
1115 >
1116 >    wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
1117 >    itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
1118 >
1119 >    SeperatedRadio = new wxRadioButton( OptionsPanel, Seperated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1120 >    SeperatedRadio->SetValue(false);
1121 >    SeperatedRadio->SetName(_T("Seperated_RadioButton"));
1122 >    itemBoxSizer30->Add(SeperatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
1123 >
1124 >    CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
1125 >    CompleteRadio->SetValue(false);
1126 >    CompleteRadio->SetName(_T("Complete_RadioButton"));
1127 >    itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
1128 >
1129 >    wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1130 >    itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
1131 >
1132 >    wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
1133 >    itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1134 >
1135 >    ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
1136 >    ReglobalizeButton->SetName(_T("Reglobalize_Button"));
1137 >    itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
1138 >
1139 >    // Connect events and objects
1140 >    Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
1141          ////@end MainWindow content construction
1142  
1143 +        Handle = (HWND)GetHWND();
1144 +        ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList);
1145 +
1146 +
1147          if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
1148 <                static_cast<string>("-import:sep");
1148 >                strImportOption = "-import:sep";
1149                  splitInstances = NOT_SPLIT;
1150          }
1151          else {
1152 <                static_cast<string>("-import:nosep");
1152 >                strImportOption = "-import:nosep";
1153                  splitInstances = SPLIT;
1154          }
1155 <
1155 >        
1156          globalPackages = getPackages();
1157          globalInstalledMods = getInstallString();
1158          for (int i = 0; i < globalPackages.size(); i++) {
# Line 1113 | Line 1164 | void MainWindow::CreateControls()
1164          TheInstallButton = InstallButton;
1165          TheProgressBar = ProgressBar;
1166          OptionsPanel->Hide();
1167 <        if(splitInstances == SPLIT) SeparatedRadio->SetValue(true);
1167 >        
1168 > //#ifndef WIN32
1169 > //      itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1170 >        
1171 > //#endif
1172 >        
1173 >        if(splitInstances == SPLIT) SeperatedRadio->SetValue(true);
1174          else CompleteRadio->SetValue(true);
1118
1119
1120
1175          if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true);
1176          else SepRadio->SetValue(true);
1177  
# Line 1185 | Line 1239 | wxBitmap MainWindow::GetBitmapResource(
1239   {
1240          // Bitmap retrieval
1241          ////@begin MainWindow bitmap retrieval
1242 <        wxUnusedVar(name);
1243 <        if (name == _T("redo.xpm"))
1244 <        {
1245 <                wxBitmap bitmap(redo_xpm);
1246 <                return bitmap;
1247 <        }
1248 <        else if (name == _T("fileopen.xpm"))
1249 <        {
1250 <                wxBitmap bitmap( fileopen_xpm);
1251 <                return bitmap;
1252 <        }
1253 <        else if (name == _T("filesaveas.xpm"))
1254 <        {
1255 <                wxBitmap bitmap( filesaveas_xpm);
1256 <                return bitmap;
1257 <        }
1258 <        else if (name == _T("quit.xpm"))
1259 <        {
1260 <                wxBitmap bitmap( quit_xpm);
1261 <                return bitmap;
1262 <        }
1263 <        return wxNullBitmap;
1242 >    wxUnusedVar(name);
1243 >    if (name == _T("undo.xpm"))
1244 >    {
1245 >        wxBitmap bitmap( undo_xpm);
1246 >        return bitmap;
1247 >    }
1248 >    else if (name == _T("fileopen.xpm"))
1249 >    {
1250 >        wxBitmap bitmap( fileopen_xpm);
1251 >        return bitmap;
1252 >    }
1253 >    else if (name == _T("filesaveas.xpm"))
1254 >    {
1255 >        wxBitmap bitmap( filesaveas_xpm);
1256 >        return bitmap;
1257 >    }
1258 >    else if (name == _T("quit.xpm"))
1259 >    {
1260 >        wxBitmap bitmap( quit_xpm);
1261 >        return bitmap;
1262 >    }
1263 >    return wxNullBitmap;
1264          ////@end MainWindow bitmap retrieval
1265   }
1266  
# Line 1219 | Line 1273 | wxIcon MainWindow::GetIconResource( cons
1273  
1274          // Icon retrieval
1275          ////@begin MainWindow icon retrieval
1276 <        wxUnusedVar(name);
1277 <        if (name == _T("oni_special.ico"))
1278 <        {
1279 <                //      wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO);
1280 <                //      return icon;
1281 <        }
1282 <        return wxNullIcon;
1276 >    wxUnusedVar(name);
1277 >    if (name == _T("aelogosmall.png"))
1278 >    {
1279 >        wxIcon icon(aelogosmall_xpm);
1280 >        return icon;
1281 >    }
1282 >    return wxNullIcon;
1283          ////@end MainWindow icon retrieval
1284   }
1285  
# Line 1273 | Line 1327 | void MainWindow::OnModsCheckboxList1Togg
1327  
1328   void MainWindow::OnOptionsClick( wxCommandEvent& event )
1329   {
1276
1277
1278
1279
1330          if (!event.GetInt() ) {
1331                  OptionsPanel->Hide();
1332 +                
1333                  this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
1334          else {
1335   //              Uncomment this when we release, it gets annoying if you are testing globalization a lot ;)
1336 <                wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert",  wxOK | wxICON_EXCLAMATION       , wxDefaultPosition);
1336 >                wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: These options are for advanced users only, use with caution.",
1337 >                                                                                                                   "AE Installer Alert",  wxOK | wxICON_EXCLAMATION     , wxDefaultPosition);
1338                  YesNoDialog->ShowModal();
1339                  OptionsPanel->Show();
1340 <                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight());
1340 >                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+1);
1341 >                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-1);
1342          }
1290        
1343   }
1344  
1345  
# Line 1360 | Line 1412 | void MainWindow::OnInstallButtonClick( w
1412  
1413   void setProgressBar( int i ) {
1414          //TheProgressBar->SetValue(
1415 + #ifdef WIN32
1416 +        
1417 +
1418 +
1419 + if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3)))
1420 + {
1421 +        
1422 +        pTaskbarList3->SetProgressValue(Handle,i, 1000);
1423 +        if ( i == 0 ) {
1424  
1425 +        pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS);
1426 +        }
1427 + }
1428 +
1429 +
1430 + #endif
1431          TheProgressBar->SetValue(i);
1432  
1433   }
# Line 1373 | Line 1440 | void setProgressBar( int i ) {
1440   void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event )
1441   {
1442          ////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
1443 <        // Before editing this code, remove the block markers.
1444 <        event.Skip();
1443 >    // Before editing this code, remove the block markers.
1444 >    event.Skip();
1445          ////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
1446   }
1447  
# Line 1386 | Line 1453 | void MainWindow::OnStatusbarUpdate( wxUp
1453   void MainWindow::OnAboutClick( wxCommandEvent& event )
1454   {
1455          ////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
1456 <        // Before editing this code, remove the block markers.
1457 <        About* window = new About(this);
1458 <        int returnValue = window->ShowModal();
1459 <        window->Destroy();
1456 >    // Before editing this code, remove the block markers.
1457 >    About* window = new About(this);
1458 >    int returnValue = window->ShowModal();
1459 >    window->Destroy();
1460          ////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
1461   }
1462  
# Line 1418 | Line 1485 | void MainWindow::OnSepRadioButtonSelecte
1485   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton
1486   */
1487  
1421 void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event )
1422 {
1423        splitInstances = SPLIT;
1424
1425 }
1426
1427
1488   /*
1489   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
1490   */
# Line 1548 | Line 1608 | void MainWindow::OnSaveClick( wxCommandE
1608  
1609   void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event )
1610   {
1611 <        wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: This will DELETE the Edition's GameDataFolder and reglobalize all of your data. \n Are you SURE you want to do this? ", "AE Installer Alert",  wxYES_NO | wxICON_EXCLAMATION  , wxDefaultPosition);
1611 >        wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: This will DELETE the Edition's GameDataFolder and recreate it from the vanilla Oni game data. \n Are you SURE you want to do this? ", "AE Installer Alert",  wxYES_NO | wxICON_EXCLAMATION    , wxDefaultPosition);
1612  
1613          if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no...
1614  
# Line 1567 | Line 1627 | void MainWindow::OnReGlobalizeButtonClic
1627                  // Tg.create_thread( &globalizeData(), this );
1628   #else
1629                  globalizeData();
1570                setProgressBar(1000);
1571                setStatusArea("Done!");
1630   #endif
1631                  
1632                  this->InstallButton->Enable();
# Line 1588 | Line 1646 | event.Skip();
1646   ////@end wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton in MainWindow.
1647   }*/
1648  
1649 +
1650 + /*
1651 + * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton
1652 + */
1653 +
1654 + void MainWindow::OnSeperatedRadioButtonSelected( wxCommandEvent& event )
1655 + {
1656 + splitInstances = SPLIT;
1657 + }
1658 +

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)