HOWTO: specify data directories for spring & unitsync - Page 2

HOWTO: specify data directories for spring & unitsync

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Basciily if we get them done.
Users can just use them to install spring.
Instead of compiling spring yourself & setting them up.
Slightly more user friendly

And by using source, should be more distro friendly. Instead of making a package just for a single distro.

Anyway had a quick glance & should be able to whip up a source rpm later to night & test it out. Looks easy enough
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

Will it deposit stuff to the different directories, or will it put all data in one location?

Why would it be a source package then and not just a normal package?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Normal packages are for various reasons e.g. debian-only or ubuntu-only, and it's impossible to convert them into each other.

OTOH, 1 source package can be compiled to a (number of) binary package(s) for any debian-derivative distro. So it's less work, reaches more users, etc. Once you got the source packages made, you can be sure there will be people with servers hosting the binary packages for the more popular distros.

E: what hollowsoul said, continue this discussion in the linux packages thread
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

Hello all,

I'm coming back to spring (or trying to) after about a month and a half away. I just updated my trunk and rebuilt the game from scratch, copied over my 0.72b1 linux data, and now every time I try to start spring it gives me a pop-up telling me there's missing content and to specify data directory in absolute paths. I have the path (/home/keithjr/.spring like I always have) in the file /etc/spring/datadir and, just to be rigorous, I put it in the .springrc SpringData field as well. Still no dice.

Here's the console output, if it helps:

Code: Select all

Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Am I doing something very wrong?
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Tried latest datadir i.e
http://download.berlios.de/taspring-lin ... e2.tar.bz2
http://download.berlios.de/taspring-lin ... ee.tar.bz2

Free = TA content free. Nanoblobs mod, no ai in svn supports it though
NonFree = TA content. XTA mod & aai works for it
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

oh my... looks like I've been away too long!!

Thanks, hollow, once again.
keithjr
Posts: 110
Joined: 30 Jun 2006, 18:45

Post by keithjr »

still didn't seem to work, extracted both data archives into my spring folder but, observe....

Code: Select all

keithjr@helios:~/.spring$ cat /etc/spring/datadir
/home/keithjr/.spring/

keithjr@helios:~/.spring$ ls
AI    cmdcolors.txt  docs  infolog.txt  maps  PALETTE.PAL  selectkeys.txt        shaders  startscripts  Vera.ttf
base  ctrlpanel.txt  guis  Luxi.ttf     mods  readme.txt   settingstemplate.xml  spring   uikeys.txt
keithjr@helios:~/.spring$ ./spring
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
Tried this with both trunk and tagged 0.73b1, what am I doing wrong? Did the datadir setting methods change? I get the same results no matter what is in /etc/spring/datadir



:::SOLVED::::

Okay, I deleted /etc/spring/datadir and now everything works fine. Specifying 'SpringData' in .springrc works, but not in the /etc/spring/datadir file. odd.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

tried losing the trailing slash & whitespace u got @ end of line in /etc/spring/datadir

Gentoo ebuild has the following in /etc/spring/datadir & works ok

Code: Select all

/usr/share/games/taspring-linux-svn
$HOME/.spring
Caradhras
Posts: 381
Joined: 31 Jul 2006, 21:49

Post by Caradhras »

hiho!

Obviously, i'm too stupid to set the read-write variables right :?

When i try to start AFlobby unitsync says this to me:
(rather when i try to login)

