s-victor / TinyPedal

Free and Open Source telemetry overlay application for racing simulation
GNU General Public License v3.0
75 stars 8 forks source link

Installation on Linux from release file #15

Closed berarma closed 1 year ago

berarma commented 1 year ago

I'd like to make it easier for Linux users to install TinyPedal like a desktop app. My idea is to add an script that does the installation, so the user just has to download a release file, uncompress it, execute a script included and all is done.

The problem I have is that the submodule isn't included in the release files. Could you add a release file that included the submodule?

s-victor commented 1 year ago

Hi, sure, a script for installing on linux would be great. I'm not sure what should I do to include submodule in release file though, do you mean that I need to manually make a linux zip package (currently only windows package is manually zipped with everything needed) with submodule folder included, or something else?

berarma commented 1 year ago

Yes, I guess it should have to be done manually since I don't think Github can do it. Ideally, you could use a script that automates the generation of the release files. If you're already using one for the Windows release you would just need to add some more commands to it and make everything in one go so you don't have to do more work.

I've used this script to create the package that maybe you want adapt to Windows:

#!/bin/sh

VERSION=$1
DIRNAME=TinyPedalLinux
FILENAME="TinyPedalLinux-${VERSION}.7z"

git clone --recurse-submodule https://github.com/s-victor/TinyPedal.git "${DIRNAME}"

rm "$FILENAME"

7z a -xr\!.git* "${FILENAME}" "${DIRNAME}"

rm -Rf "${DIRNAME}"

It takes the version number as a parameter and uses it for the name of the package file. You could just use your current repository instead of cloning in the script.

Git-archive-all is another solution to create complete release files with submodules using a Python script but something like the script above would be enough.

Edit: I've changed the 7z command because it was still grabbing some git directories.

s-victor commented 1 year ago

Thanks, I'll include submodule for linux source package in next release.

berarma commented 1 year ago

I've changed the 7z command in my last post to correctly ignore all git directories.

I'll make a PR with the installer script hopefully in advance for the next version. I'm currently testing it.

Be aware that the current code doesn't work on Linux, please see s-victor/pyRfactor2SharedMemory#2.

Thanks!

s-victor commented 1 year ago

Thanks for the fix and help.

s-victor commented 1 year ago

hi, I have just added new Hybrid widget, which requires the latest rf2 sharedmemory plugin v3.7.15.1 to correctly display data (older version should get 0 values instead).

Also I wonder if tar.gz format is better for linux user, as it seems more common on linux.

Lemme know if any issue, thanks!

berarma commented 1 year ago

Yes, tar.gz is very popular, but if it's inconvenient for you, zip is also very common, and 7z is available on all distros too. I used 7z because I saw that's what you used for Windows and I tried to reduce any extra work you could need to do.

Thanks for the notice. I'll ask the fork author to update the plugin and send it upstream.

s-victor commented 1 year ago

I just tested with the old v3.7.14.2 dll and all hybrid data actually work without issues, so I guess it probably not required to use a new version of dll (which is a good news).

s-victor commented 1 year ago

Thanks for the installer, and would you also update the readme with the new info on how to use installer script, thanks!