soong-construction / dirt-rally-time-recorder

Stage time recorder for DiRT Rally [2.0]
Other
18 stars 2 forks source link

Linux usage tips #33

Closed fenugrec closed 3 years ago

fenugrec commented 4 years ago

Hi, I've managed to make this mostly-work on linux (Dirt Rally of course, v2 is not available) and would like to share what I've found, to improve the README and if possible adapt some of the code :

I'm impressed that this all even works ! I think with some very minor tweaks it could be made even friendlier.

maxbechtold commented 4 years ago

Hey @fenugrec, thanks for the hints, much appreciated. I shall pin this issue, and mention it in the README as you suggested. In particular finding the correct settings file sounds like a big hassle, glad you figured it out. This only shows that Linux support is not really a thing when it comes to games...

Have to tried to build the executable with pyinstaller (cf. bundle-for-dr1.bat)? This should also work on a Linux system.

I will open an issue to follow up on your suggestion, e.g. there should be bash-based scripts that match the bundle and export/list bat scripts

I know that the update scripts are a shortcoming of dirt-rally-time-recorder. I'm actually working on alleviating some of the trouble by reducing the times a user has to run a script (cf. this branch). I have considered inputs like you propose, but opted against it. I believe this tool should be batch based, so the user may enjoy an uninterrupted game session and can tidy up afterwards, if necessary. Again, in the future there should be less need to intervene. Indeed, I just released v2.6.2 which cleans up old update scripts automatically, and hopefully is a bit "friendlier" in general.

As to viewing recorded times: the scripts aren't made to be used in the repository/work folder, but in the installation folder that you get when creating the bundle/exe. There, they sit right next to the database file. That's why you should first build the tool, as the updated README suggests for v2.6.2.

Thanks a bunch for your input, it is always welcome!

fenugrec commented 4 years ago

Thanks, good to hear back from you.

I believe this tool should be batch based, so the user may enjoy an uninterrupted game session and can tidy up afterwards, if necessary.

Understood. I've been in touch with the developper of dr2_logger as well on this same topic; I have the luxury of a 2-screen setup with the game only in one screen so switching between both is trivial, but I realize even alt-tabbing may be problematic on some single-screen setups.

For me the annoying thing was after an uninterrupted session which produced a bunch of files. Then I had to go in there, delete the irrelevant files (good thing I remembered which car I drove, heh), run the right scripts, then delete those so they wouldn't be there after the next session; I wasn't sure if it was ok to run a same script more than once.

I will see about the pyinstaller bundle, I usually avoid python-specific installers and packagers because they aren't tracked by my distros package manager.

maxbechtold commented 4 years ago

...but I realize even alt-tabbing may be problematic on some single-screen setups.

... and even more so in VR.

Absolutely, but with the heuristics mode I'm working there's a good chance you'll have sessions without any need to run update scripts, or maybe find only a single one to run. No need to delete irrelevant files with v2.6.2, but it might be helpful to allow users (like you :)) to configure auto-deletion earlier than 7 days after creation (I'll follow up in a separate issue) so as to not to lose overview in the installation folder - good point!

You can run a script as often as you like, it will do no harm.

I understand, but currently I don't foresee to provide dirt-rally-time-recorder through package managers anyway. Still, you should be able to create a script from timerecord.spec that builds a source structure with all the .py, .sql files (and maybe scripts)) in one place and then use that directory as your installation.

maxbechtold commented 3 years ago

Closing this as v2.9.0 resolves most of the hassles described above. You are welcome to try the new release @fenugrec.

fenugrec commented 3 years ago

Thanks, will do next time I'm in DR ! - probably in a few weeks