make sure AFLobby and libunitsync.so is in your current working folder
unitsync: Message from DLL: not a single read-write data directory found!
unitsync: Unitsync assertion failed: unitsync.cpp:635: Call InitArchiveScanner before GetPrimaryModCount.
java: unitsync.cpp:635: int GetPrimaryModCount(): Assertion `archiveScanner && hpiHandler' failed.
Aborted (core dumped)
Save the noob!
User avatar
Soelen
Posts: 5
Joined: 27 Jul 2008, 03:51

Re: HOWTO: specify data directories for spring & unitsync

Post by Soelen »

Hello,

I tried to install spring on kubuntu and I was successful by installing it and one mod. But now every time I tried to play as a single player with a bot it says "Missing Default Cursor". I took a look in the F.A.Q. but there's only a description for Windows. What should I do?
User avatar
Soelen
Posts: 5
Joined: 27 Jul 2008, 03:51

Re: HOWTO: specify data directories for spring & unitsync

Post by Soelen »

Alright thanks it worked perfectly! :-)
mammadori
Posts: 35
Joined: 08 Oct 2009, 02:00

specify data directories for IA and Interfaces

Post by mammadori »

I was requested (by my debian packaging sponsor) to put some of the things now present in /usr/lib/spring to /usr/share/spring in order to follow FHS, which tells that architecture independent stuff should go to /usr/share/* .

This DATADIR split could be applied at build time also for AIDIR?

Moreover, from a packaging PoW will also be interesting to know which content will be needed both by "spring" and "spring-dedicated" binaries, to have e.g. a finer grained packages.

spring could be then packaged in "spring", "spring-dedicated" "spring-common", so if one just need to put up a random server to just host games, it will install the 2 latter packages.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: HOWTO: specify data directories for spring & unitsync

Post by hoijui »

about AIDIR:
i am not sure what exactly you want to split, i can just say this:
An AI Interface looks like this (example for Java):

Code: Select all

${AIDIR}/AI/Interfaces/Java/0.1/libAIInterface.so
${AIDIR}/AI/Interfaces/Java/0.1/InterfaceInfo.lua
${AIDIR}/AI/Interfaces/Java/0.1/<other_stuff>
A Skirmish AI looks like this:

Code: Select all

${AIDIR}/AI/Skirmish/YAI/0.2/libSkirmishAI.so|.jar
${AIDIR}/AI/Skirmish/YAI/0.2/AIInfo.lua
${AIDIR}/AI/Skirmish/YAI/0.2/AIOptions.lua
${AIDIR}/AI/Skirmish/YAI/0.2/<other_stuff>
in think, the <other_stuff> could be moved to an other location (eg, change the ${AIDIR} part of the path), but it would need build files changes and possilby (-> likely) adjustments in the code.
the lua files listed here though, do always have to be in the same location like the library they describe. I am still convinced we use a fail approach with these files, and the info contained in them should be in the actual libraries, and retrieved by querying them, but that would be quite a big change by now :/
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: specify data directories for IA and Interfaces

Post by Auswaschbar »

mammadori wrote:Moreover, from a packaging PoW will also be interesting to know which content will be needed both by "spring" and "spring-dedicated" binaries, to have e.g. a finer grained packages.

spring could be then packaged in "spring", "spring-dedicated" "spring-common", so if one just need to put up a random server to just host games, it will install the 2 latter packages.
Not really worth the effort, as they mostly use the same files like the basecontent-packages(except AIs and some lua-files).
hoijui wrote:I am still convinced we use a fail approach with these files, and the info contained in them should be in the actual libraries, and retrieved by querying them, but that would be quite a big change by now :/
More than adding a query-ai-info function(char* key) to every AI?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: HOWTO: specify data directories for spring & unitsync

Post by hoijui »

am still thinking about doing it, but yeah its a bit more.
engine and unitsync had to be changed and the interfaces, and the same you have for info there, we would also need for options. it is feasable though, yeah.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: HOWTO: specify data directories for spring & unitsync

Post by Tobi »

What is not so nice about putting the info inside a function inside the library is that this means a bug in an AI can mean unitsync / Spring hard crashes even when the AI isn't used at all. (i.e. just because lobby tries to fetch AI info)

I highlighted the word function, as of course something like embedding the info as metadata in the library could be done safely. But I'm not sure this is worth it...
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: HOWTO: specify data directories for spring & unitsync

Post by Auswaschbar »

The upside is that it would also make alot of stuff easier (buildserv stacktraces for AIs?).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: HOWTO: specify data directories for spring & unitsync

Post by Tobi »

How would it make that easier?

(AFAICS the only thing required for that is that Spring/AIs dump their exact version to the infolog sometime near start of the game, and of course a way for BuildServ to insert this version number on build.)
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: HOWTO: specify data directories for spring & unitsync

Post by Auswaschbar »

My last info was that AI stacktrace fail because all AI libraries have the same name.
Post Reply

Return to “Linux”