mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-09-03 21:29:03 +00:00
Build Windows GUI with GTK
This commit is contained in:
parent
434ad38a1f
commit
5a5defb9d8
@ -75,7 +75,7 @@ links:
|
|||||||
Windows/kernel_windows.h Windows/kernel_windows.cpp \
|
Windows/kernel_windows.h Windows/kernel_windows.cpp \
|
||||||
Windows/serial_windows.cpp Windows/router Windows/b2ether \
|
Windows/serial_windows.cpp Windows/router Windows/b2ether \
|
||||||
Windows/ether_windows.h Windows/ether_windows.cpp \
|
Windows/ether_windows.h Windows/ether_windows.cpp \
|
||||||
Windows/serial_windows.cpp'; \
|
Windows/serial_windows.cpp Windows/prefs_editor_gtk.cpp'; \
|
||||||
PREFIX="`pwd`/"; case $(B2_TOPDIR) in /*) PREFIX="";; esac; \
|
PREFIX="`pwd`/"; case $(B2_TOPDIR) in /*) PREFIX="";; esac; \
|
||||||
for i in $$list; do \
|
for i in $$list; do \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
|
@ -13,12 +13,18 @@ man1dir = $(mandir)/man1
|
|||||||
|
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
|
|
||||||
|
SDL_CFLAGS = @SDL_CFLAGS@
|
||||||
|
SDL_LIBS = @SDL_LIBS@
|
||||||
|
WANT_GTK = @WANT_GTK@
|
||||||
|
GTK_CFLAGS = @GTK_CFLAGS@
|
||||||
|
GTK_LIBS = @GTK_LIBS@
|
||||||
|
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
WINDRES = @WINDRES@
|
WINDRES = @WINDRES@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@ $(SDL_CFLAGS)
|
||||||
CXXFLAGS = @CXXFLAGS@
|
CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS)
|
||||||
CPPFLAGS = @CPPFLAGS@ -I../include -I.
|
CPPFLAGS = @CPPFLAGS@ -I../include -I.
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
@ -55,14 +61,24 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window
|
|||||||
about_window_windows.cpp ../user_strings.cpp user_strings_windows.cpp \
|
about_window_windows.cpp ../user_strings.cpp user_strings_windows.cpp \
|
||||||
../dummy/prefs_editor_dummy.cpp clip_windows.cpp util_windows.cpp kernel_windows.cpp \
|
../dummy/prefs_editor_dummy.cpp clip_windows.cpp util_windows.cpp kernel_windows.cpp \
|
||||||
vm_alloc.cpp sigsegv.cpp posix_emu.cpp SheepShaver.rc $(CPUSRCS) $(ROUTERSRCS)
|
vm_alloc.cpp sigsegv.cpp posix_emu.cpp SheepShaver.rc $(CPUSRCS) $(ROUTERSRCS)
|
||||||
|
|
||||||
|
UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \
|
||||||
|
../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp SheepShaverGUI.rc
|
||||||
|
|
||||||
|
UI_APP = SheepShaverGUI.exe
|
||||||
|
|
||||||
APP = SheepShaver.exe
|
APP = SheepShaver.exe
|
||||||
|
|
||||||
|
ifeq ($(WANT_GTK),yes)
|
||||||
|
PROGS += $(UI_APP)
|
||||||
|
endif
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
.PHONY: clean distclean
|
.PHONY: clean distclean
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .cpp .S .o .h
|
.SUFFIXES: .c .cpp .S .o .h
|
||||||
|
|
||||||
all: $(APP)
|
all: $(PROGS)
|
||||||
|
|
||||||
$(UNIXSRCS): %: ../Unix/%
|
$(UNIXSRCS): %: ../Unix/%
|
||||||
$(LN_S) $< $@
|
$(LN_S) $< $@
|
||||||
@ -77,6 +93,12 @@ define SRCS_LIST_TO_OBJS
|
|||||||
endef
|
endef
|
||||||
OBJS = $(SRCS_LIST_TO_OBJS)
|
OBJS = $(SRCS_LIST_TO_OBJS)
|
||||||
|
|
||||||
|
define UI_SRCS_LIST_TO_OBJS
|
||||||
|
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(UI_SRCS), \
|
||||||
|
$(basename $(notdir $(file))))))
|
||||||
|
endef
|
||||||
|
UI_OBJS = $(UI_SRCS_LIST_TO_OBJS)
|
||||||
|
|
||||||
define DYNGENSRCS_LIST_TO_OBJS
|
define DYNGENSRCS_LIST_TO_OBJS
|
||||||
$(addprefix $(OBJ_DIR)/, $(addsuffix .ho, $(foreach file, $(DYNGENSRCS), \
|
$(addprefix $(OBJ_DIR)/, $(addsuffix .ho, $(foreach file, $(DYNGENSRCS), \
|
||||||
$(basename $(notdir $(file))))))
|
$(basename $(notdir $(file))))))
|
||||||
@ -88,15 +110,21 @@ VPATH :=
|
|||||||
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
|
||||||
|
|
||||||
$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
|
$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
|
||||||
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
|
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS)
|
||||||
|
|
||||||
clean:
|
$(UI_APP): $(UNIXSRCS) $(OBJ_DIR) $(UI_OBJS)
|
||||||
|
$(CXX) -o $@ $(LDFLAGS) $(UI_OBJS) $(LIBS) $(GTK_LIBS) -mwindows -mno-cygwin
|
||||||
|
|
||||||
|
mostlyclean:
|
||||||
|
rm -f $(APP) $(UI_APP) $(OBJ_DIR)/* core* *.core *~ *.bak
|
||||||
|
|
||||||
|
clean: mostlyclean
|
||||||
rm -f $(UNIXSRCS)
|
rm -f $(UNIXSRCS)
|
||||||
rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp
|
rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp ppc-execute-impl.cpp
|
||||||
rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf $(OBJ_DIR)
|
rm -rf $(OBJ_DIR)
|
||||||
|
rm -rf autom4te.cache
|
||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
rm -f config.cache config.log config.status config.h
|
rm -f config.cache config.log config.status config.h
|
||||||
|
|
||||||
@ -117,6 +145,8 @@ $(OBJ_DIR)/%.o : %.S
|
|||||||
$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.out.s
|
$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.out.s
|
||||||
$(AS) $(ASFLAGS) -o $@ $*.out.s
|
$(AS) $(ASFLAGS) -o $@ $*.out.s
|
||||||
rm $*.out.s
|
rm $*.out.s
|
||||||
|
$(OBJ_DIR)/prefs_editor_gtk.o: prefs_editor_gtk.cpp
|
||||||
|
$(CXX) -O2 -mno-cygwin -mms-bitfields $(CPPFLAGS) $(DEFS) $(GTK_CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Windows resources
|
# Windows resources
|
||||||
$(OBJ_DIR)/%.o: %.rc
|
$(OBJ_DIR)/%.o: %.rc
|
||||||
|
BIN
SheepShaver/src/Windows/SheepShaverGUI.ico
Executable file
BIN
SheepShaver/src/Windows/SheepShaverGUI.ico
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
2
SheepShaver/src/Windows/SheepShaverGUI.rc
Normal file
2
SheepShaver/src/Windows/SheepShaverGUI.rc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SheepShaverGUI ICON PRELOAD "SheepShaverGUI.ico"
|
||||||
|
|
@ -13,6 +13,7 @@ AC_CANONICAL_TARGET
|
|||||||
|
|
||||||
dnl Options.
|
dnl Options.
|
||||||
AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes])
|
AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes])
|
||||||
|
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@ -24,6 +25,15 @@ AC_PROG_LN_S
|
|||||||
AC_PATH_PROG(PERL, [perl])
|
AC_PATH_PROG(PERL, [perl])
|
||||||
AC_CHECK_TOOL(WINDRES, windres)
|
AC_CHECK_TOOL(WINDRES, windres)
|
||||||
|
|
||||||
|
dnl We use GTK+ if possible.
|
||||||
|
if [[ "x$WANT_GTK" = "xyes" ]]; then
|
||||||
|
AM_PATH_GTK_2_0(1.3.15, [], [
|
||||||
|
AC_MSG_WARN([Could not find GTK+ 2.0, disabling user interface.])
|
||||||
|
WANT_GTK=no
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
AC_SUBST(WANT_GTK)
|
||||||
|
|
||||||
dnl We use 64-bit file size support if possible.
|
dnl We use 64-bit file size support if possible.
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
@ -202,11 +212,10 @@ CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp"
|
|||||||
|
|
||||||
dnl We really want SDL for now
|
dnl We really want SDL for now
|
||||||
AC_CHECK_TOOL(sdl_config, sdl-config, [AC_MSG_ERROR([Sorry, you currently need SDL for this port])])
|
AC_CHECK_TOOL(sdl_config, sdl-config, [AC_MSG_ERROR([Sorry, you currently need SDL for this port])])
|
||||||
sdl_cflags=`$sdl_config --cflags`
|
SDL_CFLAGS=`$sdl_config --cflags`
|
||||||
sdl_libs=`$sdl_config --libs`
|
AC_SUBST(SDL_CFLAGS)
|
||||||
CFLAGS="$CFLAGS $sdl_cflags"
|
SDL_LIBS=`$sdl_config --libs`
|
||||||
CXXFLAGS="$CXXFLAGS $sdl_cflags"
|
AC_SUBST(SDL_LIBS)
|
||||||
LIBS="$LIBS $sdl_libs"
|
|
||||||
AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
|
AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
|
||||||
AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support])
|
AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support])
|
||||||
AC_DEFINE(USE_SDL_AUDIO, 1, [Define to enable SDL audio support])
|
AC_DEFINE(USE_SDL_AUDIO, 1, [Define to enable SDL audio support])
|
||||||
@ -230,5 +239,6 @@ echo
|
|||||||
echo SheepShaver configuration summary:
|
echo SheepShaver configuration summary:
|
||||||
echo
|
echo
|
||||||
echo Enable JIT compiler .............. : $WANT_JIT
|
echo Enable JIT compiler .............. : $WANT_JIT
|
||||||
|
echo GTK user interface ............... : $WANT_GTK
|
||||||
echo
|
echo
|
||||||
echo "Configuration done. Now type \"make\"."
|
echo "Configuration done. Now type \"make\"."
|
||||||
|
@ -47,6 +47,32 @@ user_string_def platform_strings[] = {
|
|||||||
{STR_WINDOW_TITLE_GRABBED, "SheepShaver (mouse grabbed, press Ctrl-F5 to release)"},
|
{STR_WINDOW_TITLE_GRABBED, "SheepShaver (mouse grabbed, press Ctrl-F5 to release)"},
|
||||||
{STR_NO_WIN32_NT_4, "SheepShaver does not run on Windows NT versions less than 4.0"},
|
{STR_NO_WIN32_NT_4, "SheepShaver does not run on Windows NT versions less than 4.0"},
|
||||||
|
|
||||||
|
{STR_PREFS_MENU_FILE_GTK, "/_File"},
|
||||||
|
{STR_PREFS_ITEM_START_GTK, "/File/_Start SheepShaver"},
|
||||||
|
{STR_PREFS_ITEM_ZAP_PRAM_GTK, "/File/_Zap PRAM File"},
|
||||||
|
{STR_PREFS_ITEM_SEPL_GTK, "/File/sepl"},
|
||||||
|
{STR_PREFS_ITEM_QUIT_GTK, "/File/_Quit SheepShaver"},
|
||||||
|
{STR_HELP_MENU_GTK, "/_Help"},
|
||||||
|
{STR_HELP_ITEM_ABOUT_GTK, "/Help/_About SheepShaver"},
|
||||||
|
|
||||||
|
{STR_FILE_CTRL, "File"},
|
||||||
|
{STR_BROWSE_TITLE, "Browse file"},
|
||||||
|
{STR_BROWSE_CTRL, "Browse..."},
|
||||||
|
{STR_SERIAL_PANE_TITLE, "Serial"},
|
||||||
|
{STR_NETWORK_PANE_TITLE, "Network"},
|
||||||
|
{STR_INPUT_PANE_TITLE, "Keyboard/Mouse"},
|
||||||
|
{STR_KEYCODES_CTRL, "Use Raw Keycodes"},
|
||||||
|
{STR_KEYCODE_FILE_CTRL, "Keycode Translation File"},
|
||||||
|
{STR_MOUSEWHEELMODE_CTRL, "Mouse Wheel Function"},
|
||||||
|
{STR_MOUSEWHEELMODE_PAGE_LAB, "Page Up/Down"},
|
||||||
|
{STR_MOUSEWHEELMODE_CURSOR_LAB, "Cursor Up/Down"},
|
||||||
|
{STR_MOUSEWHEELLINES_CTRL, "Lines To Scroll"},
|
||||||
|
{STR_POLLMEDIA_CTRL, "Try to automatically detect new removable media (enable polling)"},
|
||||||
|
{STR_EXTFS_ENABLE_CTRL, "Enable \"My Computer\" icon on your Mac desktop (external file system)"},
|
||||||
|
{STR_EXTFS_DRIVES_CTRL, "Mount drives"},
|
||||||
|
{STR_ETHER_FTP_PORT_LIST_CTRL, "FTP ports"},
|
||||||
|
{STR_ETHER_TCP_PORT_LIST_CTRL, "Server ports"},
|
||||||
|
|
||||||
{-1, NULL} // End marker
|
{-1, NULL} // End marker
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,6 +40,32 @@ enum {
|
|||||||
STR_OPEN_WINDOW_ERR,
|
STR_OPEN_WINDOW_ERR,
|
||||||
STR_WINDOW_TITLE_GRABBED,
|
STR_WINDOW_TITLE_GRABBED,
|
||||||
STR_NO_WIN32_NT_4,
|
STR_NO_WIN32_NT_4,
|
||||||
|
|
||||||
|
STR_PREFS_MENU_FILE_GTK,
|
||||||
|
STR_PREFS_ITEM_START_GTK,
|
||||||
|
STR_PREFS_ITEM_ZAP_PRAM_GTK,
|
||||||
|
STR_PREFS_ITEM_SEPL_GTK,
|
||||||
|
STR_PREFS_ITEM_QUIT_GTK,
|
||||||
|
STR_HELP_MENU_GTK,
|
||||||
|
STR_HELP_ITEM_ABOUT_GTK,
|
||||||
|
|
||||||
|
STR_FILE_CTRL,
|
||||||
|
STR_BROWSE_CTRL,
|
||||||
|
STR_BROWSE_TITLE,
|
||||||
|
STR_SERIAL_PANE_TITLE,
|
||||||
|
STR_NETWORK_PANE_TITLE,
|
||||||
|
STR_INPUT_PANE_TITLE,
|
||||||
|
STR_KEYCODES_CTRL,
|
||||||
|
STR_KEYCODE_FILE_CTRL,
|
||||||
|
STR_MOUSEWHEELMODE_CTRL,
|
||||||
|
STR_MOUSEWHEELMODE_PAGE_LAB,
|
||||||
|
STR_MOUSEWHEELMODE_CURSOR_LAB,
|
||||||
|
STR_MOUSEWHEELLINES_CTRL,
|
||||||
|
STR_POLLMEDIA_CTRL,
|
||||||
|
STR_EXTFS_ENABLE_CTRL,
|
||||||
|
STR_EXTFS_DRIVES_CTRL,
|
||||||
|
STR_ETHER_FTP_PORT_LIST_CTRL,
|
||||||
|
STR_ETHER_TCP_PORT_LIST_CTRL,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,6 +74,8 @@ enum {
|
|||||||
STR_PREFS_ITEM_ZAP_PRAM,
|
STR_PREFS_ITEM_ZAP_PRAM,
|
||||||
STR_PREFS_ITEM_QUIT,
|
STR_PREFS_ITEM_QUIT,
|
||||||
|
|
||||||
|
STR_NONE_LAB = 3100,
|
||||||
|
|
||||||
// Volumes pane
|
// Volumes pane
|
||||||
STR_VOLUMES_PANE_TITLE = 3200,
|
STR_VOLUMES_PANE_TITLE = 3200,
|
||||||
STR_ADD_VOLUME_BUTTON,
|
STR_ADD_VOLUME_BUTTON,
|
||||||
@ -99,6 +101,7 @@ enum {
|
|||||||
STR_REF_15HZ_LAB,
|
STR_REF_15HZ_LAB,
|
||||||
STR_REF_30HZ_LAB,
|
STR_REF_30HZ_LAB,
|
||||||
STR_REF_60HZ_LAB,
|
STR_REF_60HZ_LAB,
|
||||||
|
STR_REF_DYNAMIC_LAB,
|
||||||
STR_GFXACCEL_CTRL,
|
STR_GFXACCEL_CTRL,
|
||||||
STR_8_BIT_CTRL,
|
STR_8_BIT_CTRL,
|
||||||
STR_16_BIT_CTRL,
|
STR_16_BIT_CTRL,
|
||||||
|
@ -87,6 +87,8 @@ user_string_def common_strings[] = {
|
|||||||
{STR_PREFS_ITEM_ZAP_PRAM, "Zap PRAM File"},
|
{STR_PREFS_ITEM_ZAP_PRAM, "Zap PRAM File"},
|
||||||
{STR_PREFS_ITEM_QUIT, "Quit SheepShaver"},
|
{STR_PREFS_ITEM_QUIT, "Quit SheepShaver"},
|
||||||
|
|
||||||
|
{STR_NONE_LAB, "<none>"},
|
||||||
|
|
||||||
{STR_VOLUMES_PANE_TITLE, "Volumes"},
|
{STR_VOLUMES_PANE_TITLE, "Volumes"},
|
||||||
{STR_ADD_VOLUME_BUTTON, "Add" ELLIPSIS},
|
{STR_ADD_VOLUME_BUTTON, "Add" ELLIPSIS},
|
||||||
{STR_CREATE_VOLUME_BUTTON, "Create" ELLIPSIS},
|
{STR_CREATE_VOLUME_BUTTON, "Create" ELLIPSIS},
|
||||||
@ -109,6 +111,7 @@ user_string_def common_strings[] = {
|
|||||||
{STR_REF_15HZ_LAB, "15 Hz"},
|
{STR_REF_15HZ_LAB, "15 Hz"},
|
||||||
{STR_REF_30HZ_LAB, "30 Hz"},
|
{STR_REF_30HZ_LAB, "30 Hz"},
|
||||||
{STR_REF_60HZ_LAB, "60 Hz"},
|
{STR_REF_60HZ_LAB, "60 Hz"},
|
||||||
|
{STR_REF_DYNAMIC_LAB, "Dynamic"},
|
||||||
{STR_GFXACCEL_CTRL, "QuickDraw Acceleration"},
|
{STR_GFXACCEL_CTRL, "QuickDraw Acceleration"},
|
||||||
{STR_8_BIT_CTRL, "8 Bit"},
|
{STR_8_BIT_CTRL, "8 Bit"},
|
||||||
{STR_16_BIT_CTRL, "15 Bit"},
|
{STR_16_BIT_CTRL, "15 Bit"},
|
||||||
|
Loading…
Reference in New Issue
Block a user