diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile
index 3b6e16026..67fab383f 100644
--- a/polymer/eduke32/Makefile
+++ b/polymer/eduke32/Makefile
@@ -510,8 +510,12 @@ ifeq ($(PLATFORM),WINDOWS)
endif
LIBS += -lFLAC -lvorbisfile -lvorbis -logg
LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB)
- DUKE3D_GAME_OBJS+= gameres winbits startwin.game
- DUKE3D_EDITOR_OBJS+= buildres
+ ifeq ($(STARTUP_WINDOW),1)
+ DUKE3D_GAME_OBJS+= gameres winbits startwin.game
+ DUKE3D_EDITOR_OBJS+= buildres
+ else
+ DUKE3D_GAME_OBJS+= winbits
+ endif
ifeq ($(MIXERTYPE),WIN)
LIBS+= -ldsound
MIDI_OBJS=music midi mpu401
diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common
index 420843bed..d7335a60f 100644
--- a/polymer/eduke32/Makefile.common
+++ b/polymer/eduke32/Makefile.common
@@ -187,6 +187,7 @@ else
HAVE_XMP ?= 0
endif
NETCODE ?= 1
+STARTUP_WINDOW ?= 1
LUNATIC ?= 0
USE_LUAJIT_2_1 ?= 0
@@ -654,6 +655,10 @@ ifneq (0,$(USE_LIBVPX))
COMPILERFLAGS+= -DUSE_LIBVPX
endif
+ifneq (0,$(STARTUP_WINDOW))
+ COMPILERFLAGS+= -DSTARTUP_WINDOW
+endif
+
ifneq (0,$(HAVE_VORBIS))
COMPILERFLAGS+= -DHAVE_VORBIS
endif
diff --git a/polymer/eduke32/Makefile.deps b/polymer/eduke32/Makefile.deps
index f25fb8774..3841ab709 100644
--- a/polymer/eduke32/Makefile.deps
+++ b/polymer/eduke32/Makefile.deps
@@ -110,12 +110,12 @@ $(DUKE3D_OBJ)/m32vars.$o: $(DUKE3D_SRC)/m32vars.c $(DUKE3D_SRC)/m32structures.c
# TODO: m32common.c
# misc objects
-$(DUKE3D_OBJ)/game_icon.$o: $(DUKE3D_RSRC)/game_icon.c
-$(DUKE3D_OBJ)/build_icon.$o: $(DUKE3D_RSRC)/build_icon.c
+$(DUKE3D_OBJ)/game_icon.$o: $(DUKE3D_RSRC)/game_icon.c $(DUKE3D_RSRC)/game_icon.ico
+$(DUKE3D_OBJ)/build_icon.$o: $(DUKE3D_RSRC)/build_icon.c $(DUKE3D_RSRC)/build_icon.ico
$(DUKE3D_OBJ)/grpscan.$o: $(DUKE3D_SRC)/grpscan.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/crc32.h $(DUKE3D_INC)/grpscan.h
-$(DUKE3D_OBJ)/gameres.$o: $(DUKE3D_SRC)/misc/gameres.rc $(DUKE3D_SRC)/startwin.game.h $(DUKE3D_RSRC)/game.bmp $(DUKE3D_RSRC)/game_icon.ico
-$(DUKE3D_OBJ)/buildres.$o: $(DUKE3D_SRC)/misc/buildres.rc $(ENGINE_INC)/startwin.editor.h $(DUKE3D_RSRC)/build.bmp $(DUKE3D_RSRC)/build_icon.ico
+$(DUKE3D_OBJ)/gameres.$o: $(DUKE3D_SRC)/misc/gameres.rc $(DUKE3D_SRC)/startwin.game.h $(DUKE3D_RSRC)/game.bmp
+$(DUKE3D_OBJ)/buildres.$o: $(DUKE3D_SRC)/misc/buildres.rc $(ENGINE_INC)/startwin.editor.h $(DUKE3D_RSRC)/build.bmp
$(DUKE3D_OBJ)/startwin.game.$o: $(DUKE3D_SRC)/startwin.game.c $(duke3d_h) $(ENGINE_INC)/build.h $(ENGINE_INC)/winlayer.h $(ENGINE_INC)/compat.h $(DUKE3D_INC)/grpscan.h
$(DUKE3D_OBJ)/startgtk.game.$o: $(DUKE3D_SRC)/startgtk.game.c $(duke3d_h) $(ENGINE_INC)/dynamicgtk.h $(ENGINE_INC)/build.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/compat.h
diff --git a/polymer/eduke32/Makefile.msvc b/polymer/eduke32/Makefile.msvc
index 5b84efad8..be7046bea 100644
--- a/polymer/eduke32/Makefile.msvc
+++ b/polymer/eduke32/Makefile.msvc
@@ -75,7 +75,7 @@ flags_cl=$(flags_cl) /arch:SSE
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386
!endif
-ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DUSE_LIBPNG /DUSE_LIBVPX /DHAVE_VORBIS #/DHAVE_FLAC
+ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DSTARTUP_WINDOW /DUSE_LIBPNG /DUSE_LIBVPX /DHAVE_VORBIS #/DHAVE_FLAC
!ifdef CPLUSPLUS
ENGINEOPTS=$(ENGINEOPTS) /TP
diff --git a/polymer/eduke32/build/include/renderlayer.h b/polymer/eduke32/build/include/renderlayer.h
index 15fd6e4f5..d4471a9a6 100644
--- a/polymer/eduke32/build/include/renderlayer.h
+++ b/polymer/eduke32/build/include/renderlayer.h
@@ -6,6 +6,8 @@
#endif
#undef STARTUP_SETUP_WINDOW
+
+#ifdef STARTUP_WINDOW
#if defined _WIN32 || (defined RENDERTYPESDL && ((defined __APPLE__ && defined OSX_STARTUPWINDOW) || defined HAVE_GTK2))
# define STARTUP_SETUP_WINDOW
#endif
@@ -14,3 +16,4 @@
#if defined _WIN32 || (defined RENDERTYPESDL && ((defined __APPLE__ && defined OSX_STARTUPWINDOW) || defined HAVE_GTK2 || SDL_MAJOR_VERSION==2))
# define WM_MSGBOX_WINDOW
#endif
+#endif
\ No newline at end of file
diff --git a/polymer/eduke32/build/src/startwin.editor.c b/polymer/eduke32/build/src/startwin.editor.c
index 2b89b6fe4..2b8812e48 100644
--- a/polymer/eduke32/build/src/startwin.editor.c
+++ b/polymer/eduke32/build/src/startwin.editor.c
@@ -3,6 +3,10 @@
#endif
#include "compat.h"
+#include "renderlayer.h"
+
+#ifdef STARTUP_SETUP_WINDOW
+
#include "build.h"
#include "editor.h"
#include "winlayer.h"
@@ -490,3 +494,4 @@ int32_t startwin_run(void)
return done;
}
+#endif // STARTUP_SETUP_WINDOW
\ No newline at end of file
diff --git a/polymer/eduke32/eduke32.vcxproj b/polymer/eduke32/eduke32.vcxproj
index 280505858..49960163e 100644
--- a/polymer/eduke32/eduke32.vcxproj
+++ b/polymer/eduke32/eduke32.vcxproj
@@ -143,6 +143,7 @@
+
diff --git a/polymer/eduke32/eduke32.vcxproj.filters b/polymer/eduke32/eduke32.vcxproj.filters
index 89e81bbb7..ce734bd49 100644
--- a/polymer/eduke32/eduke32.vcxproj.filters
+++ b/polymer/eduke32/eduke32.vcxproj.filters
@@ -543,6 +543,9 @@
eduke32\headers\editor
+
+ build\headers
+
diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c
index 622261b84..d1330e30d 100644
--- a/polymer/eduke32/source/startwin.game.c
+++ b/polymer/eduke32/source/startwin.game.c
@@ -24,12 +24,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#error Only for Windows
#endif
+#include "compat.h"
+#include "renderlayer.h"
+
+#ifdef STARTUP_SETUP_WINDOW
+
#include "duke3d.h"
#include "sounds.h"
#include "build.h"
-#include "renderlayer.h"
-#include "compat.h"
#include "grpscan.h"
@@ -799,3 +802,4 @@ int32_t startwin_run(void)
return done;
}
+#endif // STARTUP_SETUP_WINDOW