1 (edited by Bogoris 2009-02-06 11:43:18)

Topic: [Solved] Changing config directory

Hello,

As a great fan of this game, I decided to put the last version (currently 0.5.1) of it on some hard drive space each student have reserved at my university. There is no problem with the Linux version of the game, but there is one with the Windows version. Let me explain how the network is set :
* every pupil has some space on a server that is automaticaly connected to the PC when logging into Windows,
* the "My Documents" directory can be found in H:\My Documents\ (it is mounted from a distant server and is the same no matters which PC we log in),
* however, the applications data are located in "C:\Documents and Settings\this_user_s_code\Application Data\Teeworlds", so they are stored on each PC, and not on the server,
* as a result, when we use a different PC (what happens quite often), the player name and all other player options are lost, and we have to reconfigure them.

I admit it may be the fault of my university, but I would like to know if there is a way for me to configure Teeworlds in order to change the config directory (for "H:\.teeworlds", for example, in order to have the same Windows and Linux configuration).

Thank you in advance, and thanks a lot for the great job you've done and the lot of fun you made us have so far,

Bogoris

PS : sorry for my poor English (I am french).

2

Re: [Solved] Changing config directory

Only way I see here is to copy the files from "H:\.teeworlds" to your Application Data folder. What about a batch file to start TW? Could be like the following...

@echo off
IF EXIST "H:\.teeworlds" copy "H:\.teeworlds\*.*" "C:\Documents and Settings\this_user_s_code\Application Data\Teeworlds" /Y
teeworlds.exe

Put this as teeworlds.bat into your Teeworlds directory, and start Teeworlds with this batch file.
Every time you start TW, it copies your linux tw settings to the wanted windows directory and overwrites the files. It then starts TW and it loads your linux settings.

bam: WARNING:'src/game/server/gamemodes/mod.cpp' comes from the future

3 (edited by Bogoris 2009-02-12 13:12:29)

Re: [Solved] Changing config directory

Ok, thanks a lot. I wrote

@echo off
IF EXIST "%HOMEDRIVE%\.teeworlds" copy "%HOMEDRIVE%\.teeworlds\*.*" "%APPDATA%\Teeworlds" /Y
teeworlds.exe

and it worked : it copied the linux directory to the windows application data directory, so that the linux config was loaded in the windows version of Teeworlds.

However (and that is normal but I would be glad it were different), when I save something into the windows version of Teeworlds, it is forgotten the next time I load Teeworlds (obviously, even on the same computer).

EDIT :
I figured out that copying windows directory contents into linux directory after Teeworlds was quited solved the problem. So the good script is :

@echo off
IF NOT EXIST "%APPDATA%\Teeworlds" md "%APPDATA%\Teeworlds"
IF EXIST "%HOMEDRIVE%\.teeworlds" copy "%HOMEDRIVE%\.teeworlds\*.*" "%APPDATA%\Teeworlds"
teeworlds.exe
IF NOT EXIST "%HOMEDRIVE%\.teeworlds" md "%HOMEDRIVE%\.teeworlds"
copy "%APPDATA%\Teeworlds\*.*" "%HOMEDRIVE%\.teeworlds" /Y

Thanks a lot !!!