[Scummvm-cvs-logs] SF.net SVN: scummvm: [28038] scummex/branches/gsoc2007-gameresbrowser
zbychs at users.sourceforge.net
zbychs at users.sourceforge.net
Thu Jul 12 07:32:59 CEST 2007
Revision: 28038
http://scummvm.svn.sourceforge.net/scummvm/?rev=28038&view=rev
Author: zbychs
Date: 2007-07-11 22:32:59 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
Compiles under Linux
Modified Paths:
--------------
scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile
scummex/branches/gsoc2007-gameresbrowser/src/browser/FileType.h
scummex/branches/gsoc2007-gameresbrowser/src/browser/PluginUtil.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browser/browser.h
scummex/branches/gsoc2007-gameresbrowser/src/core/GUIDObject.h
scummex/branches/gsoc2007-gameresbrowser/src/core/core.h
scummex/branches/gsoc2007-gameresbrowser/src/core/core_static_stdafx.h
scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h
scummex/branches/gsoc2007-gameresbrowser/src/core/guid.h
scummex/branches/gsoc2007-gameresbrowser/src/core/rcobject.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_plugin.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_stdafx.h
Modified: scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/gcc/Makefile 2007-07-12 05:32:59 UTC (rev 28038)
@@ -6,81 +6,73 @@
#
###########################################################################################
-.PHONY : bundle pure debug dots tell in-dep dep precomp in-all all clean clean_precomp \
- copy_data core plugins gui clean_data clean_core \
- clean_plugins clean_gui core_dir plugins_dir gui_dir
+.PHONY : bundle debug dots tell depend \
+ all clean clean_objs clean_d \
+ copy_data clean_data copy_so \
+ core browser basic scumm browserapp \
+ dirs
+
+all: tell browserapp basic copy_so copy_data
+
###########################################################################################
SOURCES_DIR = ../src
-#SOURCES_DIR = .
OUT_DIR = ./out
-#OUT_DIR = ../gcc/out
-DEP_HEADERS_DIRS = $(SOURCES_DIR)/core $(SOURCES_DIR)/plugins $(SOURCES_DIR)/gui
-HEADERS_DIRS = $(ALL_OUTPUT) $(DEP_HEADERS_DIRS)
-DATA_OUTPUT = $(GUI_OUTPUT)/share/browser
+DATA_OUTPUT = $(BROWSERAPP_OUTPUT)
+SO_OUTPUT = $(BROWSERAPP_OUTPUT)
-#precompilation actually makes it compile slower...
-MAKE_PRECOMP = no
-ifneq ($(MAKE_PRECOMP), no)
+CORE_DIR = $(SOURCES_DIR)/core
+BROWSER_DIR = $(SOURCES_DIR)/browser
+BASIC_DIR = $(SOURCES_DIR)/plugins/basic
+#SCUMM_DIR = $(SOURCES_DIR)/plugins/scumm
+SCUMM_DIR =
+BROWSERAPP_DIR = $(SOURCES_DIR)/browserapp
-CORE_GCH = $(CORE_DIR)/core_stdafx.h
-PLUGINS_GCH = $(PLUGINS_DIR)/plugins_stdafx.h
-GUI_GCH = $(GUI_DIR)/gui_stdafx.h
-#ALL_GCH = $(CORE_GCH) $(PLUGINS_GCH) $(GUI_GCH)
-ALL_GCH = $(CORE_GCH)
+ALL_DIRS = $(CORE_DIR) $(BROWSER_DIR) $(BASIC_DIR) $(SCUMM_DIR) $(BROWSERAPP_DIR)
-CORE_GCH_OUT = $(CORE_OUTPUT)/core_stdafx.h.gch
-PLUGINS_GCH_OUT = $(PLUGINS_OUTPUT)/plugins_stdafx.h.gch
-GUI_GCH_OUT = $(GUI_OUTPUT)/gui_stdafx.h.gch
-#ALL_GCH_OUT = $(CORE_GCH_OUT) $(PLUGINS_GCH_OUT) $(GUI_GCH_OUT)
-ALL_GCH_OUT = $(CORE_GCH_OUT)
+#VPATH = $(CORE_DIR):$(BROWSER_DIR):$(BASIC_DIR):$(SCUMM_DIR):$(BROWSERAPP_DIR)
-endif
+CORE_OUTPUT = $(OUT_DIR)/core
+BROWSER_OUTPUT = $(OUT_DIR)/browser
+BASIC_OUTPUT = $(OUT_DIR)/plugins/basic
+SCUMM_OUTPUT = $(OUT_DIR)/plugins/scumm
+BROWSERAPP_OUTPUT = $(OUT_DIR)/browserapp
-COMMON_DIR = $(SOURCES_DIR)/core/common
-CORE_DIR = $(SOURCES_DIR)/core
-SCUMM_DIR = $(SOURCES_DIR)/plugins/scumm
-PLUGINS_DIR = $(SOURCES_DIR)/plugins
-GUI_DIR = $(SOURCES_DIR)/gui
+ALL_OUTPUT = $(CORE_OUTPUT) $(BROWSER_OUTPUT) $(BASIC_OUTPUT) $(SCUMM_OUTPUT) $(BROWSERAPP_OUTPUT)
-COMMON_SOURCES = $(wildcard $(COMMON_DIR)/*.cpp)
-COMMON_OUTPUT = $(OUT_DIR)/core/common
-
+CORE_SOURCES = $(wildcard $(CORE_DIR)/*.cpp)
+BROWSER_SOURCES = $(wildcard $(BROWSER_DIR)/*.cpp) $(wildcard $(BROWSER_DIR)/streams/*.cpp)
+BASIC_SOURCES = $(wildcard $(BASIC_DIR)/*.cpp)
SCUMM_SOURCES = $(wildcard $(SCUMM_DIR)/*.cpp)
-SCUMM_OUTPUT = $(OUT_DIR)/plugins/scumm
+BROWSERAPP_SOURCES = $(wildcard $(BROWSERAPP_DIR)/*.cpp)
-CORE_SOURCES = $(wildcard $(CORE_DIR)/*.cpp)
-CORE_OUTPUT = $(OUT_DIR)/core
-CORE_LIB = core
-CORE_TARGET = $(CORE_OUTPUT)/lib$(CORE_LIB).a
+ALL_SOURCES = $(CORE_SOURCES) $(BROWSER_SOURCES) $(BASIC_SOURCES) $(SCUMM_SOURCES) $(BROWSERAPP_SOURCES)
-PLUGINS_SOURCES = $(wildcard $(PLUGINS_DIR)/*.cpp)
-PLUGINS_OUTPUT = $(OUT_DIR)/plugins
-PLUGINS_LIB = plugins
-PLUGINS_TARGET = $(PLUGINS_OUTPUT)/lib$(PLUGINS_LIB).a
+CORE_OBJECTS = $(patsubst %.cpp,%.o, $(CORE_SOURCES))
+BROWSER_OBJECTS = $(patsubst %.cpp,%.o, $(BROWSER_SOURCES))
+BASIC_OBJECTS = $(patsubst %.cpp,%.o, $(BASIC_SOURCES))
+SCUMM_OBJECTS = $(patsubst %.cpp,%.o, $(SCUMM_SOURCES))
+BROWSERAPP_OBJECTS = $(patsubst %.cpp,%.o, $(BROWSERAPP_SOURCES))
-GUI_SOURCES = $(wildcard $(GUI_DIR)/*.cpp)
-GUI_OUTPUT = $(OUT_DIR)/gui
-GUI_TARGET = $(GUI_OUTPUT)/browser
+ALL_OBJECTS = $(CORE_OBJECTS) $(BROWSER_OBJECTS) $(BASIC_OBJECTS) $(SCUMM_OBJECTS) $(BROWSERAPP_OBJECTS)
-COMMON_OBJECTS_ = $(patsubst %.cpp,%.o, $(COMMON_SOURCES) )
-SCUMM_OBJECTS_ = $(patsubst %.cpp,%.o, $(SCUMM_SOURCES) )
-CORE_OBJECTS_ = $(patsubst %.cpp,%.o, $(CORE_SOURCES) )
-PLUGINS_OBJECTS_ = $(patsubst %.cpp,%.o, $(PLUGINS_SOURCES) )
-GUI_OBJECTS_ = $(patsubst %.cpp,%.o, $(GUI_SOURCES) )
+CORE_LIB = core
+BROWSER_LIB = browser
+BASIC_LIB = basic
+SCUMM_LIB = scumm
-COMMON_OBJECTS = $(patsubst %, $(COMMON_OUTPUT)/%, $(notdir $(COMMON_OBJECTS_) ) )
-SCUMM_OBJECTS = $(patsubst %, $(SCUMM_OUTPUT)/%, $(notdir $(SCUMM_OBJECTS_) ) )
-CORE_OBJECTS = $(patsubst %, $(CORE_OUTPUT)/%, $(notdir $(CORE_OBJECTS_) ) )
-PLUGINS_OBJECTS = $(patsubst %, $(PLUGINS_OUTPUT)/%, $(notdir $(PLUGINS_OBJECTS_) ) )
-GUI_OBJECTS = $(patsubst %, $(GUI_OUTPUT)/%, $(notdir $(GUI_OBJECTS_) ) )
+CORE_TARGET = $(CORE_OUTPUT)/lib$(CORE_LIB).so
+BROWSER_TARGET = $(BROWSER_OUTPUT)/lib$(BROWSER_LIB).so
+BASIC_TARGET = $(BASIC_OUTPUT)/lib$(BASIC_LIB).so
+SCUMM_TARGET = $(SCUMM_OUTPUT)/lib$(SCUMM_LIB).so
-ALL_SOURCES = $(COMMON_SOURCES) $(SCUMM_SOURCES) $(CORE_SOURCES) $(PLUGINS_SOURCES) $(GUI_SOURCES)
-ALL_OBJECTS = $(COMMON_OBJECTS) $(SCUMM_OBJECTS) $(CORE_OBJECTS) $(PLUGINS_OBJECTS) $(GUI_OBJECTS)
-ALL_OUTPUT = $(CORE_OUTPUT) $(PLUGINS_OUTPUT) $(GUI_OUTPUT)
+BROWSERAPP_TARGET = $(BROWSERAPP_OUTPUT)/browser
+ALL_TARGETS = $(CORE_TARGET) $(BROWSER_TARGET) $(BASIC_TARGET) $(SCUMM_TARGET) $(BROWSERAPP_TARGET)
+
+
# TEST_OBJECTS = $(RAW_TEST_OBJECTS) $(filter-out main.o, $(OBJECTS) )
###########################################################################################
@@ -106,57 +98,40 @@
WX_VERSION = 2.8
WX_CONFIG = wx-config
#WX_CONFIG = /usr/bin/wx-config
-WX_OPTS = --version=$(WX_VERSION) --debug=$(WX_DEBUG) --unicode=$(WX_UNICODE)
+WX_OPTS = --version=$(WX_VERSION) --debug=$(WX_DEBUG) --unicode=$(WX_UNICODE) --static=no
WX_FLAGS = $(shell $(WX_CONFIG) $(WX_OPTS) --cxxflags)
WX_LIBS = $(shell $(WX_CONFIG) $(WX_OPTS) --libs)
###########################################################################################
-ifeq ($(MAKE_PURE), yes)
- PURE = NO_BOBJECTS
-else
- PURE =
-endif
-
ifeq ($(MAKE_DEBUG), yes)
TELL = DEBUG BUILD
- GLOBAL_DEFINES = _DEBUG UNIX $(PURE) $(UNICODE)
+ GLOBAL_DEFINES = _DEBUG UNIX WXUSINGDLL $(UNICODE)
else
TELL = RELEASE BUILD
-# GLOBAL_DEFINES = NDEBUG UNIX $(PURE) $(UNICODE)
- GLOBAL_DEFINES = UNIX $(PURE) $(UNICODE)
+# GLOBAL_DEFINES = NDEBUG UNIX WXUSINGDLL $(UNICODE)
+ GLOBAL_DEFINES = UNIX WXUSINGDLL $(UNICODE)
endif
-DEP_BASE_FLAGS = -g $(patsubst %, -I%, $(DEP_HEADERS_DIRS) ) $(patsubst %, -D%, $(GLOBAL_DEFINES) )
-BASE_FLAGS = -g $(patsubst %, -I%, $(HEADERS_DIRS) ) $(patsubst %, -D%, $(GLOBAL_DEFINES) )
-CFLAGS = $(BASE_FLAGS) $(WX_FLAGS)
-DEPFLAGS = $(DEP_BASE_FLAGS) $(filter-out -I%, $(WX_FLAGS) ) -D$(DEP_UNICODE)
+BASE_FLAGS = -g -fPIC $(patsubst %, -I%, $(ALL_DIRS) ) $(patsubst %, -D%, $(GLOBAL_DEFINES) ) \
+ $(patsubst %, -L%, $(ALL_OUTPUT) )
+CXXFLAGS = $(BASE_FLAGS) $(WX_FLAGS)
+DEPFLAGS = $(CXXFLAGS) $(filter-out -I%, $(WX_FLAGS)) -D$(DEP_UNICODE)
+
MKDIR = mkdir -p
###########################################################################################
-all:
-# cd ../src
- $(MAKE) in-all
-# cd ../gcc
-
-in-all: tell precomp gui
-
tell:
- echo '$(TELL)'
+ @echo '$(TELL)'
dots:
./mkdot.sh
-pure:
- $(MAKE) all MAKE_PURE=yes
-
debug:
$(MAKE) all MAKE_DEBUG=yes
-precomp: $(ALL_GCH_OUT)
-
###########################################################################################
#MacOS X Application Bundle
@@ -169,158 +144,116 @@
$(MKDIR) GameResourceBrowser.app
$(MKDIR) GameResourceBrowser.app/Contents
$(MKDIR) GameResourceBrowser.app/Contents/MacOS
+ $(MKDIR) GameResourceBrowser.app/Contents/PlugIns
$(MKDIR) GameResourceBrowser.app/Contents/Resources
# $(MKDIR) GameResourceBrowser.app/Contents/Resources/English.lproj
cp mac/Info.plist GameResourceBrowser.app/Contents/
# cp mac/version.plist GameResourceBrowser.app/Contents/
# cp mac/InfoPlist.strings GameResourceBrowser.app/Contents/Resources/English.lproj/
echo -n 'APPLGSSB' > GameResourceBrowser.app/Contents/PkgInfo
- cp $(GUI_TARGET) GameResourceBrowser.app/Contents/MacOS/GameResourceBrowser
+ cp $(BROWSERAPP_TARGET) GameResourceBrowser.app/Contents/MacOS/GameResourceBrowser
# cp mac/res/* GameResourceBrowser.app/Contents/Resources/
cp -f -R $(SOURCES_DIR)/data GameResourceBrowser.app/Contents/Resources/data
cp -f -R $(SOURCES_DIR)/help GameResourceBrowser.app/Contents/Resources/help
+ cp -f -R $(SOURCES_DIR)/so/* GameResourceBrowser.app/Contents/PlugIns
###########################################################################################
-#$(ALL_D) : %.d : %.cpp
-# @set -e; rm -f $@; \
-# g++ -MM $(CFLAGS) $< > $@.$$$$; \
-# sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-# rm -f $@.$$$$
-
ALL_D = $(ALL_SOURCES:.cpp=.d)
-#$(ALL_D) : $(OUT_DIR)%.d : $(SOURCES_DIR)%.cpp
-# g++ -MM $(CFLAGS) $< > $@
+#$(ALL_D) : %.d : %.cpp
+# g++ -MM $(DEPFLAGS) $< > $@
-#deps.d : $(ALL_SOURCES)
-# g++ -MM $(DEPFLAGS) $^ > $@
+#deps.d: $(ALL_D) $(ALL_SOURCES)
+# cat $(ALL_D) > deps.d
-$(ALL_D) : %.d : %.cpp
- g++ -MM $(DEPFLAGS) -MT $(patsubst %.cpp, %.o, $(patsubst $(SOURCES_DIR)%, $(OUT_DIR)%, $<)) $< >> deps.d
+#depend : deps.d
-in-dep : $(ALL_D)
+#include deps.d
-#broken!!!
-dep:
- rm -f deps.d
- echo "" > deps.d
- $(MAKE) in-dep
+#$(ALL_D) : %.d : %.cpp
+# g++ -MM -MT $(patsubst %.cpp, %.o, $(patsubst $(SOURCES_DIR)%, $(OUT_DIR)%, $<)) $< >> deps.d
-include deps.d
-
-#dep: deps.d
-# rm -f deps.d
-# $(MAKE) in-dep
-# @echo "make dep is broken for now. Sorry."
-
-#dep: $(ALL_D)
-
-#include $(ALL_D)
-
-#broken!!!
-#DEP_ALL_SOURCES = $(patsubst $(SOURCES_DIR)%,.%, $(ALL_SOURCES) )
-#DEP_DEPFLAGS = $(patsubst $(SOURCES_DIR)%,.%, $(DEPFLAGS) )
-
-#dep:
-#1;2B $(MAKE) -C../src -f../gcc/Makefile in-dep
-
-#in-dep: $(ALL_D)
-# makedepend -f../gcc/Makefile -Y -p$(OUT_DIR)/ -- $(DEP_DEPFLAGS) -- $(DEP_ALL_SOURCES)
-
###########################################################################################
-clean_core:
- rm -f $(COMMON_OBJECTS) $(CORE_OBJECTS) $(CORE_TARGET)
+clean_objs:
+ rm -f $(ALL_OBJECTS) $(ALL_TARGETS)
+ rm -f $(SO_OUTPUT)/*.so
-clean_plugins:
- rm -f $(SCUMM_OBJECTS) $(PLUGINS_OBJECTS) $(PLUGINS_TARGET)
+clean_d:
+ rm -f $(ALL_D)
-clean_gui:
- rm -f $(GUI_OBJECTS) $(GUI_TARGET)
+clean: clean_objs clean_d clean_data
-clean_precomp:
- rm -f $(ALL_GCH_OUT)
-
-clean: clean_core clean_plugins clean_gui clean_data clean_precomp
-
###########################################################################################
clean_data:
rm -f -R $(DATA_OUTPUT)/data
+ rm -f -R $(DATA_OUTPUT)/help
copy_data:
$(MKDIR) $(DATA_OUTPUT)
cp -f -R $(SOURCES_DIR)/data $(DATA_OUTPUT)/data
cp -f -R $(SOURCES_DIR)/help $(DATA_OUTPUT)/help
+copy_so:
+ $(MKDIR) $(SO_OUTPUT)
+ cp -f -R $(CORE_TARGET) $(SO_OUTPUT)/lib$(CORE_LIB).so
+ cp -f -R $(BROWSER_TARGET) $(SO_OUTPUT)/lib$(BROWSER_LIB).so
+ cp -f -R $(BASIC_TARGET) $(SO_OUTPUT)/lib$(BASIC_LIB).so
+# cp -f -R $(SCUMM_TARGET) $(SO_OUTPUT)/lib$(SCUMM_LIB).so
+
###########################################################################################
-$(CORE_GCH_OUT) : $(CORE_GCH)
- g++ $(CFLAGS) -c $< -o $@
-
-$(PLUGINS_GCH_OUT) : $(PLUGINS_GCH)
- g++ $(CFLAGS) -c $< -o $@
-
-$(GUI_GCH_OUT) : $(GUI_GCH)
- g++ $(CFLAGS) -c $< -o $@
-
-.SECONDEXPANSION:
+$(ALL_OBJECTS) : %.o : %.cpp
+ g++ $(CXXFLAGS) -c $< -o $@
-#$(ALL_OBJECTS) : %.o : %.cpp
-# g++ $(CFLAGS) -c $< -o $@
+###########################################################################################
-$(CORE_OBJECTS) : $(CORE_DIR)/$$(notdir $$(basename $$@) ).cpp
- g++ $(CFLAGS) -c $< -o $@
+dirs:
+ $(MKDIR) $(CORE_OUTPUT)
+ $(MKDIR) $(BROWSER_OUTPUT)
+ $(MKDIR) $(BASIC_OUTPUT)
+ $(MKDIR) $(SCUMM_OUTPUT)
+ $(MKDIR) $(BROWSERAPP_OUTPUT)
-$(PLUGINS_OBJECTS) : $(PLUGINS_DIR)/$$(notdir $$(basename $$@) ).cpp
- g++ $(CFLAGS) -c $< -o $@
+###########################################################################################
-$(COMMON_OBJECTS) : $(COMMON_DIR)/$$(notdir $$(basename $$@) ).cpp
- g++ $(CFLAGS) -c $< -o $@
+core: dirs $(CORE_TARGET)
-$(SCUMM_OBJECTS) : $(SCUMM_DIR)/$$(notdir $$(basename $$@) ).cpp
- g++ $(CFLAGS) -c $< -o $@
+browser: dirs $(BROWSER_TARGET)
-$(GUI_OBJECTS) : $(GUI_DIR)/$$(notdir $$(basename $$@) ).cpp
- g++ $(CFLAGS) -c $< -o $@
+basic: dirs $(BASIC_TARGET)
-###########################################################################################
+scumm: dirs $(SCUMM_TARGET)
-core_dir:
- $(MKDIR) $(COMMON_OUTPUT)
- $(MKDIR) $(CORE_OUTPUT)
-core: core_dir $(CORE_TARGET)
-$(CORE_TARGET) : $(COMMON_OBJECTS) $(CORE_OBJECTS)
- ar rcs $@ $^
+$(CORE_TARGET) : $(CORE_OBJECTS)
+ g++ $(CXXFLAGS) -shared -Wl,-soname,lib$(CORE_LIB).so -o $(CORE_TARGET) $^
+# ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so.1
+# ln -sf /opt/lib/libctest.so.1 /opt/lib/libctest.so
-###########################################################################################
+$(BROWSER_TARGET) : $(BROWSER_OBJECTS)
+ g++ $(CXXFLAGS) -shared -Wl,-soname,lib$(BROWSER_LIB).so -o $(BROWSER_TARGET) -l$(CORE_LIB) $^
-plugins_dir:
- $(MKDIR) $(SCUMM_OUTPUT)
- $(MKDIR) $(PLUGINS_OUTPUT)
+$(BASIC_TARGET) : $(BASIC_OBJECTS)
+ g++ $(CXXFLAGS) -shared -Wl,-soname,lib$(BASIC_LIB).so -o $(BASIC_TARGET) -l$(CORE_LIB) -l$(BROWSER_LIB) $^
-plugins: plugins_dir $(PLUGINS_TARGET)
+$(SCUMM_TARGET) : $(SCUMM_OBJECTS)
+ g++ $(CXXFLAGS) -shared -Wl,-soname,lib$(SCUMM_LIB).so -o $(SCUMM_TARGET) -l$(CORE_LIB) -l$(BROWSER_LIB) -l$(BASIC_LIB) $^
-$(PLUGINS_TARGET) : $(SCUMM_OBJECTS) $(PLUGINS_OBJECTS)
- ar rcs $@ $^
-
###########################################################################################
-gui_dir:
- $(MKDIR) $(GUI_OUTPUT)
+browserapp: dirs $(BROWSERAPP_TARGET)
-gui: gui_dir $(GUI_TARGET)
+#HACK_OBJS = $(CORE_OUTPUT)/CoreFileTypes.o $(CORE_OUTPUT)/CoreInterfaces.o \
+# $(COMMON_OUTPUT)/xorstream.o
-HACK_OBJS = $(CORE_OUTPUT)/CoreFileTypes.o $(CORE_OUTPUT)/CoreInterfaces.o \
- $(COMMON_OUTPUT)/xorstream.o
+$(BROWSERAPP_TARGET): $(BROWSERAPP_OBJECTS) core browser
+ g++ $(CXXFLAGS) -o $@ $(BROWSERAPP_OBJECTS) $(HACK_OBJS) $(WX_LIBS) -l$(CORE_LIB) -l$(BROWSER_LIB)
-$(GUI_TARGET): $(GUI_OBJECTS) core plugins
- g++ $(CFLAGS) -o $@ $(GUI_OBJECTS) $(HACK_OBJS) $(WX_LIBS) -L$(CORE_OUTPUT) -L$(PLUGINS_OUTPUT) -l$(CORE_LIB) -l$(PLUGINS_LIB)
-
###########################################################################################
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/FileType.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/FileType.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/FileType.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -73,15 +73,20 @@
bool operator<(const RecognizedFileType& other) const;
};
+} //namespace Browser
#ifdef _MSC_VER
#pragma warning(disable : 4251 4231)
#endif
-BROWSER_API_TEMPLATE template class BROWSER_API std::vector<RecognizedFileType>;
+BROWSER_API_TEMPLATE template class BROWSER_API std::vector<Browser::RecognizedFileType>;
#ifdef _MSC_VER
#pragma warning(default : 4251 4231)
#endif
+
+namespace Browser {
+
typedef std::vector<RecognizedFileType> RecognizedFileTypes;
+
//WX_DECLARE_OBJARRAY_WITH_DECL(RecognizedFileType, RecognizedFileTypes, class BROWSER_API);
//typedef std::list<RecognizedFileType> RecognizedFileTypes;
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/PluginUtil.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/PluginUtil.cpp 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/PluginUtil.cpp 2007-07-12 05:32:59 UTC (rev 28038)
@@ -38,7 +38,7 @@
//outputs a Native path
BROWSER_API wxString getResourcesDir() {
-#ifdef UNIX
+#ifdef UNIX_XXX
wxFileName execFN(wxStandardPaths::Get().GetExecutablePath());
wxStandardPaths::Get().SetInstallPrefix(execFN.GetPath());
#endif
@@ -65,7 +65,7 @@
//outputs a Native path
BROWSER_API wxString getPluginsDir() {
-#ifdef UNIX
+#ifdef UNIX_XXX
wxFileName execFN(wxStandardPaths::Get().GetExecutablePath());
wxStandardPaths::Get().SetInstallPrefix(execFN.GetPath());
#endif
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/browser.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/browser.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/browser.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -4,6 +4,8 @@
// that uses this DLL. This way any other project whose source files include this file see
// BROWSER_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
+
+#ifdef _MSC_VER
#ifdef BROWSER_EXPORTS
#define BROWSER_API __declspec(dllexport)
#define BROWSER_API_TEMPLATE
@@ -11,3 +13,7 @@
#define BROWSER_API __declspec(dllimport)
#define BROWSER_API_TEMPLATE extern
#endif
+#else
+ #define BROWSER_API
+ #define BROWSER_API_TEMPLATE
+#endif
Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/GUIDObject.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/GUIDObject.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/GUIDObject.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -44,7 +44,7 @@
#define GUID_FOR(clazz, facility, version) \
ASSIGN_GUID_VERBOSE( wxT(#clazz), facility, version)
-//#define ASSIGN_GUID(facility, version) \
+//#define ASSIGN_GUID(facility, version)
// ASSIGN_GUID_VERBOSE(typeid(this_class).name(), facility, version)
/////////////////////////////////////////////////////////////////////////////
Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/core.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/core.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/core.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -4,6 +4,7 @@
// that uses this DLL. This way any other project whose source files include this file see
// CORE_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
+#ifdef _MSC_VER
#ifdef CORE_EXPORTS
#define CORE_API __declspec(dllexport)
#define CORE_API_TEMPLATE
@@ -11,6 +12,10 @@
#define CORE_API __declspec(dllimport)
#define CORE_API_TEMPLATE extern
#endif
+#else
+ #define CORE_API
+ #define CORE_API_TEMPLATE
+#endif
/*
// This class is exported from the core.dll
@@ -23,4 +28,4 @@
extern CORE_API int ncore;
CORE_API int fncore(void);
-*/
\ No newline at end of file
+*/
Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/core_static_stdafx.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/core_static_stdafx.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/core_static_stdafx.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -57,3 +57,4 @@
#include "tostring.h"
#endif //_CORE_STATIC_STDAFX_H_
+
Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -30,3 +30,4 @@
#endif //_CORE_STDAFX_H_
+
Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/guid.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/guid.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/guid.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -56,15 +56,20 @@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+} //namespace Core
+
#ifdef _MSC_VER
#pragma warning(disable : 4251 4231)
#endif
-CORE_API_TEMPLATE template class CORE_API std::vector<BGUID>;
-typedef std::vector<BGUID> guid_arr_t;
+CORE_API_TEMPLATE template class CORE_API std::vector<Core::BGUID>;
#ifdef _MSC_VER
#pragma warning(default : 4251 4231)
#endif
+namespace Core {
+
+typedef std::vector<BGUID> guid_arr_t;
+
//WX_DECLARE_OBJARRAY_WITH_DECL(BGUID, guid_arr_t, class CORE_API);
//think of this as a std::list<BGUID*>
WX_DECLARE_LIST_WITH_DECL(BGUID, guid_list_t, class CORE_API);
@@ -74,7 +79,7 @@
#define EXPORT_GUID_MAP(type, mapname, decl) \
WX_DECLARE_HASH_MAP_WITH_DECL(BGUID, type, BGUIDHash, BGUIDEqual, mapname, decl)
-//#define LOCAL_GUID_MAP(type, mapname) \
+//#define LOCAL_GUID_MAP(type, mapname)
// WX_DECLARE_HASH_MAP(BGUID, type, BGUIDHash, BGUIDEqual, mapname)
class CORE_API BGUIDHash
Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/rcobject.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/rcobject.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/rcobject.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -236,237 +236,6 @@
}
/******************************************************************************
-* Classes String and StringValue (from pp. 204, 206-207) *
-******************************************************************************
-class String { // class to be used by
-public: // application developers
- String(const char *value = wxT(""));
-
- char operator[](int index) const;
- char& operator[](int index);
-
-private:
- // class representing string values
- struct StringValue: public RCObject {
- char *data;
-
- StringValue(const char *initValue);
- StringValue(const StringValue& rhs);
- void init(const char *initValue);
- ~StringValue();
- };
-
- RCPtr<StringValue> value;
-
- // This function is not in the book, but it's convenient for testing the
- // class -- see below.
- friend streamout& operator<<(streamout& stream, const String& string);
-};
-
-void String::StringValue::init(const char *initValue) {
- using namespace std;
-
- data = new char[strlen(initValue) + 1];
- strcpy(data, initValue);
-}
-
-String::StringValue::StringValue(const char *initValue) {
- init(initValue);
-}
-
-String::StringValue::StringValue(const StringValue& rhs) {
- init(rhs.data);
-}
-
-String::StringValue::~StringValue() {
- delete [] data;
-}
-
-
-String::String(const char *initValue)
-: value(new StringValue(initValue)) {}
-
-char String::operator[](int index) const
-{
- return value->data[index];
-}
-
-char& String::operator[](int index) {
- if (value->isShared()) {
- value = new StringValue(value->data);
- }
-
- value->markUnshareable();
-
- return value->data[index];
-}
-
-streamout& operator<<(streamout& stream, const String& string) {
- return stream << string.value->data;
-}
-
-
-/******************************************************************************
-* Template Class RCIPtr (from pp. 209-210) *
-* *
-* The code for RCIPtr has changed over the years in response to errors *
-* both in the original source code as well as in the subsequent fixes. You *
-* can find a complete list of changes at the More Effective C++ errata page. *
-* The code here is accurate as of the 13th printing of the book. *
-******************************************************************************
-template<class T>
-class RCIPtr {
-public:
- RCIPtr(T* realPtr = 0);
- RCIPtr(const RCIPtr& rhs);
- ~RCIPtr();
- RCIPtr& operator=(const RCIPtr& rhs);
-
- T* operator->() const;
- T& operator*() const;
-
- RCObject& getRCObject() // give clients access to
- { return *counter; } // isShared, etc.
-
-private:
- struct CountHolder: public RCObject {
- ~CountHolder() { delete pointee; }
- T *pointee;
- };
-
- CountHolder *counter;
- void init();
-};
-
-template<class T>
-void RCIPtr<T>::init() {
- if (counter->isShareable() == false) {
- T *oldValue = counter->pointee;
- counter = new CountHolder;
- counter->pointee = oldValue ? new T(*oldValue) : 0;
- }
-
- counter->addReference();
-}
-
-template<class T>
-RCIPtr<T>::RCIPtr(T* realPtr)
-: counter(new CountHolder) {
- counter->pointee = realPtr;
- init();
-}
-
-template<class T>
-RCIPtr<T>::RCIPtr(const RCIPtr& rhs)
-: counter(rhs.counter) { init(); }
-
-template<class T>
-RCIPtr<T>::~RCIPtr() { counter->removeReference(); }
-
-template<class T>
-RCIPtr<T>& RCIPtr<T>::operator=(const RCIPtr& rhs) {
- if (counter != rhs.counter) {
- counter->removeReference();
- counter = rhs.counter;
- init();
- }
- return *this;
-}
-
-template<class T>
-T* RCIPtr<T>::operator->() const
-{ return counter->pointee; }
-
-template<class T>
-T& RCIPtr<T>::operator*() const
-{ return *(counter->pointee); }
-
-
-/******************************************************************************
-* Class Widget (from p. 210) *
-* *
-* This class is the same as that in the book, but I've added an *
-* implementation so that RCIPtr can be tested. *
-******************************************************************************
-class Widget {
-public:
- Widget(int size): value(size) {}
- Widget(const Widget& rhs): value(rhs.value) {}
- ~Widget() {}
-
- Widget& operator=(const Widget& rhs) {
- value = rhs.value;
- return *this;
- }
-
- void doThis() { value = -1; }
-
- int showThat() const
- { return value; }
-
-private:
- int value;
-};
-
-
-/******************************************************************************
-* Class RCWidget (from p. 210) *
-* *
-* I modified this class for the 13th printing of the book. For details on *
-* why, consult the erratum affecting pages 209, 210, and 316 that was fixed *
-* on 7/15/02 in the book's errata list. *
-******************************************************************************
-class RCWidget {
-public:
- RCWidget(int size)
- : value(new Widget(size)) {}
-
- void doThis() {
- if (value.getRCObject().isShared()) { // do COW if
- value = new Widget(*value); // Widget is shared
- }
- value->doThis();
- }
-
- int showThat() const
- { return value->showThat(); }
-
-private:
- RCIPtr<Widget> value;
-};
-
-
-/******************************************************************************
-* Functions to perform VERY simple test of the above. *
-******************************************************************************
-void testRCPtr() {
- String s1 = wxT("String with no changes.");
- String s2(s1);
-
- s2[12] = s2[13] = ' ';
-
- std::cout << s1 << '\n'; // prints wxT("String with no changes.")
- std::cout << s2 << '\n'; // prints wxT("String with changes.")
-}
-
-void testRCIPtr() {
- RCWidget w1(10);
- RCWidget w2(w1);
-
- w2.doThis();
-
- std::cout << w1.showThat() << '\n'; // prints 10
- std::cout << w2.showThat() << '\n'; // prints -1
-}
-
-int main() {
- testRCPtr();
- testRCIPtr();
-
- return 0;
-}
-
-/******************************************************************************
* END. *
******************************************************************************/
Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_plugin.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_plugin.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_plugin.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -4,8 +4,13 @@
// that uses this DLL. This way any other project whose source files include this file see
// BASIC_PLUGIN_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
+
+#ifdef _MSC_VER
#ifdef BASIC_PLUGIN_EXPORTS
-#define BASIC_PLUGIN_API __declspec(dllexport)
+ #define BASIC_PLUGIN_API __declspec(dllexport)
#else
-#define BASIC_PLUGIN_API __declspec(dllimport)
+ #define BASIC_PLUGIN_API __declspec(dllimport)
#endif
+#else
+ #define BASIC_PLUGIN_API
+#endif
Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_stdafx.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_stdafx.h 2007-07-12 04:45:37 UTC (rev 28037)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/basic_stdafx.h 2007-07-12 05:32:59 UTC (rev 28038)
@@ -9,4 +9,4 @@
#include "browser_stdafx.h"
#include "basic_plugin.h"
-#endif // _BASIC_STDAFX_H_
\ No newline at end of file
+#endif // _BASIC_STDAFX_H_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list