| 27 |
|
// externs declared in installer.h |
| 28 |
|
string strInstallCfg = "../GameDataFolder/Add.cfg"; |
| 29 |
|
string strEUFN = "Edition"; // GetUpdateStatus() may set this to "Edition-patch" later, but this is the assumed name of the new Edition folder in Updates/ |
| 30 |
+ |
extern MainWindow* TheWindow; |
| 31 |
|
|
| 32 |
|
int globalizeData(void) |
| 33 |
|
{ |
| 735 |
|
copy_file(bsl_itr->path(), "../GameDataFolder/IGMD/" + dir_itr->path().filename() + "/" + bsl_itr->path().filename()); |
| 736 |
|
} |
| 737 |
|
} |
| 738 |
< |
BSLfolders.push_back( dir_itr->path().filename() ); //add back check for addon |
| 739 |
< |
BSLlog << "Pushing " << dir_itr->path().filename() << "\n" ; |
| 738 |
> |
if( !pkg.hasAddon ) { |
| 739 |
> |
BSLfolders.push_back( dir_itr->path().filename() ); //add back check for addon |
| 740 |
> |
BSLlog << "Pushing " << dir_itr->path().filename() << "\n" ; |
| 741 |
> |
} |
| 742 |
|
} |
| 743 |
|
} |
| 744 |
|
} |
| 844 |
|
return UPDATE_LOG_READ_ERR; |
| 845 |
|
} |
| 846 |
|
|
| 847 |
< |
// Is there an update folder, and is it a monthly release or a patch? |
| 847 |
> |
// Is there an update in the updates/ folder, and is it a monthly release or a patch? |
| 848 |
|
bool firstParty = 0; |
| 849 |
+ |
// First create the folder if it's missing, so users are never left wondering where updates are supposed to be put |
| 850 |
+ |
if (!exists("../updates")) |
| 851 |
+ |
create_directory("../updates"); |
| 852 |
|
if (exists("../updates/Edition")) |
| 853 |
|
{ |
| 854 |
|
firstParty = 1; |
| 981 |
|
ModPackage installedPackage, updatePackage; |
| 982 |
|
if (is_directory(install_iter->path()) && exists(install_iter->path().string() + "/Mod_Info.cfg")) |
| 983 |
|
{ |
| 978 |
– |
string blah =install_iter->path().string() + "/Mod_Info.cfg"; |
| 979 |
– |
string blah2 = "packages/" + install_iter->path().filename() + "/Mod_Info.cfg"; |
| 984 |
|
fstream file; |
| 985 |
|
file.open((install_iter->path().string() + "/Mod_Info.cfg").c_str()); |
| 986 |
|
if (!file.fail()) |
| 1492 |
|
CheckForGlobalization(true); // the 'true' value forces re-globalization |
| 1493 |
|
|
| 1494 |
|
globalPackages = getPackages(); // refresh the list in memory |
| 1495 |
< |
// TODO: Refresh the packages list in the window |
| 1496 |
< |
|
| 1495 |
> |
wxCommandEvent e; |
| 1496 |
> |
TheWindow->OnRefreshButtonClick( e ); |
| 1497 |
|
return true; |
| 1498 |
|
} |
| 1499 |
< |
extern MainWindow* TheWindow; |
| 1499 |
> |
|
| 1500 |
|
void ProcessPackageUpdates(string pathToUpdate, string strPathToPackages) |
| 1501 |
|
{ |
| 1502 |
|
ptime startTime(second_clock::local_time()); |