| 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 |
| 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; |
| 121 |
|
path TRAM = Animations / "level0_TRAM"; |
| 122 |
|
|
| 123 |
|
vector<path> GDFPaths; |
| 124 |
< |
GDFPaths.push_back(Characters); |
| 124 |
> |
//GDFPaths.push_back(Characters); |
| 125 |
|
GDFPaths.push_back(Particles); |
| 126 |
|
GDFPaths.push_back(Textures); |
| 127 |
|
GDFPaths.push_back(Sounds); |
| 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 |
|
|
| 142 |
< |
VanillaPaths.push_back(VanillaCharacters); |
| 142 |
> |
//VanillaPaths.push_back(VanillaCharacters); |
| 143 |
|
VanillaPaths.push_back(VanillaParticles); |
| 144 |
|
VanillaPaths.push_back(VanillaTextures); |
| 145 |
|
VanillaPaths.push_back(VanillaSounds); |
| 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 ); |
| 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 ) |
| 229 |
|
else remove(dir_itr->path()); |
| 230 |
|
} |
| 231 |
|
else if (dir_itr->path().filename().substr(0,4) == "TRAC" |
| 232 |
< |
|| dir_itr->path().filename().substr(0,4) == "ONVL") { |
| 232 |
> |
) { |
| 233 |
|
cout <<dir_itr->path().filename() << "\n"; |
| 234 |
|
if(!exists( TRAC / dir_itr->filename())) rename(dir_itr->path(), TRAC / dir_itr->filename()); |
| 235 |
|
else remove(dir_itr->path()); |
| 249 |
|
else if (dir_itr->path().filename().substr(0,4) == "ONCC" |
| 250 |
|
|| dir_itr->path().filename().substr(0,4) == "TRBS" |
| 251 |
|
|| dir_itr->path().filename().substr(0,4) == "ONCV" |
| 252 |
+ |
|| dir_itr->path().filename().substr(0,4) == "ONVL" |
| 253 |
|
|| dir_itr->path().filename().substr(0,4) == "TRMA" |
| 254 |
|
|| dir_itr->path().filename().substr(0,4) == "TRSC" |
| 255 |
|
|| dir_itr->path().filename().substr(0,4) == "TRAS") { |
| 284 |
|
if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename()); |
| 285 |
|
else remove(dir_itr->path()); |
| 286 |
|
} |
| 287 |
+ |
else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding |
| 288 |
+ |
cout <<dir_itr->path().filename() << "\n"; |
| 289 |
+ |
|
| 290 |
+ |
if(!exists( "VanillaDats/level0_Final/level0_Final/" + dir_itr->filename())) rename(dir_itr->path(), "VanillaDats/level0_Final/level0_Final/" + dir_itr->filename()); |
| 291 |
+ |
else remove(dir_itr->path()); |
| 292 |
+ |
} |
| 293 |
+ |
|
| 294 |
|
if (exists(dir_itr->path())) { |
| 295 |
|
|
| 296 |
|
} |
| 297 |
|
else { |
| 298 |
< |
//logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 298 |
> |
logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 299 |
|
} |
| 300 |
|
} |
| 301 |
|
|
| 317 |
|
//printf(levels[i],"%d",levels[i]); |
| 318 |
|
//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"); |
| 319 |
|
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni"); |
| 320 |
< |
logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 320 |
> |
logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level" |
| 321 |
|
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n'; |
| 322 |
< |
string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 323 |
< |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize2.log"); |
| 322 |
> |
string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level" |
| 323 |
> |
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni"); |
| 324 |
|
system(sys_str.c_str() ); |
| 325 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 326 |
|
parts_done++; |
| 327 |
|
} |
| 328 |
< |
create_directory( VanillaCharacters.parent_path() ); |
| 328 |
> |
//create_directory( VanillaCharacters.parent_path() ); |
| 329 |
|
create_directory( VanillaParticles.parent_path() ); |
| 330 |
|
create_directory( VanillaTextures.parent_path() ); |
| 331 |
|
create_directory( VanillaSounds.parent_path() ); |
| 338 |
|
parts_done++; |
| 339 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 340 |
|
} |
| 341 |
+ |
logfile << "\nMoving level0_Characters\n"; |
| 342 |
+ |
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": moving level0_Characters" ); |
| 343 |
+ |
copy((path)"../GameDataFolder/level0_Characters", (path)("VanillaDats/level0_Final")); |
| 344 |
|
/* |
| 345 |
|
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) )); |
| 346 |
|
system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str()); |
| 361 |
|
create_directory((path)"../GameDataFolder/IGMD"); |
| 362 |
|
copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); |
| 363 |
|
setProgressBar( 1000 ); |
| 364 |
< |
|
| 365 |
< |
// 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/ |
| 366 |
< |
|
| 367 |
< |
// CIP:then copy persist.dat and keyconfig.txt into edition/ as well |
| 364 |
> |
|
| 365 |
> |
if(exists("../../persist.dat")) if(!exists("../persist.dat")) |
| 366 |
> |
copy("../../persist.dat",".."); |
| 367 |
> |
if(exists("../../key_config.txt"))if(!exists("../key_config.txt")) |
| 368 |
> |
copy("../../key_config.txt",".."); |
| 369 |
|
|
| 370 |
|
#ifndef WIN32 |
| 371 |
|
/* 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). |
| 372 |
< |
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, |
| 373 |
< |
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 */ |
| 374 |
< |
path fullAEpath = system_complete("."); // get full path for Installer |
| 375 |
< |
char prefsCommand[300] = "defaults write com.godgames.oni RetailInstallationPath -string '"; |
| 376 |
< |
strcat(prefsCommand, fullAEpath.parent_path().parent_path().string().c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) |
| 372 |
> |
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 |
| 373 |
> |
run Oni before :-p */ |
| 374 |
> |
string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for edition/ |
| 375 |
> |
char prefsCommand[300] = "[ -f ~/Library/Preferences/com.godgames.oni.plist ] && defaults write com.godgames.oni RetailInstallationPath -string '"; |
| 376 |
> |
strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) |
| 377 |
|
strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters |
| 378 |
|
system(prefsCommand); |
| 379 |
|
|
| 380 |
|
#endif |
| 381 |
|
|
| 382 |
+ |
|
| 383 |
|
setStatusArea((string)"Done! Now select your mod packages and click install."); |
| 384 |
|
// while(1) Sleep(-1); |
| 385 |
|
|
| 386 |
|
} |
| 387 |
< |
catch (exception ex) { |
| 387 |
> |
catch (exception & ex) { |
| 388 |
|
setStatusArea("Warning, handled exception: " + (string)ex.what()); |
| 389 |
|
} |
| 390 |
|
|
| 545 |
|
} |
| 546 |
|
|
| 547 |
|
void recompileAll(vector<string> installedMods) |
| 548 |
< |
{ |
| 548 |
> |
{try { |
| 549 |
|
busy = 1; |
| 550 |
|
using namespace boost::gregorian; |
| 551 |
|
using namespace boost::posix_time; |
| 552 |
|
using boost::lexical_cast; |
| 553 |
|
using boost::bad_lexical_cast; |
| 554 |
< |
|
| 520 |
< |
setStatusArea("Importing levels..."); |
| 521 |
< |
//setStatusArea("Recompiling Data..."); |
| 522 |
< |
path vanilla_dir = "./packages/VanillaDats/"; |
| 554 |
> |
path vanilla_dir = "./VanillaDats/"; |
| 555 |
|
string importCommand = ""; |
| 556 |
|
char statusString[128]; |
| 557 |
|
int numberOfDats = 0; |
| 558 |
|
int j = 1; |
| 559 |
|
string datString; |
| 560 |
+ |
|
| 561 |
+ |
|
| 562 |
+ |
setStatusArea("Importing levels..."); |
| 563 |
+ |
//setStatusArea("Recompiling Data..."); |
| 564 |
+ |
|
| 565 |
|
std::stringstream out; |
| 566 |
|
|
| 567 |
|
ptime start_time(second_clock::local_time()); |
| 568 |
|
clearOldDats(); |
| 569 |
< |
remove("Install.log"); |
| 569 |
> |
|
| 570 |
> |
if(exists("Install.log")) remove("Install.log"); |
| 571 |
|
ofstream logfile("Install.log"); |
| 572 |
|
logfile << "Mod Installation started " << to_simple_string(start_time) << endl; |
| 573 |
|
logfile.close(); |
| 574 |
+ |
|
| 575 |
+ |
|
| 576 |
|
if(splitInstances == SPLIT){ |
| 577 |
|
recursive_directory_iterator end_iter; |
| 578 |
|
|
| 586 |
|
numberOfDats++; |
| 587 |
|
} |
| 588 |
|
} |
| 589 |
< |
catch(exception ex) { |
| 589 |
> |
catch(exception & ex) { |
| 590 |
> |
remove("Install.log"); |
| 591 |
> |
ofstream logfile("Install.log"); |
| 592 |
> |
|
| 593 |
|
|
| 594 |
+ |
logfile << "Warning, exception " << ex.what() << "!"; |
| 595 |
+ |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 596 |
+ |
logfile.close(); |
| 597 |
|
} |
| 598 |
|
} |
| 599 |
< |
|
| 599 |
> |
try { |
| 600 |
|
//recursive_directory_iterator end_iter; |
| 601 |
< |
|
| 601 |
> |
|
| 602 |
|
|
| 603 |
|
out << numberOfDats; |
| 604 |
|
datString = out.str(); |
| 559 |
– |
try { |
| 605 |
|
for ( recursive_directory_iterator dir_itr( vanilla_dir ); |
| 606 |
|
dir_itr != end_iter; |
| 607 |
|
++dir_itr ) |
| 615 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename() )) |
| 616 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename(); |
| 617 |
|
|
| 618 |
< |
//else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/"; |
| 618 |
> |
//else cout << " VanillaDats/" + installedMods[i] + "/oni/"; |
| 619 |
|
} |
| 620 |
|
importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; |
| 621 |
|
|
| 732 |
|
|
| 733 |
|
Sleep(1000); |
| 734 |
|
setProgressBar(0); |
| 735 |
< |
busy = 0; |
| 735 |
> |
|
| 736 |
|
} |
| 737 |
+ |
catch(exception & ex) { |
| 738 |
+ |
remove("Install.log"); |
| 739 |
+ |
ofstream logfile("Install.log"); |
| 740 |
+ |
|
| 741 |
+ |
|
| 742 |
+ |
logfile << "Warning, exception " << ex.what() << "!"; |
| 743 |
+ |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 744 |
+ |
logfile.close(); |
| 745 |
+ |
} |
| 746 |
+ |
busy = 0; |
| 747 |
+ |
} |
| 748 |
+ |
|
| 749 |
|
|
| 750 |
|
void writeInstalledMods(vector<string> installedMods) |
| 751 |
|
{ |
| 1031 |
|
itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK); |
| 1032 |
|
menuBar->Append(itemMenu42, _("Options")); |
| 1033 |
|
wxMenu* itemMenu44 = new wxMenu; |
| 1034 |
< |
itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1035 |
< |
menuBar->Append(itemMenu44, _("Help")); |
| 1034 |
> |
#ifdef WIN32 |
| 1035 |
> |
itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1036 |
> |
menuBar->Append(itemMenu44, _("Help")); |
| 1037 |
> |
#else |
| 1038 |
> |
itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1039 |
> |
#endif |
| 1040 |
> |
|
| 1041 |
|
itemFrame1->SetMenuBar(menuBar); |
| 1042 |
|
|
| 1043 |
|
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); |
| 1169 |
|
// Connect events and objects |
| 1170 |
|
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1171 |
|
////@end MainWindow content construction |
| 1172 |
+ |
#ifdef WIN32 |
| 1173 |
+ |
Handle = (HWND)GetHWND(); |
| 1174 |
+ |
::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList); |
| 1175 |
+ |
#endif |
| 1176 |
+ |
|
| 1177 |
|
|
| 1178 |
< |
if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1178 |
> |
/*if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1179 |
|
strImportOption = "-import:sep"; |
| 1180 |
|
splitInstances = NOT_SPLIT; |
| 1181 |
|
} |
| 1182 |
|
else { |
| 1183 |
|
strImportOption = "-import:nosep"; |
| 1184 |
|
splitInstances = SPLIT; |
| 1185 |
< |
} |
| 1185 |
> |
}*/ |
| 1186 |
> |
|
| 1187 |
|
|
| 1188 |
+ |
#ifndef WIN32 |
| 1189 |
+ |
strImportOption = "-import:sep"; |
| 1190 |
+ |
splitInstances = NOT_SPLIT; |
| 1191 |
+ |
#else |
| 1192 |
+ |
strImportOption = "-import:nosep"; |
| 1193 |
+ |
splitInstances = SPLIT; |
| 1194 |
+ |
#endif |
| 1195 |
+ |
|
| 1196 |
+ |
#ifndef WIN32 |
| 1197 |
+ |
strImportOption = "-import:sep"; |
| 1198 |
+ |
splitInstances = NOT_SPLIT; |
| 1199 |
+ |
#else |
| 1200 |
+ |
strImportOption = "-import:nosep"; |
| 1201 |
+ |
splitInstances = SPLIT; |
| 1202 |
+ |
#endif |
| 1203 |
+ |
|
| 1204 |
|
globalPackages = getPackages(); |
| 1205 |
|
globalInstalledMods = getInstallString(); |
| 1206 |
|
for (int i = 0; i < globalPackages.size(); i++) { |
| 1212 |
|
TheInstallButton = InstallButton; |
| 1213 |
|
TheProgressBar = ProgressBar; |
| 1214 |
|
OptionsPanel->Hide(); |
| 1215 |
+ |
|
| 1216 |
+ |
//#ifndef WIN32 |
| 1217 |
+ |
// itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 1218 |
+ |
|
| 1219 |
+ |
//#endif |
| 1220 |
+ |
|
| 1221 |
|
if(splitInstances == SPLIT) SeperatedRadio->SetValue(true); |
| 1222 |
|
else CompleteRadio->SetValue(true); |
| 1133 |
– |
|
| 1134 |
– |
|
| 1135 |
– |
|
| 1223 |
|
if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true); |
| 1224 |
|
else SepRadio->SetValue(true); |
| 1225 |
|
|
| 1414 |
|
TheInstallButton->Disable(); |
| 1415 |
|
recompileAll(thePackages); |
| 1416 |
|
TheInstallButton->Enable(); |
| 1417 |
+ |
|
| 1418 |
|
} |
| 1419 |
|
|
| 1420 |
|
vector<string> thePackages; |
| 1421 |
|
}; |
| 1422 |
|
|
| 1423 |
+ |
void globalize2(void) { |
| 1424 |
+ |
TheInstallButton->Disable(); |
| 1425 |
+ |
globalizeData(); |
| 1426 |
+ |
TheInstallButton->Enable(); |
| 1427 |
+ |
} |
| 1428 |
+ |
|
| 1429 |
+ |
|
| 1430 |
+ |
|
| 1431 |
|
void MainWindow::OnInstallButtonClick( wxCommandEvent& event ) |
| 1432 |
|
{ |
| 1433 |
|
|
| 1434 |
|
vector<string> localPackages; |
| 1435 |
< |
localPackages.push_back("Globalize"); |
| 1435 |
> |
localPackages.push_back("00000Globalize"); |
| 1436 |
|
for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); |
| 1437 |
|
if ( !localPackages.empty() ) { |
| 1438 |
< |
|
| 1438 |
> |
sort(localPackages.begin(), localPackages.end()); |
| 1439 |
> |
localPackages[0] = "Globalize"; |
| 1440 |
|
//MainWindow::MainWindow().Hide(); |
| 1441 |
|
// boost::thread thrd2(recompileAll(localPackages) ); |
| 1442 |
|
//MainWindow::MainWindow().Show(); |
| 1470 |
|
|
| 1471 |
|
void setProgressBar( int i ) { |
| 1472 |
|
//TheProgressBar->SetValue( |
| 1473 |
+ |
#ifdef WIN32 |
| 1474 |
+ |
|
| 1475 |
+ |
|
| 1476 |
+ |
|
| 1477 |
+ |
if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3))) |
| 1478 |
+ |
{ |
| 1479 |
+ |
|
| 1480 |
+ |
pTaskbarList3->SetProgressValue(Handle,i, 1000); |
| 1481 |
+ |
if ( i == 0 ) { |
| 1482 |
+ |
|
| 1483 |
+ |
pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS); |
| 1484 |
+ |
} |
| 1485 |
+ |
} |
| 1486 |
+ |
|
| 1487 |
|
|
| 1488 |
+ |
#endif |
| 1489 |
|
TheProgressBar->SetValue(i); |
| 1490 |
|
|
| 1491 |
|
} |