aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-04-30 18:30:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-04-30 18:30:36 -0400
commit3565aad630864ecdbe53fdaa501ea708555b3c7c (patch)
treec743e4ad0bad39ebdb2f514c7cc52d34a257ebbe /.github/workflows
parent1fdc150116cad39aae5c5da407c3312b47a59e3a (diff)
New upstream version 3.4.4+dfsg.upstream/3.4.4+dfsg
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lin_release.yml169
-rw-r--r--.github/workflows/mac_release.yml159
-rw-r--r--.github/workflows/remove_old_artifacts.yml19
-rw-r--r--.github/workflows/sandbox_w64.yml105
-rw-r--r--.github/workflows/tests.yml42
-rw-r--r--.github/workflows/update_messages.yml67
-rw-r--r--.github/workflows/win32_release.yml264
-rw-r--r--.github/workflows/win64_release.yml265
-rw-r--r--.github/workflows/win_release.yml157
9 files changed, 1022 insertions, 225 deletions
diff --git a/.github/workflows/lin_release.yml b/.github/workflows/lin_release.yml
index b95453c..2f6145a 100644
--- a/.github/workflows/lin_release.yml
+++ b/.github/workflows/lin_release.yml
@@ -1,42 +1,86 @@
env:
QT_VERSION: '5.15.2'
TCL_VERSION: '8.6'
- SQLITE_VERSION: '3350400'
- SQLITE_RELEASE_YEAR: '2021'
+ SQLITE_VERSION: '3410200'
+ SQLITE_RELEASE_YEAR: '2023'
+ PYTHON_VERSION: '3.9'
PORTABLE_DIR: ${{ github.workspace }}/output/portable/SQLiteStudio
+ INSTALLBUILDER_DIR: ../ib
+ INSTALLBUILDER_URL: https://releases.bitrock.com/installbuilder/installbuilder-enterprise-23.1.0-linux-x64-installer.run
name: Linux release build
on:
+ workflow_dispatch:
+ inputs:
+ use_ccache:
+ description: 'Use ccache (for workflow debugging only!)'
+ required: false
+ type: boolean
+ schedule:
+ - cron: '30 3 * * 1' # run at 3:30 AM UTC every Monday
repository_dispatch:
types: [lin_release]
jobs:
build:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
steps:
- - name: Cache Qt
- id: cache-qt
- uses: actions/cache@v1
+ - uses: actions/setup-python@v4
with:
- path: ${{ github.workspace }}/../Qt
- key: ${{ runner.os }}-Qt-${{ env.QT_VERSION }}-Linux-Cache
-
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x64'
+
+ - name: Qt installation dir
+ id: qt-installation-dir
+ run: echo "DIR=$(readlink -f ${{ github.workspace }}/..)" >> $GITHUB_OUTPUT
+
- name: Install Qt
- uses: jurplel/install-qt-action@v2
+ uses: jurplel/install-qt-action@v3
with:
- cached: ${{ steps.cache-qt.outputs.cache-hit }}
+ cache: true
version: ${{ env.QT_VERSION }}
host: 'linux'
- dir: '${{ github.workspace }}/..'
- modules: 'qtscript'
-
+ dir: '${{ steps.qt-installation-dir.DIR }}'
+ aqtversion: '==3.0.*'
+ py7zrversion: '==0.20.*'
+ setup-python: 'false'
+ extra: '--external 7z'
+
+ - name: Install the InstalBuilder
+ shell: bash
+ run: |
+ curl -L ${{ env.INSTALLBUILDER_URL }} --output ib.run
+ chmod +x ib.run
+ ./ib.run --mode unattended --prefix ${{ env.INSTALLBUILDER_DIR }}
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder --version
+ echo "INSTALLER_SRC_PREFIX=$(pwd)" >> $GITHUB_ENV
+ echo "INSTALLER_BIN_PREFIX=${{ env.PORTABLE_DIR }}" >> $GITHUB_ENV
+
- name: Clone repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch }}
+ - name: Pre-download SQLite vanilla sourcecode
+ shell: bash
+ run: |
+ cd ..
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-src-$SQLITE_VERSION.zip --output sqlite-src-$SQLITE_VERSION.zip
+
+ - name: Prepare ccache
+ if: inputs.use_ccache || false
+ uses: hendrikmuhs/ccache-action@v1.2.8
+ with:
+ key: lin_release
+ max-size: "24M"
+
+ - name: Configure ccache
+ if: inputs.use_ccache || false
+ run: |
+ echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
+
- name: Install SQLite3
run: |
sudo rm -f /usr/lib/libsqlite* /usr/local/lib/libsqlite* /usr/include/sqlite* /usr/local/include/sqlite* /usr/lib/x86_64-linux-gnu/libsqlite*
@@ -60,29 +104,63 @@ jobs:
sudo cp -P libsqlite3.so* /usr/local/lib/
sudo cp *.h /usr/local/include/
+ - name: Compile additional SQLite3 extensions
+ shell: bash
+ run: |
+ cd ..
+ mkdir ext
+ unzip sqlite-src-$SQLITE_VERSION.zip
+ cd sqlite-src-$SQLITE_VERSION/ext
+ FLAGS="-ldl -Os -fpic -shared -Imisc -I/usr/local/include -L/usr/local/lib -lsqlite3"
+ for f in compress; do
+ echo "gcc misc/$f.c $FLAGS -lz -o ../../ext/$f.so"
+ gcc misc/$f.c $FLAGS -lz -o ../../ext/$f.so
+ done
+ for f in csv decimal eval ieee754 percentile rot13 series sqlar uint uuid zorder; do
+ echo "gcc misc/$f.c $FLAGS -o ../../ext/$f.so"
+ gcc misc/$f.c $FLAGS -o ../../ext/$f.so
+ done
+ for f in icu; do
+ echo "gcc icu/$f.c $FLAGS $(pkg-config --libs --cflags icu-uc icu-io) -o ../../ext/$f.so"
+ gcc icu/$f.c $FLAGS `pkg-config --libs --cflags icu-uc icu-io` -o ../../ext/$f.so
+ done
+ ls -l ../../ext/
+
- name: Install Tcl
run: sudo apt-get install -qq libtcl$TCL_VERSION tcl$TCL_VERSION-dev
-
+
- name: Install other tools/dependencies
run: |
- sudo apt install libreadline-dev libncurses5-dev patchelf
+ sudo apt install libreadline-dev libncurses5-dev patchelf chrpath
echo "${{ github.workspace }}/../Qt/${{ env.QT_VERSION }}/gcc_64/bin" >> $GITHUB_PATH
-
+
- name: Prepare output dir
run: mkdir output output/build output/build/Plugins
-
+
- name: Compile SQLiteStudio3
working-directory: output/build
run: |
- qmake CONFIG+=portable ../../SQLiteStudio3
+ qmake \
+ $([ ${{ inputs.use_ccache || false }} = false ] || echo "CONFIG+=ccache") \
+ CONFIG+=portable \
+ ../../SQLiteStudio3
make -j 2
-
+
- name: Compile Plugins
working-directory: output/build/Plugins
run: |
- qmake CONFIG+=portable ../../../Plugins
- make -j 2
-
+ qmake \
+ $([ ${{ inputs.use_ccache || false }} = false ] || echo "CONFIG+=ccache") \
+ CONFIG+=portable \
+ "INCLUDEPATH+=$pythonLocation/include/python$PYTHON_VERSION" "LIBS += -L$pythonLocation/lib" \
+ ../../../Plugins
+ make -j 1
+
+ - name: Copy SQLite extensions to output dir
+ shell: bash
+ run: |
+ cp -R ../ext output/SQLiteStudio/extensions
+
- name: Prepare portable dir
working-directory: output
run: |
@@ -93,6 +171,20 @@ jobs:
working-directory: ${{ env.PORTABLE_DIR }}
run: cp -P /usr/local/lib/libsqlite3.so* lib/
+ - name: Copy SQLCipher's libcrypto to portable dir
+ working-directory: ${{ env.PORTABLE_DIR }}
+ run: |
+ LIBCRYPTO=$(ldd plugins/libDbSqliteCipher.so | grep crypto | awk '{print $3}')
+ REAL_LIBCRYPTO=$(readlink -e $LIBCRYPTO)
+ cp -P $REAL_LIBCRYPTO lib/$(basename -- $LIBCRYPTO)
+
+ - name: Copy Qt's libcrypto and libssl to portable dir (#4577)
+ run: |
+ wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
+ dpkg-deb -xv libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb .
+ cp ./usr/lib/x86_64-linux-gnu/libssl.so.1.1 ${{ env.PORTABLE_DIR }}/lib/
+ cp ./usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ${{ env.PORTABLE_DIR }}/lib/
+
- name: Copy Qt to portable dir
working-directory: ${{ env.PORTABLE_DIR }}
run: |
@@ -102,7 +194,7 @@ jobs:
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Gui.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Network.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5PrintSupport.so* lib/
- cp -P ${{ env.Qt5_Dir }}/lib/libQt5Script.so* lib/
+ cp -P ${{ env.Qt5_Dir }}/lib/libQt5Qml.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Widgets.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Xml.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Svg.so* lib/
@@ -114,7 +206,7 @@ jobs:
- name: Copy Qt plugins to portable dir
working-directory: ${{ env.PORTABLE_DIR }}
run: |
- mkdir platforms imageformats iconengines printsupport platformthemes
+ mkdir platforms imageformats iconengines printsupport platformthemes platforminputcontexts
cp -P ${{ env.Qt5_Dir }}/plugins/platforms/libqxcb.so platforms/libqxcb.so
cp -P ${{ env.Qt5_Dir }}/plugins/imageformats/libqgif.so imageformats/libqgif.so
cp -P ${{ env.Qt5_Dir }}/plugins/imageformats/libqicns.so imageformats/libqicns.so
@@ -126,6 +218,7 @@ jobs:
cp -P ${{ env.Qt5_Dir }}/plugins/iconengines/libqsvgicon.so iconengines/libqsvgicon.so
cp -P ${{ env.Qt5_Dir }}/plugins/printsupport/libcupsprintersupport.so printsupport/libcupsprintersupport.so
cp -P ${{ env.Qt5_Dir }}/plugins/platformthemes/libqgtk3.so platformthemes/libqgtk3.so
+ cp -P ${{ env.Qt5_Dir }}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so platforminputcontexts/libcomposeplatforminputcontextplugin.so
- name: Fix dependency paths
working-directory: ${{ env.PORTABLE_DIR }}
@@ -140,6 +233,12 @@ jobs:
chrpath -l sqlitestudiocli
- name: Final preparations for packaging
+ run: |
+ mkdir "${{ env.PORTABLE_DIR }}"/assets
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio_256.png "${{ env.PORTABLE_DIR }}"/assets/appicon.png
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.svg "${{ env.PORTABLE_DIR }}"/assets/appicon.svg
+
+ - name: Final preparations for packaging
working-directory: ${{ env.PORTABLE_DIR }}
run: |
cp `ldd sqlitestudiocli | grep readline | awk '{print $3}'` lib/
@@ -160,8 +259,26 @@ jobs:
pwd
ls -l
+ - name: Create installer package
+ shell: bash
+ env:
+ IB_LICENSE: ${{ secrets.INSTALLER_LICENSE }}
+ run: |
+ echo "$IB_LICENSE" > lic.xml
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder build SQLiteStudio-installer.xml \
+ --license lic.xml \
+ --setvars project.outputDirectory=$(pwd) \
+ --setvars project.version=$SQLITESTUDIO_VERSION
+ ls -l
+
- name: Upload package artifact
uses: actions/upload-artifact@v1
with:
name: sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.tar.xz
path: output/portable/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.tar.xz
+
+ - name: Upload installer artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-linux-x64-installer.run
+ path: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-linux-x64-installer.run
diff --git a/.github/workflows/mac_release.yml b/.github/workflows/mac_release.yml
index 109b31b..3ba4f25 100644
--- a/.github/workflows/mac_release.yml
+++ b/.github/workflows/mac_release.yml
@@ -1,19 +1,31 @@
env:
QT_VERSION: '5.15.2'
TCL_VERSION: '8.6'
- SQLITE_VERSION: '3350400'
- SQLITE_RELEASE_YEAR: '2021'
+ SQLITE_VERSION: '3410200'
+ SQLITE_RELEASE_YEAR: '2023'
+ PYTHON_VERSION: '3.9'
+ ICU_VERSION: '72.1'
PORTABLE_DIR: ${{ github.workspace }}/output/portable/SQLiteStudio
+ INSTALLBUILDER_DIR: ../ib
+ INSTALLBUILDER_URL: https://releases.bitrock.com/installbuilder/installbuilder-enterprise-23.1.0-osx-installer.dmg
-name: MaxOSX release build
+name: MacOSX release build
on:
+ workflow_dispatch:
+ inputs:
+ use_ccache:
+ description: 'Use ccache (for workflow debugging only!)'
+ required: false
+ type: boolean
+ schedule:
+ - cron: '0 3 * * 1' # run at 3 AM UTC every Monday
repository_dispatch:
types: [mac_release]
jobs:
build:
- runs-on: macos-latest
+ runs-on: macos-11
steps:
# - name: Debug
@@ -24,27 +36,54 @@ jobs:
# ls -l /usr/local/opt/openssl/include/
# ls -l /usr/local/opt/expat/include
- - name: Cache Qt
- id: cache-qt
- uses: actions/cache@v1
- with:
- path: ${{ github.workspace }}/../Qt
- key: ${{ runner.os }}-Qt-${{ env.QT_VERSION }}-Mac-Cache
-
+ - name: Qt installation dir
+ id: qt-installation-dir
+ run: echo "DIR=$(readlink -f ${{ github.workspace }}/..)" >> $GITHUB_OUTPUT
+
- name: Install Qt
- uses: jurplel/install-qt-action@v2
+ uses: jurplel/install-qt-action@v3
with:
- cached: ${{ steps.cache-qt.outputs.cache-hit }}
+ cache: true
version: ${{ env.QT_VERSION }}
host: 'mac'
- dir: '${{ github.workspace }}/..'
- modules: 'qtscript'
-
+ dir: '${{ steps.qt-installation-dir.DIR }}'
+ aqtversion: '==3.0.*'
+ py7zrversion: '==0.20.*'
+ setup-python: 'false'
+ extra: '--external 7z'
+
+ - name: Install the InstalBuilder
+ shell: bash
+ run: |
+ curl -L ${{ env.INSTALLBUILDER_URL }} --output ib.dmg
+ hdiutil attach ib.dmg
+ /Volumes/InstallBuilder\ Enterprise/*.app/Contents/MacOS/installbuilder.sh --mode unattended --prefix ${{ env.INSTALLBUILDER_DIR }}
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder --version
+ echo "INSTALLER_SRC_PREFIX=$(pwd)" >> $GITHUB_ENV
+ echo "INSTALLER_BIN_PREFIX=/Volumes/SQLiteStudio" >> $GITHUB_ENV
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x64'
+
- name: Clone repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch }}
+ - name: Prepare ccache
+ if: inputs.use_ccache || false
+ uses: hendrikmuhs/ccache-action@v1.2.8
+ with:
+ key: mac_release
+ max-size: "24M"
+
+ - name: Configure ccache
+ if: inputs.use_ccache || false
+ run: |
+ echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
+
- name: Install SQLite3
run: |
wget http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-amalgamation-$SQLITE_VERSION.zip
@@ -68,39 +107,109 @@ jobs:
sudo cp *.h /usr/local/include/
echo "DYLD_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
+ - name: Install extension dependencies
+ run: |
+ brew tap-new $USER/local-tap
+ brew extract --version=$ICU_VERSION icu4c $USER/local-tap
+ brew install icu4c@$ICU_VERSION
+ echo ICU_FLAGS="$(PKG_CONFIG_PATH="/usr/local/opt/icu4c@$ICU_VERSION/lib/pkgconfig" pkg-config --libs --cflags icu-uc icu-io)" \
+ >> $GITHUB_ENV
+
+ - name: Compile additional SQLite3 extensions
+ shell: bash
+ run: |
+ cd ..
+ mkdir ext
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-src-$SQLITE_VERSION.zip --output sqlite-src-$SQLITE_VERSION.zip
+ ls -l
+ unzip sqlite-src-$SQLITE_VERSION.zip
+ ls -l
+ cd sqlite-src-$SQLITE_VERSION/ext
+ ls -l
+ FLAGS="-ldl -Os -fpic -shared -I/usr/local/include -L/usr/local/lib -lsqlite3"
+ for f in compress sqlar; do
+ echo "gcc misc/$f.c -Imisc $FLAGS -lz -o ../../ext/$f.dylib"
+ gcc misc/$f.c -Imisc $FLAGS -lz -o ../../ext/$f.dylib
+ done
+ for f in csv decimal eval ieee754 percentile rot13 series uint uuid zorder; do
+ echo "gcc misc/$f.c -Imisc $FLAGS -o ../../ext/$f.dylib"
+ gcc misc/$f.c -Imisc $FLAGS -o ../../ext/$f.dylib
+ done
+ for f in icu; do
+ echo "gcc icu/$f.c -Iicu $ICU_FLAGS $FLAGS -o ../../ext/$f.dylib"
+ gcc icu/$f.c -Iicu $ICU_FLAGS $FLAGS -o ../../ext/$f.dylib
+ done
+ ls -l ../../ext/
+
+ - name: Install Tcl
+ run: |
+ brew install tcl-tk
+ echo "PATH=/usr/local/opt/tcl-tk/bin:$PATH" >> $GITHUB_ENV
+
- name: Prepare deps
run: |
mkdir ../lib ../include
cp /usr/local/lib/libsqlite3* ../lib
cp /usr/local/include/sqlite3* ../include
-
+
- name: Prepare output dir
run: mkdir output output/build output/build/Plugins
-
+
- name: Compile SQLiteStudio3
working-directory: output/build
run: |
- qmake CONFIG+=portable ../../SQLiteStudio3
+ qmake \
+ $([ ${{ inputs.use_ccache || false }} = false ] || echo "CONFIG+=ccache") \
+ CONFIG+=portable \
+ ../../SQLiteStudio3
make -j 2
-
+
- name: Compile Plugins
working-directory: output/build/Plugins
run: |
- qmake CONFIG+=portable ../../../Plugins
- make -j 2
-
+ qmake \
+ $([ ${{ inputs.use_ccache || false }} = false ] || echo "CONFIG+=ccache") \
+ CONFIG+=portable \
+ "INCLUDEPATH+=$pythonLocation/include/python$PYTHON_VERSION" "LIBS += -L$pythonLocation/lib" \
+ ../../../Plugins
+ make -j 1
+
+ - name: Copy SQLite extensions to output dir
+ shell: bash
+ run: |
+ cp -R ../ext output/SQLiteStudio/SQLiteStudio.app/Contents/extensions
+
- name: Build packages
working-directory: output/build
run: |
make pkg
-
+
- name: Determine SQLiteStudio version
working-directory: output/SQLiteStudio
run: |
echo "SQLITESTUDIO_VERSION=$(SQLiteStudio.app/Contents/MacOS/sqlitestudiocli -v | awk '{print $2}')" >> $GITHUB_ENV
+ - name: Create installer package
+ shell: bash
+ env:
+ IB_LICENSE: ${{ secrets.INSTALLER_LICENSE }}
+ run: |
+ echo "$IB_LICENSE" > lic.xml
+ hdiutil attach output/SQLiteStudio/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.dmg
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder build SQLiteStudio-installer.xml \
+ --license lic.xml \
+ --setvars project.outputDirectory=$(pwd) \
+ --setvars project.version=${{ env.SQLITESTUDIO_VERSION }}
+ ls -l
+
- name: Upload package artifact
uses: actions/upload-artifact@v1
with:
name: sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.dmg
path: output/SQLiteStudio/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.dmg
+
+ - name: Upload installer artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-osx-installer.dmg
+ path: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-osx-installer.dmg
diff --git a/.github/workflows/remove_old_artifacts.yml b/.github/workflows/remove_old_artifacts.yml
new file mode 100644
index 0000000..79a23c4
--- /dev/null
+++ b/.github/workflows/remove_old_artifacts.yml
@@ -0,0 +1,19 @@
+name: Remove old artifacts
+
+on:
+ workflow_dispatch:
+ inputs:
+ schedule:
+ # Every day at 1am
+ - cron: '0 1 * * *'
+
+jobs:
+ remove-old-artifacts:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+
+ steps:
+ - name: Remove old artifacts
+ uses: c-hive/gha-remove-artifacts@v1
+ with:
+ age: '10 days' # '<number> <unit>', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js
diff --git a/.github/workflows/sandbox_w64.yml b/.github/workflows/sandbox_w64.yml
new file mode 100644
index 0000000..498b690
--- /dev/null
+++ b/.github/workflows/sandbox_w64.yml
@@ -0,0 +1,105 @@
+env:
+ QT_VERSION: '5.15.2'
+ SQLITE_VERSION: '3400000'
+ SQLITE_RELEASE_YEAR: '2022'
+ QT_ARCH: 'win32_mingw81'
+ PYTHON_VERSION: '3.9'
+ QT_BIN_DIR: ../Qt/5.15.2/mingw81_32/bin
+
+name: Sandbox/playground
+
+on:
+ workflow_dispatch:
+ inputs:
+
+jobs:
+ win:
+ runs-on: windows-2019
+
+ steps:
+ - name: Set up MinGW
+ uses: egor-tensin/setup-mingw@v2
+ with:
+ platform: x86
+
+ - name: Cache Qt
+ id: cache-qt
+ uses: actions/cache@v3
+ with:
+ path: ${{ github.workspace }}\..\Qt
+ key: ${{ runner.os }}-${{ env.QT_VERSION }}-Qt-Cache
+
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v3
+ with:
+ cache: true
+ version: ${{ env.QT_VERSION }}
+ host: 'windows'
+ arch: ${{ env.QT_ARCH }}
+ # jurplel/install-qt-action has a bug due to which we cannot use ${{ github.workspace }} for the "dir" property, because it will fail.
+ dir: 'D:/'
+ setup-python: 'false'
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x86'
+
+ - name: Clone repo
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.client_payload.branch }}
+
+ - name: Install dependencies
+ shell: bash
+ run: |
+ 7z x -o".." win_deps/win32_deps.zip
+ echo "../lib" >> $GITHUB_PATH
+
+ - name: Find zlib
+ shell: bash
+ run: |
+ find ../../ -name "zlib.h"
+
+ - name: Install SQLite3
+ shell: bash
+ run: |
+ cd ..
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-amalgamation-$SQLITE_VERSION.zip --output sqlite-amalgamation-$SQLITE_VERSION.zip
+ 7z x sqlite-amalgamation-$SQLITE_VERSION.zip
+ cd sqlite-amalgamation-$SQLITE_VERSION
+ gcc.exe sqlite3.c -Os -fpic -DWIN32 -m32 -I. -shared -o sqlite3.dll \
+ -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
+ -DSQLITE_ENABLE_DBSTAT_VTAB \
+ -DSQLITE_ENABLE_BYTECODE_VTAB \
+ -DSQLITE_ENABLE_COLUMN_METADATA \
+ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
+ -DSQLITE_ENABLE_FTS3 \
+ -DSQLITE_ENABLE_FTS4 \
+ -DSQLITE_ENABLE_FTS5 \
+ -DSQLITE_ENABLE_GEOPOLY \
+ -DSQLITE_ENABLE_JSON1 \
+ -DSQLITE_ENABLE_RTREE \
+ -DSQLITE_ENABLE_MATH_FUNCTIONS
+ cp -f sqlite3.dll ../lib/
+ cp -f sqlite3.h ../include/
+ cp -f sqlite3ext.h ../include/
+
+ - name: Compile additional SQLite3 extensions
+ shell: bash
+ run: |
+ cd ..
+ mkdir ext
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-src-$SQLITE_VERSION.zip --output sqlite-src-$SQLITE_VERSION.zip
+ 7z x sqlite-src-$SQLITE_VERSION.zip
+ cd sqlite-src-$SQLITE_VERSION/ext
+ FLAGS="-shared -Os -fpic -DWIN32 -m32 -Imisc -I../../include -L../../lib -lsqlite3"
+ for f in compress; do
+ echo "gcc.exe misc/$f.c $FLAGS -lzlib1 -o ../../ext/$f.dll"
+ gcc.exe misc/$f.c $FLAGS -lzlib1 -o ../../ext/$f.dll
+ done
+ for f in csv decimal eval ieee754 percentile rot13 series uint uuid zorder; do
+ echo "gcc.exe misc/$f.c $FLAGS -o ../../ext/$f.dll"
+ gcc.exe misc/$f.c $FLAGS -o ../../ext/$f.dll
+ done
+ ls -l ../../ext/
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 3453b57..30d2f59 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,7 +1,8 @@
env:
TCL_VERSION: '8.6'
- SQLITE_VERSION: '3350400'
- SQLITE_RELEASE_YEAR: '2021'
+ SQLITE_VERSION: '3410200'
+ SQLITE_RELEASE_YEAR: '2023'
+ PYTHON_VERSION: '3.9'
PORTABLE_DIR: ${{ github.workspace }}/output/portable/SQLiteStudio
name: Unit tests
@@ -12,6 +13,7 @@ on:
- master
- 3.2
- 3.3
+ - 3.4
paths:
- '**.cpp'
- '**.hpp'
@@ -20,35 +22,41 @@ on:
- '**.pro'
- '**.pri'
- '**.ui'
+ - '**.qrc'
- '**/tests.yml'
jobs:
build:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-22.04
strategy:
matrix:
- QT_VERSION: ['5.12.10', '5.15.2']
+ QT_VERSION: ['5.15.2']
steps:
- - name: Cache Qt
- id: cache-qt
- uses: actions/cache@v1
+ - uses: actions/setup-python@v4
with:
- path: ${{ github.workspace }}/../Qt
- key: ${{ runner.os }}-Qt-${{ matrix.QT_VERSION }}-Linux-Cache
-
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x64'
+
+ - name: Qt installation dir
+ id: qt-installation-dir
+ run: echo "DIR=$(readlink -f ${{ github.workspace }}/..)" >> $GITHUB_OUTPUT
+
- name: Install Qt
- uses: jurplel/install-qt-action@v2
+ uses: jurplel/install-qt-action@v3
with:
- cached: ${{ steps.cache-qt.outputs.cache-hit }}
+ cache: true
version: ${{ matrix.QT_VERSION }}
host: 'linux'
- dir: '${{ github.workspace }}/..'
- modules: 'qtscript'
+ dir: '${{ steps.qt-installation-dir.DIR }}'
+ aqtversion: '==3.0.*'
+ py7zrversion: '==0.20.*'
+ setup-python: 'false'
+ extra: '--external 7z'
- name: Clone repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
@@ -95,8 +103,8 @@ jobs:
- name: Compile Plugins
working-directory: output/build/Plugins
run: |
- qmake CONFIG+=portable CONFIG+=debug DEFINES+=tests ../../../Plugins
- make -j 2
+ qmake CONFIG+=portable CONFIG+=debug DEFINES+=tests "INCLUDEPATH+=$pythonLocation/include/python$PYTHON_VERSION" "LIBS += -L$pythonLocation/lib" ../../../Plugins
+ make -j 1
- name: Run tests
working-directory: output/SQLiteStudio
diff --git a/.github/workflows/update_messages.yml b/.github/workflows/update_messages.yml
new file mode 100644
index 0000000..011d4e0
--- /dev/null
+++ b/.github/workflows/update_messages.yml
@@ -0,0 +1,67 @@
+env:
+ PYTHON_VERSION: '3.9'
+ QT_VERSION: '5.15.2'
+ TCL_VERSION: '8.6'
+
+name: Update messages
+
+on:
+ workflow_dispatch:
+ inputs:
+ schedule:
+ - cron: '30 5 * * *' # run at 5:30 AM UTC every day
+
+jobs:
+ build:
+ runs-on: ubuntu-22.04
+
+ steps:
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x64'
+
+ - name: Qt installation dir
+ id: qt-installation-dir
+ run: echo "DIR=$(readlink -f ${{ github.workspace }}/..)" >> $GITHUB_OUTPUT
+
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v3
+ with:
+ cache: true
+ version: ${{ env.QT_VERSION }}
+ host: 'linux'
+ dir: '${{ steps.qt-installation-dir.DIR }}'
+ aqtversion: '==3.0.*'
+ py7zrversion: '==0.20.*'
+ setup-python: 'false'
+ extra: '--external 7z'
+
+ - name: Clone repo
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ env.GITHUB_REF }}
+
+ - name: Install Tcl
+ run: sudo apt-get install -qq libtcl$TCL_VERSION tcl$TCL_VERSION-dev
+
+ - name: Install xmllint
+ run: sudo apt install libxml2-utils
+
+ - name: Executing lang update
+ working-directory: SQLiteStudio3
+ run: tclsh lang.tcl update
+
+ - name: Listing Git status
+ run: |
+ git status
+ echo "==========================================================================="
+ git diff
+
+ - name: Committing changes
+ run: |
+ git config user.name github-actions
+ git config user.email github-actions@github.com
+ git add .
+ git diff-index --quiet HEAD || git commit -m "Automated update of translation files."
+ git push
diff --git a/.github/workflows/win32_release.yml b/.github/workflows/win32_release.yml
new file mode 100644
index 0000000..a522d3c
--- /dev/null
+++ b/.github/workflows/win32_release.yml
@@ -0,0 +1,264 @@
+env:
+ QT_VERSION: '5.15.2'
+ SQLITE_VERSION: '3410200'
+ SQLITE_RELEASE_YEAR: '2023'
+ QT_ARCH: 'win32_mingw81'
+ PYTHON_VERSION: '3.9'
+ ICU_VER: '72'
+ ICU_URL: https://mirror.msys2.org/mingw/mingw32/mingw-w64-i686-icu-72.1-1-any.pkg.tar.zst
+ QT_BIN_DIR: ../Qt/5.15.2/mingw81_32/bin
+ PORTABLE_DIR: output/portable/SQLiteStudio
+ INSTALLBUILDER_DIR: ../ib
+ MINGW_URL: https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_mingw/qt.tools.win32_mingw810/8.1.0-1-202004170606i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z
+ INSTALLBUILDER_URL: https://releases.bitrock.com/installbuilder/installbuilder-enterprise-23.1.0-windows-installer.exe
+
+name: Windows 32-bit release build
+
+on:
+ workflow_dispatch:
+ inputs:
+ use_ccache:
+ description: 'Use ccache (for workflow debugging only!)'
+ required: false
+ type: boolean
+ schedule:
+ - cron: '30 2 * * 1' # run at 2 AM UTC every Monday
+ repository_dispatch:
+ types: [win32_release]
+
+jobs:
+ build:
+ runs-on: windows-2019
+
+ steps:
+ - name: Set up MinGW
+ uses: egor-tensin/setup-mingw@v2
+ with:
+ platform: x86
+ version: 8.1.0
+
+ - name: Cache Qt
+ id: cache-qt
+ uses: actions/cache@v3
+ with:
+ path: ${{ github.workspace }}\..\Qt
+ key: ${{ runner.os }}-${{ env.QT_VERSION }}-Qt-Cache
+
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v3
+ with:
+ cache: true
+ version: ${{ env.QT_VERSION }}
+ host: 'windows'
+ arch: ${{ env.QT_ARCH }}
+ # jurplel/install-qt-action has a bug due to which we cannot use ${{ github.workspace }} for the "dir" property, because it will fail.
+ dir: 'D:/'
+ setup-python: 'false'
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x86'
+
+ - name: Clone repo
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.client_payload.branch }}
+
+ - name: Install dependencies
+ shell: bash
+ run: |
+ 7z x -o".." win_deps/win32_deps.zip
+ echo "../lib" >> $GITHUB_PATH
+
+ - name: Prepare ccache
+ if: inputs.use_ccache || false
+ uses: hendrikmuhs/ccache-action@v1.2.8
+ with:
+ key: win32_release
+ max-size: "24M"
+
+ - name: Configure ccache (or not ccache)
+ shell: bash
+ run: |
+ if [ ${{ inputs.use_ccache || false }} = false ]; then
+ printf 'GCC_COMMAND=gcc.exe\nGXX_COMMAND=g++.exe\n'
+ else
+ printf 'GCC_COMMAND=ccache.exe gcc.exe\nGXX_COMMAND=ccache.exe g++.exe\n'
+ fi >> $GITHUB_ENV
+
+ - name: Install SQLite3
+ shell: bash
+ run: |
+ cd ..
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-amalgamation-$SQLITE_VERSION.zip --output sqlite-amalgamation-$SQLITE_VERSION.zip
+ 7z x sqlite-amalgamation-$SQLITE_VERSION.zip
+ cd sqlite-amalgamation-$SQLITE_VERSION
+ $GCC_COMMAND sqlite3.c -Os -fpic -DWIN32 -m32 -I. -shared -o sqlite3.dll \
+ -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
+ -DSQLITE_ENABLE_DBSTAT_VTAB \
+ -DSQLITE_ENABLE_BYTECODE_VTAB \
+ -DSQLITE_ENABLE_COLUMN_METADATA \
+ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
+ -DSQLITE_ENABLE_FTS3 \
+ -DSQLITE_ENABLE_FTS4 \
+ -DSQLITE_ENABLE_FTS5 \
+ -DSQLITE_ENABLE_GEOPOLY \
+ -DSQLITE_ENABLE_JSON1 \
+ -DSQLITE_ENABLE_RTREE \
+ -DSQLITE_ENABLE_MATH_FUNCTIONS
+ cp -f sqlite3.dll ../lib/
+ cp -f sqlite3.h ../include/
+ cp -f sqlite3ext.h ../include/
+
+ - name: Install extension dependencies
+ shell: bash
+ run: |
+ cd ..
+ curl -L "$ICU_URL" | tar -xf - --zstd
+ mv mingw32 icu
+
+ - name: Compile additional SQLite3 extensions
+ shell: bash
+ run: |
+ cd ..
+ mkdir ext
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-src-$SQLITE_VERSION.zip --output sqlite-src-$SQLITE_VERSION.zip
+ 7z x sqlite-src-$SQLITE_VERSION.zip
+ cd sqlite-src-$SQLITE_VERSION/ext
+ FLAGS="-shared -Os -fpic -DWIN32 -m32 -I../../include -L../../lib -lsqlite3"
+ #for f in compress sqlar; do
+ # echo "$GCC_COMMAND misc/$f.c -Imisc $FLAGS -lzlib1 -o ../../ext/$f.dll"
+ # $GCC_COMMAND misc/$f.c -Imisc $FLAGS -lzlib1 -o ../../ext/$f.dll
+ #done
+ for f in csv decimal eval ieee754 percentile rot13 series uint uuid zorder; do
+ echo "$GCC_COMMAND misc/$f.c -Imisc $FLAGS -o ../../ext/$f.dll"
+ $GCC_COMMAND misc/$f.c -Imisc $FLAGS -o ../../ext/$f.dll
+ done
+ for f in icu; do
+ echo "$GCC_COMMAND icu/$f.c -I../../icu/include -L../../icu/lib -licuio -licuin -licuuc -licudt $FLAGS -o ../../ext/$f.dll"
+ $GCC_COMMAND icu/$f.c -I../../icu/include -L../../icu/lib -licuio -licuin -licuuc -licudt $FLAGS -o ../../ext/$f.dll
+ done
+ ls -l ../../ext/
+
+ - name: Prepare output dir
+ shell: bash
+ run: mkdir output output/build output/build/Plugins
+
+ - name: Compile SQLiteStudio3
+ working-directory: output/build
+ run: |
+ qmake.exe `
+ CONFIG+=portable `
+ "QMAKE_CXX=${{ env.GXX_COMMAND }}" `
+ "QMAKE_CXXFLAGS+=-m32" `
+ ..\..\SQLiteStudio3
+ mingw32-make.exe -j 2
+
+ - name: Compile Plugins
+ working-directory: output/build/Plugins
+ run: |
+ qmake.exe `
+ "QMAKE_CXX=${{ env.GXX_COMMAND }}" `
+ CONFIG+=portable `
+ "INCLUDEPATH+=${{ env.pythonLocation }}/include" "LIBS += -L${{ env.pythonLocation }}" `
+ "QMAKE_CXXFLAGS+=-m32" `
+ ..\..\..\Plugins
+ mingw32-make.exe -j 1
+
+ - name: Copy SQLite extensions to output dir
+ shell: bash
+ run: |
+ cp -R ../ext output/SQLiteStudio/
+
+ - name: Prepare portable dir
+ shell: bash
+ working-directory: output
+ run: |
+ mkdir portable
+ cp -R SQLiteStudio portable/
+
+ - name: Clean-up portable dir
+ shell: bash
+ run: |
+ cd ${{ env.PORTABLE_DIR }}
+ rm -f *.a
+ rm -f plugins/*.a
+ rm -f styles/*.a
+ echo "ABSOLUTE_PORTABLE_DIR=`pwd`" >> $GITHUB_ENV
+
+ - name: Prepare portable distro (Qt)
+ shell: bash
+ working-directory: ${{ env.Qt5_Dir }}
+ run: |
+ for f in Qt5Core Qt5Gui Qt5Network Qt5PrintSupport Qt5Qml Qt5Svg Qt5Widgets Qt5Xml libgcc_s_dw2-1 libstdc++-6 libwinpthread-1; do cp bin/$f.dll "$ABSOLUTE_PORTABLE_DIR"; done
+ cp bin/qt.conf "$ABSOLUTE_PORTABLE_DIR"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/iconengines"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/platforms"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/printsupport"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/styles"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/imageformats"
+ cp plugins/iconengines/qsvgicon.dll "$ABSOLUTE_PORTABLE_DIR/iconengines"
+ cp plugins/platforms/qwindows.dll "$ABSOLUTE_PORTABLE_DIR/platforms"
+ cp plugins/styles/qwindowsvistastyle.dll "$ABSOLUTE_PORTABLE_DIR/styles"
+ cp plugins/printsupport/windowsprintersupport.dll "$ABSOLUTE_PORTABLE_DIR/printsupport"
+ for f in qgif qicns qico qjpeg qsvg qtga qtiff qwbmp; do cp plugins/imageformats/$f.dll "$ABSOLUTE_PORTABLE_DIR/imageformats"; done
+
+ - name: Prepare portable distro (Deps)
+ shell: bash
+ run: |
+ cd ../lib
+ cp *.dll "$ABSOLUTE_PORTABLE_DIR"
+ cd ../icu/bin
+ cp libicuio$ICU_VER.dll libicuin$ICU_VER.dll libicuuc$ICU_VER.dll libicudt$ICU_VER.dll "$ABSOLUTE_PORTABLE_DIR"
+
+ - name: Prepare portable distro (Resources)
+ shell: bash
+ run: |
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.ico "$ABSOLUTE_PORTABLE_DIR"/appicon.ico
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.svg "${{ env.PORTABLE_DIR }}"/appicon.svg
+
+ - name: Determine SQLiteStudio version
+ shell: bash
+ run: |
+ cd $ABSOLUTE_PORTABLE_DIR
+ echo "SQLITESTUDIO_VERSION=$(./sqlitestudiocli.exe --version | cut -f 2 -d ' ')" >> $GITHUB_ENV
+
+ - name: Assemble portable package
+ shell: bash
+ run: |
+ cd $ABSOLUTE_PORTABLE_DIR/..
+ 7z a -r sqlitestudio-$SQLITESTUDIO_VERSION.zip SQLiteStudio
+
+ - name: Install the InstalBuilder
+ shell: bash
+ env:
+ IB_LICENSE: ${{ secrets.INSTALLER_LICENSE }}
+ run: |
+ curl -L ${{ env.INSTALLBUILDER_URL }} --output ib.exe
+ ./ib.exe --mode unattended --prefix ${{ env.INSTALLBUILDER_DIR }}
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder-cli.exe --version
+ echo "$IB_LICENSE" > lic.xml
+ echo "INSTALLER_SRC_PREFIX=$(pwd)" >> $GITHUB_ENV
+ echo "INSTALLER_BIN_PREFIX=$ABSOLUTE_PORTABLE_DIR" >> $GITHUB_ENV
+
+ - name: Create installer package
+ shell: bash
+ run: |
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder-cli.exe build SQLiteStudio-installer.xml \
+ --license lic.xml \
+ --setvars project.outputDirectory=$(pwd) \
+ --setvars project.version=$SQLITESTUDIO_VERSION
+ ls -l
+
+ - name: Upload package artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.zip
+ path: output/portable/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.zip
+
+ - name: Upload installer artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-windows-installer.exe
+ path: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-windows-installer.exe
diff --git a/.github/workflows/win64_release.yml b/.github/workflows/win64_release.yml
new file mode 100644
index 0000000..2f44835
--- /dev/null
+++ b/.github/workflows/win64_release.yml
@@ -0,0 +1,265 @@
+env:
+ QT_VERSION: '5.15.2'
+ SQLITE_VERSION: '3410200'
+ SQLITE_RELEASE_YEAR: '2023'
+ QT_ARCH: 'win64_mingw81'
+ PYTHON_VERSION: '3.9'
+ ICU_VER: '72'
+ ICU_URL: https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-icu-72.1-1-any.pkg.tar.zst
+ MINGW_DIR: ../Qt/Tools/mingw810_64
+ QT_BIN_DIR: ../Qt/5.15.2/mingw81_64/bin
+ PORTABLE_DIR: output/portable/SQLiteStudio
+ INSTALLBUILDER_DIR: ../ib
+ MINGW_URL: https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_mingw/qt.tools.win64_mingw810/8.1.0-1-202004170606x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
+ INSTALLBUILDER_URL: https://releases.bitrock.com/installbuilder/installbuilder-enterprise-23.1.0-windows-x64-installer.exe
+
+name: Windows 64-bit release build
+
+on:
+ workflow_dispatch:
+ inputs:
+ use_ccache:
+ description: 'Use ccache (for workflow debugging only!)'
+ required: false
+ type: boolean
+ schedule:
+ - cron: '0 2 * * 1' # run at 2 AM UTC every Monday
+ repository_dispatch:
+ types: [win64_release]
+
+jobs:
+ build:
+ runs-on: windows-2019
+
+ steps:
+ - name: Cache Qt
+ id: cache-qt
+ uses: actions/cache@v3
+ with:
+ path: ${{ github.workspace }}\..\Qt
+ key: ${{ runner.os }}-${{ env.QT_VERSION }}-Qt-Cache
+
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v3
+ with:
+ cache: true
+ version: ${{ env.QT_VERSION }}
+ host: 'windows'
+ arch: ${{ env.QT_ARCH }}
+ # jurplel/install-qt-action has a bug due to which we cannot use ${{ github.workspace }} for the "dir" property, because it will fail.
+ dir: 'D:/'
+ setup-python: 'false'
+
+ - name: Install mingw
+ if: steps.cache-qt.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ curl -L ${{ env.MINGW_URL }} --output ../mingw.7z
+ 7z x -o"../Qt" ../mingw.7z
+ echo "${{ env.MINGW_DIR }}/bin" >> $GITHUB_PATH
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ env.PYTHON_VERSION }}
+ architecture: 'x64'
+
+ - name: Clone repo
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.client_payload.branch }}
+
+ - name: Install dependencies
+ shell: bash
+ run: |
+ 7z x -o".." win_deps/win64_deps.zip
+ echo "../lib" >> $GITHUB_PATH
+
+ - name: Prepare ccache
+ if: inputs.use_ccache || false
+ uses: hendrikmuhs/ccache-action@v1.2.8
+ with:
+ key: win64_release
+ max-size: "24M"
+
+ - name: Configure ccache (or not ccache)
+ shell: bash
+ run: |
+ if [ ${{ inputs.use_ccache || false }} = false ]; then
+ printf 'GCC_COMMAND=gcc.exe\nGXX_COMMAND=g++.exe\n'
+ else
+ printf 'GCC_COMMAND=ccache.exe gcc.exe\nGXX_COMMAND=ccache.exe g++.exe\n'
+ fi >> $GITHUB_ENV
+
+ - name: Install SQLite3
+ shell: bash
+ run: |
+ cd ..
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-amalgamation-$SQLITE_VERSION.zip --output sqlite-amalgamation-$SQLITE_VERSION.zip
+ 7z x sqlite-amalgamation-$SQLITE_VERSION.zip
+ cd sqlite-amalgamation-$SQLITE_VERSION
+ $GCC_COMMAND sqlite3.c -Os -fpic -DWIN64 -m64 -I. -shared -o sqlite3.dll \
+ -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
+ -DSQLITE_ENABLE_DBSTAT_VTAB \
+ -DSQLITE_ENABLE_BYTECODE_VTAB \
+ -DSQLITE_ENABLE_COLUMN_METADATA \
+ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
+ -DSQLITE_ENABLE_FTS3 \
+ -DSQLITE_ENABLE_FTS4 \
+ -DSQLITE_ENABLE_FTS5 \
+ -DSQLITE_ENABLE_GEOPOLY \
+ -DSQLITE_ENABLE_JSON1 \
+ -DSQLITE_ENABLE_RTREE \
+ -DSQLITE_ENABLE_MATH_FUNCTIONS
+ cp -f sqlite3.dll ../lib/
+ cp -f sqlite3.h ../include/
+ cp -f sqlite3ext.h ../include/
+
+ - name: Install extension dependencies
+ shell: bash
+ run: |
+ cd ..
+ curl -L "$ICU_URL" | tar -xf - --zstd
+ mv mingw64 icu
+
+ - name: Compile additional SQLite3 extensions
+ shell: bash
+ run: |
+ cd ..
+ mkdir ext
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-src-$SQLITE_VERSION.zip --output sqlite-src-$SQLITE_VERSION.zip
+ 7z x sqlite-src-$SQLITE_VERSION.zip
+ cd sqlite-src-$SQLITE_VERSION/ext
+ FLAGS="-shared -Os -fpic -DWIN64 -m64 -I../../include -L../../lib -lsqlite3"
+ for f in compress sqlar; do
+ echo "$GCC_COMMAND misc/$f.c -Imisc $FLAGS -lzlib1 -o ../../ext/$f.dll"
+ $GCC_COMMAND misc/$f.c -Imisc $FLAGS -lzlib1 -o ../../ext/$f.dll
+ done
+ for f in csv decimal eval ieee754 percentile rot13 series uint uuid zorder; do
+ echo "$GCC_COMMAND misc/$f.c -Imisc $FLAGS -o ../../ext/$f.dll"
+ $GCC_COMMAND misc/$f.c -Imisc $FLAGS -o ../../ext/$f.dll
+ done
+ for f in icu; do
+ echo "$GCC_COMMAND icu/$f.c -I../../icu/include -L../../icu/lib -licuio -licuin -licuuc -licudt $FLAGS -o ../../ext/$f.dll"
+ $GCC_COMMAND icu/$f.c -I../../icu/include -L../../icu/lib -licuio -licuin -licuuc -licudt $FLAGS -o ../../ext/$f.dll
+ done
+ ls -l ../../ext/
+
+ - name: Prepare output dir
+ shell: bash
+ run: mkdir output output/build output/build/Plugins
+
+ - name: Compile SQLiteStudio3
+ working-directory: output/build
+ run: |
+ qmake.exe `
+ CONFIG+=portable `
+ "QMAKE_CXX=${{ env.GXX_COMMAND }}" `
+ ..\..\SQLiteStudio3
+ mingw32-make.exe -j 2
+
+ - name: Compile Plugins
+ working-directory: output/build/Plugins
+ run: |
+ qmake.exe `
+ "QMAKE_CXX=${{ env.GXX_COMMAND }}" `
+ CONFIG+=portable `
+ "INCLUDEPATH+=${{ env.pythonLocation }}/include" "LIBS += -L${{ env.pythonLocation }}" `
+ ..\..\..\Plugins
+ mingw32-make.exe -j 1
+
+ - name: Copy SQLite extensions to output dir
+ shell: bash
+ run: |
+ cp -R ../ext output/SQLiteStudio/
+
+ - name: Prepare portable dir
+ shell: bash
+ working-directory: output
+ run: |
+ mkdir portable
+ cp -R SQLiteStudio portable/
+
+ - name: Clean-up portable dir
+ shell: bash
+ run: |
+ cd ${{ env.PORTABLE_DIR }}
+ rm -f *.a
+ rm -f plugins/*.a
+ rm -f styles/*.a
+ echo "ABSOLUTE_PORTABLE_DIR=`pwd`" >> $GITHUB_ENV
+
+ - name: Prepare portable distro (Qt)
+ shell: bash
+ working-directory: ${{ env.Qt5_Dir }}
+ run: |
+ for f in Qt5Core Qt5Gui Qt5Network Qt5PrintSupport Qt5Qml Qt5Svg Qt5Widgets Qt5Xml libgcc_s_seh-1 libstdc++-6 libwinpthread-1; do cp bin/$f.dll "$ABSOLUTE_PORTABLE_DIR"; done
+ cp bin/qt.conf "$ABSOLUTE_PORTABLE_DIR"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/iconengines"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/platforms"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/printsupport"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/styles"
+ mkdir -p "$ABSOLUTE_PORTABLE_DIR/imageformats"
+ cp plugins/iconengines/qsvgicon.dll "$ABSOLUTE_PORTABLE_DIR/iconengines"
+ cp plugins/platforms/qwindows.dll "$ABSOLUTE_PORTABLE_DIR/platforms"
+ cp plugins/styles/qwindowsvistastyle.dll "$ABSOLUTE_PORTABLE_DIR/styles"
+ cp plugins/printsupport/windowsprintersupport.dll "$ABSOLUTE_PORTABLE_DIR/printsupport"
+ for f in qgif qicns qico qjpeg qsvg qtga qtiff qwbmp; do cp plugins/imageformats/$f.dll "$ABSOLUTE_PORTABLE_DIR/imageformats"; done
+
+ - name: Prepare portable distro (Deps)
+ shell: bash
+ run: |
+ cd ../lib
+ cp *.dll "$ABSOLUTE_PORTABLE_DIR"
+ cd ../icu/bin
+ cp libicuio$ICU_VER.dll libicuin$ICU_VER.dll libicuuc$ICU_VER.dll libicudt$ICU_VER.dll "$ABSOLUTE_PORTABLE_DIR"
+
+ - name: Prepare portable distro (Resources)
+ shell: bash
+ run: |
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.ico "$ABSOLUTE_PORTABLE_DIR"/appicon.ico
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.svg "${{ env.PORTABLE_DIR }}"/appicon.svg
+
+ - name: Determine SQLiteStudio version
+ shell: bash
+ run: |
+ cd $ABSOLUTE_PORTABLE_DIR
+ echo "SQLITESTUDIO_VERSION=$(./sqlitestudiocli.exe --version | cut -f 2 -d ' ')" >> $GITHUB_ENV
+
+ - name: Assemble portable package
+ shell: bash
+ run: |
+ cd $ABSOLUTE_PORTABLE_DIR/..
+ 7z a -r sqlitestudio-$SQLITESTUDIO_VERSION.zip SQLiteStudio
+
+ - name: Install the InstalBuilder
+ shell: bash
+ env:
+ IB_LICENSE: ${{ secrets.INSTALLER_LICENSE }}
+ run: |
+ curl -L ${{ env.INSTALLBUILDER_URL }} --output ib.exe
+ ./ib.exe --mode unattended --prefix ${{ env.INSTALLBUILDER_DIR }}
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder-cli.exe --version
+ echo "$IB_LICENSE" > lic.xml
+ echo "INSTALLER_SRC_PREFIX=$(pwd)" >> $GITHUB_ENV
+ echo "INSTALLER_BIN_PREFIX=$ABSOLUTE_PORTABLE_DIR" >> $GITHUB_ENV
+
+ - name: Create installer package
+ shell: bash
+ run: |
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder-cli.exe build SQLiteStudio-installer.xml \
+ --license lic.xml \
+ --setvars project.outputDirectory=$(pwd) \
+ --setvars project.version=$SQLITESTUDIO_VERSION
+ ls -l
+
+ - name: Upload package artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.zip
+ path: output/portable/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.zip
+
+ - name: Upload installer artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-windows-x64-installer.exe
+ path: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-windows-x64-installer.exe
diff --git a/.github/workflows/win_release.yml b/.github/workflows/win_release.yml
deleted file mode 100644
index 1a5307d..0000000
--- a/.github/workflows/win_release.yml
+++ /dev/null
@@ -1,157 +0,0 @@
-env:
- QT_VERSION: '5.15.2'
- SQLITE_VERSION: '3350400'
- SQLITE_RELEASE_YEAR: '2021'
- QT_ARCH: 'win64_mingw81'
- MINGW_DIR: ../Qt/Tools/mingw810_64
- QT_BIN_DIR: ../Qt/5.15.2/mingw81_64/bin
- PORTABLE_DIR: output/portable/SQLiteStudio
- MINGW_URL: https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_mingw/qt.tools.win64_mingw810/8.1.0-1-202004170606x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
- DEPS_URL: https://www.dropbox.com/s/2dpem7vy0ee19tu/win64_deps.zip?dl=1
-
-name: Windows release build
-
-on:
- repository_dispatch:
- types: [win_release]
-
-jobs:
- build:
- runs-on: windows-2019
-
- steps:
- - name: Cache Qt
- id: cache-qt
- uses: actions/cache@v1
- with:
- path: ${{ github.workspace }}\..\Qt
- key: ${{ runner.os }}-${{ env.QT_VERSION }}-Qt-Cache
-
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- with:
- cached: ${{ steps.cache-qt.outputs.cache-hit }}
- version: ${{ env.QT_VERSION }}
- host: 'windows'
- arch: ${{ env.QT_ARCH }}
- # jurplel/install-qt-action has a bug due to which we cannot use ${{ github.workspace }} for the "dir" property, because it will fail.
- dir: 'D:/'
- modules: 'qtscript'
- setup-python: 'false'
-
- - name: Install mingw
- if: steps.cache-qt.outputs.cache-hit != 'true'
- shell: bash
- run: |
- curl -L ${{ env.MINGW_URL }} --output ../mingw.7z
- 7z x -o"../Qt" ../mingw.7z
- echo "${{ env.MINGW_DIR }}/bin" >> $GITHUB_PATH
-
- - name: Clone repo
- uses: actions/checkout@v2
- with:
- ref: ${{ github.event.client_payload.branch }}
-
- - name: Install dependencies
- shell: bash
- run: |
- curl -L ${{ env.DEPS_URL }} --output ../win64_deps.zip
- 7z x -o".." ../win64_deps.zip
- echo "../lib" >> $GITHUB_PATH
-
- - name: Install SQLite3
- shell: bash
- run: |
- cd ..
- curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-amalgamation-$SQLITE_VERSION.zip --output sqlite-amalgamation-$SQLITE_VERSION.zip
- 7z x sqlite-amalgamation-$SQLITE_VERSION.zip
- cd sqlite-amalgamation-$SQLITE_VERSION
- gcc.exe sqlite3.c -Os -fpic -DWIN64 -m64 -I. -shared -o sqlite3.dll \
- -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
- -DSQLITE_ENABLE_DBSTAT_VTAB \
- -DSQLITE_ENABLE_BYTECODE_VTAB \
- -DSQLITE_ENABLE_COLUMN_METADATA \
- -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
- -DSQLITE_ENABLE_FTS3 \
- -DSQLITE_ENABLE_FTS4 \
- -DSQLITE_ENABLE_FTS5 \
- -DSQLITE_ENABLE_GEOPOLY \
- -DSQLITE_ENABLE_JSON1 \
- -DSQLITE_ENABLE_RTREE \
- -DSQLITE_ENABLE_MATH_FUNCTIONS
- cp -f sqlite3.dll ../lib/
- cp -f sqlite3.h ../include/
- cp -f sqlite3ext.h ../include/
-
- - name: Prepare output dir
- shell: bash
- run: mkdir output output/build output/build/Plugins
-
- - name: Compile SQLiteStudio3
- working-directory: output/build
- run: |
- qmake.exe CONFIG+=portable ..\..\SQLiteStudio3
- mingw32-make.exe -j 2
-
- - name: Compile Plugins
- working-directory: output/build/Plugins
- run: |
- qmake.exe CONFIG+=portable ..\..\..\Plugins
- mingw32-make.exe -j 2
-
- - name: Prepare portable dir
- shell: bash
- working-directory: output
- run: |
- mkdir portable
- cp -R SQLiteStudio portable/
-
- - name: Clean-up portable dir
- shell: bash
- run: |
- cd ${{ env.PORTABLE_DIR }}
- rm -f *.a
- rm -f plugins/*.a
- rm -f styles/*.a
- echo "ABSOLUTE_PORTABLE_DIR=`pwd`" >> $GITHUB_ENV
-
- - name: Prepare portable distro (Qt)
- shell: bash
- working-directory: ${{ env.Qt5_Dir }}
- run: |
- for f in Qt5Core Qt5Gui Qt5Network Qt5PrintSupport Qt5Script Qt5Svg Qt5Widgets Qt5Xml libgcc_s_seh-1 libstdc++-6 libwinpthread-1; do cp bin/$f.dll "$ABSOLUTE_PORTABLE_DIR"; done
- cp bin/qt.conf "$ABSOLUTE_PORTABLE_DIR"
- mkdir -p "$ABSOLUTE_PORTABLE_DIR/iconengines"
- mkdir -p "$ABSOLUTE_PORTABLE_DIR/platforms"
- mkdir -p "$ABSOLUTE_PORTABLE_DIR/printsupport"
- mkdir -p "$ABSOLUTE_PORTABLE_DIR/styles"
- mkdir -p "$ABSOLUTE_PORTABLE_DIR/imageformats"
- cp plugins/iconengines/qsvgicon.dll "$ABSOLUTE_PORTABLE_DIR/iconengines"
- cp plugins/platforms/qwindows.dll "$ABSOLUTE_PORTABLE_DIR/platforms"
- cp plugins/styles/qwindowsvistastyle.dll "$ABSOLUTE_PORTABLE_DIR/styles"
- cp plugins/printsupport/windowsprintersupport.dll "$ABSOLUTE_PORTABLE_DIR/printsupport"
- for f in qgif qicns qico qjpeg qsvg qtga qtiff qwbmp; do cp plugins/imageformats/$f.dll "$ABSOLUTE_PORTABLE_DIR/imageformats"; done
-
- - name: Prepare portable distro (Deps)
- shell: bash
- run: |
- cd ../lib
- cp *.dll "$ABSOLUTE_PORTABLE_DIR"
-
- - name: Determine SQLiteStudio version
- shell: bash
- run: |
- cd $ABSOLUTE_PORTABLE_DIR
- echo "SQLITESTUDIO_VERSION=$(./sqlitestudiocli.exe --version | cut -f 2 -d ' ')" >> $GITHUB_ENV
-
- - name: Assemble portable package
- shell: bash
- run: |
- cd $ABSOLUTE_PORTABLE_DIR/..
- 7z a -r sqlitestudio-$SQLITESTUDIO_VERSION.zip SQLiteStudio
-
- - name: Upload package artifact
- uses: actions/upload-artifact@v1
- with:
- name: sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.zip
- path: output/portable/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.zip