Skip to content

Commit

Permalink
qmake: Unifying engine deployment (win32/unix), moved libdeng2 configs
Browse files Browse the repository at this point in the history
The libdeng2 config scripts are now placed under "(basedir)/config",
away from the data directory.

This also unifies the placement of the config scripts with OS X, where
they are placed in "Resources/config" inside the app bundle.
  • Loading branch information
skyjake committed Oct 30, 2012
1 parent 8d3d1a4 commit 639bb12
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion distrib/win32/setup.iss.template
Expand Up @@ -117,8 +117,8 @@ Source: "doc\LICENSE"; DestDir: "{app}\doc"; Components: Engine
Source: "doc\readme.txt"; DestDir: "{app}\doc"; Components: Engine

; Resources
Source: "config\deng.de"; DestDir: "{app}\config"; Components: Engine
Source: "data\doomsday.pk3"; DestDir: "{app}\data"; Components: Engine
Source: "data\config\deng.de"; DestDir: "{app}\data\config"; Components: Engine
Source: "data\graphics\background.pcx"; DestDir: "{app}\data\graphics"; Components: Engine
Source: "data\graphics\loading1.png"; DestDir: "{app}\data\graphics"; Components: Engine
Source: "data\graphics\loading2.png"; DestDir: "{app}\data\graphics"; Components: Engine
Expand Down
50 changes: 23 additions & 27 deletions doomsday/engine/engine.pro
Expand Up @@ -737,36 +737,32 @@ macx {

# Installation ---------------------------------------------------------------

win32 {
# Windows installation.
INSTALLS += target data startupdata startupgfx startupfonts cfg license icon

target.path = $$DENG_BIN_DIR

data.path = $$DENG_DATA_DIR
startupdata.path = $$DENG_DATA_DIR
!macx {
# Common (non-Mac) parts of the installation.
INSTALLS += target data startupdata startupgfx startupfonts cfg

target.path = $$DENG_BIN_DIR
data.path = $$DENG_DATA_DIR
startupdata.path = $$DENG_DATA_DIR
startupgfx.path = $$DENG_DATA_DIR/graphics
startupfonts.path = $$DENG_DATA_DIR/fonts
startupgfx.path = $$DENG_DATA_DIR/graphics
cfg.path = $$DENG_DATA_DIR/config

license.files = doc/LICENSE
license.path = $$DENG_DOCS_DIR
cfg.path = $$DENG_BASE_DIR/config

icon.files = win32/res/doomsday.ico
icon.path = $$DENG_DATA_DIR/graphics
}
else:unix:!macx {
# Generic Unix installation.
INSTALLS += target data startupdata startupgfx startupfonts cfg readme
win32 {
# Windows-specific installation.
INSTALLS += license icon

target.path = $$DENG_BIN_DIR
license.files = doc/LICENSE
license.path = $$DENG_DOCS_DIR

data.path = $$DENG_DATA_DIR
startupdata.path = $$DENG_DATA_DIR
startupfonts.path = $$DENG_DATA_DIR/fonts
startupgfx.path = $$DENG_DATA_DIR/graphics
cfg.path = $$DENG_DATA_DIR/config
icon.files = win32/res/doomsday.ico
icon.path = $$DENG_DATA_DIR/graphics
}
else {
# Generic Unix installation.
INSTALLS += readme

readme.files = ../doc/output/doomsday.6
readme.path = $$PREFIX/share/man/man6
readme.files = ../doc/output/doomsday.6
readme.path = $$PREFIX/share/man/man6
}
}
7 changes: 3 additions & 4 deletions doomsday/libdeng2/src/core/app.cpp
Expand Up @@ -145,17 +145,16 @@ void App::initSubsystems(SubsystemInitFlags flags)
}
String appDir = _appPath.fileNameNativePath();
_fs.makeFolder("/data").attach(new DirectoryFeed(appDir.concatenateNativePath("..\\data")));
_fs.makeFolder("/config").attach(new DirectoryFeed(appDir.concatenateNativePath("..\\data\\config")));
_fs.makeFolder("/config").attach(new DirectoryFeed(appDir.concatenateNativePath("..\\config")));
//fs_->makeFolder("/modules").attach(new DirectoryFeed("data\\modules"));

#else // UNIX
if(allowPlugins)
{
binFolder.attach(new DirectoryFeed(nativeBinaryPath()));
}
String dataDir = nativeBasePath() / "data";
_fs.makeFolder("/data").attach(new DirectoryFeed(dataDir));
_fs.makeFolder("/config").attach(new DirectoryFeed(dataDir / "config"));
_fs.makeFolder("/data").attach(new DirectoryFeed(nativeBasePath() / "data"));
_fs.makeFolder("/config").attach(new DirectoryFeed(nativeBasePath() / "config"));
//fs_->makeFolder("/modules").attach(new DirectoryFeed("data/modules"));
#endif

Expand Down

0 comments on commit 639bb12

Please sign in to comment.