Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
修复了没有添加armhf本地库的问题
添加了openal (由lwjgl.org预编译)
  • Loading branch information
huangguiniab committed Nov 18, 2021
1 parent 67a6d83 commit f552005
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 16 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/github-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ jobs:
sudo debootstrap --arch arm64 buster arm64/
sudo debootstrap --arch armhf buster armhf/
- name: 配置操作环境
run: |
sudo cp -r lwjgl-backports/build_script/*.sh arm64/
sudo cp -r lwjgl-backports/build_script/*.sh armhf/
sudo cp lwjgl-backports/patch/build-aarch64.xml arm64/build.xml
sudo cp lwjgl-backports/patch/build-aarch32.xml armhf/build.xml
sudo cp -r lwjgl/ arm64/
sudo cp -r lwjgl/ armhf/
run: sudo bash lwjgl-backports/build_script/00-action-setup.sh
- name: ARM64:准备操作环境
run: sudo systemd-nspawn -D arm64/ bash /01-setup.sh
- name: ARM64:开始编译
Expand All @@ -33,13 +27,7 @@ jobs:
- name: ARMHF:开始编译
run: sudo systemd-nspawn -D armhf/ bash /02-build.sh
- name: 整理文件
run: |
sudo mkdir dist
sudo mv arm64/lwjgl/dist/lwjgl_platform.jar arm64/lwjgl/dist/lwjgl_platform_arm64.jar
sudo mv arm64/lwjgl/dist/liblwjgl64.so arm64/lwjgl/dist/liblwjgl_arm64.so
sudo rm arm64/lwjgl/dist/liblwjgl.so
sudo cp arm64/lwjgl/dist/* dist/
sudo cp armhf/lwjgl/dist/liblwjgl.so dist/liblwjgl_armhf.so
run: sudo bash lwjgl-backports/build_script/03-action-clear.sh
- name: 获取当前发行版本号
run: |
echo $(cat lwjgl-backports/RELEASE) >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ReleaseVersion=0.1
ReleaseVersion=0.2
21 changes: 21 additions & 0 deletions build_script/00-action-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -o errexit
set -o nounset

#复制构建脚本到操作环境
sudo cp -r lwjgl-backports/build_script/*.sh arm64/
sudo cp -r lwjgl-backports/build_script/*.sh armhf/

#复制补丁到操作环境
sudo cp lwjgl-backports/patch/build-aarch64.xml arm64/build.xml
sudo cp lwjgl-backports/patch/build-aarch32.xml armhf/build.xml

#复制源代码到操作环境
sudo cp -r lwjgl/ arm64/
sudo cp -r lwjgl/ armhf/

#下载OPENAL到操作环境
wget -O arm64/lwjgl/dist/libopenal.so https://build.lwjgl.org/stable/linux/arm64/libopenal.so
wget -O arm64/lwjgl/dist/libopenal64.so https://build.lwjgl.org/stable/linux/arm64/libopenal.so
wget -O armhf/lwjgl/dist/libopenal.so https://build.lwjgl.org/stable/linux/arm32/libopenal.so
wget -O armhf/lwjgl/dist/libopenal64.so https://build.lwjgl.org/stable/linux/arm32/libopenal.so
2 changes: 2 additions & 0 deletions build_script/01-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
set -o errexit
set -o nounset
apt update
apt install gnupg wget apt-transport-https libx11-dev libxxf86vm-dev libxt-dev libxcursor-dev libxrandr-dev -y
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -
Expand Down
4 changes: 3 additions & 1 deletion build_script/02-build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
set -o errexit
set -o nounset
cd /lwjgl
rm platform_build/linux_ant/build.xml
cp /build.xml platform_build/linux_ant/build.xml
Expand All @@ -10,4 +12,4 @@ cp libs/linux/liblwjgl.so dist/liblwjgl.so
cp libs/linux/liblwjgl.so dist/liblwjgl64.so
cp libs/lwjgl* dist/
cd dist/
jar cvf lwjgl_platform.jar liblwjgl.so liblwjgl64.so
jar cvf lwjgl_platform.jar liblwjgl.so liblwjgl64.so libopenal.so libopenal64.so
25 changes: 25 additions & 0 deletions build_script/03-action-clear.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -o errexit
set -o nounset

#从arm64复制所有纯java库
sudo mkdir dist
sudo cp arm64/lwjgl/dist/lwjgl.jar dist/
sudo cp arm64/lwjgl/dist/lwjgl_test.jar dist/
sudo cp arm64/lwjgl/dist/lwjgl_util.jar dist/
sudo cp arm64/lwjgl/dist/lwjgl_util_applet.jar dist/

#重命名与复制本地库
#arm64
sudo mv arm64/lwjgl/dist/liblwjgl64.so arm64/lwjgl/dist/liblwjgl_arm64.so
sudo mv arm64/lwjgl/dist/libopenal.so arm64/lwjgl/dist/libopenal_arm64.so

sudo cp arm64/lwjgl/dist/liblwjgl_arm64.so dist/
sudo cp arm64/lwjgl/dist/libopenal_arm64.so dist/

#armhf
sudo mv armhf/lwjgl/dist/liblwjgl.so armhf/lwjgl/dist/liblwjgl_armhf.so
sudo mv armhf/lwjgl/dist/libopenal.so armhf/lwjgl/dist/libopenal_armhf.so

sudo cp armhf/lwjgl/dist/liblwjgl_armhf.so dist/
sudo cp armhf/lwjgl/dist/libopenal_armhf.so dist/

0 comments on commit f552005

Please sign in to comment.