mirror of https://github.com/buggins/dlangui.git
no main in unit tests - buggins/dlangide#276
This commit is contained in:
parent
e2116d0be9
commit
54356dbca1
|
@ -1940,35 +1940,31 @@ static if (BACKEND_CONSOLE) {
|
|||
|
||||
/// put "mixin APP_ENTRY_POINT;" to main module of your dlangui based app
|
||||
mixin template APP_ENTRY_POINT() {
|
||||
static if (BACKEND_CONSOLE) {
|
||||
int main(string[] args)
|
||||
{
|
||||
return DLANGUImain(args);
|
||||
}
|
||||
version (unittest) {
|
||||
// no main in unit tests
|
||||
} else {
|
||||
/// workaround for link issue when WinMain is located in library
|
||||
version(Windows) {
|
||||
version (unittest) {
|
||||
// no main in unit tests
|
||||
} else {
|
||||
static if (BACKEND_CONSOLE) {
|
||||
int main(string[] args)
|
||||
{
|
||||
return DLANGUImain(args);
|
||||
}
|
||||
} else {
|
||||
/// workaround for link issue when WinMain is located in library
|
||||
version(Windows) {
|
||||
extern (Windows) int WinMain(void* hInstance, void* hPrevInstance,
|
||||
char* lpCmdLine, int nCmdShow)
|
||||
char* lpCmdLine, int nCmdShow)
|
||||
{
|
||||
try {
|
||||
int res = DLANGUIWinMain(hInstance, hPrevInstance,
|
||||
lpCmdLine, nCmdShow);
|
||||
lpCmdLine, nCmdShow);
|
||||
return res;
|
||||
} catch (Exception e) {
|
||||
Log.e("Exception: ", e);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
version (Android) {
|
||||
} else {
|
||||
version (unittest) {
|
||||
// no main in unit tests
|
||||
version (Android) {
|
||||
} else {
|
||||
int main(string[] args)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue