Add spring environment variables
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Add spring environment variables
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.
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, 22:15, edited 2 times in total.
-
- Posts: 451
- Joined: 03 Jul 2011, 11:54
Re: Add spring environment variables
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.
Installing is a thing of the past, in my opinion. Extracting and creating the necessary stuff in /~ at first run should suffice.
Re: Add spring environment variables
Good idea, make multiple spring installs useless.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
Ya know, nothing annoys me more than people who can't read, so let me help you out with that.
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.
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.
Desura (just like steam) gives you the option of where to install.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.
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, 23:56, edited 1 time in total.
Re: Add spring environment variables
I rescind my previous objection; it's far from the stupidest thing about this idea.
The real question is what was I expecting from a forb "Development" thread? I apologize for being such an idiot.
I'll just quote this part and wait until you figure out why this is entirely irrelevant to a standard (and sensible) spring install.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.
The real question is what was I expecting from a forb "Development" thread? I apologize for being such an idiot.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
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?
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, 23:52, edited 1 time in total.
Re: Add spring environment variables
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.
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.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
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.
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.
Re: Add spring environment variables
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.
Re: Add spring environment variables
he does that, he was asking if they'll do it for spring
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
^^ 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.
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.
Re: Add spring environment variables
One install to rule them all...... *sigh*
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
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.
It's not a must have feature, just something that might help make life easier on some gamedevs.
Re: Add spring environment variables
but to be fair, it isn't what envvars are for.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
True, but so what? A tool is a tool.
Re: Add spring environment variables
I *can* hammer in a screw.. but should I?
Re: Add spring environment variables
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?
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?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Add spring environment variables
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.
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.
Re: Add spring environment variables
This thread:
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
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.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
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
Re: Add spring environment variables
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.
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.