trying to fix unittests

This commit is contained in:
Vadim Lopatin 2015-04-07 12:24:03 +03:00
parent d97cec9522
commit 9a1d35aa86
2 changed files with 24 additions and 27 deletions

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids>DebugFocus FontResources</debugids>
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL</versionids>
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL USE_SDL</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>1</createImplib>

View File

@ -1237,24 +1237,13 @@ version (Windows) {
int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
initLogs();
Log.d("myWinMain()");
//Log.d("myWinMain()");
string basePath = exePath();
Log.i("Current executable: ", exePath());
//Log.i("Current executable: ", exePath());
string cmdline = fromStringz(lpCmdLine).dup;
Log.i("Command line: ", cmdline);
//Log.i("Command line: ", cmdline);
string[] args = splitCmdLine(cmdline);
Log.i("Command line params: ", args);
if (!initFontManager()) {
Log.e("******************************************************************");
Log.e("No font files found!!!");
Log.e("Currently, only hardcoded font paths implemented.");
Log.e("Probably you can modify sdlapp.d to add some fonts for your system.");
Log.e("TODO: use fontconfig");
Log.e("******************************************************************");
assert(false);
}
//Log.i("Command line params: ", args);
return sdlmain(args);
}
@ -1265,21 +1254,25 @@ version (Windows) {
initLogs();
if (!initFontManager()) {
Log.e("******************************************************************");
Log.e("No font files found!!!");
Log.e("Currently, only hardcoded font paths implemented.");
Log.e("Probably you can modify sdlapp.d to add some fonts for your system.");
Log.e("TODO: use fontconfig");
Log.e("******************************************************************");
assert(false);
}
return sdlmain(args);
}
}
int sdlmain(string[] args) {
initLogs();
if (!initFontManager()) {
Log.e("******************************************************************");
Log.e("No font files found!!!");
Log.e("Currently, only hardcoded font paths implemented.");
Log.e("Probably you can modify sdlapp.d to add some fonts for your system.");
Log.e("TODO: use fontconfig");
Log.e("******************************************************************");
assert(false);
}
currentTheme = createDefaultTheme();
try {
@ -1331,7 +1324,11 @@ int sdlmain(string[] args) {
int res = 0;
res = UIAppMain(args);
version (unittest) {
} else {
res = UIAppMain(args);
}
//Log.e("Widget instance count after UIAppMain: ", Widget.instanceCount());
Log.d("Destroying SDL platform");