| 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 |
< |
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") { |
| 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( "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()); |
| 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 >> Globalize.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()); |
| 362 |
|
copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); |
| 363 |
|
setProgressBar( 1000 ); |
| 364 |
|
|
| 365 |
< |
copy("../../persist.dat","../persist.dat"); |
| 366 |
< |
copy("../../key_config.txt","../key_config.txt"); |
| 365 |
> |
if(!exists("../persist.dat")) |
| 366 |
> |
copy("../../persist.dat",".."); |
| 367 |
> |
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). |
| 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 |
|
|
| 554 |
|
|
| 555 |
|
setStatusArea("Importing levels..."); |
| 556 |
|
//setStatusArea("Recompiling Data..."); |
| 557 |
< |
path vanilla_dir = "./packages/VanillaDats/"; |
| 557 |
> |
path vanilla_dir = "./VanillaDats/"; |
| 558 |
|
string importCommand = ""; |
| 559 |
|
char statusString[128]; |
| 560 |
|
int numberOfDats = 0; |
| 585 |
|
|
| 586 |
|
} |
| 587 |
|
} |
| 588 |
< |
|
| 588 |
> |
try { |
| 589 |
|
//recursive_directory_iterator end_iter; |
| 590 |
|
|
| 591 |
|
|
| 592 |
|
out << numberOfDats; |
| 593 |
|
datString = out.str(); |
| 587 |
– |
try { |
| 594 |
|
for ( recursive_directory_iterator dir_itr( vanilla_dir ); |
| 595 |
|
dir_itr != end_iter; |
| 596 |
|
++dir_itr ) |
| 604 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename() )) |
| 605 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename(); |
| 606 |
|
|
| 607 |
< |
//else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/"; |
| 607 |
> |
//else cout << " VanillaDats/" + installedMods[i] + "/oni/"; |
| 608 |
|
} |
| 609 |
|
importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; |
| 610 |
|
|
| 1146 |
|
// Connect events and objects |
| 1147 |
|
Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this); |
| 1148 |
|
////@end MainWindow content construction |
| 1149 |
< |
|
| 1149 |
> |
#ifdef WIN32 |
| 1150 |
|
Handle = (HWND)GetHWND(); |
| 1151 |
|
::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList); |
| 1152 |
+ |
#endif |
| 1153 |
|
|
| 1154 |
|
|
| 1155 |
< |
if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1155 |
> |
/*if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) { |
| 1156 |
|
strImportOption = "-import:sep"; |
| 1157 |
|
splitInstances = NOT_SPLIT; |
| 1158 |
|
} |
| 1159 |
|
else { |
| 1160 |
|
strImportOption = "-import:nosep"; |
| 1161 |
|
splitInstances = SPLIT; |
| 1162 |
< |
} |
| 1162 |
> |
}*/ |
| 1163 |
> |
|
| 1164 |
> |
|
| 1165 |
> |
#ifndef WIN32 |
| 1166 |
> |
strImportOption = "-import:sep"; |
| 1167 |
> |
splitInstances = NOT_SPLIT; |
| 1168 |
> |
#else |
| 1169 |
> |
strImportOption = "-import:nosep"; |
| 1170 |
> |
splitInstances = SPLIT; |
| 1171 |
> |
#endif |
| 1172 |
> |
|
| 1173 |
> |
#ifndef WIN32 |
| 1174 |
> |
strImportOption = "-import:sep"; |
| 1175 |
> |
splitInstances = NOT_SPLIT; |
| 1176 |
> |
#else |
| 1177 |
> |
strImportOption = "-import:nosep"; |
| 1178 |
> |
splitInstances = SPLIT; |
| 1179 |
> |
#endif |
| 1180 |
|
|
| 1181 |
|
globalPackages = getPackages(); |
| 1182 |
|
globalInstalledMods = getInstallString(); |