Skip to content

Commit

Permalink
Merge branch 'master' into mapdata-c++
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 11, 2013
2 parents 3de3182 + a39572b commit dbdf2b6
Show file tree
Hide file tree
Showing 155 changed files with 5,169 additions and 2,708 deletions.
10 changes: 8 additions & 2 deletions distrib/autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,22 @@ def create_build_event():
ev = builder.Event(todaysBuild)
ev.clean()

#if prevBuild:
update_changes()


def todays_platform_release():
"""Build today's release for the current platform."""
print "Building today's build."
ev = builder.Event()

git_pull()

if sys.platform == 'darwin' and mac_os_version() == '10.5':
if version_cmp(ev.version_base(), '1.11') >= 0:
# Build should not occur on this platform.
print 'Version %s is not buildable on OS X %s.' % (ev.version(), mac_os_version())
return

git_checkout(ev.tag() + builder.config.TAG_MODIFIER)

# We'll copy the new files to the build dir.
Expand Down
11 changes: 10 additions & 1 deletion distrib/builder/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(self, build=None, latestAvailable=False):
self.buildDir = os.path.join(config.EVENT_DIR, self.name)

self.packages = ['doomsday', 'fmod']

self.packageName = {'doomsday': 'Doomsday',
'fmod': 'FMOD Ex Audio Plugin'}

Expand All @@ -49,14 +50,19 @@ def __init__(self, build=None, latestAvailable=False):
('Mac OS X 10.6+ (x86_64/i386)', 'mac10_6.dmg', 'darwin-64bit'),
('Mac OS X 10.4+ (ppc/i386)', '32bit.dmg', 'darwin-32bit'),
('Ubuntu (x86_64)', 'amd64.deb', 'linux2-64bit'),
('Ubuntu (x86)', 'i386.deb', 'linux2-32bit')]
('Ubuntu (x86)', 'i386.deb', 'linux2-32bit')]

if self.has_version() and utils.version_cmp(self.version_base(), '1.11') >= 0:
del self.oses[3] # no more OS X 10.4

elif self.num >= 778: # Mac distribution naming was changed.
# Platforms: Name File ext sys_id()
self.oses = [('Windows (x86)', '.exe', 'win32-32bit'),
('Mac OS X 10.6+ (x86_64/i386)', '.dmg', 'darwin-64bit'),
('Mac OS X 10.4+ (ppc/i386)', '32bit.dmg', 'darwin-32bit'),
('Ubuntu (x86_64)', 'amd64.deb', 'linux2-64bit'),
('Ubuntu (x86)', 'i386.deb', 'linux2-32bit')]

