View topic - Add spring environment variables



All times are UTC + 1 hour


Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 18 Jun 2012, 09:56 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
It occurred to me that a lot of things could be made easier if there were environment variables for them. It wouldn't be hard to add and could make things easier for installers, scripts, etc.

For example, in evo installs I set EVOLUTIONRTS as evo's install dir. That way, instead of having to do anything fancy to figure out where the user installed evo, I already know where it is.

Just a thought, but it could make various game/mappack/addon installers a lot easier to create/do cool stuff with.

It should be noted, that the env vars would only be set by people installing spring via the spring installer.

Portable, being what it is, there is nothing to be gained by setting env vars for those installs as the location might change at any given moment.

I know that this is already done via the registry. As in, you can find the spring install dir by looking up the reg key, but an env var is a lot easier to use.

Just a thought. Of course it wouldn't be useful all the time, but it would be useful some of the time, and having SPRING_INSTALLDIR env var set isn't going to hurt anything.

Edit because people can't string 2 paragraphs together to form a single thought: Obviously ticking portable in the spring installer would nullify an env var.


Last edited by Forboding Angel on 21 Jun 2012, 21:15, edited 2 times in total.

Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 09:53 

Joined: 03 Jul 2011, 10:54
You don't let the user choose what directory spring/evorts is installed in? That alone would cause huge amounts of grief on my part.

Installing is a thing of the past, in my opinion. Extracting and creating the necessary stuff in /~ at first run should suffice.


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 19:58 
Malcontent
User avatar

Joined: 27 Feb 2006, 22:04
Location: The only way to win is not to play.
Good idea, make multiple spring installs useless.


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 21:10 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
Ya know, nothing annoys me more than people who can't read, so let me help you out with that.

Quote:
It should be noted, that the env vars would only be set by people installing spring via the spring installer.

Portable, being what it is, there is nothing to be gained by setting env vars for those installs as the location might change at any given moment.


varikonniemi wrote:
You don't let the user choose what directory spring/evorts is installed in? That alone would cause huge amounts of grief on my part.


Desura (just like steam) gives you the option of where to install.

Whenever evo is started, an env is set to point to evo's install location. That way, no matter where it is, any time evo is run, it will point to it's install location (usually (But not always) c:/program files(x86)/desura/common/evolution rts).

The main reason I did this is so I can do clever shit with error reporting (and other things too, just error reporting always ends up being the most common). For example, when I tell someone to go poking around for their evo install, I can just so open up windows explorer and where it says "My Documents, erase that shit and put %EVOLUTIONRTS% and press enter.

VIOLA!!! Evo install folder. Now gimmie the infolog.

Or later, I can write a program that automatically uploads an infolog to my server when a user does something or another. The uses of the env var are to make it very easy on game devs. I do not need it for myself, but for the rest of the gamedevs, it could help make their lives much easier.


Last edited by Forboding Angel on 21 Jun 2012, 22:56, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 21:36 
Malcontent
User avatar

Joined: 27 Feb 2006, 22:04
Location: The only way to win is not to play.
I rescind my previous objection; it's far from the stupidest thing about this idea.

Forboding Angel wrote:
The main reason I did this is so I can do clever shit with error reporting. For example, when I tell someone to go poking around for their evo install, I can just so open up windows explorer and where it says "My Documents, erase that shit and put %EVOLUTIONRTS% and press enter.

VIOLA!!! Evo install folder. Now gimmie the infolog.

Or later, I can write a program that automatically uploads an infolog to my server when a user does something or another. The uses of the env var are to make it very easy on game devs. I do not need it for myself, but for the rest of the gamedevs, it could help make their lives much easier.


I'll just quote this part and wait until you figure out why this is entirely irrelevant to a standard (and sensible) spring install.

The real question is what was I expecting from a forb "Development" thread? I apologize for being such an idiot.


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 21:46 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
How many times do you tell newbies to go to their spring install?

Omg, relevant.

In no way does the addition of an environment variable make multiple spring installs useless. It's an environment variable... It's a pointer to a location. Just because it exists doesn't mean you have to use it.

As I have spent the last half hour explaining to smoth... portable installs would not be affected at all. What would be the purpose of setting an env var pointing to a location that may or may not exists at any given point? That would be fucking retarded.

I'm talking about normal spring installs (I made this quite clear in the original post). At the end of the install, the installer would set env vars to common locations, such as (but not necessarily limited to)

Spring install folder (possibly %SPRING_INSTALLDIR%)
Spring common maps folder (perhaps %SPRING_MAPS%)
Spring common games folder (maybe %SPRING_GAMES%)

Useful for a lot of things, but mainly for gamedevs who use the spring installer as their main platform.

