Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6e9bd4de13 | ||
|
05a41b31bc | ||
|
eed17f963e | ||
|
c09c0c002d |
16
.github/workflows/flatpak.yml
vendored
16
.github/workflows/flatpak.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
id: version_info
|
||||
working-directory: Ryujinx
|
||||
run: |
|
||||
echo "git_short_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
echo "git_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
- name: Update flatpak metadata
|
||||
id: metadata
|
||||
env:
|
||||
RYUJINX_GIT_HASH: ${{ steps.version_info.outputs.git_short_hash }}
|
||||
RYUJINX_GIT_HASH: ${{ steps.version_info.outputs.git_hash }}
|
||||
shell: python
|
||||
run: |
|
||||
import hashlib
|
||||
@@ -94,7 +94,17 @@ jobs:
|
||||
import yaml
|
||||
from datetime import datetime
|
||||
from lxml import etree
|
||||
|
||||
|
||||
|
||||
# Ensure we don't destroy multiline strings
|
||||
def str_presenter(dumper, data):
|
||||
if len(data.splitlines()) > 1:
|
||||
return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|")
|
||||
return dumper.represent_scalar("tag:yaml.org,2002:str", data)
|
||||
|
||||
|
||||
yaml.representer.SafeRepresenter.add_representer(str, str_presenter)
|
||||
|
||||
yaml_file = "flathub/org.ryujinx.Ryujinx.yml"
|
||||
xml_file = "flathub/org.ryujinx.Ryujinx.appdata.xml"
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="$([MSBuild]::IsOSPlatform('OSX'))">
|
||||
<Exec Command="codesign --entitlements $(ProjectDir)..\distribution\macos\entitlements.xml -f --deep -s $(SigningCertificate) $(TargetDir)$(TargetName)" />
|
||||
<Exec Command="codesign --entitlements '$(ProjectDir)..\distribution\macos\entitlements.xml' -f --deep -s $(SigningCertificate) '$(TargetDir)$(TargetName)'" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup Condition="'$(RuntimeIdentifier)' != ''">
|
||||
|
@@ -236,7 +236,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
public DateTimeOffset DateOffset { get; set; }
|
||||
public TimeSpan TimeOffset { get; set; }
|
||||
private AvaloniaList<TimeZone> TimeZones { get; set; }
|
||||
internal AvaloniaList<TimeZone> TimeZones { get; set; }
|
||||
public AvaloniaList<string> GameDirectories { get; set; }
|
||||
public ObservableCollection<ComboBoxItem> AvailableGpus { get; set; }
|
||||
|
||||
|
@@ -152,21 +152,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
|
||||
ulong ticks = _context.GetTimestamp();
|
||||
|
||||
float divisor = type switch
|
||||
{
|
||||
ReportCounterType.SamplesPassed => _channel.TextureManager.RenderTargetScale * _channel.TextureManager.RenderTargetScale,
|
||||
_ => 1f
|
||||
};
|
||||
|
||||
ICounterEvent counter = null;
|
||||
|
||||
void resultHandler(object evt, ulong result)
|
||||
{
|
||||
if (divisor != 1f)
|
||||
{
|
||||
result = (ulong)MathF.Ceiling(result / divisor);
|
||||
}
|
||||
|
||||
CounterData counterData = new CounterData
|
||||
{
|
||||
Counter = result,
|
||||
|
@@ -178,7 +178,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
}
|
||||
|
||||
_pipeline.Initialize(this);
|
||||
_counters.Initialize();
|
||||
_counters.Initialize(_pipeline);
|
||||
|
||||
// This is required to disable [0, 1] clamping for SNorm outputs on compatibility profiles.
|
||||
// This call is expected to fail if we're running with a core profile,
|
||||
|
@@ -773,6 +773,16 @@ namespace Ryujinx.Graphics.OpenGL
|
||||
_tfEnabled = false;
|
||||
}
|
||||
|
||||
public double GetCounterDivisor(CounterType type)
|
||||
{
|
||||
if (type == CounterType.SamplesPassed)
|
||||
{
|
||||
return _renderScale[0].X * _renderScale[0].X;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public void SetAlphaTest(bool enable, float reference, CompareOp op)
|
||||
{
|
||||
if (!enable)
|
||||
|
@@ -10,6 +10,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
{
|
||||
private const int MaxQueryRetries = 5000;
|
||||
private const long DefaultValue = -1;
|
||||
private const ulong HighMask = 0xFFFFFFFF00000000;
|
||||
|
||||
public int Query { get; }
|
||||
|
||||
@@ -63,11 +64,17 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
}
|
||||
}
|
||||
|
||||
private bool WaitingForValue(long data)
|
||||
{
|
||||
return data == DefaultValue ||
|
||||
((ulong)data & HighMask) == (unchecked((ulong)DefaultValue) & HighMask);
|
||||
}
|
||||
|
||||
public bool TryGetResult(out long result)
|
||||
{
|
||||
result = Marshal.ReadInt64(_bufferMap);
|
||||
|
||||
return result != DefaultValue;
|
||||
return WaitingForValue(result);
|
||||
}
|
||||
|
||||
public long AwaitResult(AutoResetEvent wakeSignal = null)
|
||||
@@ -76,7 +83,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
|
||||
if (wakeSignal == null)
|
||||
{
|
||||
while (data == DefaultValue)
|
||||
while (WaitingForValue(data))
|
||||
{
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
}
|
||||
@@ -84,10 +91,10 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
else
|
||||
{
|
||||
int iterations = 0;
|
||||
while (data == DefaultValue && iterations++ < MaxQueryRetries)
|
||||
while (WaitingForValue(data) && iterations++ < MaxQueryRetries)
|
||||
{
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
if (data == DefaultValue)
|
||||
if (WaitingForValue(data))
|
||||
{
|
||||
wakeSignal.WaitOne(1);
|
||||
}
|
||||
|
@@ -13,6 +13,8 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
public CounterType Type { get; }
|
||||
public bool Disposed { get; private set; }
|
||||
|
||||
private readonly Pipeline _pipeline;
|
||||
|
||||
private Queue<CounterQueueEvent> _events = new Queue<CounterQueueEvent>();
|
||||
private CounterQueueEvent _current;
|
||||
|
||||
@@ -28,10 +30,12 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
|
||||
private Thread _consumerThread;
|
||||
|
||||
internal CounterQueue(CounterType type)
|
||||
internal CounterQueue(Pipeline pipeline, CounterType type)
|
||||
{
|
||||
Type = type;
|
||||
|
||||
_pipeline = pipeline;
|
||||
|
||||
QueryTarget glType = GetTarget(Type);
|
||||
|
||||
_queryPool = new Queue<BufferedQuery>(QueryPoolInitialSize);
|
||||
@@ -119,7 +123,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
_current.ReserveForHostAccess();
|
||||
}
|
||||
|
||||
_current.Complete(draws > 0);
|
||||
_current.Complete(draws > 0, _pipeline.GetCounterDivisor(Type));
|
||||
_events.Enqueue(_current);
|
||||
|
||||
_current.OnResult += resultHandler;
|
||||
|
@@ -26,6 +26,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
|
||||
private object _lock = new object();
|
||||
private ulong _result = ulong.MaxValue;
|
||||
private double _divisor = 1f;
|
||||
|
||||
public CounterQueueEvent(CounterQueue queue, QueryTarget type, ulong drawIndex)
|
||||
{
|
||||
@@ -45,9 +46,11 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
ClearCounter = true;
|
||||
}
|
||||
|
||||
internal void Complete(bool withResult)
|
||||
internal void Complete(bool withResult, double divisor)
|
||||
{
|
||||
_counter.End(withResult);
|
||||
|
||||
_divisor = divisor;
|
||||
}
|
||||
|
||||
internal bool TryConsume(ref ulong result, bool block, AutoResetEvent wakeSignal = null)
|
||||
@@ -78,7 +81,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
}
|
||||
}
|
||||
|
||||
result += (ulong)queryResult;
|
||||
result += _divisor == 1 ? (ulong)queryResult : (ulong)Math.Ceiling(queryResult / _divisor);
|
||||
|
||||
_result = result;
|
||||
|
||||
|
@@ -14,12 +14,12 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
_counterQueues = new CounterQueue[count];
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
public void Initialize(Pipeline pipeline)
|
||||
{
|
||||
for (int index = 0; index < _counterQueues.Length; index++)
|
||||
{
|
||||
CounterType type = (CounterType)index;
|
||||
_counterQueues[index] = new CounterQueue(type);
|
||||
_counterQueues[index] = new CounterQueue(pipeline, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -684,6 +684,16 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
_tfEnabled = false;
|
||||
}
|
||||
|
||||
public double GetCounterDivisor(CounterType type)
|
||||
{
|
||||
if (type == CounterType.SamplesPassed)
|
||||
{
|
||||
return _renderScale[0].X * _renderScale[0].X;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public bool IsCommandBufferActive(CommandBuffer cb)
|
||||
{
|
||||
return CommandBuffer.Handle == cb.Handle;
|
||||
|
@@ -12,6 +12,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
private const int MaxQueryRetries = 5000;
|
||||
private const long DefaultValue = -1;
|
||||
private const long DefaultValueInt = 0xFFFFFFFF;
|
||||
private const ulong HighMask = 0xFFFFFFFF00000000;
|
||||
|
||||
private readonly Vk _api;
|
||||
private readonly Device _device;
|
||||
@@ -125,6 +126,12 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
}
|
||||
}
|
||||
|
||||
private bool WaitingForValue(long data)
|
||||
{
|
||||
return data == _defaultValue ||
|
||||
(!_result32Bit && ((ulong)data & HighMask) == ((ulong)_defaultValue & HighMask));
|
||||
}
|
||||
|
||||
public bool TryGetResult(out long result)
|
||||
{
|
||||
result = Marshal.ReadInt64(_bufferMap);
|
||||
@@ -138,7 +145,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
|
||||
if (wakeSignal == null)
|
||||
{
|
||||
while (data == _defaultValue)
|
||||
while (WaitingForValue(data))
|
||||
{
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
}
|
||||
@@ -146,10 +153,10 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
else
|
||||
{
|
||||
int iterations = 0;
|
||||
while (data == _defaultValue && iterations++ < MaxQueryRetries)
|
||||
while (WaitingForValue(data) && iterations++ < MaxQueryRetries)
|
||||
{
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
if (data == _defaultValue)
|
||||
if (WaitingForValue(data))
|
||||
{
|
||||
wakeSignal.WaitOne(1);
|
||||
}
|
||||
|
@@ -148,7 +148,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
_current.ReserveForHostAccess();
|
||||
}
|
||||
|
||||
_current.Complete(draws > 0 && Type != CounterType.TransformFeedbackPrimitivesWritten);
|
||||
_current.Complete(draws > 0 && Type != CounterType.TransformFeedbackPrimitivesWritten, _pipeline.GetCounterDivisor(Type));
|
||||
_events.Enqueue(_current);
|
||||
|
||||
_current.OnResult += resultHandler;
|
||||
|
@@ -24,6 +24,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
|
||||
private object _lock = new object();
|
||||
private ulong _result = ulong.MaxValue;
|
||||
private double _divisor = 1f;
|
||||
|
||||
public CounterQueueEvent(CounterQueue queue, CounterType type, ulong drawIndex)
|
||||
{
|
||||
@@ -52,9 +53,11 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
ClearCounter = true;
|
||||
}
|
||||
|
||||
internal void Complete(bool withResult)
|
||||
internal void Complete(bool withResult, double divisor)
|
||||
{
|
||||
_counter.End(withResult);
|
||||
|
||||
_divisor = divisor;
|
||||
}
|
||||
|
||||
internal bool TryConsume(ref ulong result, bool block, AutoResetEvent wakeSignal = null)
|
||||
@@ -85,7 +88,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
}
|
||||
}
|
||||
|
||||
result += (ulong)queryResult;
|
||||
result += _divisor == 1 ? (ulong)queryResult : (ulong)Math.Ceiling(queryResult / _divisor);
|
||||
|
||||
_result = result;
|
||||
|
||||
|
@@ -6,31 +6,31 @@ PUBLISH_DIRECTORY=$1
|
||||
OUTPUT_DIRECTORY=$2
|
||||
ENTITLEMENTS_FILE_PATH=$3
|
||||
|
||||
APP_BUNDLE_DIRECTORY=$OUTPUT_DIRECTORY/Ryujinx.app
|
||||
APP_BUNDLE_DIRECTORY="$OUTPUT_DIRECTORY/Ryujinx.app"
|
||||
|
||||
rm -rf $APP_BUNDLE_DIRECTORY
|
||||
mkdir -p $APP_BUNDLE_DIRECTORY/Contents
|
||||
mkdir $APP_BUNDLE_DIRECTORY/Contents/Frameworks
|
||||
mkdir $APP_BUNDLE_DIRECTORY/Contents/MacOS
|
||||
mkdir $APP_BUNDLE_DIRECTORY/Contents/Resources
|
||||
rm -rf "$APP_BUNDLE_DIRECTORY"
|
||||
mkdir -p "$APP_BUNDLE_DIRECTORY/Contents"
|
||||
mkdir "$APP_BUNDLE_DIRECTORY/Contents/Frameworks"
|
||||
mkdir "$APP_BUNDLE_DIRECTORY/Contents/MacOS"
|
||||
mkdir "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
||||
|
||||
# Copy executables first
|
||||
cp $PUBLISH_DIRECTORY/Ryujinx.Ava $APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx
|
||||
chmod u+x $APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx
|
||||
cp "$PUBLISH_DIRECTORY/Ryujinx.Ava" "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx"
|
||||
chmod u+x "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx"
|
||||
|
||||
# Then all libraries
|
||||
cp $PUBLISH_DIRECTORY/*.dylib $APP_BUNDLE_DIRECTORY/Contents/Frameworks
|
||||
cp "$PUBLISH_DIRECTORY"/*.dylib "$APP_BUNDLE_DIRECTORY/Contents/Frameworks"
|
||||
|
||||
# Then resources
|
||||
cp Info.plist $APP_BUNDLE_DIRECTORY/Contents
|
||||
cp Ryujinx.icns $APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns
|
||||
cp updater.sh $APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh
|
||||
cp -r $PUBLISH_DIRECTORY/THIRDPARTY.md $APP_BUNDLE_DIRECTORY/Contents/Resources
|
||||
cp Info.plist "$APP_BUNDLE_DIRECTORY/Contents"
|
||||
cp Ryujinx.icns "$APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns"
|
||||
cp updater.sh "$APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh"
|
||||
cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
||||
|
||||
echo -n "APPL????" > $APP_BUNDLE_DIRECTORY/Contents/PkgInfo
|
||||
echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo"
|
||||
|
||||
# Fixup libraries and executable
|
||||
python3 bundle_fix_up.py $APP_BUNDLE_DIRECTORY MacOS/Ryujinx
|
||||
python3 bundle_fix_up.py "$APP_BUNDLE_DIRECTORY" MacOS/Ryujinx
|
||||
|
||||
# Now sign it
|
||||
if ! [ -x "$(command -v codesign)" ];
|
||||
@@ -44,9 +44,9 @@ then
|
||||
# NOTE: Currently require https://github.com/indygreg/apple-platform-rs/pull/44 to work on other OSes.
|
||||
# cargo install --git "https://github.com/marysaka/apple-platform-rs" --branch "fix/adhoc-app-bundle" apple-codesign --bin "rcodesign"
|
||||
echo "Usign rcodesign for ad-hoc signing"
|
||||
rcodesign sign --entitlements-xml-path $ENTITLEMENTS_FILE_PATH $APP_BUNDLE_DIRECTORY
|
||||
rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$APP_BUNDLE_DIRECTORY"
|
||||
else
|
||||
echo "Usign codesign for ad-hoc signing"
|
||||
codesign --entitlements $ENTITLEMENTS_FILE_PATH -f --deep -s - $APP_BUNDLE_DIRECTORY
|
||||
codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f --deep -s - "$APP_BUNDLE_DIRECTORY"
|
||||
fi
|
||||
|
||||
|
@@ -7,54 +7,54 @@ if [ "$#" -ne 6 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $1
|
||||
mkdir -p $2
|
||||
mkdir -p $3
|
||||
mkdir -p "$1"
|
||||
mkdir -p "$2"
|
||||
mkdir -p "$3"
|
||||
|
||||
BASE_DIR=$(readlink -f $1)
|
||||
TEMP_DIRECTORY=$(readlink -f $2)
|
||||
OUTPUT_DIRECTORY=$(readlink -f $3)
|
||||
ENTITLEMENTS_FILE_PATH=$(readlink -f $4)
|
||||
BASE_DIR=$(readlink -f "$1")
|
||||
TEMP_DIRECTORY=$(readlink -f "$2")
|
||||
OUTPUT_DIRECTORY=$(readlink -f "$3")
|
||||
ENTITLEMENTS_FILE_PATH=$(readlink -f "$4")
|
||||
VERSION=$5
|
||||
SOURCE_REVISION_ID=$6
|
||||
|
||||
RELEASE_TAR_FILE_NAME=Ryujinx-$VERSION-macos_universal.app.tar
|
||||
ARM64_APP_BUNDLE=$TEMP_DIRECTORY/output_arm64/Ryujinx.app
|
||||
X64_APP_BUNDLE=$TEMP_DIRECTORY/output_x64/Ryujinx.app
|
||||
UNIVERSAL_APP_BUNDLE=$OUTPUT_DIRECTORY/Ryujinx.app
|
||||
ARM64_APP_BUNDLE="$TEMP_DIRECTORY/output_arm64/Ryujinx.app"
|
||||
X64_APP_BUNDLE="$TEMP_DIRECTORY/output_x64/Ryujinx.app"
|
||||
UNIVERSAL_APP_BUNDLE="$OUTPUT_DIRECTORY/Ryujinx.app"
|
||||
EXECUTABLE_SUB_PATH=Contents/MacOS/Ryujinx
|
||||
|
||||
rm -rf $TEMP_DIRECTORY
|
||||
mkdir -p $TEMP_DIRECTORY
|
||||
rm -rf "$TEMP_DIRECTORY"
|
||||
mkdir -p "$TEMP_DIRECTORY"
|
||||
|
||||
DOTNET_COMMON_ARGS="-p:DebugType=embedded -p:Version=$VERSION -p:SourceRevisionId=$SOURCE_REVISION_ID --self-contained true"
|
||||
|
||||
dotnet restore
|
||||
dotnet build -c Release Ryujinx.Ava
|
||||
dotnet publish -c Release -r osx-arm64 -o $TEMP_DIRECTORY/publish_arm64 $DOTNET_COMMON_ARGS Ryujinx.Ava
|
||||
dotnet publish -c Release -r osx-x64 -o $TEMP_DIRECTORY/publish_x64 $DOTNET_COMMON_ARGS Ryujinx.Ava
|
||||
dotnet publish -c Release -r osx-arm64 -o "$TEMP_DIRECTORY/publish_arm64" $DOTNET_COMMON_ARGS Ryujinx.Ava
|
||||
dotnet publish -c Release -r osx-x64 -o "$TEMP_DIRECTORY/publish_x64" $DOTNET_COMMON_ARGS Ryujinx.Ava
|
||||
|
||||
# Get ride of the support library for ARMeilleur for x64 (that's only for arm64)
|
||||
rm -rf $TEMP_DIRECTORY/publish_x64/libarmeilleure-jitsupport.dylib
|
||||
rm -rf "$TEMP_DIRECTORY/publish_x64/libarmeilleure-jitsupport.dylib"
|
||||
|
||||
# Get ride of libsoundio from arm64 builds as we don't have a arm64 variant
|
||||
# TODO: remove this once done
|
||||
rm -rf $TEMP_DIRECTORY/publish_arm64/libsoundio.dylib
|
||||
rm -rf "$TEMP_DIRECTORY/publish_arm64/libsoundio.dylib"
|
||||
|
||||
pushd $BASE_DIR/distribution/macos
|
||||
./create_app_bundle.sh $TEMP_DIRECTORY/publish_x64 $TEMP_DIRECTORY/output_x64 $ENTITLEMENTS_FILE_PATH
|
||||
./create_app_bundle.sh $TEMP_DIRECTORY/publish_arm64 $TEMP_DIRECTORY/output_arm64 $ENTITLEMENTS_FILE_PATH
|
||||
pushd "$BASE_DIR/distribution/macos"
|
||||
./create_app_bundle.sh "$TEMP_DIRECTORY/publish_x64" "$TEMP_DIRECTORY/output_x64" "$ENTITLEMENTS_FILE_PATH"
|
||||
./create_app_bundle.sh "$TEMP_DIRECTORY/publish_arm64" "$TEMP_DIRECTORY/output_arm64" "$ENTITLEMENTS_FILE_PATH"
|
||||
popd
|
||||
|
||||
rm -rf $UNIVERSAL_APP_BUNDLE
|
||||
mkdir -p $OUTPUT_DIRECTORY
|
||||
rm -rf "$UNIVERSAL_APP_BUNDLE"
|
||||
mkdir -p "$OUTPUT_DIRECTORY"
|
||||
|
||||
# Let's copy one of the two different app bundle and remove the executable
|
||||
cp -R $ARM64_APP_BUNDLE $UNIVERSAL_APP_BUNDLE
|
||||
rm $UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH
|
||||
cp -R "$ARM64_APP_BUNDLE" "$UNIVERSAL_APP_BUNDLE"
|
||||
rm "$UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH"
|
||||
|
||||
# Make it libraries universal
|
||||
python3 $BASE_DIR/distribution/macos/construct_universal_dylib.py $ARM64_APP_BUNDLE $X64_APP_BUNDLE $UNIVERSAL_APP_BUNDLE "**/*.dylib"
|
||||
python3 "$BASE_DIR/distribution/macos/construct_universal_dylib.py" "$ARM64_APP_BUNDLE" "$X64_APP_BUNDLE" "$UNIVERSAL_APP_BUNDLE" "**/*.dylib"
|
||||
|
||||
if ! [ -x "$(command -v lipo)" ];
|
||||
then
|
||||
@@ -69,12 +69,12 @@ else
|
||||
fi
|
||||
|
||||
# Make it the executable universal
|
||||
$LIPO $ARM64_APP_BUNDLE/$EXECUTABLE_SUB_PATH $X64_APP_BUNDLE/$EXECUTABLE_SUB_PATH -output $UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH -create
|
||||
$LIPO "$ARM64_APP_BUNDLE/$EXECUTABLE_SUB_PATH" "$X64_APP_BUNDLE/$EXECUTABLE_SUB_PATH" -output "$UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH" -create
|
||||
|
||||
# Patch up the Info.plist to have appropriate version
|
||||
sed -r -i.bck "s/\%\%RYUJINX_BUILD_VERSION\%\%/$VERSION/g;" $UNIVERSAL_APP_BUNDLE/Contents/Info.plist
|
||||
sed -r -i.bck "s/\%\%RYUJINX_BUILD_GIT_HASH\%\%/$SOURCE_REVISION_ID/g;" $UNIVERSAL_APP_BUNDLE/Contents/Info.plist
|
||||
rm $UNIVERSAL_APP_BUNDLE/Contents/Info.plist.bck
|
||||
sed -r -i.bck "s/\%\%RYUJINX_BUILD_VERSION\%\%/$VERSION/g;" "$UNIVERSAL_APP_BUNDLE/Contents/Info.plist"
|
||||
sed -r -i.bck "s/\%\%RYUJINX_BUILD_GIT_HASH\%\%/$SOURCE_REVISION_ID/g;" "$UNIVERSAL_APP_BUNDLE/Contents/Info.plist"
|
||||
rm "$UNIVERSAL_APP_BUNDLE/Contents/Info.plist.bck"
|
||||
|
||||
# Now sign it
|
||||
if ! [ -x "$(command -v codesign)" ];
|
||||
@@ -88,16 +88,16 @@ then
|
||||
# NOTE: Currently require https://github.com/indygreg/apple-platform-rs/pull/44 to work on other OSes.
|
||||
# cargo install --git "https://github.com/marysaka/apple-platform-rs" --branch "fix/adhoc-app-bundle" apple-codesign --bin "rcodesign"
|
||||
echo "Usign rcodesign for ad-hoc signing"
|
||||
rcodesign sign --entitlements-xml-path $ENTITLEMENTS_FILE_PATH $UNIVERSAL_APP_BUNDLE
|
||||
rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$UNIVERSAL_APP_BUNDLE"
|
||||
else
|
||||
echo "Usign codesign for ad-hoc signing"
|
||||
codesign --entitlements $ENTITLEMENTS_FILE_PATH -f --deep -s - $UNIVERSAL_APP_BUNDLE
|
||||
codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f --deep -s - "$UNIVERSAL_APP_BUNDLE"
|
||||
fi
|
||||
|
||||
echo "Creating archive"
|
||||
pushd $OUTPUT_DIRECTORY
|
||||
pushd "$OUTPUT_DIRECTORY"
|
||||
tar --exclude "Ryujinx.app/Contents/MacOS/Ryujinx" -cvf $RELEASE_TAR_FILE_NAME Ryujinx.app 1> /dev/null
|
||||
python3 $BASE_DIR/distribution/misc/add_tar_exec.py $RELEASE_TAR_FILE_NAME "Ryujinx.app/Contents/MacOS/Ryujinx" "Ryujinx.app/Contents/MacOS/Ryujinx"
|
||||
python3 "$BASE_DIR/distribution/misc/add_tar_exec.py" $RELEASE_TAR_FILE_NAME "Ryujinx.app/Contents/MacOS/Ryujinx" "Ryujinx.app/Contents/MacOS/Ryujinx"
|
||||
gzip -9 < $RELEASE_TAR_FILE_NAME > $RELEASE_TAR_FILE_NAME.gz
|
||||
rm $RELEASE_TAR_FILE_NAME
|
||||
popd
|
||||
|
Reference in New Issue
Block a user