Skip to content

Commit

Permalink
Mac OS X: Fixing the Kitchen Sink script test
Browse files Browse the repository at this point in the history
The test_script.app is appropriately bundled with the libraries
and scripts.
  • Loading branch information
skyjake committed Jul 19, 2012
1 parent ae347f9 commit fc85726
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
2 changes: 2 additions & 0 deletions doomsday/config.pri
Expand Up @@ -44,6 +44,8 @@ DENG_WIN_INCLUDE_DIR = $$PWD/engine/win32/include
# Binaries and generated files are placed here.
DENG_WIN_PRODUCTS_DIR = $$PWD/../distrib/products

DENG_CONFIG_DIR = $$PWD/libdeng2/config

# Versions -------------------------------------------------------------------

include(versions.pri)
Expand Down
1 change: 1 addition & 0 deletions doomsday/libdeng2/data.pri
Expand Up @@ -80,6 +80,7 @@ SOURCES += \
src/data/archive.cpp \
src/data/arrayvalue.cpp \
src/data/block.cpp \
src/data/blockvalue.cpp \
src/data/byteorder.cpp \
src/data/byterefarray.cpp \
src/data/bytesubarray.cpp \
Expand Down
4 changes: 4 additions & 0 deletions doomsday/libdeng2/include/de/core/config.h
Expand Up @@ -31,6 +31,10 @@ namespace de
* in the config directories. The resulting namespace is serialized for
* storage, and is restored from the serialized version directly before the
* config scripts are run.
*
* The version of the engine is stored in the serialized config namespace.
* This is for actions needed when upgrading: the config script can check
* the previous version and apply changes accordingly.
*/
class DENG2_PUBLIC Config
{
Expand Down
3 changes: 3 additions & 0 deletions doomsday/libdeng2/libdeng2.pro
Expand Up @@ -92,6 +92,9 @@ SOURCES += \
src/core/log.cpp \
src/core/logbuffer.cpp

OTHER_FILES += \
config/deng.de

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

macx {
Expand Down
10 changes: 5 additions & 5 deletions doomsday/libdeng2/src/core/app.cpp
Expand Up @@ -92,19 +92,19 @@ void App::initSubsystems()
_fs.refresh();

// The configuration.
QScopedPointer<Config> conf(new Config("/config/doomsday.de"));
QScopedPointer<Config> conf(new Config("/config/deng.de"));
conf->read();

LogBuffer& logBuf = LogBuffer::appBuffer();

// Update the log buffer max entry count.
logBuf.setMaxEntryCount(conf->getui("deng.log.bufferSize"));
logBuf.setMaxEntryCount(conf->getui("log.bufferSize"));

// Set the log output file.
logBuf.setOutputFile(conf->gets("deng.log.file"));
logBuf.setOutputFile(conf->gets("log.file"));

// The level of enabled messages.
logBuf.enable(Log::LogLevel(conf->getui("deng.log.level")));
logBuf.enable(Log::LogLevel(conf->getui("log.level")));

#if 0 // not yet handled by libdeng2
// Load the basic plugins.
Expand Down Expand Up @@ -203,7 +203,7 @@ Record& App::importModule(const String& name, const String& fromPath)
ArrayValue* importPath = defaultImportPath.get();
try
{
importPath = &config().names()["deng.importPath"].value<ArrayValue>();
importPath = &config().names()["importPath"].value<ArrayValue>();
}
catch(const Record::NotFoundError&)
{}
Expand Down
1 change: 1 addition & 0 deletions doomsday/tests/script/main.cpp
Expand Up @@ -18,6 +18,7 @@
*/

#include <de/App>
#include <de/LogBuffer>
#include <de/Script>
#include <de/FS>
#include <de/Process>
Expand Down
6 changes: 5 additions & 1 deletion doomsday/tests/script/script.pro
Expand Up @@ -12,7 +12,11 @@ OTHER_FILES += $$SCRIPTS
macx {
scripts.files = $$SCRIPTS
scripts.path = Contents/Resources
QMAKE_BUNDLE_DATA += scripts

cfg.files = $$DENG_CONFIG_DIR/deng.de
cfg.path = Contents/Resources/config

QMAKE_BUNDLE_DATA += scripts cfg

macDeployTest($$TARGET)
}

0 comments on commit fc85726

Please sign in to comment.