else:
# Platforms: Name File ext sys_id()
self.oses = [('Windows (x86)', '.exe', 'win32-32bit'),
Expand Down Expand Up @@ -129,6 +135,9 @@ def version(self):
if os.path.exists(fn): return file(fn).read().strip()
return None

def has_version(self):
return os.path.exists(self.file_path('version.txt'))

def name(self):
return self.name

Expand Down
16 changes: 16 additions & 0 deletions distrib/builder/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,22 @@ def count_word(word, inText):
return count


def mac_os_version():
"""Determines the Mac OS version."""
return platform.mac_ver()[0][:4]


def version_cmp(a, b):
"""Compares two versions, returning -1 if a < b, 0 if a == b, and 1 if a > b.
- a: String in the form 1.2.3
- b: String in the form 3.4.5"""
va = map(lambda s: int(s), a.split('.'))
vb = map(lambda s: int(s), b.split('.'))
if va < vb: return -1
if va > vb: return 1
return 0


def system_command(cmd):
result = subprocess.call(cmd, shell=True)
if result != 0:
Expand Down
3 changes: 2 additions & 1 deletion distrib/platform_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import glob
import build_version
import build_number
import builder.utils

# Configuration.
LAUNCH_DIR = os.path.abspath(os.getcwd())
Expand Down Expand Up @@ -96,7 +97,7 @@ def prepare_work_dir():

def mac_os_version():
"""Determines the Mac OS version."""
return platform.mac_ver()[0][:4]
return builder.utils.mac_os_version()


def mac_target_ext():
Expand Down
79 changes: 0 additions & 79 deletions doomsday/api/dd_share.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,85 +302,6 @@ enum {

///@}

//------------------------------------------------------------------------
//
// Key Codes
//
//------------------------------------------------------------------------

/// @defgroup input Input

/**
* @defgroup keyConstants Key Constants
* @ingroup input
* Most key data is regular ASCII so key constants correspond to ASCII codes.
*/
///@{
#define DDKEY_ESCAPE 27
#define DDKEY_RETURN 13
#define DDKEY_TAB 9
#define DDKEY_BACKSPACE 127
#define DDKEY_EQUALS 0x3d
#define DDKEY_MINUS 0x2d
#define DDKEY_BACKSLASH 0x5C

// Extended keys (above 127).
enum {
DDKEY_RIGHTARROW = 0x80,
DDKEY_LEFTARROW,
DDKEY_UPARROW,
DDKEY_DOWNARROW,
DDKEY_F1,
DDKEY_F2,
DDKEY_F3,
DDKEY_F4,
DDKEY_F5,
DDKEY_F6,
DDKEY_F7,
DDKEY_F8,
DDKEY_F9,
DDKEY_F10,
DDKEY_F11,
DDKEY_F12,
DDKEY_NUMLOCK,
DDKEY_CAPSLOCK,
DDKEY_SCROLL,
DDKEY_NUMPAD7,
DDKEY_NUMPAD8,
DDKEY_NUMPAD9,
DDKEY_NUMPAD4,
DDKEY_NUMPAD5,
DDKEY_NUMPAD6,
DDKEY_NUMPAD1,
DDKEY_NUMPAD2,
DDKEY_NUMPAD3,
DDKEY_NUMPAD0,
DDKEY_DECIMAL,
DDKEY_PAUSE,
DDKEY_RSHIFT,
DDKEY_LSHIFT = DDKEY_RSHIFT,
DDKEY_RCTRL,
DDKEY_LCTRL = DDKEY_RCTRL,
DDKEY_RALT,
DDKEY_LALT = DDKEY_RALT,
DDKEY_INS,
DDKEY_DEL,
DDKEY_PGUP,
DDKEY_PGDN,
DDKEY_HOME,
DDKEY_END,
DDKEY_SUBTRACT, ///< '-' on numeric keypad.
DDKEY_ADD, ///< '+' on numeric keypad.
DDKEY_PRINT,
DDKEY_ENTER, ///< on the numeric keypad.
DDKEY_DIVIDE, ///< '/' on numeric keypad.
DDKEY_MULTIPLY, ///< '*' on the numeric keypad.
DDKEY_SECTION, ///< §
DD_HIGHEST_KEYCODE
};
///@}


//------------------------------------------------------------------------
//
// Map Data
Expand Down
48 changes: 5 additions & 43 deletions doomsday/client/client.pro
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,10 @@ win32 {
else:macx {
useFramework(Cocoa)
useFramework(QTKit)

# The old 10.4 build uses a Carbon-based Qt.
deng_carbonqt: useFramework(Carbon)
}
else {
# Generic Unix.
!freebsd-*: LIBS += -ldl
LIBS += -lX11

# DisplayMode uses the Xrandr and XFree86-VideoMode extensions.
!deng_nodisplaymode {
# Check that the X11 extensions exist.
!system(pkg-config --exists xxf86vm) {
error(Missing dependency: X11 XFree86 video mode extension library (development headers). Alternatively disable display mode functionality with: CONFIG+=deng_nodisplaymode)
}
!system(pkg-config --exists xrandr) {
error(Missing dependency: X11 RandR extension library (development headers). Alternatively disable display mode functionality with: CONFIG+=deng_nodisplaymode)
}

QMAKE_CXXFLAGS += $$system(pkg-config xrandr xxf86vm --cflags)
LIBS += $$system(pkg-config xrandr xxf86vm --libs)
}
}

# Source Files ---------------------------------------------------------------
Expand Down Expand Up @@ -353,17 +335,14 @@ DENG_HEADERS += \
include/ui/b_util.h \
include/ui/busyvisual.h \
include/ui/busywidget.h \
include/ui/canvas.h \
include/ui/canvaswindow.h \
include/ui/clientwindow.h \
include/ui/dd_input.h \
include/ui/dd_ui.h \
include/ui/displaymode.h \
include/ui/displaymode_native.h \
include/ui/fi_main.h \
include/ui/finaleinterpreter.h \
include/ui/guirootwidget.h \
include/ui/guiwidget.h \
include/ui/joystick.h \
include/ui/keycode.h \
include/ui/legacywidget.h \
include/ui/mouse_qt.h \
include/ui/nativeui.h \
Expand All @@ -372,7 +351,6 @@ DENG_HEADERS += \
include/ui/ui2_main.h \
include/ui/ui_main.h \
include/ui/ui_panel.h \
include/ui/window.h \
include/ui/windowsystem.h \
include/ui/zonedebug.h \
include/updater.h \
Expand Down Expand Up @@ -409,8 +387,6 @@ win32 {
src/windows/directinput.cpp \
src/windows/joystick_win32.cpp \
src/windows/mouse_win32.cpp

!deng_nodisplaymode: SOURCES += src/windows/displaymode_win32.cpp
}
else:unix {
# Common Unix (including Mac OS X).
Expand All @@ -432,21 +408,10 @@ macx {
OBJECTIVE_SOURCES += \
src/macx/MusicPlayer.m

!deng_nodisplaymode: OBJECTIVE_SOURCES += src/macx/displaymode_macx.mm

INCLUDEPATH += $$DENG_MAC_INCLUDE_DIR
}
else:unix {
!deng_nodisplaymode {
# Unix (non-Mac) only.
SOURCES += \
src/unix/displaymode_x11.cpp \
src/unix/imKStoUCS.c
}
}

deng_nodisplaymode {
SOURCES += src/ui/displaymode_dummy.c
# Unix (non-Mac) only.
}

# Platform-independent sources.
Expand Down Expand Up @@ -635,14 +600,12 @@ SOURCES += \
src/ui/b_util.cpp \
src/ui/busyvisual.cpp \
src/ui/busywidget.cpp \
src/ui/canvas.cpp \
src/ui/canvaswindow.cpp \
src/ui/clientwindow.cpp \
src/ui/dd_input.cpp \
src/ui/displaymode.cpp \
src/ui/fi_main.cpp \
src/ui/finaleinterpreter.cpp \
src/ui/guirootwidget.cpp \
src/ui/guiwidget.cpp \
src/ui/keycode.cpp \
src/ui/legacywidget.cpp \
src/ui/mouse_qt.cpp \
src/ui/nativeui.cpp \
Expand All @@ -651,7 +614,6 @@ SOURCES += \
src/ui/ui2_main.cpp \
src/ui/ui_main.cpp \
src/ui/ui_panel.cpp \
src/ui/window.cpp \
src/ui/windowsystem.cpp \
src/ui/zonedebug.cpp \
src/updater/downloaddialog.cpp \
Expand Down
24 changes: 23 additions & 1 deletion doomsday/client/data/cphelp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ desc = Write the current lights to a DED file.
[blunlock]
desc = Unlock current/specified light.

[centerwindow]
desc = Center the window on the desktop when in windowed mode.

[chat]
desc = Broadcast a chat message.

Expand Down Expand Up @@ -120,6 +123,10 @@ inf = Params: demolump (demofile) (lumpfile)\nFor example, 'demolump demo1.dmo D
desc = Print contents of directories.
inf = Params: dir (dirs) ...\nFor example, 'dir data/'.\nVirtual files are listed, too.\nPaths are relative to the base path.

[displaymode]
desc = Print information about the current display mode and window state.
inf = SEE ALSO:\n- 'listdisplaymodes'\n- 'setres'\n- 'setfullres'\n- 'setwinres'\n

[dump]
desc = Dump a data lump currently loaded in memory.
inf = Params: dump (name)\nFor example, 'dump PLAYPAL'.
Expand Down Expand Up @@ -188,6 +195,10 @@ desc = List all console commands.
[listcontrols]
desc = List the names of all player controls.

[listdisplaymodes]
desc = List all display modes supported by the graphics hardware.
inf = SEE ALSO:\n- 'displaymode'\n- 'setres'\n- 'setfullres'\n- 'setwinres'\n

[listfiles]
desc = List all loaded resource files.

Expand Down Expand Up @@ -303,6 +314,10 @@ inf = Params: setbpp (bits)\nFor example, 'setbpp 32'.
desc = Set console and viewplayer.
inf = Params: setcon (playernum)\nFor example, 'setcon 1'.

[setfullres]
desc = Change to fullscreen mode using the specified resolution.
inf = USAGE:\nsetfullres (width) (height)\nSEE ALSO:\n- 'listdisplaymodes'\n- 'setwinres'\n- 'setres'\n

[setname]
desc = Set your name.
inf = Params: setname (name)\nFor example, 'setname "my name"'.
Expand All @@ -318,6 +333,10 @@ inf = Params: settics (tics)\nFor example, 'settics 15'.
[setvidramp]
desc = Update display's hardware gamma ramp.

[setwinres]
desc = Set window size and change to windowed mode.
inf = USAGE:\nsetwinres (width) (height)\nSEE ALSO:\n- 'setfullres'\n- 'setres'\n- 'listdisplaymodes'\n

[stopdemo]
desc = Stop currently playing demo.

Expand All @@ -335,7 +354,10 @@ desc = Toggle the value of a cvar between zero and nonzero.
inf = Params: toggle (cvar)\nFor example, 'toggle rend-light'.

[togglefullscreen]
desc = Toggle between fullscreen and windowed video modes.
desc = Toggle between fullscreen and windowed modes.

[togglemaximized]
desc = Toggle between maximized and normal window modes.

[uicolor]
desc = Change Doomsday user interface colors.
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/clientapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <de/GuiApp>
#include "network/serverlink.h"
#include "ui/windowsystem.h"

/**
* The client application.
Expand All @@ -42,6 +43,7 @@ class ClientApp : public de::GuiApp
public:
static ClientApp &app();
static ServerLink &serverLink();
static WindowSystem &windowSystem();

private:
DENG2_PRIVATE(d)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/de_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#ifdef __CLIENT__
# include "network/sys_network.h"
# include "gl/sys_opengl.h"
# include "ui/window.h"
# include "ui/sys_input.h"
# include "ui/clientwindow.h"
#endif

#ifdef __SERVER__
Expand Down
Loading

0 comments on commit dbdf2b6

Please sign in to comment.