mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
desktop (windows): fix build of CLI (#3387)
This commit is contained in:
parent
f6c4e969e4
commit
84e09f195c
3 changed files with 33 additions and 10 deletions
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
|
@ -266,6 +266,15 @@ jobs:
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
scripts/desktop/prepare-openssl-windows.sh
|
||||||
|
openssl_windows_style_path=$(echo `pwd`/dist-newstyle/openssl-1.1.1w | sed 's#/\([a-zA-Z]\)#\1:#' | sed 's#/#\\#g')
|
||||||
|
rm cabal.project.local 2>/dev/null || true
|
||||||
|
echo "ignore-project: False" >> cabal.project.local
|
||||||
|
echo "package direct-sqlcipher" >> cabal.project.local
|
||||||
|
echo " flags: +openssl" >> cabal.project.local
|
||||||
|
echo " extra-include-dirs: $openssl_windows_style_path\include" >> cabal.project.local
|
||||||
|
echo " extra-lib-dirs: $openssl_windows_style_path" >> cabal.project.local
|
||||||
|
|
||||||
rm -rf dist-newstyle/src/direct-sq*
|
rm -rf dist-newstyle/src/direct-sq*
|
||||||
sed -i "s/, unix /--, unix /" simplex-chat.cabal
|
sed -i "s/, unix /--, unix /" simplex-chat.cabal
|
||||||
cabal build --enable-tests
|
cabal build --enable-tests
|
||||||
|
|
|
@ -30,16 +30,9 @@ BUILD_DIR=dist-newstyle/build/$ARCH-$OS/ghc-*/simplex-chat-*
|
||||||
cd $root_dir
|
cd $root_dir
|
||||||
mkdir dist-newstyle 2>/dev/null || true
|
mkdir dist-newstyle 2>/dev/null || true
|
||||||
|
|
||||||
if [ ! -f dist-newstyle/openssl-1.1.1w/libcrypto-1_1-x64.dll ]; then
|
scripts/desktop/prepare-openssl-windows.sh
|
||||||
cd dist-newstyle
|
|
||||||
curl https://www.openssl.org/source/openssl-1.1.1w.tar.gz -o openssl.tar.gz
|
openssl_windows_style_path=$(echo `pwd`/dist-newstyle/openssl-1.1.1w | sed 's#/\([a-zA-Z]\)#\1:#' | sed 's#/#\\#g')
|
||||||
$WINDIR\\System32\\tar.exe -xvzf openssl.tar.gz
|
|
||||||
cd openssl-1.1.1w
|
|
||||||
./Configure mingw64
|
|
||||||
make
|
|
||||||
cd ../../
|
|
||||||
fi
|
|
||||||
openssl_windows_style_path=$(echo `pwd`/dist-newstyle/openssl-1.1.1w | sed 's#/\([a-z]\)#\1:#' | sed 's#/#\\#g')
|
|
||||||
rm -rf $BUILD_DIR 2>/dev/null || true
|
rm -rf $BUILD_DIR 2>/dev/null || true
|
||||||
# Existence of this directory produces build error: cabal's bug
|
# Existence of this directory produces build error: cabal's bug
|
||||||
rm -rf dist-newstyle/src/direct-sq* 2>/dev/null || true
|
rm -rf dist-newstyle/src/direct-sq* 2>/dev/null || true
|
||||||
|
|
21
scripts/desktop/prepare-openssl-windows.sh
Normal file
21
scripts/desktop/prepare-openssl-windows.sh
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
function readlink() {
|
||||||
|
echo "$(cd "$(dirname "$1")"; pwd -P)"
|
||||||
|
}
|
||||||
|
root_dir="$(dirname "$(dirname "$(readlink "$0")")")"
|
||||||
|
|
||||||
|
cd $root_dir
|
||||||
|
|
||||||
|
if [ ! -f dist-newstyle/openssl-1.1.1w/libcrypto-1_1-x64.dll ]; then
|
||||||
|
mkdir dist-newstyle 2>/dev/null || true
|
||||||
|
cd dist-newstyle
|
||||||
|
curl https://www.openssl.org/source/openssl-1.1.1w.tar.gz -o openssl.tar.gz
|
||||||
|
$WINDIR\\System32\\tar.exe -xvzf openssl.tar.gz
|
||||||
|
cd openssl-1.1.1w
|
||||||
|
./Configure mingw64
|
||||||
|
make
|
||||||
|
cd ../../
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue