mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-12 16:30:44 +00:00
Check for GTK for the GUI. Also add serial_windows.cpp to SRCS files
This commit is contained in:
parent
1e7c27958d
commit
3e532be645
@ -15,12 +15,18 @@ KEYCODES = ../SDL/keycodes
|
||||
|
||||
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@
|
||||
WINDRES = @WINDRES@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CFLAGS = @CFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CFLAGS = @CFLAGS@ $(SDL_CFLAGS)
|
||||
CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS)
|
||||
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
|
||||
DEFS = @DEFS@ @DEFINES@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
@ -45,7 +51,7 @@ ROUTERSRCS = router/arp.cpp router/dump.cpp router/dynsockets.cpp router/ftp.cp
|
||||
SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_windows.cpp \
|
||||
sys_windows.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \
|
||||
../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_windows.cpp ../timer.cpp \
|
||||
timer_windows.cpp ../adb.cpp ../serial.cpp ../dummy/serial_dummy.cpp \
|
||||
timer_windows.cpp ../adb.cpp ../serial.cpp serial_windows.cpp \
|
||||
../ether.cpp ether_windows.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp \
|
||||
../scsi.cpp ../dummy/scsi_dummy.cpp ../video.cpp ../SDL/video_sdl.cpp \
|
||||
video_blit.cpp ../audio.cpp ../SDL/audio_sdl.cpp clip_windows.cpp \
|
||||
@ -54,14 +60,25 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window
|
||||
../dummy/prefs_editor_dummy.cpp BasiliskII.rc \
|
||||
$(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS)
|
||||
|
||||
UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \
|
||||
../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp BasiliskIIGUI.rc
|
||||
|
||||
UI_APP = BasiliskIIGUI.exe
|
||||
|
||||
APP = BasiliskII.exe
|
||||
|
||||
PROGS = $(APP)
|
||||
|
||||
ifeq ($(WANT_GTK),yes)
|
||||
PROGS += $(UI_APP)
|
||||
endif
|
||||
|
||||
## Rules
|
||||
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cpp .s .o .h
|
||||
|
||||
all: $(APP)
|
||||
all: $(PROGS)
|
||||
|
||||
$(UNIXSRCS): %: ../Unix/%
|
||||
$(LN_S) $< $@
|
||||
@ -76,15 +93,24 @@ define SRCS_LIST_TO_OBJS
|
||||
endef
|
||||
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)
|
||||
|
||||
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
|
||||
VPATH :=
|
||||
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
|
||||
|
||||
$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
|
||||
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
$(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS)
|
||||
|
||||
$(UI_APP): $(UNIXSRCS) $(OBJ_DIR) $(UI_OBJS)
|
||||
$(CXX) -o $@ $(LDFLAGS) $(UI_OBJS) $(LIBS) $(GTK_LIBS) -mwindows -mno-cygwin
|
||||
|
||||
mostlyclean:
|
||||
rm -f $(APP)$(EXEEXT) $(OBJ_DIR)/* core* *.core *~ *.bak
|
||||
rm -f $(APP) $(UI_APP) $(OBJ_DIR)/* core* *.core *~ *.bak
|
||||
|
||||
clean: mostlyclean
|
||||
rm -f $(UNIXSRCS)
|
||||
@ -109,6 +135,8 @@ $(OBJ_DIR)/%.o : %.cpp
|
||||
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
|
||||
$(OBJ_DIR)/%.o : %.s
|
||||
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
|
||||
$(OBJ_DIR)/prefs_editor_gtk.o: prefs_editor_gtk.cpp
|
||||
$(CXX) -O2 -mno-cygwin -mms-bitfields $(CPPFLAGS) $(DEFS) $(GTK_CFLAGS) -c $< -o $@
|
||||
|
||||
# Windows resources
|
||||
$(OBJ_DIR)/%.o: %.rc
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -978,7 +978,7 @@ static void create_input_pane(GtkWidget *top)
|
||||
|
||||
|
||||
/*
|
||||
* "Ports" pane
|
||||
* "Serial" pane
|
||||
*/
|
||||
|
||||
static GtkWidget *w_seriala, *w_portfile0, *w_portfile0_browse;
|
||||
@ -1044,7 +1044,7 @@ static GList *add_serial_names(void)
|
||||
return glist;
|
||||
}
|
||||
|
||||
// Create "Ports" pane
|
||||
// Create "Serial" pane
|
||||
static void create_serial_pane(GtkWidget *top)
|
||||
{
|
||||
GtkWidget *box, *hbox, *table, *label, *combo, *sep, *entry;
|
||||
|
@ -51,6 +51,8 @@ prefs_desc platform_prefs_items[] = {
|
||||
{"routerenabled", TYPE_BOOLEAN, false, "enable NAT/Router module"},
|
||||
{"ftp_port_list", TYPE_STRING, false, "FTP ports list"},
|
||||
{"tcp_port", TYPE_STRING, false, "TCP ports list"},
|
||||
{"portfile0", TYPE_STRING, false, "output file for serial port 0"},
|
||||
{"portfile1", TYPE_STRING, false, "output file for serial port 1"},
|
||||
|
||||
{NULL, TYPE_END, false, NULL} // End of list
|
||||
};
|
||||
@ -130,4 +132,6 @@ void AddPlatformPrefsDefaults(void)
|
||||
PrefsReplaceInt32("ethermulticastmode", 0);
|
||||
PrefsReplaceBool("routerenabled", false);
|
||||
PrefsReplaceString("ftp_port_list", "21");
|
||||
PrefsReplaceString("portfile0", "C:\\B2TEMP0.OUT");
|
||||
PrefsReplaceString("portfile1", "C:\\B2TEMP1.OUT");
|
||||
}
|
||||
|
@ -42,6 +42,30 @@ user_string_def platform_strings[] = {
|
||||
{STR_WINDOW_TITLE_GRABBED, "Basilisk II (mouse grabbed, press Ctrl-F5 to release)"},
|
||||
{STR_NO_WIN32_NT_4, "Basilisk II does not run on Windows NT versions less than 4.0"},
|
||||
|
||||
{STR_PREFS_MENU_FILE_GTK, "/_File"},
|
||||
{STR_PREFS_ITEM_START_GTK, "/File/_Start Basilisk II"},
|
||||
{STR_PREFS_ITEM_ZAP_PRAM_GTK, "/File/_Zap PRAM File"},
|
||||
{STR_PREFS_ITEM_SEPL_GTK, "/File/sepl"},
|
||||
{STR_PREFS_ITEM_QUIT_GTK, "/File/_Quit Basilisk II"},
|
||||
{STR_HELP_MENU_GTK, "/_Help"},
|
||||
{STR_HELP_ITEM_ABOUT_GTK, "/Help/_About Basilisk II"},
|
||||
|
||||
{STR_ABOUT_BUTTON, "About"},
|
||||
{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_IGNORESEGV_CTRL, "Ignore Illegal Memory Accesses"},
|
||||
|
||||
{-1, NULL} // End marker
|
||||
};
|
||||
|
||||
|
@ -31,6 +31,30 @@ enum {
|
||||
STR_KEYCODE_VENDOR_WARN,
|
||||
STR_WINDOW_TITLE_GRABBED,
|
||||
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_ABOUT_BUTTON,
|
||||
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_IGNORESEGV_CTRL,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user