| 8 |
|
// Copyright: |
| 9 |
|
// Licence: |
| 10 |
|
///////////////////////////////////////////////////////////////////////////// |
| 11 |
< |
|
| 11 |
> |
#include "boost/thread.hpp" |
| 12 |
> |
#include <boost/thread/mutex.hpp> |
| 13 |
> |
#include <fstream> |
| 14 |
|
#include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations |
| 15 |
|
#include "boost/lexical_cast.hpp" //int -> string |
| 16 |
|
using namespace boost::filesystem; |
| 110 |
|
////@end AEInstallerApp initialisation |
| 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 |
+ |
|
| 116 |
+ |
|
| 117 |
+ |
if (!monoPresent) // abort! abort! abort! |
| 118 |
+ |
{ |
| 119 |
+ |
// CIP: disable window controls, present alert with URL to download mono, alert window has one button, "Quit" |
| 120 |
+ |
} |
| 121 |
+ |
#endif |
| 122 |
+ |
|
| 123 |
|
//anything after this is done after the window appears... |
| 124 |
|
if ( !exists("../GameDataFolder") ) { |
| 125 |
|
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); |
| 128 |
|
TheWindow->Close(); |
| 129 |
|
} |
| 130 |
|
else { |
| 131 |
< |
//globalize... |
| 131 |
> |
TheWindow->InstallButton->Disable(); |
| 132 |
> |
TheWindow->ReglobalizeButton->Disable(); |
| 133 |
> |
|
| 134 |
> |
#ifdef WIN32 |
| 135 |
> |
|
| 136 |
> |
boost::thread thrd3(globalizeData); |
| 137 |
> |
//globalizeData(); |
| 138 |
> |
//boost::thread::create_thread(&globalizeData); |
| 139 |
> |
// boost::thread_group Tg; |
| 140 |
> |
// Tg.create_thread( &globalizeData(), this ); |
| 141 |
> |
#else |
| 142 |
> |
globalizeData(); |
| 143 |
> |
#endif |
| 144 |
> |
|
| 145 |
> |
TheWindow->InstallButton->Enable(); |
| 146 |
> |
TheWindow->ReglobalizeButton->Enable(); |
| 147 |
|
} |
| 148 |
|
} |
| 149 |
|
|