Windows SDL version (builds, not functioning)

This commit is contained in:
Dagen Brock 2016-10-18 22:01:19 -07:00
parent 56b15c4305
commit 0c21e1a072
7 changed files with 65 additions and 16 deletions

View File

@ -73,13 +73,44 @@ build-win32:
- make
artifacts:
paths:
- gsplus.exe
- gsplus32.exe
expire_in: 5 minutes
package-win32:
tags:
- windows
stage: package
artifacts:
paths:
- gsplus32.exe
build-win-sdl:
tags:
- windows
stage: build
script:
- cd src
- ln -s vars_win32_sdl vars
- make clean
- make
artifacts:
paths:
- gsplus.exe
expire_in: 5 minutes
package-win-sdl:
tags:
- windows
stage: package
artifacts:
paths:
- gsplus.exe

View File

@ -52,8 +52,8 @@ gsplusfb: $(OBJECTS) compile_time.o
mv gsplusfb ..
cp -f ../config.template ../config.txt
# Mingw32 (native windows) / Cygwin builds:
gsplus.exe: $(OBJECTS) compile_time.o
# Mingw32 / Cygwin builds: The Win32 API version
gsplus32.exe: $(OBJECTS) compile_time.o
g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32
#mkdir -p ../GSplus.app/lib
#cp -f gsplus.exe ../GSplus.app/GSplus.exe
@ -64,6 +64,21 @@ gsplus.exe: $(OBJECTS) compile_time.o
#cp -f GSplus.bat ../GSplus.app/GSplus.bat
#cp -f parallel.rom ../GSplus.app
#cp -f ../COPYING.txt ../GSplus.app
cp gsplus32.exe ..
# Mingw32 / Cygwin builds: The SDL version (builds, but non-functioning)
gsplus.exe: $(OBJECTS) compile_time.o
#g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32
g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lSDLmain -mwindows
#mkdir -p ../GSplus.app/lib
#cp -f gsplus.exe ../GSplus.app/GSplus.exe
#cp -f ../config.template ../GSplus.app/config.txt
#cp -f ../lib/*.ttf ../GSplus.app/lib
#cp -f ../lib/arch/win32/*.dll ../GSplus.app
#cp -f ../lib/NoBoot.po ../GSplus.app
#cp -f GSplus.bat ../GSplus.app/GSplus.bat
#cp -f parallel.rom ../GSplus.app
#cp -f ../COPYING.txt ../GSplus.app
cp gsplus.exe ..
# NOT CURRENTLY SUPPORTED

View File

