JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.02k stars 614 forks source link

Portable version #158

Closed Razish closed 11 years ago

Razish commented 11 years ago

With the addition of fs_homepath, OpenJK will no longer read/write to the working directory (C:\Games\JKA) but to C:\Users\Derp\Documents\My Games\OpenJK\ instead.

Whilst there are valid reasons for this to exist, a +com_portable 1 or +fs_homepath "" launch param would be greatly appreciated.

appastair commented 11 years ago

Have you tried a symlink from Windows' game save directory to your game's working directory?

Razish commented 11 years ago

That's not the point of a portable version (e.g. running from flash drive on a computer you don't own) Another issue is that people have multiple copies of JA installed, specifically movie-makers and developers. It would be nice to write in JA's directory easily.

shinyquagsire23 commented 11 years ago

Yes, I'd definitely like to have the ability to use the working directory as opposed to a static path for the use on flash drives, since I'm the kind of person who has like 10 portable games on a 16gb flash drive for the times when I'm at someone's house and I want to play some Quake III with them. :P

You could probably do both of the parameters and have it so that if com_portable is set it uses the working directory, and have an automatic fallback on the fs_homepath if the path is empty or doesn't exist, which would allow for having a flash drive use the host system's files when they exist, or if they don't use the local files.

ensiform commented 11 years ago

While I get that you would like portable, and for legitimate uses sure. But the rest of you need to seriously stop living in 1998 and windows 98 ffs. Yes portable sure, but it will not be the default.

SzicoVII commented 11 years ago

Yes, I hate things saving into My Documents :p

eezstreet commented 11 years ago

fs_homepath

Sent from my Windows Phone


