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 394 by gumby, Mon Jul 6 17:53:15 2009 UTC vs.
Revision 396 by gumby, Mon Jul 6 19:18:00 2009 UTC

# Line 75 | Line 75 | string escapePath(string input) {
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 += '\\';
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;
# Line 318 | Line 318 | int globalizeData(void)
318                          logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/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"
321 <                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize2.log");
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) ));
324                          parts_done++;
# Line 366 | Line 366 | int globalizeData(void)
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).
367                     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,
368                     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 */
369 <                string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for Installer
369 >                path fullAEpath = system_complete("."); // get full path for Installer
370                  char prefsCommand[300] = "defaults write com.godgames.oni RetailInstallationPath -string '";
371 <                strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF)
371 >                strcat(prefsCommand, fullAEpath.parent_path().parent_path().string().c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF)
372                  strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters
373                  system(prefsCommand);
374                  

Diff Legend

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