From c0b7c99c43709295c86e150ad126d0150107d13c Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sun, 4 Jun 2023 14:07:06 +0800 Subject: [PATCH] 7zBuilder --- wineautobuild-action-7z.sh | 67 ++++++++++++++++++++++++++++++++++++++ wineautobuild-action.sh | 1 - 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 wineautobuild-action-7z.sh diff --git a/wineautobuild-action-7z.sh b/wineautobuild-action-7z.sh new file mode 100644 index 0000000..28211f4 --- /dev/null +++ b/wineautobuild-action-7z.sh @@ -0,0 +1,67 @@ +#!/bin/bash +dpkg --add-architecture i386 +apt update +apt install sudo gpg wget dpkg-dev aria2 -y +sudo apt update +# 添加源 +sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +echo "deb-src [signed-by=/usr/share/keyrings/winehq-archive.key] https://dl.winehq.org/wine-builds/ubuntu/ focal main" > /etc/apt/sources.list.d/winehq-bionic.list +sudo apt update +# 编译 +mkdir /wine +cd /wine +#sudo apt build-dep wget -y +#sudo apt source wget +sudo apt build-dep wine -y +#sudo apt source wine +sudo apt install fakeroot p7zip-full -y +sudo apt install flex bison gettext make gcc gcc-multilib gcc-mingw-w64 libasound2-dev libasound2-dev:i386 libpulse-dev libpulse-dev:i386 libdbus-1-dev libdbus-1-dev:i386 libfontconfig1-dev libfontconfig1-dev:i386 libfreetype6-dev libfreetype6-dev:i386 libgnutls28-dev libgnutls28-dev:i386 libjpeg62-turbo-dev libjpeg62-turbo-dev:i386 libpng-dev libpng-dev:i386 libtiff-dev libtiff-dev:i386 libgl-dev libgl-dev:i386 libunwind-dev libunwind-dev:i386 libx11-dev libx11-dev:i386 libxml2-dev libxml2-dev:i386 libxslt1-dev libxslt1-dev:i386 libgstreamer1.0-dev libgstreamer1.0-dev:i386 libgstreamer-plugins-base1.0-dev libgstreamer-plugins-base1.0-dev:i386 libmpg123-dev libmpg123-dev:i386 libosmesa6-dev libosmesa6-dev:i386 libudev-dev libudev-dev:i386 libvkd3d-dev libvkd3d-dev:i386 libvulkan-dev libvulkan-dev:i386 libcapi20-dev libcapi20-dev:i386 liblcms2-dev liblcms2-dev:i386 libcups2-dev libcups2-dev:i386 libgphoto2-dev libgphoto2-dev:i386 libsane-dev libsane-dev:i386 libgsm1-dev libgsm1-dev:i386 libkrb5-dev libkrb5-dev:i386 libldap2-dev libldap2-dev:i386 samba-dev ocl-icd-opencl-dev ocl-icd-opencl-dev:i386 libpcap-dev libpcap-dev:i386 libusb-1.0-0-dev libusb-1.0-0-dev:i386 libv4l-dev libv4l-dev:i386 libopenal-dev libopenal-dev:i386 libxcomposite-dev libxcomposite-dev:i386 libxcursor-dev libxcursor-dev:i386 libxi-dev libxi-dev:i386 libxrandr-dev libxrandr-dev:i386 libxinerama-dev libxinerama-dev:i386 -y +sudo apt install flex:i386 bison:i386 qt4-qmake:i386 libfreetype6-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libxslt1-dev:i386 libxml2-dev:i386 libxrender-dev:i386 libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 freeglut3-dev:i386 prelink:i386 libasound2-dev:i386 g++-multilib gcc-multilib g++-multilib -y +# 获取数据 +url=`cat /wine-url.txt` +version=`cat /wine-version.txt` +type=`cat /wine-type.txt` +cpu=$(cat /proc/cpuinfo | grep processor | wc -l) +aria2c -x 16 -s 16 $url +tar -xvf `dirname $url` +#cd wine-$version +## 编译64位 +mkdir build64 +cd build64 +sudo apt install libpcsclite-dev libsdl2-dev samba-dev -y +../wine-$version/configure --enable-win64 +make -j$cpu +mkdir ../program +make install -j$cpu DESTDIR=../program +cd ../program +# 打7z包 +7z a ../wine-$type-$version-debian10-amd64.7z * +cd .. +rm -rfv program +## 构建 32 + 64 位(混合) +mkdir build32 +cd build32 +sudo apt install libpcsclite-dev:i386 libsdl2-dev:i386 samba-dev:i386 -y +PKG_CONFIG_PATH=/usr/lib32 ../wine-$version/configure --with-wine64=../build64 +make -j$cpu +mkdir ../program +make install -j$cpu DESTDIR=../program +cd ../build64 +make install -j$cpu DESTDIR=../program +cd ../program +# 打7z包 +7z a ../wine-$type-$version-debian10-x86_64.7z * +cd .. +rm -rfv program +## 构建纯 32 位 +mkdir build32-only +cd build32-only +../wine-$version/configure +make -j$cpu +mkdir ../program +make install -j$cpu DESTDIR=../program +# 打7z包 +7z a ../wine-$type-$version-debian10-i386.7z * +cd .. +rm -rfv program +## 移除临时文件(不写了,反正 Github Action 会自动销毁) \ No newline at end of file diff --git a/wineautobuild-action.sh b/wineautobuild-action.sh index 13382c1..a166d5f 100644 --- a/wineautobuild-action.sh +++ b/wineautobuild-action.sh @@ -6,7 +6,6 @@ sudo apt update # 添加源 sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key echo "deb-src [signed-by=/usr/share/keyrings/winehq-archive.key] https://dl.winehq.org/wine-builds/ubuntu/ focal main" > /etc/apt/sources.list.d/winehq-bionic.list -echo "deb-src http://repo.huaweicloud.com/debian buster main" > /etc/apt/sources.list.d/debian10-s.list sudo apt update # 编译 mkdir /wine