Skip to content

Commit 9895b5d

Browse files
committed
Attempt Two
Typo, Silicon Resources test and Signing improvement
1 parent 8d29807 commit 9895b5d

File tree

6 files changed

+25
-11
lines changed

6 files changed

+25
-11
lines changed

.github/workflows/docker_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Containers
22
on:
33
push:
44
tags:
5-
- 'v*'
5+
- 'NO-v*'
66

77
jobs:
88
build-client:

.github/workflows/release_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release-Linux
22
on:
33
push:
44
tags:
5-
- 'v*'
5+
- 'NO-v*'
66

77
jobs:
88
build-ubuntu:

.github/workflows/release_macos_intel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release-macOS
1+
name: Release-macOS-Intel
22
on:
33
push:
44
tags:
@@ -55,7 +55,7 @@ jobs:
5555
cp static/build_files/macos_intel/requirements.txt requirements.txt
5656
basename $(rustc --print sysroot) | sed -e "s/^stable-//" > triple.txt
5757
rustup target add x86_64-apple-darwin
58-
pyoxidizer build --release --target x86_64-apple-darwin
58+
pyoxidizer build --release --target-triple x86_64-apple-darwin
5959
cd build/$(head -n 1 triple.txt)/release
6060
mkdir -p "Hydrus Network.app/Contents/MacOS"
6161
mkdir -p "Hydrus Network.app/Contents/Resources"

.github/workflows/release_macos_silicon.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release-macOS
1+
name: Release-macOS-Silicon
22
on:
33
push:
44
tags:
@@ -54,7 +54,7 @@ jobs:
5454
cp static/build_files/macos_silicon/pyoxidizer.bzl pyoxidizer.bzl
5555
cp static/build_files/macos_silicon/requirements.txt requirements.txt
5656
basename $(rustc --print sysroot) | sed -e "s/^stable-//" > triple.txt
57-
pyoxidizer build --release
57+
pyoxidizer build --release --target-triple aarch64-apple-darwin
5858
cd build/$(head -n 1 triple.txt)/release
5959
mkdir -p "Hydrus Network.app/Contents/MacOS"
6060
mkdir -p "Hydrus Network.app/Contents/Resources"
@@ -69,7 +69,10 @@ jobs:
6969
run: |
7070
cd $GITHUB_WORKSPACE
7171
cd build/$(head -n 1 triple.txt)/release
72-
codesign --sign - --force --deep --timestamp=none "Hydrus Network.app"
72+
find "Hydrus Network.app/Contents" -type f -print0 |
73+
xargs -0 -I{} sh -c 'file -b "{}" | grep -q "Mach-O" && codesign -s - --force --timestamp=none "{}" || true'
74+
codesign --sign - --force --timestamp=none "Hydrus Network.app"
75+
codesign --verify --verbose "Hydrus Network.app"
7376
-
7477
name: Zip it up
7578
run: |

.github/workflows/release_win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release-Win
22
on:
33
push:
44
tags:
5-
- 'v*'
5+
- 'NO-v*'
66

77
jobs:
88
build-windows:

static/build_files/macos_silicon/pyoxidizer.bzl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
def make_dist():
2-
return default_python_distribution( python_version = "3.10" )
2+
return default_python_distribution(
3+
python_version = "3.10",
4+
target_triple = "aarch64-apple-darwin"
5+
)
6+
7+
def make_resource_policy(dist):
8+
res = dist.make_resource_location_policy()
9+
res.resources_location = "resources"
10+
11+
return res
312

413
def make_packaging_policy(dist):
514
policy = dist.make_python_packaging_policy()
@@ -10,7 +19,7 @@ def make_packaging_policy(dist):
1019

1120
return policy
1221

13-
def make_client(dist, policy):
22+
def make_client(dist, policy, res):
1423
python_config = dist.make_python_interpreter_config()
1524
python_config.module_search_paths = ["$ORIGIN", "$ORIGIN/lib"]
1625
python_config.filesystem_importer = True
@@ -20,6 +29,7 @@ def make_client(dist, policy):
2029
client = dist.to_python_executable(
2130
name="hydrus_client",
2231
packaging_policy=policy,
32+
resources_policy=res,
2333
config=python_config,
2434
)
2535

@@ -48,7 +58,8 @@ print(CWD)
4858
# Tell PyOxidizer about the build targets defined above.
4959
register_target("dist", make_dist)
5060
register_target("policy", make_packaging_policy, depends=["dist"])
51-
register_target("hydrus_client", make_client, depends=["dist", "policy"])
61+
register_target("res", make_packaging_policy, depends=["dist"])
62+
register_target("hydrus_client", make_client, depends=["dist", "policy", "res"])
5263
register_target("resources", make_embedded_resources, depends=["hydrus_client"], default_build_script=True)
5364
register_target("install", make_install, depends=["hydrus_client", "resources"], default=True)
5465

0 commit comments

Comments
 (0)