summarylogtreecommitdiffstats
path: root/0001-Fix-Make-spec-files-platform-agnostic.patch
blob: 08f0f4ee62ef43e05aa22a23b0e8ac7f970eebd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From 09398f85b9910055935a362341a374126cf02005 Mon Sep 17 00:00:00 2001
From: Reyka Matthies <openglfreak@googlemail.com>
Date: Thu, 26 Mar 2026 01:30:42 +0100
Subject: [PATCH 01/12] [Fix] Make spec files platform-agnostic

---
 spec/backend.spec      | 13 +++++++++++--
 spec/backend_cuda.spec | 13 +++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/spec/backend.spec b/spec/backend.spec
index 786d7233..e53f29ce 100644
--- a/spec/backend.spec
+++ b/spec/backend.spec
@@ -1,8 +1,10 @@
 # -*- mode: python ; coding: utf-8 -*-
 
+import subprocess
+
 
 a = Analysis(
-    ['..\\src-python\\mainloop.py'],
+    ['../src-python/mainloop.py'],
     pathex=[],
     binaries=[],
     datas=[
@@ -24,12 +26,19 @@ a = Analysis(
 )
 pyz = PYZ(a.pure)
 
+try:
+    cargo = subprocess.run(['cargo', '--verbose', '--version'], capture_output=True, universal_newlines=True)
+    cargo_output = cargo.stdout.split('\n')
+    rust_triple = next(x[6:].strip() for x in cargo_output if x.startswith('host: '))
+except Exception:
+    rust_triple = 'pc-windows-msvc'
+
 exe = EXE(
     pyz,
     a.scripts,
     [],
     exclude_binaries=True,
-    name='VRCT-sidecar-x86_64-pc-windows-msvc',
+    name=('VRCT-sidecar-' + rust_triple),
     debug=False,
     bootloader_ignore_signals=False,
     strip=False,
diff --git a/spec/backend_cuda.spec b/spec/backend_cuda.spec
index e32776ed..9d16e80c 100644
--- a/spec/backend_cuda.spec
+++ b/spec/backend_cuda.spec
@@ -1,8 +1,10 @@
 # -*- mode: python ; coding: utf-8 -*-
 
+import subprocess
+
 
 a = Analysis(
-    ['..\\src-python\\mainloop.py'],
+    ['../src-python/mainloop.py'],
     pathex=[],
     binaries=[],
     datas=[
@@ -24,12 +26,19 @@ a = Analysis(
 )
 pyz = PYZ(a.pure)
 
+try:
+    cargo = subprocess.run(['cargo', '--verbose', '--version'], capture_output=True, universal_newlines=True)
+    cargo_output = cargo.stdout.split('\n')
+    rust_triple = next(x[6:].strip() for x in cargo_output if x.startswith('host: '))
+except Exception:
+    rust_triple = 'pc-windows-msvc'
+
 exe = EXE(
     pyz,
     a.scripts,
     [],
     exclude_binaries=True,
-    name='VRCT-sidecar-x86_64-pc-windows-msvc',
+    name=('VRCT-sidecar-' + rust_triple),
     debug=False,
     bootloader_ignore_signals=False,
     strip=False,
-- 
2.53.0