From: SzicoVIImailto:notifications@github.com Sent: ‎5/‎24/‎2013 3:19 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Subject: Re: [OpenJK] Portable version (#158)

Yes, I hate things saving into My Documents :p


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/158#issuecomment-18390097

StrikerMan780 commented 11 years ago

Ensiform: "While I get that you would like portable, and for legitimate uses sure. But the rest of you need to seriously stop living in 1998 and windows 98 ffs. Yes portable sure, but it will not be the default."

Do you realize how much of a douche you come off as right there?

Just because a lot of people would prefer to be able to store their settings in their working directory rather than the "My Games" folder, doesn't mean they are living in 1998 and using windows 98 you pretentious fuck.

ensiform commented 11 years ago

Yes it does. The standards have changed since XP to not be writing to program files, hence the default is changed. If you would like to revert it and resort to using "Admin rights" or "VirtualStore" magic folder, please use +set fs_homepath "C:\Program Files(x86)\whateverrestofpath" or whereever you have put it. Sling more mud, please do. And grats for commenting on a month old comment.

mrwonko commented 11 years ago

More specifically this has to do with users with limited rights regarding installation of programs. If you're not allowed to install programs, that means you're not allowed to write to C:/Program Files/, which means JKA can't store it's data there.

It could write to %appdata% instead, that way you won't notice it as much as if it were to use My Documents...

ensiform commented 11 years ago

Right and make it more hidden from even less technical users? That's why I chose to deviate from ioq3's appdata folder. Documents does still have the issue of domain windows installs too, because CSIDL_PERSONAL doesn't pick the local one afaik.

StrikerMan780 commented 11 years ago

The whole point is moot when you aren't installed to Program Files or another Protected folder, now isn't it? For example, I run my JA from G:/Games/JediAcademy/ . Which is in an external drive. Annoying to have to use external means(such as a batch file) in order to do something that was originally default behavior. I'd personally just have OpenJK check it's own working directory, and if it isn't in a place that's protected with Windows permissions, just use the root folder for it's home path, otherwise, use My Games/OpenJK. In the end being able to be overridden with the new fs_homepath CVar. I know of some games(and plain applications, such as Notepad++) that do this.

And I'm in no way slinging mud, I'm just pointing out how pretentious those kinds of statements are, especially when said in such an insulting way. Just because someone wants to run their programs a certain way doesn't mean they're "out of date/stuck in the past and need to do it X way or fuck off" in a sense. I consider myself a fairly tech-savvy person who has certain preferences with how how I run things and it just gets under my skin when people consider that worthy of insult.

mrwonko commented 11 years ago

Annoying to have to use external means(such as a batch file) in order to do something that was originally default behavior.

So OpenJK does not look inside its own folder for a cfg containing the default values (including one for fs_homepath) first? Imho that should totally happen so you can change fs_homepath to "." or something similar for the "old" behaviour.

StrikerMan780 commented 11 years ago

^ Agreed, as that works too. (Unreal Engine 3 games do that, btw.)

ensiform commented 11 years ago

Windows does not allow you to check write permission unfortunately. Due to the virtual store magic folder, write will still pass.

Yes it was originally default behavior, but you and I are in the minority of alternate install locations (if even consider that installed). Yes it is now invalid behavior on XP and newer according to Microsoft guidelines for writing software that deals with writing to the filesystem. And this behavior also conforms with unix operating system style.

And all UE3 games I have all use my games directory despite being installed on D:\

StrikerMan780 commented 11 years ago

"And all UE3 games I have all use my games directory despite being installed on D:\" Not before executing the configs in it's own folder first. Useful for setting your own defaults.

"Windows does not allow you to check write permission unfortunately. Due to the virtual store magic folder, write will still pass. And of course, we are in the minority for installing elsewhere which is why the default behavior is changed. Is it so hard to use a shortcut that you most likely do anyway."

Why not use MrWonko's suggestion? Or did you just completely miss that?

ensiform commented 11 years ago

Because you cannot load a config file without loading the filesystem hello. UE3 uses INI files in a completely different manner entirely.

The Q3 engine has always been designed for using the launch parameters to be overriden by using defaults especially when it deals with INIT only cvars such as paths. I'm not gonna keep arguing over something you clearly know very little about. The default has changed and that is final. Use a batch or use a shortcut with a relative exe path within the directory that contains the exe, its not that hard.

The other option is to supply a pull request patch that includes a way to hard override the default without affecting the q3 filesystem and is xplat.

StrikerMan780 commented 11 years ago

"Because you cannot load a config file without loading the filesystem hello."

You should have just mentioned that earlier, I would have understood. I'm not too familiar with Quake 3, in comparison to Quake 1 and 2, in regards to how the engine works.

"invalid behavior on XP and newer"

Correction: Vista and Newer. (When UAC was introduced.) Unless one runs a limited access account, of course, which was quite rare. (And not the default. Ironically.)

"Use a batch or use a shortcut with a relative exe path within the directory that contains the exe, its not that hard."

I know it isn't hard, It's just irritating when you're extremely OCD like myself and are left to use another method for something that wasn't an issue before...

(Am I wrong for wanting to keep my folders clean/organized, simply being able to have it "just work" by clicking the usual EXE with it's appropriate application icon? And not have to stare at an ugly-ass generic batch icon, let alone use it as my launcher, and seeing the resulting command window that stays in the background as it runs? I'd use a shortcut, but that's not viable when the drive letter is constantly changing from computer to computer.

Then again, there's also my friends who play some of the games on my drive when I'm not around or using it... they aren't as tech-savvy, and don't know what a batch file is, and wouldn't know to click it rather than the EXE, and would probably wonder why the game is suddenly not using the same settings. Or perhaps what if they wanted to set up their own portable install by copying the appropriate files, installing OpenJK, and just pick up and go?)

"The other option is to supply a pull request patch that includes a way to hard override the default without affecting the q3 filesystem and is xplat."

Once I get more in depth with learning C++, I may consider it. I've done small patches for other projects before, but not as complex.

Anyhow... sorry for coming off as really abrasive today.. I've been in a shit mood, my limbs feel like they are on fire, and everything today has been hell in general.

ensiform commented 11 years ago

"invalid behavior on XP and newer" Correction: Vista and Newer. (When UAC was introduced.) Unless one runs a limited access account, of course, which was quite rare. (And not the default. Ironically.)

Vista and newer is when UAC was introduced yes, but the guideline technically changed when XP was released which is why UE3 games (pre-Vista) were already writing to My Games back then. IIRC UE3 has a nohome type launch command too. As do most forks of the open source games that are available today.

No you aren't wrong for trying to do this, but the new default is not just done for the hell of it as has been explained. The simple fact that only so few require obscure true portable installs (like I mentioned waaaaaaay above was the legitimate reason for doing this, of which will still have the option later on). This is still early alpha/un-released development version and there isn't even an installer or anything to configure it nicely for you.

Another solution we could propose for a later date, is having a windows "portable" build that is tailored specifically for portable use like many free portable apps.

Note: you can make a shortcut within the directory with the correct icon that does the same thing, batch files are not required to add launch parameters.

ensiform commented 11 years ago

If you wanted to talk more about contributing (faster and most of us usually idle), there is always the IRC channel located in the readme. Would recommend getting a real IRC client though, instead of an embeded flash version within the web browser.

xycaleth commented 11 years ago

Closing this issue as it was addressed a while ago. There's even CMake support, so you have the option to build the portable version.