Skip to content

Commit be10d1a

Browse files
committed
ci(windows): Add the 'nalgeon/sqlean' lib to Windows build
1 parent 3adf55b commit be10d1a

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

.github/patch/product.wxs.patch

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
diff --git a/installer/windows/product.wxs b/installer/windows/product.wxs
2-
index c040591a..da3c2604 100644
2+
index c040591a..23a9b40a 100644
33
--- a/installer/windows/product.wxs
44
+++ b/installer/windows/product.wxs
5-
@@ -63,7 +63,7 @@
5+
@@ -63,7 +63,8 @@
66
<Directory Id="extensions" Name="extensions">
77
<Component><File Source="$(var.SQLitePath)\math.dll" /></Component>
88
<Component><File Source="$(var.SQLitePath)\formats.dll" /></Component>
99
- <Component><File Source="$(var.SQLitePath)\fileio.dll" /></Component>
1010
+ <!-- <Component><File Source="$(var.SQLitePath)\fileio.dll" /></Component> -->
11+
+ <Component><File Source="$(var.SqleanPath)\sqlean.dll" /></Component>
1112
</Directory>
1213
<Directory Id="imageformats" Name="imageformats">
1314
<Component><File Source="$(var.QtPath)\plugins\imageformats\qgif.dll" /></Component>
14-
@@ -149,9 +149,9 @@
15+
@@ -149,8 +150,11 @@
1516
<Feature Id="FormatsExtension" Title="Formats" Description="Provide additional field display formats." AllowAdvertise="no">
1617
<ComponentRef Id="formats.dll" />
1718
</Feature>
1819
- <Feature Id="FileioExtension" Title="Fileio" Description="Implements SQL functions readfile(), writefile(), and eponymous virtual type 'fsdir'." AllowAdvertise="no">
1920
+ <!-- <Feature Id="FileioExtension" Title="Fileio" Description="Implements SQL functions readfile(), writefile(), and eponymous virtual type 'fsdir'." AllowAdvertise="no">
2021
<ComponentRef Id="fileio.dll" />
21-
- </Feature>
2222
+ </Feature> -->
23+
+ <Feature Id="SqleanExtension" Title="sqlean" Description="All the Missing SQLite Functions." AllowAdvertise="no">
24+
+ <ComponentRef Id="sqlean.dll" />
25+
</Feature>
2326
</Feature>
2427

25-
<!-- Registry -->

.github/patch/variables.wxi.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/installer/windows/variables.wxi b/installer/windows/variables.wxi
2-
index fbedf0c3..368888ef 100644
2+
index fbedf0c3..34a65831 100644
33
--- a/installer/windows/variables.wxi
44
+++ b/installer/windows/variables.wxi
55
@@ -40,8 +40,8 @@
@@ -13,7 +13,7 @@ index fbedf0c3..368888ef 100644
1313

1414
<!--
1515
=================================================== Build System ===================================================
16-
@@ -49,20 +49,11 @@
16+
@@ -49,20 +49,12 @@
1717
Paths for the various libraries the application needs to compile. Change these to match the build machine.
1818
-->
1919

@@ -36,6 +36,7 @@ index fbedf0c3..368888ef 100644
3636
+ <?define SQLitePath="$(env.SQLitePath)" ?>
3737
+ <?define SQLCipherPath="$(env.SQLCipherPath)" ?>
3838
+ <?define OpenSSLPath="$(env.OpenSSLPath)" ?>
39+
+ <?define SqleanPath="$(env.SqleanPath)" ?>
3940
+ <?define SQLiteExePath="$(env.ExePath)\release-sqlite\Release" ?>
4041
+ <?define SQLCipherExePath="$(env.ExePath)\release-sqlcipher\Release" ?>
4142

.github/workflows/build-windows.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
os: [windows-2019]
1818
arch: ["Win32", "Win64"]
1919
env:
20+
GH_TOKEN: ${{ github.token }}
2021
OPENSSL_VERSION: 1.1.1.2100
2122
QT_VERSION: 5.15.2
2223
steps:
@@ -51,6 +52,29 @@ jobs:
5152
cache-key-prefix: "cache"
5253
version: ${{ env.QT_VERSION }}
5354

55+
- name: Install MSYS2 and 'mingw-w64-i686-toolchain'
56+
if: matrix.os == 'windows-2019' && matrix.arch == 'Win32'
57+
uses: msys2/setup-msys2@v2
58+
with:
59+
cache: true
60+
install: mingw-w64-i686-toolchain
61+
update: true
62+
63+
- name: Build 'nalgeon/sqlean' for x86
64+
if: matrix.os == 'windows-2019' && matrix.arch == 'Win32'
65+
shell: bash
66+
run: |
67+
git clone https://github.com/nalgeon/sqlean && cd sqlean
68+
make prepare-dist && make download-sqlite && make download-external
69+
$RUNNER_TEMP/msys64/msys2_shell.cmd -defterm -no-start -mingw32 -lc "mingw32-make compile-windows"
70+
mv -v dist/sqlean.dll ./
71+
72+
- name: Download 'nalgeon/sqlean' for x86_64
73+
if: matrix.os == 'windows-2019' && matrix.arch == 'Win64'
74+
run: |
75+
gh release download --pattern "sqlean-win-x64.zip" --repo "nalgeon/sqlean"
76+
Expand-Archive -Path sqlean-win-x64.zip -DestinationPath .\sqlean
77+
5478
- name: Setup MSVC
5579
uses: ilammy/msvc-dev-cmd@v1
5680
with:
@@ -137,6 +161,7 @@ jobs:
137161
ExePath: ${{ github.workspace }}
138162
OpenSSLPath: C:\dev\OpenSSL-${{ matrix.arch }}
139163
SQLCipherPath: C:\dev\SQLCipher-${{ matrix.arch }}
164+
SqleanPath: ${{ github.workspace }}\sqlean
140165
SQLitePath: C:\dev\SQLite-${{ matrix.arch }}
141166
run: |
142167
cd installer/windows

0 commit comments

Comments
 (0)