Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: msys2 dev-latest
on: [workflow_dispatch]
#on:
# push:
# branches:
# - dev
on:
workflow_dispatch:
inputs:
use_ucrt:
description: "Use UCRT64 instead of MINGW64?"
type: choice
default: 'false'
options:
- 'true'
- 'false'

jobs:
build:
runs-on: windows-latest
Expand All @@ -13,27 +19,28 @@ jobs:
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
msystem: ${{ inputs.use_ucrt == 'true' && 'UCRT64' || 'MINGW64' }}
update: true
install: git p7zip

- uses: actions/checkout@v4
with:
with:
#ref: dev
fetch-depth: 0

- id: build
name: CI-Build
env:
USE_UCRT: ${{ inputs.use_ucrt == 'true' && '1' || '0' }}
run: |
export BUILD_NAME="qimgv-x64_$(git describe --tags)"
export BUILD_NAME="qimgv-$([[ "$USE_UCRT" == 1 ]] && echo ucrt-)x64_$(git describe --tags)"
echo "build_name=${BUILD_NAME}" >> $GITHUB_OUTPUT
echo "build_file_name=${BUILD_NAME}.7z" >> $GITHUB_OUTPUT
./scripts/build-qimgv.sh
pwd
ls -al
echo "running: 7z a qimgv-x64.7z ./${BUILD_NAME}"
7z a qimgv-x64.7z ./${BUILD_NAME}

- uses: actions/upload-artifact@v4
with:
name: qimgv-build
Expand All @@ -49,7 +56,7 @@ jobs:
steps:
#- run: echo "${{ needs.build.outputs.build_name }}"
- uses: actions/download-artifact@v4
with:
with:
name: qimgv-build

- name: Rename archive
Expand Down
14 changes: 10 additions & 4 deletions scripts/build-qimgv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ mkdir -p $BUILD_DIR

# ------------------------------------------------------------------------------
echo "UPDATING DEPENDENCY LIST"
wget --progress=dot:mega -O $BUILD_DIR/msys2-build-deps.txt https://raw.githubusercontent.com/easymodo/qimgv-deps-bin/main/msys2-build-deps.txt
wget --progress=dot:mega -O $BUILD_DIR/msys2-dll-deps.txt https://raw.githubusercontent.com/easymodo/qimgv-deps-bin/main/msys2-dll-deps.txt
if [[ -f "$PWD/msys2-build-deps.txt" ]]
then cp "$PWD/msys2-build-deps.txt" "$BUILD_DIR/msys2-build-deps.txt"
else wget --progress=dot:mega -O "$BUILD_DIR/msys2-build-deps.txt" https://raw.githubusercontent.com/easymodo/qimgv-deps-bin/main/msys2-build-deps.txt
fi
if [[ -f "$PWD/msys2-dll-deps.txt" ]]
then cp "$PWD/msys2-dll-deps.txt" "$BUILD_DIR/msys2-dll-deps.txt"
else wget --progress=dot:mega -O "$BUILD_DIR/msys2-dll-deps.txt" https://raw.githubusercontent.com/easymodo/qimgv-deps-bin/main/msys2-dll-deps.txt
fi

# ------------------------------------------------------------------------------
echo "INSTALLING MSYS2 BUILD DEPS"
MSYS_DEPS=$(cat $BUILD_DIR/msys2-build-deps.txt | sed 's/\n/ /')
MSYS_DEPS=$(cat $BUILD_DIR/msys2-build-deps.txt | sed "$(echo 's/\n/ /;' $([[ "$USE_UCRT" == 1 ]] && echo s/w64-x86_64/w64-ucrt-x86_64/))")
pacman -S $MSYS_DEPS --noconfirm --needed

# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -165,7 +171,7 @@ mingw32-make -j4
echo "PACKAGING"
# 0 - prepare dir
cd $SRC_DIR
BUILD_NAME=qimgv-x64_$(git describe --tags)
BUILD_NAME=qimgv-$([[ "$USE_UCRT" == 1 ]] && echo ucrt-)x64_$(git describe --tags)
PACKAGE_DIR=$SRC_DIR/$BUILD_NAME
rm -rf $PACKAGE_DIR
mkdir $PACKAGE_DIR
Expand Down