otavepto / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
193 stars 56 forks source link

Working directory for generate_emu_config #78

Closed Ghost-Terms closed 4 months ago

Ghost-Terms commented 4 months ago

A recent commit (https://github.com/otavepto/gbe_fork/commit/d8c14ab13edb215c3a6cf76ab6c21ba874890f54) made it so generate_emu_config always uses the directory that the executable was ran in. I don't like this change, In a completely separate directory from the executable.

I have a script called run.ps1 which generates my_login.txt from an encrypted file with my stored credentials. .bin/generate_emu_config.exe is called with the arguments I passed to the script. Then it uses SysInternals's Secure Delete utility to dispose of it afterward.

Keeping the generate_emu_config files in a .bin subdirectory makes upgrading convenient, I just get rid of the files inside and extract the new files in their place. But since the executable directory now has to be used, it's a messier process.

I'd honestly like the old behavior back where it just uses the working directory for everything, but a parameter that makes it use the working directory instead of the executable directory would be fine too. The third option would be a parameter or multiple parameters for manually setting paths; this solution is my least preferred, though.

otavepto commented 4 months ago

Leaving a note for later, maybe introduce a new arg -reltmp which will use the old behavior.

otavepto commented 4 months ago

@ImportTaste Check the build artifact, add the new flag to your script and you'll get the old behavior.

My curiosity is quite high, can I ask why you didn't just edit the script locally?

Ghost-Terms commented 4 months ago

Thank you.

My curiosity is quite high, can I ask why you didn't just edit the script locally?

Mainly because I'd have to keep making local edits to every new version, and little things like that add up. I could automate a script edit, but it might sometimes break depending on what code changes are made.

otavepto commented 4 months ago

Alright, I'll merge this PR now, I might not make a release at the moment, but you can use the build artifact since that's what's uploaded to a release anyway.