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 379 by iritscen, Mon Jun 29 19:23:42 2009 UTC vs.
Revision 390 by gumby, Mon Jul 6 14:02:56 2009 UTC

# Line 148 | Line 148 | int globalizeData(void)
148  
149                  if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats");
150                  create_directory( "packages/VanillaDats" );
151
151                  create_directory( "packages/VanillaDats/level0_Final/" );
152                  //blah blah finish this.
153                  //logfile <<  "packages/VanillaDats/level0_Final/ created";
# Line 261 | Line 260 | int globalizeData(void)
260                                                                  if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename());
261                                                                  else remove(dir_itr->path());
262                                                  }
263 +                                                else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding
264 +                                                                cout <<dir_itr->path().filename() << "\n";
265 +
266 +                                                                if(!exists( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final/" +  dir_itr->filename())) rename(dir_itr->path(), "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final/" +  dir_itr->filename());
267 +                                                                else remove(dir_itr->path());
268 +                                                }
269                                                  if (exists(dir_itr->path())) {
270  
271                                                  }
# Line 287 | Line 292 | int globalizeData(void)
292                          //printf(levels[i],"%d",levels[i]);
293                          //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");
294                          setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni");
295 <                        system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
296 <                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str());
295 >                        logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
296 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n';
297 >                        string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
298 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize2.log");
299 >                                system(sys_str.c_str() );
300                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
301                          parts_done++;
302                  }
# Line 327 | Line 335 | int globalizeData(void)
335                  setProgressBar( 1000 );
336                  
337                  // 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/
338 <                
339 <                // CIP:then copy persist.dat and keyconfig.txt into edition/ as well
340 <                
338 >                // or we could just include it in the zip in the proper place already.
339 >
340 >                copy("../../persist.dat","../persist.dat");
341 >                copy("../../keyconfig.txt","../keyconfig.txt");
342   #ifndef WIN32
343                  /* 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).
344                     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,
# Line 342 | Line 351 | int globalizeData(void)
351                  
352   #endif
353                  
354 +                
355                  setStatusArea((string)"Done! Now select your mod packages and click install.");
356                  //      while(1) Sleep(-1);
357  
# Line 635 | Line 645 | void recompileAll(vector<string> install
645                          {
646                                  if ( is_directory( dir_itr->status() ) )
647                                  {
648 <                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
639 <                                                + ".dat";
648 >                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " ";
649                                          for (int i = 0; i < installedMods.size(); ++i) {
650                                                  if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename()  ))
651                                                          importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename();
# Line 797 | Line 806 | vector<ModPackage> globalPackages;
806   #endif
807  
808   ////@begin includes
809 < #include "about_window.h"
809 > #include "about.h"
810   ////@end includes
811  
812   #include "main_window.h"
813  
814   ////@begin XPM images
815 < #include "redo.xpm"
815 > #include "aelogosmall.xpm"
816 > #include "undo.xpm"
817   #include "fileopen.xpm"
818   #include "filesaveas.xpm"
819   #include "quit.xpm"
# Line 826 | Line 836 | IMPLEMENT_CLASS( MainWindow, wxFrame )
836   BEGIN_EVENT_TABLE( MainWindow, wxFrame )
837  
838   ////@begin MainWindow event table entries
839 < EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
839 >    EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
840  
841 < EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
841 >    EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
842  
843 < EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
844 < EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
843 >    EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
844 >    EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
845  
846 < EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
846 >    EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
847  
848 < EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
848 >    EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
849  
850 < EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
850 >    EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
851  
852 < EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
852 >    EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
853  
854 < EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected )
854 >    EVT_RADIOBUTTON( Seperated_RadioButton, MainWindow::OnSeperatedRadioButtonSelected )
855  
856 < EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
856 >    EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
857  
858 < EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
858 >    EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
859  
860 < EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
860 >    EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
861  
862 < EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
862 >    EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
863  
864 < EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
864 >    EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
865  
866 < EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
866 >    EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
867  
868 < EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
868 >    EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
869  
870   ////@end MainWindow event table entries
871  
# Line 885 | Line 895 | MainWindow::MainWindow( wxWindow* parent
895   bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
896   {
897          ////@begin MainWindow creation
898 <        wxFrame::Create( parent, id, caption, pos, size, style );
889 <
890 <        CreateControls();
891 <        SetIcon(GetIconResource(wxT("oni_special.ico")));
892 <        Centre();
893 <
898 >    wxFrame::Create( parent, id, caption, pos, size, style );
899  
900 +    CreateControls();
901 +    SetIcon(GetIconResource(wxT("aelogosmall.png")));
902 +    Centre();
903          ////@end MainWindow creation
904          return true;
905   }
# Line 915 | Line 923 | MainWindow::~MainWindow()
923   void MainWindow::Init()
924   {
925          ////@begin MainWindow member initialisation
926 <        MainSplitter = NULL;
927 <        SelectAll = NULL;
928 <        RefreshButton = NULL;
929 <        Mods_CheckboxList = NULL;
930 <        titleText = NULL;
931 <        creatorText = NULL;
932 <        descriptionText = NULL;
933 <        StatusArea = NULL;
934 <        ProgressBar = NULL;
935 <        InstallButton = NULL;
936 <        OptionsPanel = NULL;
937 <        SepRadio = NULL;
938 <        NoSepRadio = NULL;
939 <        SeparatedRadio = NULL;
940 <        CompleteRadio = NULL;
941 <        ReglobalizeButton = NULL;
926 >    MainSplitter = NULL;
927 >    SelectAll = NULL;
928 >    RefreshButton = NULL;
929 >    Mods_CheckboxList = NULL;
930 >    titleText = NULL;
931 >    creatorText = NULL;
932 >    descriptionText = NULL;
933 >    StatusArea = NULL;
934 >    ProgressBar = NULL;
935 >    InstallButton = NULL;
936 >    OptionsPanel = NULL;
937 >    SepRadio = NULL;
938 >    NoSepRadio = NULL;
939 >    SeperatedRadio = NULL;
940 >    CompleteRadio = NULL;
941 >    ReglobalizeButton = NULL;
942          ////@end MainWindow member initialisation
943  
944   }
# Line 945 | Line 953 | wxGauge* TheProgressBar;
953   void MainWindow::CreateControls()
954   {    
955          ////@begin MainWindow content construction
956 <        // Generated by DialogBlocks, 31/05/2009 19:03:55 (unregistered)
949 <
950 <        MainWindow* itemFrame1 = this;
956 >    MainWindow* itemFrame1 = this;
957  
958 <        wxMenuBar* menuBar = new wxMenuBar;
959 <        wxMenu* itemMenu37 = new wxMenu;
960 <        {
961 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
962 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
963 <                menuItem->SetBitmap(bitmap);
964 <                itemMenu37->Append(menuItem);
965 <        }
966 <        {
967 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
968 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
969 <                menuItem->SetBitmap(bitmap);
970 <                itemMenu37->Append(menuItem);
971 <        }
972 <        itemMenu37->AppendSeparator();
973 <        {
974 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
975 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
976 <                menuItem->SetBitmap(bitmap);
977 <                itemMenu37->Append(menuItem);
978 <        }
979 <        menuBar->Append(itemMenu37, _("&File"));
980 <        wxMenu* itemMenu42 = new wxMenu;
981 <        itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
982 <        menuBar->Append(itemMenu42, _("Options"));
983 <        wxMenu* itemMenu44 = new wxMenu;
984 <        itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL);
958 >    wxMenuBar* menuBar = new wxMenuBar;
959 >    wxMenu* itemMenu37 = new wxMenu;
960 >    {
961 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
962 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
963 >        menuItem->SetBitmap(bitmap);
964 >        itemMenu37->Append(menuItem);
965 >    }
966 >    {
967 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
968 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
969 >        menuItem->SetBitmap(bitmap);
970 >        itemMenu37->Append(menuItem);
971 >    }
972 >    itemMenu37->AppendSeparator();
973 >    {
974 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
975 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
976 >        menuItem->SetBitmap(bitmap);
977 >        itemMenu37->Append(menuItem);
978 >    }
979 >    menuBar->Append(itemMenu37, _("&File"));
980 >    wxMenu* itemMenu42 = new wxMenu;
981 >    itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
982 >    menuBar->Append(itemMenu42, _("Options"));
983 >    wxMenu* itemMenu44 = new wxMenu;
984 > #ifdef WIN32
985          itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
986          menuBar->Append(itemMenu44, _("Help"));
987 <        itemFrame1->SetMenuBar(menuBar);
988 <        
989 <        wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
984 <        itemFrame1->SetSizer(itemBoxSizer2);
987 > #else
988 >        itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
989 > #endif  
990  
991 <        MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
987 <        MainSplitter->SetMinimumPaneSize(150);
988 <        MainSplitter->SetName(_T("MainSplitter"));
989 <
990 <        wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
991 <        wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
992 <        itemPanel4->SetSizer(itemBoxSizer5);
993 <
994 <        wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
995 <        itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
996 <        SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
997 <        SelectAll->SetValue(false);
998 <        SelectAll->SetName(_T("SelectAll_Checkbox"));
999 <        itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1000 <
1001 <        RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
1002 <        RefreshButton->SetName(_T("RefreshButton"));
1003 <        itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
1004 <
1005 <        wxArrayString Mods_CheckboxListStrings;
1006 <        Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
1007 <        Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
1008 <        itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
1009 <
1010 <        wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1011 <        itemPanel10->SetName(_T("DescriptionHolder_Panel"));
1012 <        wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
1013 <        itemPanel10->SetSizer(itemBoxSizer11);
1014 <
1015 <        wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
1016 <        itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
1017 <        wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
1018 <        itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
1019 <        titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
1020 <        titleText->SetName(_T("Title_Text"));
1021 <        titleText->SetBackgroundColour(wxColour(240, 240, 240));
1022 <        itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
1023 <
1024 <        wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
1025 <        itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
1026 <        creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
1027 <        creatorText->SetName(_T("Author_Text"));
1028 <        creatorText->SetBackgroundColour(wxColour(240, 240, 240));
1029 <        itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
1030 <
1031 <        wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1032 <        itemStaticLine17->Show(false);
1033 <        itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
1034 <
1035 <        descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL );
1036 <        descriptionText->SetName(_T("DescriptionName"));
1037 <        descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
1038 <        itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
1039 <
1040 <        MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150);
1041 <        itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
1042 <
1043 <        StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
1044 <        StatusArea->SetName(_T("StatusArea"));
1045 <        StatusArea->SetFieldsCount(1);
1046 <        StatusArea->SetStatusText(_("Status Area"), 0);
1047 <        itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
1048 <
1049 <        wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
1050 <        itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
1051 <
1052 <        ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxSize(-1, 30), wxGA_SMOOTH );
1053 <        ProgressBar->SetValue(0);
1054 <        itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
1055 <
1056 <        InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxSize(-1, 30), 0 );
1057 <        itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
1058 <
1059 <        wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
1060 <        itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
1061 <
1062 <        OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1063 <        itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
1064 <
1065 <        wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
1066 <        OptionsPanel->SetSizer(itemBoxSizer25);
1067 <
1068 <        wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
1069 <        itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
1070 <
1071 <        SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1072 <        SepRadio->SetValue(false);
1073 <        if (MainWindow::ShowToolTips())
1074 <                SepRadio->SetToolTip(_("For PC Demo and Mac"));
1075 <        itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1076 <
1077 <        NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
1078 <        NoSepRadio->SetValue(false);
1079 <        if (MainWindow::ShowToolTips())
1080 <                NoSepRadio->SetToolTip(_("For PC Retail"));
1081 <        itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1082 <
1083 <        wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1084 <        itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
1085 <
1086 <        wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
1087 <        itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
1088 <
1089 <        SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1090 <        SeparatedRadio->SetValue(false);
1091 <        SeparatedRadio->SetName(_T("Separated_RadioButton"));
1092 <        itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
1093 <
1094 <        CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
1095 <        CompleteRadio->SetValue(false);
1096 <        CompleteRadio->SetName(_T("Complete_RadioButton"));
1097 <        itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
1098 <
1099 <        wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1100 <        itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
1101 <
1102 <        wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
1103 <        itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1104 <
1105 <        ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
1106 <        ReglobalizeButton->SetName(_T("Reglobalize_Button"));
1107 <        itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
991 >    itemFrame1->SetMenuBar(menuBar);
992  
993 <        // Connect events and objects
994 <        Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
993 >    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
994 >    itemFrame1->SetSizer(itemBoxSizer2);
995 >
996 >    MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
997 >    MainSplitter->SetMinimumPaneSize(1);
998 >    MainSplitter->SetName(_T("MainSplitter"));
999 >
1000 >    wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1001 >    wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
1002 >    itemPanel4->SetSizer(itemBoxSizer5);
1003 >
1004 >    wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
1005 >    itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
1006 >    SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
1007 >    SelectAll->SetValue(false);
1008 >    SelectAll->SetName(_T("SelectAll_Checkbox"));
1009 >    itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1010 >
1011 >    RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("undo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
1012 >    RefreshButton->SetName(_T("RefreshButton"));
1013 >    itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
1014 >
1015 >    wxArrayString Mods_CheckboxListStrings;
1016 >    Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
1017 >    Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
1018 >    itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
1019 >
1020 >    wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1021 >    itemPanel10->SetName(_T("DescriptionHolder_Panel"));
1022 >    wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
1023 >    itemPanel10->SetSizer(itemBoxSizer11);
1024 >
1025 >    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
1026 >    itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
1027 >    wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
1028 >    itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
1029 >    titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
1030 >    titleText->SetName(_T("Title_Text"));
1031 >    titleText->SetBackgroundColour(wxColour(240, 240, 240));
1032 >    itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
1033 >
1034 >    wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
1035 >    itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
1036 >    creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
1037 >    creatorText->SetName(_T("Author_Text"));
1038 >    creatorText->SetBackgroundColour(wxColour(240, 240, 240));
1039 >    itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
1040 >
1041 >    wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1042 >    itemStaticLine17->Show(false);
1043 >    itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
1044 >
1045 >    descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 );
1046 >    descriptionText->SetName(_T("DescriptionName"));
1047 >    descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
1048 >    itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
1049 >
1050 >    MainSplitter->SplitVertically(itemPanel4, itemPanel10, 200);
1051 >    itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
1052 >
1053 >    StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
1054 >    StatusArea->SetName(_T("StatusArea"));
1055 >    StatusArea->SetFieldsCount(1);
1056 >    StatusArea->SetStatusText(_("AE Installer v1.0"), 0);
1057 >    itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
1058 >
1059 >    wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
1060 >    itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
1061 >
1062 >    ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH );
1063 >    ProgressBar->SetValue(0);
1064 >    itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
1065 >
1066 >    InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 );
1067 >    itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
1068 >
1069 >    wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
1070 >    itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
1071 >
1072 >    OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1073 >    itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
1074 >
1075 >    wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
1076 >    OptionsPanel->SetSizer(itemBoxSizer25);
1077 >
1078 >    wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
1079 >    itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
1080 >
1081 >    SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1082 >    SepRadio->SetValue(false);
1083 >    if (MainWindow::ShowToolTips())
1084 >        SepRadio->SetToolTip(_("For PC Demo and Mac"));
1085 >    itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1086 >
1087 >    NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
1088 >    NoSepRadio->SetValue(false);
1089 >    if (MainWindow::ShowToolTips())
1090 >        NoSepRadio->SetToolTip(_("For PC Retail"));
1091 >    itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1092 >
1093 >    wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1094 >    itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
1095 >
1096 >    wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
1097 >    itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
1098 >
1099 >    SeperatedRadio = new wxRadioButton( OptionsPanel, Seperated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1100 >    SeperatedRadio->SetValue(false);
1101 >    SeperatedRadio->SetName(_T("Seperated_RadioButton"));
1102 >    itemBoxSizer30->Add(SeperatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
1103 >
1104 >    CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
1105 >    CompleteRadio->SetValue(false);
1106 >    CompleteRadio->SetName(_T("Complete_RadioButton"));
1107 >    itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
1108 >
1109 >    wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1110 >    itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
1111 >
1112 >    wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
1113 >    itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1114 >
1115 >    ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
1116 >    ReglobalizeButton->SetName(_T("Reglobalize_Button"));
1117 >    itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
1118 >
1119 >    // Connect events and objects
1120 >    Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
1121          ////@end MainWindow content construction
1122  
1123          if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
1124 <                static_cast<string>("-import:sep");
1124 >                strImportOption = "-import:sep";
1125                  splitInstances = NOT_SPLIT;
1126          }
1127          else {
1128 <                static_cast<string>("-import:nosep");
1128 >                strImportOption = "-import:nosep";
1129                  splitInstances = SPLIT;
1130          }
1131 <
1131 >        
1132          globalPackages = getPackages();
1133          globalInstalledMods = getInstallString();
1134          for (int i = 0; i < globalPackages.size(); i++) {
# Line 1130 | Line 1140 | void MainWindow::CreateControls()
1140          TheInstallButton = InstallButton;
1141          TheProgressBar = ProgressBar;
1142          OptionsPanel->Hide();
1143 <        if(splitInstances == SPLIT) SeparatedRadio->SetValue(true);
1143 >        
1144 > //#ifndef WIN32
1145 > //      itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1146 >        
1147 > //#endif
1148 >        
1149 >        if(splitInstances == SPLIT) SeperatedRadio->SetValue(true);
1150          else CompleteRadio->SetValue(true);
1135
1136
1137
1151          if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true);
1152          else SepRadio->SetValue(true);
1153  
# Line 1202 | Line 1215 | wxBitmap MainWindow::GetBitmapResource(
1215   {
1216          // Bitmap retrieval
1217          ////@begin MainWindow bitmap retrieval
1218 <        wxUnusedVar(name);
1219 <        if (name == _T("redo.xpm"))
1220 <        {
1221 <                wxBitmap bitmap(redo_xpm);
1222 <                return bitmap;
1223 <        }
1224 <        else if (name == _T("fileopen.xpm"))
1225 <        {
1226 <                wxBitmap bitmap( fileopen_xpm);
1227 <                return bitmap;
1228 <        }
1229 <        else if (name == _T("filesaveas.xpm"))
1230 <        {
1231 <                wxBitmap bitmap( filesaveas_xpm);
1232 <                return bitmap;
1233 <        }
1234 <        else if (name == _T("quit.xpm"))
1235 <        {
1236 <                wxBitmap bitmap( quit_xpm);
1237 <                return bitmap;
1238 <        }
1239 <        return wxNullBitmap;
1218 >    wxUnusedVar(name);
1219 >    if (name == _T("undo.xpm"))
1220 >    {
1221 >        wxBitmap bitmap( undo_xpm);
1222 >        return bitmap;
1223 >    }
1224 >    else if (name == _T("fileopen.xpm"))
1225 >    {
1226 >        wxBitmap bitmap( fileopen_xpm);
1227 >        return bitmap;
1228 >    }
1229 >    else if (name == _T("filesaveas.xpm"))
1230 >    {
1231 >        wxBitmap bitmap( filesaveas_xpm);
1232 >        return bitmap;
1233 >    }
1234 >    else if (name == _T("quit.xpm"))
1235 >    {
1236 >        wxBitmap bitmap( quit_xpm);
1237 >        return bitmap;
1238 >    }
1239 >    return wxNullBitmap;
1240          ////@end MainWindow bitmap retrieval
1241   }
1242  
# Line 1236 | Line 1249 | wxIcon MainWindow::GetIconResource( cons
1249  
1250          // Icon retrieval
1251          ////@begin MainWindow icon retrieval
1252 <        wxUnusedVar(name);
1253 <        if (name == _T("oni_special.ico"))
1254 <        {
1255 <                //      wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO);
1256 <                //      return icon;
1257 <        }
1258 <        return wxNullIcon;
1252 >    wxUnusedVar(name);
1253 >    if (name == _T("aelogosmall.png"))
1254 >    {
1255 >        wxIcon icon(aelogosmall_xpm);
1256 >        return icon;
1257 >    }
1258 >    return wxNullIcon;
1259          ////@end MainWindow icon retrieval
1260   }
1261  
# Line 1292 | Line 1305 | void MainWindow::OnOptionsClick( wxComma
1305   {
1306          if (!event.GetInt() ) {
1307                  OptionsPanel->Hide();
1308 +                
1309                  this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
1310          else {
1311   //              Uncomment this when we release, it gets annoying if you are testing globalization a lot ;)
# Line 1387 | Line 1401 | void setProgressBar( int i ) {
1401   void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event )
1402   {
1403          ////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
1404 <        // Before editing this code, remove the block markers.
1405 <        event.Skip();
1404 >    // Before editing this code, remove the block markers.
1405 >    event.Skip();
1406          ////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
1407   }
1408  
# Line 1400 | Line 1414 | void MainWindow::OnStatusbarUpdate( wxUp
1414   void MainWindow::OnAboutClick( wxCommandEvent& event )
1415   {
1416          ////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
1417 <        // Before editing this code, remove the block markers.
1418 <        About* window = new About(this);
1419 <        int returnValue = window->ShowModal();
1420 <        window->Destroy();
1417 >    // Before editing this code, remove the block markers.
1418 >    About* window = new About(this);
1419 >    int returnValue = window->ShowModal();
1420 >    window->Destroy();
1421          ////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
1422   }
1423  
# Line 1432 | Line 1446 | void MainWindow::OnSepRadioButtonSelecte
1446   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton
1447   */
1448  
1435 void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event )
1436 {
1437        splitInstances = SPLIT;
1438
1439 }
1440
1441
1449   /*
1450   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
1451   */
# Line 1600 | Line 1607 | event.Skip();
1607   ////@end wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton in MainWindow.
1608   }*/
1609  
1610 +
1611 + /*
1612 + * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton
1613 + */
1614 +
1615 + void MainWindow::OnSeperatedRadioButtonSelected( wxCommandEvent& event )
1616 + {
1617 + splitInstances = SPLIT;
1618 + }
1619 +

Diff Legend

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