mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
CI: build native binaries with MinGW before packaging
The runtime binaries are no longer committed, so compile them in the builder container (example JARs stay committed) and package both artifacts.
This commit is contained in:
1 parent
f11687481f
commit
8cf2b8330c
1 file changed
+20
-6
+20
-6
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# JuiceAgent release packaging script.
|
||||
# The binaries and example JARs are committed to the repository, so this
|
||||
# script only packages them. Runs inside the juiceagent-builder container.
|
||||
# JuiceAgent release build script.
|
||||
# Runs inside the juiceagent-builder Docker container.
|
||||
# The example JARs are committed to the repository, so only the native
|
||||
# binaries are compiled here (MinGW cross-compile).
|
||||
# Produces two artifacts:
|
||||
# 1. JuiceAgent-windows-x64.zip - pure compiled binaries
|
||||
# 2. JuiceAgent-windows-x64-examples.zip - binaries + runnable example
|
||||
@@ -14,20 +15,33 @@ cd /workspace
|
||||
EXAMPLE_DIR=examples/load-via-injector-exe
|
||||
|
||||
echo "========================================"
|
||||
echo " [1/2] Packaging pure binaries"
|
||||
echo " [1/3] Building native binaries (MinGW)"
|
||||
echo "========================================"
|
||||
rm -rf build-mingw
|
||||
cmake --preset mingw-release
|
||||
cmake --build build-mingw
|
||||
|
||||
echo "========================================"
|
||||
echo " [2/3] Packaging pure binaries"
|
||||
echo "========================================"
|
||||
rm -f /workspace/JuiceAgent-windows-x64.zip
|
||||
cd "$EXAMPLE_DIR"
|
||||
cd build-mingw/bin
|
||||
zip -9 -j /workspace/JuiceAgent-windows-x64.zip injector.exe libagent.dll libloader.dll libinject.dll
|
||||
cd /workspace
|
||||
|
||||
echo "========================================"
|
||||
echo " [2/2] Packaging binaries + example"
|
||||
echo " [3/3] Packaging binaries + example"
|
||||
echo "========================================"
|
||||
rm -rf /workspace/release-examples
|
||||
mkdir -p /workspace/release-examples
|
||||
|
||||
cp -r "$EXAMPLE_DIR/." /workspace/release-examples/
|
||||
|
||||
cp build-mingw/bin/injector.exe /workspace/release-examples/
|
||||
cp build-mingw/bin/libagent.dll /workspace/release-examples/
|
||||
cp build-mingw/bin/libloader.dll /workspace/release-examples/
|
||||
cp build-mingw/bin/libinject.dll /workspace/release-examples/
|
||||
|
||||
rm -f /workspace/JuiceAgent-windows-x64-examples.zip
|
||||
cd /workspace/release-examples
|
||||
zip -9 -r /workspace/JuiceAgent-windows-x64-examples.zip .
|
||||
|
||||
Reference in new issue
Block a user