| 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 |
|
|
| 169 |
|
|
| 170 |
|
create_directory( "packages" ); |
| 171 |
|
|
| 172 |
< |
if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats"); |
| 173 |
< |
create_directory( "packages/VanillaDats" ); |
| 174 |
< |
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 ) |
| 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( "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()); |
| 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 |
|
} |
| 295 |
|
else { |
| 296 |
< |
//logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 296 |
> |
logfile << "\tMoved file: " << dir_itr->path().filename() << "\n"; |
| 297 |
|
} |
| 298 |
|
} |
| 299 |
|
|
| 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 |
< |
logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 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 packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 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) )); |
| 357 |
|
copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); |
| 358 |
|
setProgressBar( 1000 ); |
| 359 |
|
|
| 360 |
< |
copy("../../persist.dat","../persist.dat"); |
| 361 |
< |
copy("../../key_config.txt","../key_config.txt"); |
| 360 |
> |
if(!exists("../persist.dat")) |
| 361 |
> |
copy("../../persist.dat",".."); |
| 362 |
> |
if(!exists("../key_config.txt")) |
| 363 |
> |
copy("../../key_config.txt",".."); |
| 364 |
|
|
| 365 |
|
#ifndef WIN32 |
| 366 |
|
/* 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). |
| 379 |
|
// while(1) Sleep(-1); |
| 380 |
|
|
| 381 |
|
} |
| 382 |
< |
catch (exception ex) { |
| 382 |
> |
catch (exception & ex) { |
| 383 |
|
setStatusArea("Warning, handled exception: " + (string)ex.what()); |
| 384 |
|
} |
| 385 |
|
|
| 549 |
|
|
| 550 |
|
setStatusArea("Importing levels..."); |
| 551 |
|
//setStatusArea("Recompiling Data..."); |
| 552 |
< |
path vanilla_dir = "./packages/VanillaDats/"; |
| 552 |
> |
path vanilla_dir = "./VanillaDats/"; |
| 553 |
|
string importCommand = ""; |
| 554 |
|
char statusString[128]; |
| 555 |
|
int numberOfDats = 0; |
| 580 |
|
|
| 581 |
|
} |
| 582 |
|
} |
| 583 |
< |
|
| 583 |
> |
try { |
| 584 |
|
//recursive_directory_iterator end_iter; |
| 585 |
|
|
| 586 |
|
|
| 587 |
|
out << numberOfDats; |
| 588 |
|
datString = out.str(); |
| 587 |
– |
try { |
| 589 |
|
for ( recursive_directory_iterator dir_itr( vanilla_dir ); |
| 590 |
|
dir_itr != end_iter; |
| 591 |
|
++dir_itr ) |
| 599 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename() )) |
| 600 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename(); |
| 601 |
|
|
| 602 |
< |
//else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/"; |
| 602 |
> |
//else cout << " VanillaDats/" + installedMods[i] + "/oni/"; |
| 603 |
|
} |
| 604 |
|
importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; |
| 605 |
|
|
| 1141 |
|
// Connect events and objects |
| 1142 |
|
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1143 |
|
////@end MainWindow content construction |
| 1144 |
< |
|
| 1144 |
> |
#ifdef WIN32 |
| 1145 |
|
Handle = (HWND)GetHWND(); |
| 1146 |
|
::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList); |
| 1147 |
+ |
#endif |
| 1148 |
|
|
| 1149 |
< |
|
| 1148 |
< |
if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1149 |
> |
/*if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1150 |
|
strImportOption = "-import:sep"; |
| 1151 |
|
splitInstances = NOT_SPLIT; |
| 1152 |
|
} |
| 1153 |
|
else { |
| 1154 |
|
strImportOption = "-import:nosep"; |
| 1155 |
|
splitInstances = SPLIT; |
| 1156 |
< |
} |
| 1156 |
> |
}*/ |
| 1157 |
> |
|
| 1158 |
> |
#ifndef WIN32 |
| 1159 |
> |
strImportOption = "-import:sep"; |
| 1160 |
> |
splitInstances = NOT_SPLIT; |
| 1161 |
> |
#else |
| 1162 |
> |
strImportOption = "-import:nosep"; |
| 1163 |
> |
splitInstances = SPLIT; |
| 1164 |
> |
#endif |
| 1165 |
|
|
| 1166 |
|
globalPackages = getPackages(); |
| 1167 |
|
globalInstalledMods = getInstallString(); |