BA
BAR (even though BAR will have it's own install, 80% of it's players probably won't use it)
ZK (because zk caters to regular spring installs as well -- Of course, this isn't really applicable for zk because they would just go to the registry to get the location, but whatever, listing it here for posterity)
the rest of *A
Spring Tanks
other random spring games
etc.

Why am I bothering to respond to a troll?


Last edited by Forboding Angel on 21 Jun 2012, 22:52, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 22:13 
Malcontent
User avatar

Joined: 27 Feb 2006, 22:04
Location: The only way to win is not to play.
It conflicts with multiple spring installs in that any tool that relies on the env variable will be completely useless for interacting with any but one. Environment variables are generally only used for global frameworks and toolchains that have to interact with the shell, and even many of their uses under that umbrella are questionable. A game (ok, a a game engine) adding an environment variable for each of its installation and data directories borders on heinous.

And I'd rather be a troll and spew needlessly vitriolic nonsense than not be a troll and still continuously spew needlessly vitriolic nonsense.

And here's the good part:
A normal Spring install does not put the infolog in its Program Files installation directory.

I think you should carry out a basic level of research on the topic at hand before posting in a forum dedicated to the discussion of Spring's internals - let alone insulting everyone within arm's reach.


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 22:51 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
That last part is a good point.

Enter, %SPRING_COMMON_DATADIR%. See what I did there?

Of course it would only point to one. This is for player spring installs. Gamedevs do any number of weird shit spring installs ( I know I do, but I use isolated in all of them except one ).

However, maps, games, and datadir would all be the common locations. install would be the only one that might be a moving target (however doubtful) on a player's machine.

I am well aware of what env vars are, what they do, and how they are commonly used. That part of your post was completely irrelevant to the topic at hand.

Peet, you have a way of making everything unpleasant for everyone involved.

It's worth noting that of course, these locations could all be stored within the registry, but I think we all know that pulling out registry locations is more often than not a pain in the ass. And then you get into the fact that locations are then stored differently on windows than linux and a bunch of other crap that would just make it more trouble than it's worth.

Regardless, this would not benefit me in any way shape or form. I just thought that it might help out Beherith and BAR mainly, and everyone else to a lesser extent.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 02:50 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Well, just have your Desura Evo installer create whatever env variable you fancy, I don't see why the Spring devs need to be involved.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 04:02 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: You are going to die anyway, hurry up and do it.
he does that, he was asking if they'll do it for spring


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 06:36 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
^^ This. I do not need this feature. I am asking for it purely for the convenience of others.

Independent spring is already very difficult to work with an maintain. Anything that makes doing that easier to do, should be considered a good thing.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 10:24 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
One install to rule them all...... *sigh*


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 10:39 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
The reasoning being that gamedevs generally use portable installs, whereas players use the normal installer and generally don't have more than one.

It's not a must have feature, just something that might help make life easier on some gamedevs.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 12:49 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: You are going to die anyway, hurry up and do it.
but to be fair, it isn't what envvars are for.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 22:05 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
True, but so what? A tool is a tool.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 22:36 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: You are going to die anyway, hurry up and do it.
I *can* hammer in a screw.. but should I?


Top
 Offline Profile  
 
PostPosted: 23 Jun 2012, 04:18 
Moderator

Joined: 05 Aug 2009, 19:42
I've read this a couple of times without knowing how to respond exactly.
You're saying that environment variables could be useful, well, ok, I agree, but one would need to be precise in exactly which variables you would use and what would their semantics be.

Having a %SPRING_DIR% variable is wrong f.e, it wouldn't work with multiple spring engines (a common case in zero K f.e). Having %SPRING_MAPS% may make sense, although I'm not sure how that'd work out with multiple games, or what would be the benefit of that, if any.

Using environment variables for debugging tutorials is probably not very useful either, creating better error reporting tools would probably be time better spent (and those tools should really know where they're installed without any environment variables).

Could you come with concrete variables and their semantics so we can discuss that?


Top
 Offline Profile  
 
PostPosted: 23 Jun 2012, 10:42 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring since 04/24/12
Well, my thought process was that env vars are pretty standard across windows and linux. I mean they basically function more or less the same way.

But if you use the registry to store locations, then you have 2 perpendicular systems, where on one you have to muck about in the windows registry and in the other you have to use a completely different method in linux.

Maybe someone has an idea on better methods?

@smoth, granted, but in this case, what would be the nail? Certainly not the windows registry. Everyone knows what a travesty that is.


Top
 Offline Profile  
 
PostPosted: 24 Jun 2012, 20:49 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
This thread:

Quote:
I have a cart wheel and it only turns at 0.5m/s

Obvious solution: Buy a car, why are you messing with cart wheels? Its the 21st century
Request made in Thread: Allow us to modify the aerodynamics of the wheel so that we can improve the speed by 0.2m/s


The shared Spring setup is useful for developers and whatnot, but it's not how we should be distributing our games once we're happy to market them as anywhere near complete.

So rather than try to bandage a bandage on a bandage on a bandage, on a gaping hole in your Torso, just do it the proper way and watch half the threads you've started over the last 2 years suddenly become utterly irrelevant and pointless non-issues


Top
 Offline Profile  
 
PostPosted: 25 Jun 2012, 08:56 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
to share the lobby makes sense for pretty much every spring game except maybe BA and ZK, though.. i would say even for them it still does, and it allows for an easier transition from BA/ZK to other, less often played games.
as in.. you can install ZK, and just double-click on a KP autohost, and you are ready.
muhc more likely to happen then someone finding KP on the ofrum or on its homepage, downloading, installing, opening it, and then finding noone else to play for sure (while in hte above example, chances are at least existing, that he would find someone to play).

if stuff would be as black and white as you draw them, the situation would not be as it is anymore.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.