@ -110,7 +110,7 @@ extern char* g_imagewriter_prop_font;
extern int g_imagewriter_paper;
extern int g_imagewriter_banner;
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(_WIN32) || defined(__CYGWIN__) && !defined(WIN_SDL)
extern int g_win_show_console_request;
extern int g_win_status_debug_request;
#endif
@ -348,7 +348,7 @@ Cfg_menu g_cfg_imagewriter_menu[] = {
Cfg_menu g_cfg_devel_menu[] = {
{ "Developer Options", g_cfg_devel_menu, 0, 0, CFGTYPE_MENU },
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(_WIN32) || defined(__CYGWIN__) && !defined(WIN_SDL)
{ "Status lines,0,Hide,1,Show", KNMP(g_win_status_debug_request), CFGTYPE_INT },
{ "Console,0,Hide,1,Show", KNMP(g_win_show_console_request), CFGTYPE_INT },
#endif

View File

@ -21,8 +21,7 @@
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// @todo: mouse clip bugs.. great western shootout. Paint 8/16
// @todo: mouse clip bugs.. great western shootout. Paint 8/16. still in win32
#include "SDL.h"
#include <stdbool.h>
#include <time.h>
@ -178,6 +177,7 @@ int a2_key_to_sdlkeycode[][3] = {
{ -1, -1, -1 }
};
int
main(int argc, char **argv)
{

View File

@ -37,7 +37,7 @@ extern const char *g_config_gsplus_name_list[];
#include "tfe/protos_tfe.h"
#endif
#if defined (_WIN32) || defined(__CYGWIN__)
#if defined (_WIN32) || defined(__CYGWIN__) && !defined(WIN_SDL)
#define WIN32_LEAN_AND_MEAN /* Tell windows we want less header gunk */
#define STRICT /* Tell Windows we want compile type checks */
#include <windows.h> /* Need a definition for LPTSTR in CYGWIN */
@ -1246,7 +1246,7 @@ gsport_expand_path(char *out_ptr, const char *in_ptr, int maxlen)
if(!strncmp("0", name_buf, 128)) {
/* Replace ${0} with g_argv0_path */
tmp_ptr = &(g_argv0_path[0]);
#if defined (_WIN32) || defined(__CYGWIN__)
#if defined (_WIN32) || defined(__CYGWIN__) && !defined(WIN_SDL)
} else if(!strncmp("PWD", name_buf, 128)) {
/* Replace ${PWD} with cwd in Windows */
get_cwd(out_ptr,128);

View File

@ -1,11 +1,11 @@
TARGET = gsplus.exe
TARGET = gsplus32.exe
OBJECTS = $(OBJECTS1) $(TFEOBJ) $(ATOBJ) $(PCAPOBJ) scc_windriver.o win32snd_driver.o win_console.o win_generic.o gsplus32.o
CCOPTS = -O2 -DGSPLUS_LITTLE_ENDIAN -DHAVE_TFE -DWIN_SOUND -DTOGGLE_STATUS -DWIN32 -D_WIN32 -D__USE_W32_SOCKETS -D_WINSOCK2API_ -std=gnu99 -DHAVE_ATBRIDGE
CPPOPTS = -O2 -DGSPLUS_LITTLE_ENDIAN -DHAVE_TFE -DTOGGLE_STATUS -DWIN32 -D_WIN32 -D__USE_W32_SOCKETS -D_WINSOCK2API_ -DHAVE_ATBRIDGE
SUFFIX = ".exe"
NAME = gsplus
NAME = gsplus32
EXTRA_LIBS = -Larch/win32 -lcomdlg32 -lShlwapi -lIPHlpApi
XOPTS = -Wall -fomit-frame-pointer -march=i686

View File

@ -1,11 +1,14 @@
TARGET = gsplus.exe
OBJECTS = $(OBJECTS1) $(TFEOBJ) $(ATOBJ) $(PCAPOBJ) scc_windriver.o sdl2snd_driver.o win_console.o win_generic.o gsplus32.o
CCOPTS = -O2 -DGSPLUS_LITTLE_ENDIAN -DHAVE_TFE -DHAVE_SDL -DTOGGLE_STATUS -DWIN32 -D_WIN32 -D__USE_W32_SOCKETS -D_WINSOCK2API_ -std=gnu99 -DHAVE_ATBRIDGE -I/usr/include/SDL2
CPPOPTS = -O2 -DGSPLUS_LITTLE_ENDIAN -DHAVE_TFE -DHAVE_SDL -DTOGGLE_STATUS -DWIN32 -D_WIN32 -D__USE_W32_SOCKETS -D_WINSOCK2API_ -DHAVE_ATBRIDGE -I /usr/include/freetype2 -I/usr/include/SDL2
NAME = gsplus
OBJECTS = sdl2_driver.o $(OBJECTS1) sdl2snd_driver.o
CCOPTS = -O2 -DGSPLUS_LITTLE_ENDIAN -DHAVE_SDL -DWIN_SDL -DTOGGLE_STATUS -I/usr/include/SDL2
CPPOPTS = -O2 -DGSPLUS_LITTLE_ENDIAN -DHAVE_SDL -DWIN_SDL -DTOGGLE_STATUS -I /usr/include/freetype2 -I/usr/include/SDL2
SUFFIX = ".exe"
NAME = gsplus
EXTRA_LIBS = -Larch/win32 -lSDL2 -lfreetype -lcomdlg32 -lShlwapi -lIPHlpApi
EXTRA_LIBS = -Larch/win32 -lSDL2main -lSDL2 -lfreetype -lcomdlg32 -lShlwapi -lIPHlpApi -lcygwin
EXTRA_LIBS = -L/usr/local/lib -lcygwin -lSDL2main -lSDL2 -mwindows -lfreetype -lcomdlg32 -lShlwapi -lIPHlpApi -L/usr/lib -lpthread
XOPTS = -Wall -fomit-frame-pointer -march=i686
XLIBS =