mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
Embed full version into PList
This commit is contained in:
@@ -20,15 +20,9 @@ namespace osu.iOS
|
||||
{
|
||||
private readonly AppDelegate appDelegate;
|
||||
|
||||
public override Version AssemblyVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
// Example: 2025.613.0-tachyon
|
||||
string bundleVersion = NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString();
|
||||
return new Version(bundleVersion.Split('-')[0]);
|
||||
}
|
||||
}
|
||||
public override Version AssemblyVersion => new Version(NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString());
|
||||
|
||||
public override string Version => NSBundle.MainBundle.InfoDictionary["OsuVersion"].ToString();
|
||||
|
||||
public override bool HideUnlicensedContent => true;
|
||||
|
||||
|
||||
@@ -22,4 +22,14 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.3" />
|
||||
</ItemGroup>
|
||||
<!-- https://github.com/dotnet/macios/blob/eabcdee2ac43a0cc8324396a1bf75f8797d71810/msbuild/Xamarin.Shared/Xamarin.Shared.targets#L1328 -->
|
||||
<Target Name="AddOsuVersionToBundle" AfterTargets="_CreateAppBundle">
|
||||
<PropertyGroup>
|
||||
<PlistFilePath>$(AppBundleDir)/Info.plist</PlistFilePath>
|
||||
<OsuVersionKey>OsuVersion</OsuVersionKey>
|
||||
</PropertyGroup>
|
||||
<Exec Command="bash -c "(/usr/libexec/PlistBuddy -c 'Print :$(OsuVersionKey)' '$(PlistFilePath)' >/dev/null 2>&1 \
|
||||
&& /usr/libexec/PlistBuddy -c 'Set :$(OsuVersionKey) $(Version)' '$(PlistFilePath)') \
|
||||
|| /usr/libexec/PlistBuddy -c 'Add :$(OsuVersionKey) string $(Version)' '$(PlistFilePath)'""/>
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user