Improved CI build scripts.

This commit is contained in:
Gonzalo Exequiel Pedone 2021-08-03 12:32:54 -03:00
parent 7e74a59e1e
commit 0f9278ff7a
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF
17 changed files with 227 additions and 215 deletions

View file

@ -4,48 +4,95 @@ on: [push, pull_request]
env: env:
QTIFWVER: 4.1.1 QTIFWVER: 4.1.1
ARCH_ROOT_DATE: 2021.05.01
ARCH_ROOT_URL: https://mirror.rackspace.com/archlinux
NSIS_VERSION: 3.06.1 NSIS_VERSION: 3.06.1
DOCKERIMG: archlinux:latest
ARCH_ROOT_URL: https://mirror.rackspace.com/archlinux
NJOBS: 4
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
max-parallel: 10
fail-fast: false
matrix:
include:
- compiler: gcc
- compiler: clang
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install dependencies - name: Release build
uses: addnab/docker-run-action@v3
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gcr.io
image: ${{ env.DOCKERIMG }}
options: >-
-v ${{ github.workspace }}:/sources
-e NSIS_VERSION=${{ env.NSIS_VERSION }}
-e TARGET_ARCH=${{ matrix.target_arch }}
-e COMPILER=${{ matrix.COMPILER }}
-e DOCKERIMG=${{ env.DOCKERIMG }}
-e ARCH_ROOT_URL=${{ env.ARCH_ROOT_URL }}
-e NJOBS=${{ env.NJOBS }}
run: | run: |
cd /sources
echo
echo Install dependencies
echo
chmod +x ports/ci/linux-mingw/install_deps.sh chmod +x ports/ci/linux-mingw/install_deps.sh
./ports/ci/linux-mingw/install_deps.sh ./ports/ci/linux-mingw/install_deps.sh
- name: Release Build echo
if: ${{ startsWith(github.ref, 'refs/tags/') }} echo Release Build
run: | echo
chmod +x ports/ci/linux-mingw/build.sh chmod +x ports/ci/linux-mingw/build.sh
./ports/ci/linux-mingw/build.sh ./ports/ci/linux-mingw/build.sh
- name: Release Deploy echo
if: ${{ startsWith(github.ref, 'refs/tags/') }} echo Release Deploy
run: | echo
chmod +x ports/ci/linux-mingw/deploy.sh chmod +x ports/ci/linux-mingw/deploy.sh
./ports/ci/linux-mingw/deploy.sh ./ports/ci/linux-mingw/deploy.sh
- name: Daily Build - name: Daily build
uses: addnab/docker-run-action@v3
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
env: with:
DAILY_BUILD: 1 username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gcr.io
image: ${{ env.DOCKERIMG }}
options: >-
-v ${{ github.workspace }}:/sources
-e NSIS_VERSION=${{ env.NSIS_VERSION }}
-e TARGET_ARCH=${{ matrix.target_arch }}
-e COMPILER=${{ matrix.COMPILER }}
-e DOCKERIMG=${{ env.DOCKERIMG }}
-e ARCH_ROOT_URL=${{ env.ARCH_ROOT_URL }}
-e NJOBS=${{ env.NJOBS }}
-e DAILY_BUILD=1
run: | run: |
cd /sources
echo
echo Install dependencies
echo
chmod +x ports/ci/linux-mingw/install_deps.sh
./ports/ci/linux-mingw/install_deps.sh
echo
echo Daily Build
echo
chmod +x ports/ci/linux-mingw/build.sh chmod +x ports/ci/linux-mingw/build.sh
./ports/ci/linux-mingw/build.sh ./ports/ci/linux-mingw/build.sh
- name: Daily Deploy echo
if: ${{ !startsWith(github.ref, 'refs/tags/') }} echo Daily Deploy
env: echo
DAILY_BUILD: 1
run: |
chmod +x ports/ci/linux-mingw/deploy.sh chmod +x ports/ci/linux-mingw/deploy.sh
./ports/ci/linux-mingw/deploy.sh ./ports/ci/linux-mingw/deploy.sh
- name: Release Upload - name: Release Upload
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
with: with:
files: webcamoid-packages/* files: packages/windows-gcc/*
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Daily Build Upload - name: Daily Build Upload
@ -54,13 +101,8 @@ jobs:
with: with:
body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})" body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})"
prerelease: true prerelease: true
files: webcamoid-packages/* files: packages/windows-gcc/*
name: Daily Build name: Daily Build
tag_name: daily-build tag_name: daily-build
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Linux MinGW daily build packages
uses: actions/upload-artifact@v2
with:
name: linux-mingw-daily-build
path: webcamoid-packages/*

View file

@ -4,6 +4,7 @@ on: [push, pull_request]
env: env:
QTIFWVER: 4.1.1 QTIFWVER: 4.1.1
NJOBS: 4
jobs: jobs:
build: build:
@ -42,7 +43,7 @@ jobs:
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
with: with:
files: webcamoid-packages/* files: packages/mac/*
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Daily Build Upload - name: Daily Build Upload
@ -51,13 +52,8 @@ jobs:
with: with:
body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})" body: "${{ github.event.head_commit.message }} (commit: ${{ github.sha }})"
prerelease: true prerelease: true
files: webcamoid-packages/* files: packages/mac/*
name: Daily Build name: Daily Build
tag_name: daily-build tag_name: daily-build
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: MacOS daily build packages
uses: actions/upload-artifact@v2
with:
name: mac-daily-build
path: webcamoid-packages/*

View file

@ -2,6 +2,9 @@ name: Windows MSYS
on: [push, pull_request] on: [push, pull_request]
env:
NJOBS: 4
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
@ -9,11 +12,22 @@ jobs:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
strategy:
max-parallel: 10
fail-fast: false
matrix:
include:
- compiler: gcc
- compiler: clang
env:
COMPILER: ${{ matrix.compiler }}
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
update: true update: true
install: >- install: >-
ccache
clang
cmake cmake
git git
make make
@ -29,8 +43,3 @@ jobs:
run: ./ports/ci/windows-msys/build.sh run: ./ports/ci/windows-msys/build.sh
- name: Deploy - name: Deploy
run: ./ports/ci/windows-msys/deploy.sh run: ./ports/ci/windows-msys/deploy.sh
- name: Windows MSYS daily build packages
uses: actions/upload-artifact@v2
with:
name: windows-msys-daily-build
path: webcamoid-packages/*

View file

@ -5,6 +5,7 @@ on: [push, pull_request]
env: env:
CMAKE_GENERATOR: Visual Studio 16 2019 CMAKE_GENERATOR: Visual Studio 16 2019
PYTHON_VERSION: Python39 PYTHON_VERSION: Python39
NJOBS: 4
jobs: jobs:
build: build:
@ -18,8 +19,3 @@ jobs:
run: ports\ci\windows-vs\build.bat run: ports\ci\windows-vs\build.bat
- name: Deploy - name: Deploy
run: ports\ci\windows-vs\deploy.bat run: ports\ci\windows-vs\deploy.bat
- name: Windows MSVC daily build packages
uses: actions/upload-artifact@v2
with:
name: windows-vs-daily-build
path: webcamoid-packages/*

View file

@ -13,7 +13,7 @@ build:
environment: environment:
global: global:
PYTHON_VERSION: Python39 PYTHON_VERSION: Python39
NJOBS: 4
matrix: matrix:
- CMAKE_GENERATOR: MSYS Makefiles - CMAKE_GENERATOR: MSYS Makefiles
- CMAKE_GENERATOR: Visual Studio 16 2019 - CMAKE_GENERATOR: Visual Studio 16 2019

View file

@ -16,7 +16,7 @@ REM along with akvirtualcamera. If not, see <http://www.gnu.org/licenses/>.
REM REM
REM Web-Site: http://webcamoid.github.io/ REM Web-Site: http://webcamoid.github.io/
set INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\webcamoid-data set INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\package-data
echo. echo.
echo Building x64 virtual camera driver echo Building x64 virtual camera driver
@ -28,12 +28,13 @@ setlocal
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH% if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" ( if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
cmake ^ cmake ^
-LA ^
-S . ^ -S . ^
-B build-x64 ^ -B build-x64 ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
cmake --build build-x64 cmake --build build-x64 --parallel "%NJOBS%"
cmake --build build-x64 --target install cmake --build build-x64 --target install
) )
@ -41,13 +42,14 @@ endlocal
if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" ( if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" (
cmake ^ cmake ^
-LA ^
-S . ^ -S . ^
-B build-x64 ^ -B build-x64 ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-A x64 ^ -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
cmake --build build-x64 --config Release cmake --build build-x64 --config Release --parallel "%NJOBS%"
cmake --build build-x64 --config Release --target install cmake --build build-x64 --config Release --target install
) )
@ -61,12 +63,13 @@ setlocal
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw32\bin;C:\msys64\usr\bin;%PATH% if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw32\bin;C:\msys64\usr\bin;%PATH%
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" ( if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
cmake ^ cmake ^
-LA ^
-S . ^ -S . ^
-B build-x86 ^ -B build-x86 ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
cmake --build build-x86 cmake --build build-x86 --parallel "%NJOBS%"
cmake --build build-x86 --target install cmake --build build-x86 --target install
) )
@ -74,12 +77,13 @@ endlocal
if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" ( if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" (
cmake ^ cmake ^
-LA ^
-S . ^ -S . ^
-B build-x86 ^ -B build-x86 ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-A Win32 ^ -A Win32 ^
-DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
cmake --build build-x86 --config Release cmake --build build-x86 --config Release --parallel "%NJOBS%"
cmake --build build-x86 --config Release --target install cmake --build build-x86 --config Release --target install
) )

View file

@ -22,8 +22,8 @@ if "%PLATFORM%" == "x86" (
set PYTHON_PATH=C:\%PYTHON_VERSION%-x64 set PYTHON_PATH=C:\%PYTHON_VERSION%-x64
) )
set INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\webcamoid-data set INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\package-data
set PACKAGES_DIR=%APPVEYOR_BUILD_FOLDER%\webcamoid-packages set PACKAGES_DIR=%APPVEYOR_BUILD_FOLDER%\packages
git clone https://github.com/webcamoid/DeployTools.git git clone https://github.com/webcamoid/DeployTools.git

View file

@ -25,6 +25,8 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
pacman --noconfirm -Syyu ^ pacman --noconfirm -Syyu ^
--ignore filesystem,pacman,pacman-mirrors --ignore filesystem,pacman,pacman-mirrors
pacman --noconfirm --needed -S ^ pacman --noconfirm --needed -S ^
ccache ^
clang ^
cmake ^ cmake ^
git ^ git ^
make ^ make ^

View file

@ -18,47 +18,53 @@
# #
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
BUILDSCRIPT=dockerbuild.sh if [ "${COMPILER}" = clang ]; then
SOURCES_DIR=${PWD} COMPILER_C=clang
INSTALL_PREFIX=${SOURCES_DIR}/webcamoid-data COMPILER_CXX=clang++
else
COMPILER_C=gcc
COMPILER_CXX=g++
fi
sudo mount --bind root.x86_64 root.x86_64 if [ -z "${DISABLE_CCACHE}" ]; then
sudo mount --bind "$HOME" "root.x86_64/$HOME" EXTRA_PARAMS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache"
cat << EOF > ${BUILDSCRIPT} fi
#!/bin/sh
INSTALL_PREFIX=${PWD}/package-data-${COMPILER}
export LC_ALL=C
export HOME=$HOME
cd "${SOURCES_DIR}"
echo echo
echo "Building x64 virtual camera driver" echo "Building x64 virtual camera driver"
echo echo
mkdir build-x64 COMPILER_C=x86_64-w64-mingw32-${COMPILER_C}
COMPILER_CXX=x86_64-w64-mingw32-${COMPILER_CXX}
buildDir=build-${COMPILER}-x64
mkdir ${buildDir}
x86_64-w64-mingw32-cmake \ x86_64-w64-mingw32-cmake \
-LA \
-S . \ -S . \
-B build-x64 \ -B ${buildDir} \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
cmake --build build-x64 -DCMAKE_C_COMPILER="${COMPILER_C}" \
cmake --build build-x64 --target install -DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install
echo echo
echo "Building x86 virtual camera driver" echo "Building x86 virtual camera driver"
echo echo
mkdir build-x86 COMPILER_C=i686-w64-mingw32-${COMPILER_C}
cd build-x86 COMPILER_CXX=i686-w64-mingw32-${COMPILER_CXX}
buildDir=build-${COMPILER}-x86
mkdir ${buildDir}
i686-w64-mingw32-cmake \ i686-w64-mingw32-cmake \
-LA \
-S . \ -S . \
-B build-x86 \ -B ${buildDir} \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
cmake --build build-x86 -DCMAKE_C_COMPILER="${COMPILER_C}" \
cmake --build build-x86 --target install -DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
EOF ${EXTRA_PARAMS}
chmod +x ${BUILDSCRIPT} cmake --build ${buildDir} --parallel ${NJOBS}
sudo cp -vf ${BUILDSCRIPT} "root.x86_64/$HOME/" cmake --build ${buildDir} --target install
EXEC='sudo ./root.x86_64/bin/arch-chroot root.x86_64'
${EXEC} bash "$HOME/${BUILDSCRIPT}"
sudo umount "root.x86_64/$HOME"
sudo umount root.x86_64

View file

@ -18,54 +18,25 @@
# #
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
SOURCES_DIR=${PWD}
EXEC='sudo ./root.x86_64/bin/arch-chroot root.x86_64'
git clone https://github.com/webcamoid/DeployTools.git git clone https://github.com/webcamoid/DeployTools.git
DEPLOYSCRIPT=deployscript.sh
sudo mount --bind root.x86_64 root.x86_64
sudo mount --bind "$HOME" "root.x86_64/$HOME"
cat << EOF > package_info_strip.conf cat << EOF > package_info_strip.conf
[System] [System]
stripCmd = x86_64-w64-mingw32-strip stripCmd = x86_64-w64-mingw32-strip
EOF EOF
cat << EOF > ${DEPLOYSCRIPT}
#!/bin/sh
export LC_ALL=C
export HOME=${HOME}
export PATH="${SOURCES_DIR}/.local/bin:\$PATH"
export INSTALL_PREFIX="${SOURCES_DIR}/webcamoid-data"
export PACKAGES_DIR="${SOURCES_DIR}/webcamoid-packages"
export PYTHONPATH="${SOURCES_DIR}/DeployTools"
export BUILD_PATH="${SOURCES_DIR}/build-x64"
export WINEPREFIX=/opt/.wine export WINEPREFIX=/opt/.wine
cd "${SOURCES_DIR}" export PATH="${PWD}/.local/bin:${PATH}"
EOF export INSTALL_PREFIX="${PWD}/package-data-${COMPILER}"
export PACKAGES_DIR="${PWD}/packages/windows-${COMPILER}"
export PYTHONPATH="${PWD}/DeployTools"
export BUILD_PATH="${PWD}/build-${COMPILER}-x64"
if [ ! -z "${DAILY_BUILD}" ]; then i686-w64-mingw32-strip ${INSTALL_PREFIX}/x86/*
cat << EOF >> ${DEPLOYSCRIPT} x86_64-w64-mingw32-strip ${INSTALL_PREFIX}/x64/*
export DAILY_BUILD=1
EOF
fi
cat << EOF >> ${DEPLOYSCRIPT}
i686-w64-mingw32-strip \${INSTALL_PREFIX}/x86/*
x86_64-w64-mingw32-strip \${INSTALL_PREFIX}/x64/*
python ./DeployTools/deploy.py \ python ./DeployTools/deploy.py \
-d "\${INSTALL_PREFIX}" \ -d "${INSTALL_PREFIX}" \
-c "\${BUILD_PATH}/package_info.conf" \ -c "${BUILD_PATH}/package_info.conf" \
-c "./package_info_strip.conf" \ -c "${PWD}/package_info_strip.conf" \
-o "\${PACKAGES_DIR}" -o "${PACKAGES_DIR}"
EOF
chmod +x ${DEPLOYSCRIPT}
sudo cp -vf ${DEPLOYSCRIPT} "root.x86_64/$HOME/"
${EXEC} bash "$HOME/${DEPLOYSCRIPT}"
sudo umount "root.x86_64/$HOME"
sudo umount root.x86_64

View file

@ -18,24 +18,15 @@
# #
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
SOURCES_DIR=${PWD}
if [ ! -z "${USE_WGET}" ]; then if [ ! -z "${USE_WGET}" ]; then
export DOWNLOAD_CMD="wget -nv -c" export DOWNLOAD_CMD="wget -nv -c"
else else
export DOWNLOAD_CMD="curl --retry 10 -sS -kLOC -" export DOWNLOAD_CMD="curl --retry 10 -sS -kLOC -"
fi fi
EXEC='sudo ./root.x86_64/bin/arch-chroot root.x86_64'
# Download chroot image
archImage=archlinux-bootstrap-${ARCH_ROOT_DATE}-x86_64.tar.gz
${DOWNLOAD_CMD} "${ARCH_ROOT_URL}/iso/${ARCH_ROOT_DATE}/$archImage"
sudo tar xzf "$archImage"
# Configure mirrors # Configure mirrors
cp -vf root.x86_64/etc/pacman.conf .
cat << EOF >> pacman.conf cat << EOF >> /etc/pacman.conf
[multilib] [multilib]
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
@ -44,31 +35,24 @@ Include = /etc/pacman.d/mirrorlist
Server = https://ftp.f3l.de/~martchus/\$repo/os/\$arch Server = https://ftp.f3l.de/~martchus/\$repo/os/\$arch
Server = http://martchus.no-ip.biz/repo/arch/\$repo/os/\$arch Server = http://martchus.no-ip.biz/repo/arch/\$repo/os/\$arch
EOF EOF
sed -i 's/Required DatabaseOptional/Never/g' pacman.conf sed -i 's/Required DatabaseOptional/Never/g' /etc/pacman.conf
sed -i 's/#TotalDownload/TotalDownload/g' pacman.conf
sudo cp -vf pacman.conf root.x86_64/etc/pacman.conf
cp -vf root.x86_64/etc/pacman.d/mirrorlist . cat << EOF >> /etc/pacman.d/mirrorlist
cat << EOF >> mirrorlist
Server = ${ARCH_ROOT_URL}/\$repo/os/\$arch Server = ${ARCH_ROOT_URL}/\$repo/os/\$arch
EOF EOF
sudo cp -vf mirrorlist root.x86_64/etc/pacman.d/mirrorlist
# Install packages # Install packages
sudo mkdir -pv "root.x86_64/$HOME"
sudo mount --bind root.x86_64 root.x86_64
sudo mount --bind "$HOME" "root.x86_64/$HOME"
${EXEC} pacman-key --init pacman-key --init
${EXEC} pacman-key --populate archlinux pacman-key --populate archlinux
${EXEC} pacman -Syu \ pacman -Syu \
--noconfirm \ --noconfirm \
--ignore linux,linux-api-headers,linux-docs,linux-firmware,linux-headers,pacman --ignore linux,linux-api-headers,linux-docs,linux-firmware,linux-headers,pacman
pacman --noconfirm --needed -S \
${EXEC} pacman --noconfirm --needed -S \
ccache \ ccache \
clang \ clang \
cmake \
file \ file \
git \ git \
make \ make \
@ -78,34 +62,16 @@ ${EXEC} pacman --noconfirm --needed -S \
xorg-server-xvfb \ xorg-server-xvfb \
wine \ wine \
mingw-w64-pkg-config \ mingw-w64-pkg-config \
mingw-w64-gcc \ mingw-w64-cmake \
mingw-w64-cmake mingw-w64-gcc
# Install NSIS # Install NSIS
nsis=nsis-${NSIS_VERSION}-setup.exe nsis=nsis-${NSIS_VERSION}-setup.exe
${DOWNLOAD_CMD} "https://sourceforge.net/projects/nsis/files/NSIS%20${NSIS_VERSION:0:1}/${NSIS_VERSION}/${nsis}" ${DOWNLOAD_CMD} "https://sourceforge.net/projects/nsis/files/NSIS%20${NSIS_VERSION:0:1}/${NSIS_VERSION}/${nsis}"
if [ -e "${nsis}" ]; then if [ -e ${nsis} ]; then
INSTALLSCRIPT=installscript.sh export WINEPREFIX=/opt/.wine
cat << EOF > ${INSTALLSCRIPT} wine ./${nsis} /S
#!/bin/sh
export LC_ALL=C
export HOME=$HOME
export WINEPREFIX=/opt/.wine
cd "${SOURCES_DIR}"
wine ./${nsis} /S
EOF
chmod +x ${INSTALLSCRIPT}
sudo cp -vf ${INSTALLSCRIPT} "root.x86_64/$HOME/"
${EXEC} bash "$HOME/${INSTALLSCRIPT}"
fi fi
# Finish
sudo umount -f "root.x86_64/$HOME" || true
sudo umount -f root.x86_64 || true

View file

@ -19,13 +19,14 @@
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
SOURCES_DIR=${PWD} SOURCES_DIR=${PWD}
INSTALL_PREFIX=${SOURCES_DIR}/webcamoid-data INSTALL_PREFIX=${SOURCES_DIR}/package-data
mkdir build mkdir build
cmake \ cmake \
-LA \
-S . \ -S . \
-B build \ -B build \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
cmake --build build cmake --build build --parallel ${NJOBS}
cmake --build build --target install cmake --build build --target install

View file

@ -22,8 +22,8 @@ SOURCES_DIR=${PWD}
git clone https://github.com/webcamoid/DeployTools.git git clone https://github.com/webcamoid/DeployTools.git
export INSTALL_PREFIX="${SOURCES_DIR}/webcamoid-data" export INSTALL_PREFIX="${SOURCES_DIR}/package-data"
export PACKAGES_DIR="${SOURCES_DIR}/webcamoid-packages" export PACKAGES_DIR="${SOURCES_DIR}/packages/mac"
export PYTHONPATH="${SOURCES_DIR}/DeployTools" export PYTHONPATH="${SOURCES_DIR}/DeployTools"
export BUILD_PATH="${SOURCES_DIR}/build" export BUILD_PATH="${SOURCES_DIR}/build"
python3 ./DeployTools/deploy.py \ python3 ./DeployTools/deploy.py \

View file

@ -18,38 +18,57 @@
# #
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
SOURCES_DIR=${PWD} if [ "${COMPILER}" = clang ]; then
INSTALL_PREFIX=${SOURCES_DIR}/webcamoid-data COMPILER_C=clang
COMPILER_CXX=clang++
else
COMPILER_C=gcc
COMPILER_CXX=g++
fi
if [ -z "${DISABLE_CCACHE}" ]; then
EXTRA_PARAMS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache"
fi
INSTALL_PREFIX=${PWD}/package-data-${COMPILER}
ORIG_PATH=${PATH} ORIG_PATH=${PATH}
echo echo
echo Building x64 virtual camera driver echo "Building x64 virtual camera driver"
echo echo
mkdir build-x64
export PATH=/c/msys64/mingw64/bin:/c/msys64/usr/bin:${ORIG_PATH} export PATH=/c/msys64/mingw64/bin:/c/msys64/usr/bin:${ORIG_PATH}
buildDir=build-${COMPILER}-x64
mkdir ${buildDir}
cmake \ cmake \
-LA \
-S . \ -S . \
-B build-x64 \ -B ${buildDir} \
-G "MSYS Makefiles" \ -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
cmake --build build-x64 -DCMAKE_C_COMPILER="${COMPILER_C}" \
cmake --build build-x64 --target install -DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install
echo echo
echo Building x86 virtual camera driver echo "Building x86 virtual camera driver"
echo echo
mkdir build-x86
export PATH=/c/msys64/mingw32/bin:/c/msys64/usr/bin:${ORIG_PATH} export PATH=/c/msys64/mingw32/bin:/c/msys64/usr/bin:${ORIG_PATH}
buildDir=build-${COMPILER}-x86
mkdir ${buildDir}
cmake \ cmake \
-LA \
-S . \ -S . \
-B build-x86 \ -B ${buildDir} \
-G "MSYS Makefiles" \ -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
cmake --build build-x86 -DCMAKE_C_COMPILER="${COMPILER_C}" \
cmake --build build-x86 --target install -DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \
${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install

View file

@ -18,22 +18,20 @@
# #
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
SOURCES_DIR=${PWD}
INSTALL_PREFIX=${SOURCES_DIR}/webcamoid-data
INSTALL_PREFIX_W=$(cygpath -w "${INSTALL_PREFIX}")
PACKAGES_DIR=${SOURCES_DIR}/webcamoid-packages
PACKAGES_DIR_W=$(cygpath -w "${PACKAGES_DIR}")
git clone https://github.com/webcamoid/DeployTools.git git clone https://github.com/webcamoid/DeployTools.git
export PATH="/c/Program Files (x86)/NSIS:${PATH}"
export INSTALL_PREFIX="${PWD}/package-data-${COMPILER}"
export INSTALL_PREFIX_W=$(cygpath -w "${INSTALL_PREFIX}")
export PACKAGES_DIR="${PWD}/packages/windows-${COMPILER}"
export PACKAGES_DIR_W=$(cygpath -w "${PACKAGES_DIR}")
export PYTHONPATH="${PWD}/DeployTools"
export BUILD_PATH="${PWD}/build-${COMPILER}-x64"
export BUILD_PATH_W=$(cygpath -w "${BUILD_PATH}")
/c/msys64/mingw32/bin/strip "${INSTALL_PREFIX}"/x86/* /c/msys64/mingw32/bin/strip "${INSTALL_PREFIX}"/x86/*
/c/msys64/mingw64/bin/strip "${INSTALL_PREFIX}"/x64/* /c/msys64/mingw64/bin/strip "${INSTALL_PREFIX}"/x64/*
export PATH="/c/Program Files (x86)/NSIS:${PATH}"
export PYTHONPATH=${SOURCES_DIR}/DeployTools
BUILD_PATH=${SOURCES_DIR}/build-x64
BUILD_PATH_W=$(cygpath -w "${BUILD_PATH}")
python DeployTools/deploy.py \ python DeployTools/deploy.py \
-d "${INSTALL_PREFIX_W}" \ -d "${INSTALL_PREFIX_W}" \
-c "${BUILD_PATH_W}/package_info.conf" \ -c "${BUILD_PATH_W}/package_info.conf" \

View file

@ -17,7 +17,7 @@ REM
REM Web-Site: http://webcamoid.github.io/ REM Web-Site: http://webcamoid.github.io/
set SOURCES_DIR=%cd% set SOURCES_DIR=%cd%
set INSTALL_PREFIX=%SOURCES_DIR%\webcamoid-data set INSTALL_PREFIX=%SOURCES_DIR%\package-data
echo. echo.
echo Building x64 virtual camera driver echo Building x64 virtual camera driver
@ -26,13 +26,14 @@ echo.
mkdir build-x64 mkdir build-x64
cmake ^ cmake ^
-LA ^
-S . ^ -S . ^
-B build-x64 ^ -B build-x64 ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-A x64 ^ -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
cmake --build build-x64 --config Release cmake --build build-x64 --config Release --parallel "%NJOBS%"
cmake --build build-x64 --config Release --target install cmake --build build-x64 --config Release --target install
echo. echo.
@ -42,11 +43,12 @@ echo.
mkdir build-x86 mkdir build-x86
cmake ^ cmake ^
-LA ^
-S . ^ -S . ^
-B build-x86 ^ -B build-x86 ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-A Win32 ^ -A Win32 ^
-DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%"
cmake --build build-x86 --config Release cmake --build build-x86 --config Release --parallel "%NJOBS%"
cmake --build build-x86 --config Release --target install cmake --build build-x86 --config Release --target install

View file

@ -17,8 +17,8 @@ REM
REM Web-Site: http://webcamoid.github.io/ REM Web-Site: http://webcamoid.github.io/
set SOURCES_DIR=%cd% set SOURCES_DIR=%cd%
set INSTALL_PREFIX=%SOURCES_DIR%\webcamoid-data set INSTALL_PREFIX=%SOURCES_DIR%\package-data
set PACKAGES_DIR=%SOURCES_DIR%\webcamoid-packages set PACKAGES_DIR=%SOURCES_DIR%\packages\windows
git clone https://github.com/webcamoid/DeployTools.git git clone https://github.com/webcamoid/DeployTools.git