Skip to content

Commit 906f992

Browse files
Merge branch 'develop' into Feat/MergeAllChannelToStdout
2 parents 40132f1 + 5db78eb commit 906f992

11 files changed

+484
-1
lines changed

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build package
2+
3+
on:
4+
push:
5+
release:
6+
types:
7+
- created
8+
9+
env:
10+
BUILD_OUTPUT_PATH: build_output
11+
12+
# Prevent running multiple-runners per workflow-file per event-name per branch per github-user (/ref)
13+
# Ex. multiple changes are commited on the same PR/branch in a very short timespan,
14+
# cancel the previous runner (as it's not the latest anymore)
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-${{ github.actor }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build_installer:
21+
permissions:
22+
contents: write
23+
runs-on: windows-2019
24+
steps:
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
- name: download packages
27+
shell: bash
28+
run: ./scripts/package-download.sh
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
- run: mkdir -p ${{env.BUILD_OUTPUT_PATH}}
32+
33+
- shell: cmd
34+
run: .\scripts\installer-build.bat
35+
36+
- uses: actions/upload-artifact@v4
37+
id: artifact-upload-step
38+
with:
39+
name: qif-artifact
40+
path: build_output/
41+
- name: Output artifact url
42+
run: echo 'Artifact url is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
43+
44+
release_package:
45+
needs: build_installer
46+
if: github.event_name == 'release'
47+
permissions:
48+
contents: write
49+
runs-on: ubuntu-24.04
50+
steps:
51+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
- run: mkdir -p dist
53+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
54+
with:
55+
name: qif-artifact
56+
path: dist/
57+
- run: cd dist; zip -r ../qif-package.zip .
58+
- run:
59+
gh release upload ${{ github.event.release.tag_name }}
60+
qif-package.zip
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

installerfw.pri

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ isEqual(IFW_DISABLE_TRANSLATIONS, 1) {
1919
}
2020

2121
# Still default to LZMA SDK if nothing is defined by user
22+
CONFIG += libarchive
2223
!contains(CONFIG, libarchive|lzmasdk): CONFIG += lzmasdk
2324

2425
CONFIG(lzmasdk) {
@@ -115,6 +116,14 @@ INCLUDEPATH += \
115116
$$IFW_SOURCE_TREE/src/libs/ifwtools \
116117
$$IFW_SOURCE_TREE/src/libs/installer
117118

119+
INCLUDEPATH += $$PWD/package/bzip2/include
120+
INCLUDEPATH += $$PWD/package/xz/include
121+
INCLUDEPATH += $$PWD/package/zlib/include
122+
123+
IFW_BZIP2_LIBRARY = $$PWD/package/bzip2/lib/bz2_static.lib
124+
IFW_LZMA_LIBRARY = $$PWD/package/xz/lib/lzma.lib
125+
IFW_ZLIB_LIBRARY = $$PWD/package/zlib/lib/zlibstatic.lib
126+
118127
CONFIG(libarchive): INCLUDEPATH += $$IFW_SOURCE_TREE/src/libs/3rdparty/libarchive
119128

120129
CONFIG(lzmasdk) {
@@ -144,6 +153,10 @@ macx:LIBS += -framework Carbon -framework Security
144153
contains(QT_CONFIG, shared): CONFIG += shared
145154
}
146155

156+
CONFIG += static
157+
QMAKE_CFLAGS_RELEASE += -MT
158+
QMAKE_CXXFLAGS_RELEASE += -MT
159+
147160
QT += uitools core-private
148161
CONFIG(static, static|shared) {
149162
win32:lessThan(QT_MAJOR_VERSION, 6):QT += winextras

scripts/installer-build.bat

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@echo on
2+
SetLocal EnableDelayedExpansion
3+
REM set msvc env
4+
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
5+
6+
REM set env path
7+
set path=%path%;%~dp0..\package\qt-static-6.6.0\bin
8+
set path=%path%;%~dp0..\package\jom
9+
10+
REM qmake
11+
qmake -v
12+
qmake .\installerfw.pro -spec win32-msvc "CONFIG+=qtquickcompiler" -o %~dp0..\build_output
13+
14+
REM jom
15+
cd build_output
16+
jom.exe clean
17+
jom.exe qmake_all
18+
jom.exe -j4 -f Makefile
19+
EndLocal

scripts/package-download.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
set -e # Error handling mechanism inside this script
3+
4+
ROOT=$(dirname "$(dirname "${BASH_SOURCE[@]}")")
5+
PKG="$ROOT/package"
6+
7+
REPO="barcoopensource/di-qif-helper"
8+
VERSION="1.0.1"
9+
QT_STAT_ASSET="static-qt-660.zip"
10+
BZIP2_ASSET="bzip2.zip"
11+
XZ_ASSET="xz.zip"
12+
ZLIB_ASSET="zlib.zip"
13+
14+
QT_STAT_PKG="$PKG/qt-static-6.6.0"
15+
QT_JOM_PKG="$PKG/jom"
16+
BZIP2_PKG="$PKG/bzip2"
17+
XZ_PKG="$PKG/xz"
18+
ZLIB_PKG="$PKG/zlib"
19+
20+
echo "Cleanup previous build"
21+
rm -rf "$QT_STAT_PKG"
22+
rm -rf "$QT_JOM_PKG"
23+
rm -rf "$BZIP2_PKG"
24+
rm -rf "$XZ_PKG"
25+
rm -rf "$ZLIB_PKG"
26+
mkdir -p "$PKG"
27+
28+
29+
echo "Fetching jom package"
30+
curl -L -o "$QT_JOM_PKG.zip" "https://download.qt.io/official_releases/jom/jom.zip"
31+
32+
echo "Fetching Qt_Static-6.6.0 package"
33+
gh release download --repo "$REPO" "$VERSION" \
34+
--pattern "$QT_STAT_ASSET" --output "$QT_STAT_PKG.zip"
35+
36+
echo "Fetching bzip2 package"
37+
gh release download --repo "$REPO" "$VERSION" \
38+
--pattern "$BZIP2_ASSET" --output "$BZIP2_PKG.zip"
39+
40+
echo "Fetching xz package"
41+
gh release download --repo "$REPO" "$VERSION" \
42+
--pattern "$XZ_ASSET" --output "$XZ_PKG.zip"
43+
44+
echo "Fetching zlib package"
45+
gh release download --repo "$REPO" "$VERSION" \
46+
--pattern "$ZLIB_ASSET" --output "$ZLIB_PKG.zip"
47+
48+
echo "Unzipping packages"
49+
unzip "$QT_STAT_PKG.zip" -d "$QT_STAT_PKG"
50+
unzip "$QT_JOM_PKG.zip" -d "$QT_JOM_PKG"
51+
unzip "$BZIP2_PKG.zip" -d "$BZIP2_PKG"
52+
unzip "$XZ_PKG.zip" -d "$XZ_PKG"
53+
unzip "$ZLIB_PKG.zip" -d "$ZLIB_PKG"

src/libs/installer/commandlineparser.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,33 @@ CommandLineParser::CommandLineParser()
120120
<< CommandLineOptions::scNoProxyShort << CommandLineOptions::scNoProxyLong,
121121
QLatin1String("Do not use system proxy.")));
122122

123+
// Starting mode options
124+
addOption(QCommandLineOption(QStringList()
125+
<< CommandLineOptions::scManualProxyShort << CommandLineOptions::scManualProxyLong,
126+
QLatin1String("Use manual proxy.")));
127+
128+
// Custom Proxy options
129+
addOption(QCommandLineOption(QStringList()
130+
<< CommandLineOptions::scHttpProxyHostNameShort << CommandLineOptions::scHttpProxyHostNameLong,
131+
QLatin1String("Use Http proxy."),
132+
QLatin1String("ProxyName")));
133+
addOption(QCommandLineOption(QStringList()
134+
<< CommandLineOptions::scFtpProxyHostNameShort << CommandLineOptions::scFtpProxyHostNameLong,
135+
QLatin1String("Use Ftp proxy."),
136+
QLatin1String("ProxyName")));
137+
addOption(QCommandLineOption(QStringList()
138+
<< CommandLineOptions::scPortIdShort << CommandLineOptions::scPortIdLong,
139+
QLatin1String("Port id."),
140+
QLatin1String("PortId")));
141+
addOption(QCommandLineOption(QStringList()
142+
<< CommandLineOptions::scProxyUserNameShort << CommandLineOptions::scProxyUserNameLong,
143+
QLatin1String("Proxy Username."),
144+
QLatin1String("Username")));
145+
addOption(QCommandLineOption(QStringList()
146+
<< CommandLineOptions::scProxyPasswordShort << CommandLineOptions::scProxyPasswordLong,
147+
QLatin1String("Proxy password."),
148+
QLatin1String("Password")));
149+
123150
// Starting mode options
124151
addOption(QCommandLineOption(QStringList()
125152
<< CommandLineOptions::scStartUpdaterShort << CommandLineOptions::scStartUpdaterLong,

src/libs/installer/constants.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,20 @@ static const QLatin1String scSystemProxyShort("sp");
235235
static const QLatin1String scSystemProxyLong("system-proxy");
236236
static const QLatin1String scNoProxyShort("np");
237237
static const QLatin1String scNoProxyLong("no-proxy");
238+
static const QLatin1String scManualProxyShort("mp");
239+
static const QLatin1String scManualProxyLong("manual-proxy");
240+
241+
// Custom Proxy options
242+
static const QLatin1String scHttpProxyHostNameShort("hph");
243+
static const QLatin1String scHttpProxyHostNameLong("http-proxy-host");
244+
static const QLatin1String scFtpProxyHostNameShort("fph");
245+
static const QLatin1String scFtpProxyHostNameLong("ftp-proxy-host");
246+
static const QLatin1String scPortIdShort("pi");
247+
static const QLatin1String scPortIdLong("port-id");
248+
static const QLatin1String scProxyUserNameShort("un");
249+
static const QLatin1String scProxyUserNameLong("user-name");
250+
static const QLatin1String scProxyPasswordShort("pp");
251+
static const QLatin1String scProxyPasswordLong("proxy-password");
238252

239253
// Starting mode options
240254
static const QLatin1String scStartUpdaterShort("su");

0 commit comments

Comments
 (0)