goatcorp / FFXIVQuickLauncher

Custom launcher for FFXIV
https://goatcorp.github.io/
GNU General Public License v3.0
2.76k stars 327 forks source link

Compiling from tarball fails with fatal: not a git repository (or any of the parent directories): .git #1179

Closed a-crate closed 1 year ago

a-crate commented 1 year ago

Update disclaimer

What did you do?

Trying to compile the native linux version from the published tarball on github fails to with the message fatal: not a git repository (or any of the parent directories): .git It seems to be a failure of src/XIVLauncher.Core/XIVLauncher.Core.csproj line 115. Can this information be embedded at release time and the version hash creation skipped if the file is non-empty? On Linux this would be a pretty simple test -n $(cat VerFile) || git [...], I'm not sure what a cross-platform solution would look like.

Platform

Linux (native)

Wine/Proton runner version

No response

Relevant log output

amy@waifu ~/g/x/F/s/XIVLauncher.Core [1]> dotnet publish -r linux-x64 --sc -o ~/git/xl/build --configuration Release -p:DefineConstants=WINE_XIV_GENTOO_LINUX
MSBuild version 17.3.1+2badb37d1 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  XIVLauncher.VersionGenerator -> /home/amy/git/xl/FFXIVQuickLauncher-6.2.44/src/XIVLauncher.VersionGenerator/bin/Release/netstandard2.0/XIVLauncher.VersionGenerator.dll
  XIVLauncher.Common -> /home/amy/git/xl/FFXIVQuickLauncher-6.2.44/src/XIVLauncher.Common/bin/Release/net6.0/XIVLauncher.Common.dll
  XIVLauncher.Common.Unix -> /home/amy/git/xl/FFXIVQuickLauncher-6.2.44/src/XIVLauncher.Common.Unix/bin/Release/net6.0/XIVLauncher.Common.Unix.dll
  XIVLauncher.Common.Windows -> /home/amy/git/xl/FFXIVQuickLauncher-6.2.44/src/XIVLauncher.Common.Windows/bin/Release/net6.0/XIVLauncher.Common.Windows.dll
  fatal: not a git repository (or any of the parent directories): .git
/home/amy/git/xl/FFXIVQuickLauncher-6.2.44/src/XIVLauncher.Core/XIVLauncher.Core.csproj(115,5): error MSB3073: The command "git -C "/home/amy/git/xl/FFXIVQuickLauncher-6.2.44/src/XIVLauncher.Core/" describe --long --always --dirty > obj/Release/net6.0/linux-x64/gitver" exited with code 128.
amy@waifu ~/g/x/F/s/XIVLauncher.Core [1]>
reiichi001 commented 1 year ago

There are some fields that are looking for a git hash, as those are put in the titlebar and debug info.

When compiling from a tarball, the git repo bits aren't there and you'll need to provide that on command line args with -p:BuildHash=SomeHashHere

Here's what I'm doing for the MPR PKGBUILD (AUR pulls from git, but the MPR wasn't doing that properly). https://mpr.makedeb.org/pkgbase/xivlauncher/git/tree/PKGBUILD

a-crate commented 1 year ago

That works, thank you.