mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
feat: wcc module
This commit is contained in:
parent
e95371e22f
commit
a3b858e143
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -151,6 +151,8 @@ jobs:
|
|||||||
# ./test/wine/wcc.exe
|
# ./test/wine/wcc.exe
|
||||||
pnpm run test-prepare
|
pnpm run test-prepare
|
||||||
sudo apt install -y xvfb
|
sudo apt install -y xvfb
|
||||||
|
ls -l build
|
||||||
|
ls -l test/runner/nwjs/wcc/build/Release
|
||||||
# pnpm run test
|
# pnpm run test
|
||||||
- uses: ./.github/actions/test
|
- uses: ./.github/actions/test
|
||||||
with:
|
with:
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
build
|
/build
|
||||||
cache
|
cache
|
||||||
test/*.json
|
test/*.json
|
||||||
wcc.exe.c
|
wcc.exe.c
|
||||||
|
1
test/node-gyp/.gitignore
vendored
Normal file
1
test/node-gyp/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
build
|
@ -30,33 +30,54 @@ fi
|
|||||||
rm -rf "$root_dir/cache/nwjs-sdk-v$nw_version-win-x64/package.nw"
|
rm -rf "$root_dir/cache/nwjs-sdk-v$nw_version-win-x64/package.nw"
|
||||||
cp -r "$cur_dir/package.nw" "$root_dir/cache/nwjs-sdk-v$nw_version-win-x64"
|
cp -r "$cur_dir/package.nw" "$root_dir/cache/nwjs-sdk-v$nw_version-win-x64"
|
||||||
|
|
||||||
docker run -d -i\
|
docker_start(){
|
||||||
--volume=$root_dir:/workspace\
|
docker run -d -i\
|
||||||
--env=USE_XVFB=yes\
|
--rm\
|
||||||
--env=XVFB_SERVER=:95\
|
--volume=$root_dir:/workspace\
|
||||||
--env=XVFB_SCREEN=0\
|
--env=USE_XVFB=yes\
|
||||||
--env=XVFB_RESOLUTION=320x240x8\
|
--env=XVFB_SERVER=:95\
|
||||||
--env=DISPLAY=:95\
|
--env=XVFB_SCREEN=0\
|
||||||
--hostname=DESKTOP-1TV4OA1\
|
--env=XVFB_RESOLUTION=320x240x8\
|
||||||
--name=wine\
|
--env=DISPLAY=:95\
|
||||||
--shm-size=1g\
|
--hostname=DESKTOP-1TV4OA1\
|
||||||
--workdir=/home/wineuser\
|
--name=wine\
|
||||||
--env=TZ=Asia/Shanghai\
|
--shm-size=1g\
|
||||||
--volume=winehome:/home/wineuser\
|
--workdir=/home/wineuser\
|
||||||
-p 8083:8083\
|
--env=TZ=Asia/Shanghai\
|
||||||
scottyhardy/docker-wine:latest\
|
--volume=winehome:/home/wineuser\
|
||||||
wine /workspace/cache/nwjs-sdk-v$nw_version-win-x64/nw.exe
|
-p 8083:8083\
|
||||||
i=0
|
scottyhardy/docker-wine:latest\
|
||||||
until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:8083/check); do
|
wine /workspace/cache/nwjs-sdk-v$nw_version-win-x64/nw.exe
|
||||||
printf '.'
|
|
||||||
curl http://127.0.0.1:8083/check
|
i=0
|
||||||
sleep 1
|
until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:8083/check); do
|
||||||
let i=$i+1
|
printf '.'
|
||||||
if [ $i -ge 50 ];then
|
curl http://127.0.0.1:8083/check
|
||||||
echo "error"
|
sleep 1
|
||||||
|
let i=$i+1
|
||||||
|
if [ $i -ge 50 ];then
|
||||||
|
echo "error"
|
||||||
|
docker ps -a
|
||||||
|
docker logs wine
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
for ((i=0; i<5; i++));
|
||||||
|
do
|
||||||
|
ret=$(docker_start)
|
||||||
|
if [ "$ret" -eq 0 ];then
|
||||||
|
echo "Docker started successfully."
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ "$i" -eq 4 ];then
|
||||||
|
echo "Failed to start Docker after 5 attempts."
|
||||||
docker ps -a
|
docker ps -a
|
||||||
docker logs wine
|
docker logs wine
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "success"
|
echo "success"
|
BIN
test/runner/nwjs/package.nw/wcc/build/Release/wcc.node
Normal file
BIN
test/runner/nwjs/package.nw/wcc/build/Release/wcc.node
Normal file
Binary file not shown.
BIN
test/runner/nwjs/package.nw/wcc/build/Release/wcsc.node
Normal file
BIN
test/runner/nwjs/package.nw/wcc/build/Release/wcsc.node
Normal file
Binary file not shown.
1
test/runner/nwjs/wcc/build/Release/wcc.node
Symbolic link
1
test/runner/nwjs/wcc/build/Release/wcc.node
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../../build/wcc_module.node
|
1
test/runner/nwjs/wcc/build/Release/wcsc.node
Symbolic link
1
test/runner/nwjs/wcc/build/Release/wcsc.node
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../../build/wcsc_module.node
|
Loading…
x
Reference in New Issue
Block a user