The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
[SOLVED] Data files path - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Help (https://www.vdrift.net/Forum/forumdisplay.php?fid=5)
+--- Thread: [SOLVED] Data files path (/showthread.php?tid=1189)



[SOLVED] Data files path - fer - 11-05-2009

I have successfully compiled vdrift on Linux. I did a package too.
The source tarball was extracted on /usr/src/vdrift-20090615/pkg/
This is the code I used to compile and install vdrift for packaging purposes.
Code:
scons -j 2 release=1 arch=i686 prefix=/usr localstatedir=/var sysconfdir=/etc || return 1
scons install prefix=$startdir/pkg
$startdir=/usr/src/vdrift-20090615.
The package installs the data files on /share/games/vdrift/data as it should, but when I run vdrift it keeps searching the data files on:
Quote:INFO: Data directory: /usr/src/vdrift-20090615/pkg/share/games/vdrift/data
DATA_DIR: /usr/src/vdrift-20090615/pkg/share/games/vdrift/data
(that's where 'scons install' installed them as it was told).
So is this DATA_DIR hardcoded in the vdrift binary?
If not, is there any way I can tell vdrift to look for the data files on /share/games/vdrift/data instead of on /usr/src/vdrift-20090615/pkg/share/games/vdrift/data
PS. The game runs OK provided I copy the data files to /usr/src/vdrift-20090615/pkg/share/games/vdrift/data.


- joevenzon - 11-06-2009

You can set the DATA_DIR at compile time with:
Code:
scons datadir=share/games/vdrift/data
just replace share/games/vdrift/data with some/other/path.

You can get a full list of the options with scons --help.


- fer - 11-06-2009

Thank you for your reply.

This what I did in the end:
Code:
scons -j 2 prefix=/usr datadir=share/games/vdrift/data release=1 arch=i686 localstatedir=/var sysconfdir=/etc || return 1
    mv $startdir/src/$pkgname-$pkgver/build/vdrift $startdir/src/$pkgname-$pkgver/build/vdrift.back
    scons -j 2 install prefix=$startdir/pkg/usr datadir=share/games/vdrift/data
    mv $startdir/src/$pkgname-$pkgver/build/vdrift.back $startdir/pkg/usr/bin/vdrift
I realised that after the first scons command the datadir was correctely set but after the second scons command the vdrift binary was compiled again and this time the datadir was set to $startdir/pkg/usr/share/games/vdrift/data.
Maybe there is a more elegant solution, but this one works :wink: