Skip to content

Commit

Permalink
Merge branch 'de2-args'
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 23, 2012
2 parents 006ebd5 + 8bf320c commit b762913
Show file tree
Hide file tree
Showing 48 changed files with 756 additions and 538 deletions.
24 changes: 13 additions & 11 deletions doomsday/dep_deng2.pri
@@ -1,19 +1,11 @@
# Build configuration for using libdeng2.
INCLUDEPATH += $$PWD/libdeng2/include
include(dep_deng2_cwrapper.pri)

# Use the appropriate library path.
!useLibDir($$OUT_PWD/../libdeng2) {
useLibDir($$OUT_PWD/../../libdeng2)
}

LIBS += -ldeng2

# libdeng2 requires the following Qt modules.
# libdeng2's C++ API requires the following Qt modules.
QT += core network gui opengl

win32 {
# Install the required Qt DLLs into the products dir.
INSTALLS += qtlibs
INSTALLS *= qtlibs
deng_debug: qtver = "d4"
else: qtver = "4"
qtlibs.files += \
Expand All @@ -23,3 +15,13 @@ win32 {
$$[QT_INSTALL_BINS]/QtOpenGL$${qtver}.dll
qtlibs.path = $$DENG_LIB_DIR
}

macx {
defineTest(linkToBundledLibdeng2) {
fixInstallName($${1}.bundle/$$1, libdeng2.2.dylib, ..)
fixInstallName($${1}.bundle/$$1, QtCore.framework/Versions/4/QtCore, ..)
fixInstallName($${1}.bundle/$$1, QtNetwork.framework/Versions/4/QtNetwork, ..)
fixInstallName($${1}.bundle/$$1, QtGui.framework/Versions/4/QtGui, ..)
fixInstallName($${1}.bundle/$$1, QtOpenGL.framework/Versions/4/QtOpenGL, ..)
}
}
21 changes: 21 additions & 0 deletions doomsday/dep_deng2_cwrapper.pri
@@ -0,0 +1,21 @@
# Build configuration for using the libdeng2 C wrapper.
INCLUDEPATH += $$PWD/libdeng2/include

# Use the appropriate library path.
!useLibDir($$OUT_PWD/../libdeng2) {
useLibDir($$OUT_PWD/../../libdeng2)
}

LIBS += -ldeng2

macx {
defineTest(fixInstallName) {
# 1: binary file
# 2: library name
# 3: path to Frameworks/
doPostLink("install_name_tool -change $$2 @executable_path/$$3/Frameworks/$$2 $$1")
}
defineTest(linkToBundledLibdeng2) {
fixInstallName($${1}.bundle/$$1, libdeng2.2.dylib, ..)
}
}
18 changes: 9 additions & 9 deletions doomsday/engine/api/doomsday.def
Expand Up @@ -888,15 +888,15 @@ EXPORTS
M_PointXYToAngle2 @101 NONAME

; Miscellaneous: Command line.
ArgAbbreviate @146 NONAME
Argc @147 NONAME
Argv @148 NONAME
ArgvPtr @149 NONAME
ArgNext @150 NONAME
ArgCheck @151 NONAME
ArgCheckWith @152 NONAME
ArgExists @153 NONAME
ArgIsOption @154 NONAME
; ArgAbbreviate @146 NONAME
; Argc @147 NONAME
; Argv @148 NONAME
; ArgvPtr @149 NONAME
; ArgNext @150 NONAME
; ArgCheck @151 NONAME
; ArgCheckWith @152 NONAME
; ArgExists @153 NONAME
; ArgIsOption @154 NONAME

; Doomsday Engine Definitions.
DED_Init @155 NONAME
Expand Down
11 changes: 0 additions & 11 deletions doomsday/engine/api/doomsday.h
Expand Up @@ -766,17 +766,6 @@ binangle_t bamsAtan2(int y, int x);
/// @addtogroup base
///@{

// Miscellaneous: Command line.
void _DECALL ArgAbbreviate(const char* longName, const char* shortName);
int _DECALL Argc(void);
const char* _DECALL Argv(int i);
const char* const* _DECALL ArgvPtr(int i);
const char* _DECALL ArgNext(void);
int _DECALL ArgCheck(const char* check);
int _DECALL ArgCheckWith(const char* check, int num);
int _DECALL ArgExists(const char* check);
int _DECALL ArgIsOption(int i);

// Miscellaneous: Random Number Generator facilities.
byte RNG_RandByte(void);
float RNG_RandFloat(void);
Expand Down
11 changes: 3 additions & 8 deletions doomsday/engine/engine.pro
Expand Up @@ -249,7 +249,6 @@ DENG_HEADERS += \
portable/include/lumpdirectory.h \
portable/include/lumpfile.h \
portable/include/lumpinfo.h \
portable/include/m_args.h \
portable/include/m_bams.h \
portable/include/m_decomp64.h \
portable/include/m_linkedlist.h \
Expand Down Expand Up @@ -526,7 +525,6 @@ SOURCES += \
portable/src/linedef.c \
portable/src/lumpdirectory.c \
portable/src/lumpfile.c \
portable/src/m_args.c \
portable/src/m_bams.c \
portable/src/m_decomp64.c \
portable/src/m_linkedlist.c \
Expand Down Expand Up @@ -705,7 +703,7 @@ macx {

# Since qmake is unable to copy directories as bundle data, let's copy
# the frameworks manually.
FW_DIR = \"$${OUT_PWD}/doomsday.app/Contents/Frameworks/\"
FW_DIR = \"$${OUT_PWD}/Doomsday.app/Contents/Frameworks/\"
doPostLink("rm -rf $$FW_DIR")
doPostLink("mkdir $$FW_DIR")
!deng_nosdl {
Expand All @@ -716,11 +714,8 @@ macx {
# libdeng2 dynamic library.
doPostLink("cp -fRp $$OUT_PWD/../libdeng2/libdeng2*dylib $$FW_DIR")

# Fix the dynamic linker paths so they point to ../Frameworks/.
defineTest(fixInstallName) {
doPostLink("install_name_tool -change $$1 @executable_path/../Frameworks/$$1 doomsday.app/Contents/MacOS/doomsday")
}
fixInstallName("libdeng2.2.dylib")
# Fix the dynamic linker paths so they point to ../Frameworks/ inside the bundle.
fixInstallName("Doomsday.app/Contents/MacOS/Doomsday", "libdeng2.2.dylib", "..")

# Clean up previous deployment.
doPostLink("rm -rf Doomsday.app/Contents/PlugIns/")
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/dd_pinit.h
Expand Up @@ -47,7 +47,7 @@ int DD_CheckArg(char* tag, const char** value);
void DD_ComposeMainWindowTitle(char* title);
void DD_ConsoleInit(void);
void DD_InitAPI(void);
void DD_InitCommandLine(const char* cmdLine);
void DD_InitCommandLine(void);

extern game_import_t gi;
extern game_export_t gx;
Expand Down
2 changes: 2 additions & 0 deletions doomsday/engine/portable/include/de_base.h
Expand Up @@ -49,4 +49,6 @@
#include "writer.h"
#include "garbage.h"

#include <de/c_wrapper.h>

#endif /* LIBDENG_BASE_H */
1 change: 0 additions & 1 deletion doomsday/engine/portable/include/de_misc.h
Expand Up @@ -30,7 +30,6 @@
*/

#include "m_misc.h"
#include "m_args.h"
#include "m_bams.h"
#include "m_vector.h"
#include "m_nodepile.h"
Expand Down
54 changes: 0 additions & 54 deletions doomsday/engine/portable/include/m_args.h

This file was deleted.

2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/canvaswindow.cpp
Expand Up @@ -24,11 +24,11 @@
#include <QGLFormat>
#include <QMoveEvent>
#include <de/Log>
#include <de/c_wrapper.h>

#include "de_platform.h"
#include "con_main.h"
#include "gl_main.h"
#include "m_args.h"
#include "canvaswindow.h"
#include <assert.h>

Expand Down
1 change: 0 additions & 1 deletion doomsday/engine/portable/src/con_data.c
Expand Up @@ -37,7 +37,6 @@
#include "de_console.h"

#include "cbuffer.h"
#include "m_args.h"
#include "m_misc.h"
#include "blockset.h"
#include "pathdirectory.h"
Expand Down
1 change: 0 additions & 1 deletion doomsday/engine/portable/src/dd_main.c
Expand Up @@ -56,7 +56,6 @@
#include "abstractresource.h"
#include "resourcenamespace.h"
#include "m_misc.h"
#include "m_args.h"
#include "texture.h"
#include "displaymode.h"

Expand Down
8 changes: 4 additions & 4 deletions doomsday/engine/portable/src/dd_pinit.c
Expand Up @@ -45,7 +45,6 @@
#include "de_ui.h"
#include "de_filesys.h"

#include "m_args.h"
#include "def_main.h"

// MACROS ------------------------------------------------------------------
Expand Down Expand Up @@ -131,9 +130,11 @@ void DD_InitAPI(void)
}
}

void DD_InitCommandLine(const char* cmdLine)
void DD_InitCommandLine(void)
{
#if 0
ArgInit(cmdLine);
#endif

// Register some abbreviations for command line options.
ArgAbbreviate("-game", "-g");
Expand Down Expand Up @@ -228,8 +229,7 @@ void DD_ShutdownAll(void)
Def_Destroy();
F_ShutdownResourceLocator();
F_Shutdown();
ArgShutdown();
Garbage_Shutdown();
Garbage_Shutdown(); // before memzone
Z_Shutdown();
Sys_ShutdownWindowManager();

Expand Down
1 change: 0 additions & 1 deletion doomsday/engine/portable/src/library.c
Expand Up @@ -32,7 +32,6 @@
#include "de_base.h"
#include "de_filesys.h"
#include "m_misc.h"
#include "m_args.h"

#ifdef WIN32
# include "de_platform.h"
Expand Down

0 comments on commit b762913

Please sign in to comment.