| 111 |
|
TheWindow = mainWindow; |
| 112 |
|
|
| 113 |
|
#ifndef WIN32 |
| 114 |
< |
// CIP: test for the third-party mono framework, because without it, on Mac, we are up a creek |
| 115 |
< |
|
| 114 |
> |
// test for the third-party mono framework, because without it, on Mac, we are up a creek |
| 115 |
> |
char monoCommand[300] = "which mono >> "; |
| 116 |
> |
strcat(monoCommand, system_complete("./mono_check.log").string().c_str()); |
| 117 |
> |
system(monoCommand); |
| 118 |
> |
fstream file; |
| 119 |
> |
file.open("./mono_check.log"); |
| 120 |
> |
string line; |
| 121 |
> |
int line_count = 0; |
| 122 |
> |
while (!file.eof()) |
| 123 |
> |
{ |
| 124 |
> |
line_count++; |
| 125 |
> |
getline(file, line); |
| 126 |
> |
} |
| 127 |
> |
file.close(); |
| 128 |
> |
remove("./mono_check.log"); |
| 129 |
|
|
| 130 |
< |
if (!monoPresent) // abort! abort! abort! |
| 130 |
> |
if (line_count <= 1) // this means that "which mono" returned nothing -- abort! abort! abort! |
| 131 |
|
{ |
| 132 |
< |
// CIP: disable window controls, present alert with URL to download mono, alert window has one button, "Quit" |
| 132 |
> |
wxMessageDialog* MonoDialogOfDeath = new wxMessageDialog(TheWindow, "You don't have 'mono' installed! 'mono' is a command-line tool required by the Edition. You can download it from:\nhttp://www.go-mono.com/mono-downloads/download.html (OS X 10.4+) or\nhttp://edt.oni2.net/AE/MonoFramework10.3.dmg (OS X 10.3)\n\nPlease install 'mono', then open this Installer again.", "AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); |
| 133 |
> |
MonoDialogOfDeath->ShowModal(); |
| 134 |
> |
TheWindow->Close(); |
| 135 |
> |
return true; // it's quittin' time, Joe |
| 136 |
|
} |
| 137 |
|
#endif |
| 138 |
|
|
| 139 |
|
//anything after this is done after the window appears... |
| 140 |
< |
if ( !exists("../GameDataFolder") ) { |
| 140 |
> |
if ( !exists("../GameDataFolder") ) |
| 141 |
> |
{ |
| 142 |
|
wxMessageDialog* YesNoDialog = new wxMessageDialog(TheWindow, "You haven't globalized yet! \nYou must globalize to use the Anniversary Edition framework. \nWould you like to globalize now? (This could take a while...)\n(Selecting \"No\" will exit this program...)", "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); |
| 143 |
|
|
| 144 |
< |
if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no... |
| 144 |
> |
if (YesNoDialog->ShowModal() == wxID_NO) // if the user said no... |
| 145 |
|
TheWindow->Close(); |
| 146 |
< |
} |
| 147 |
< |
else { |
| 146 |
> |
else |
| 147 |
> |
{ |
| 148 |
|
TheWindow->InstallButton->Disable(); |
| 149 |
< |
TheWindow->ReglobalizeButton->Disable(); |
| 149 |
> |
TheWindow->ReglobalizeButton->Disable(); |
| 150 |
|
|
| 151 |
|
#ifdef WIN32 |
| 152 |
< |
|
| 136 |
< |
boost::thread thrd3(globalizeData); |
| 152 |
> |
boost::thread thrd3(globalizeData); |
| 153 |
|
//globalizeData(); |
| 154 |
|
//boost::thread::create_thread(&globalizeData); |
| 155 |
|
// boost::thread_group Tg; |
| 156 |
|
// Tg.create_thread( &globalizeData(), this ); |
| 157 |
|
#else |
| 158 |
< |
globalizeData(); |
| 158 |
> |
globalizeData(); |
| 159 |
|
#endif |
| 160 |
|
|
| 161 |
< |
TheWindow->InstallButton->Enable(); |
| 162 |
< |
TheWindow->ReglobalizeButton->Enable(); |
| 161 |
> |
TheWindow->InstallButton->Enable(); |
| 162 |
> |
TheWindow->ReglobalizeButton->Enable(); |
| 163 |
|
} |
| 164 |
|
} |
| 165 |
|
|