Fix missing artifacts in Windows build
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
d77c2f9c78
commit
f0cd54e65e
|
@ -19,13 +19,13 @@ endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUNICODE -std=c11")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUNICODE -std=c11")
|
||||||
set(CMAKE_INSTALL_PREFIX bin)
|
set(CMAKE_INSTALL_PREFIX bin)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}" CACHE PATH "Where to place compiled executables.")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}" CACHE PATH "Where to place compiled executables.")
|
||||||
set(${APP_NAME}_BINARY_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
|
||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
|
||||||
|
|
||||||
project(${APP_NAME} C CXX)
|
project(${APP_NAME} C CXX)
|
||||||
|
set(${APP_NAME}_BINARY_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
|
||||||
set(USED_QT_MODULES Core Concurrent Qml Quick WebSockets Svg)
|
set(USED_QT_MODULES Core Concurrent Qml Quick WebSockets Svg)
|
||||||
include(QtConfiguration)
|
include(QtConfiguration)
|
||||||
|
|
|
@ -72,7 +72,7 @@ function joinExistingPath() {
|
||||||
|
|
||||||
function join { local IFS="$1"; shift; echo "$*"; }
|
function join { local IFS="$1"; shift; echo "$*"; }
|
||||||
|
|
||||||
CMAKE_EXTRA_FLAGS=$'-DCMAKE_CXX_FLAGS:=\'-DBUILD_FOR_BUNDLE=1\''
|
CMAKE_EXTRA_FLAGS="-DCMAKE_CXX_FLAGS:='-DBUILD_FOR_BUNDLE=1'"
|
||||||
[ -n $STATUS_NO_LOGGING ] && CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DSTATUS_NO_LOGGING=1"
|
[ -n $STATUS_NO_LOGGING ] && CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DSTATUS_NO_LOGGING=1"
|
||||||
if is_windows_target; then
|
if is_windows_target; then
|
||||||
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DCMAKE_TOOLCHAIN_FILE='Toolchain-Ubuntu-mingw64.cmake'"
|
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DCMAKE_TOOLCHAIN_FILE='Toolchain-Ubuntu-mingw64.cmake'"
|
||||||
|
@ -146,23 +146,23 @@ function buildClojureScript() {
|
||||||
|
|
||||||
function compile() {
|
function compile() {
|
||||||
# Temporarily add path to javascript bundle to package.json
|
# Temporarily add path to javascript bundle to package.json
|
||||||
local jsBundleLine="\"desktopJSBundlePath\": \"$WORKFOLDER/Status.jsbundle\""
|
local JS_BUNDLE_PATH="$WORKFOLDER/Status.jsbundle"
|
||||||
|
local jsBundleLine="\"desktopJSBundlePath\": \"$JS_BUNDLE_PATH\""
|
||||||
local jsPackagePath=$(joinExistingPath "$STATUSREACTPATH" 'desktop_files/package.json.orig')
|
local jsPackagePath=$(joinExistingPath "$STATUSREACTPATH" 'desktop_files/package.json.orig')
|
||||||
local tmp=$(mktemp)
|
local tmp=$(mktemp)
|
||||||
jq ".=(. + {$jsBundleLine})" "$jsPackagePath" > "$tmp" && mv "$tmp" "$jsPackagePath"
|
jq ".=(. + {$jsBundleLine})" "$jsPackagePath" > "$tmp" && mv "$tmp" "$jsPackagePath"
|
||||||
echo -e "${YELLOW}Added 'desktopJSBundlePath' line to $jsPackagePath:${NC}"
|
echo -e "${YELLOW}Added 'desktopJSBundlePath' line to $jsPackagePath:${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
local EXTERNAL_MODULES_DIR="$(joinStrings ${external_modules_dir[@]})"
|
||||||
|
local DESKTOP_FONTS="$(joinStrings ${external_fonts[@]})"
|
||||||
pushd desktop
|
pushd desktop
|
||||||
rm -rf CMakeFiles CMakeCache.txt cmake_install.cmake Makefile modules reportApp/CMakeFiles desktop/node_modules/google-breakpad/CMakeFiles desktop/node_modules/react-native-keychain/desktop/qtkeychain-prefix/src/qtkeychain-build/CMakeFiles desktop/node_modules/react-native-keychain/desktop/qtkeychain
|
rm -rf CMakeFiles CMakeCache.txt cmake_install.cmake Makefile modules reportApp/CMakeFiles desktop/node_modules/google-breakpad/CMakeFiles desktop/node_modules/react-native-keychain/desktop/qtkeychain-prefix/src/qtkeychain-build/CMakeFiles desktop/node_modules/react-native-keychain/desktop/qtkeychain
|
||||||
EXTERNAL_MODULES_DIR="$(joinStrings ${external_modules_dir[@]})"
|
|
||||||
DESKTOP_FONTS="$(joinStrings ${external_fonts[@]})"
|
|
||||||
JS_BUNDLE_PATH="$WORKFOLDER/Status.jsbundle"
|
|
||||||
if is_windows_target; then
|
if is_windows_target; then
|
||||||
export PATH=$STATUSREACTPATH:$PATH
|
export PATH=$STATUSREACTPATH:$PATH
|
||||||
|
|
||||||
# Get the toolchain bin folder from toolchain/conanbuildinfo.json
|
# Get the toolchain bin folder from toolchain/conanbuildinfo.json
|
||||||
bin_dirs=$(jq -r '.dependencies[0].bin_paths | .[]' toolchain/conanbuildinfo.json)
|
local bin_dirs=$(jq -r '.dependencies[0].bin_paths | .[]' toolchain/conanbuildinfo.json)
|
||||||
while read -r bin_dir; do
|
while read -r bin_dir; do
|
||||||
if [ ! -d $bin ]; then
|
if [ ! -d $bin ]; then
|
||||||
echo -e "${RED}Could not find $bin_dir directory from 'toolchain/conanbuildinfo.json', aborting${NC}"
|
echo -e "${RED}Could not find $bin_dir directory from 'toolchain/conanbuildinfo.json', aborting${NC}"
|
||||||
|
@ -172,11 +172,11 @@ function compile() {
|
||||||
done <<< "$bin_dirs"
|
done <<< "$bin_dirs"
|
||||||
fi
|
fi
|
||||||
cmake -Wno-dev \
|
cmake -Wno-dev \
|
||||||
|
$CMAKE_EXTRA_FLAGS \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DEXTERNAL_MODULES_DIR="$EXTERNAL_MODULES_DIR" \
|
-DEXTERNAL_MODULES_DIR="$EXTERNAL_MODULES_DIR" \
|
||||||
-DDESKTOP_FONTS="$DESKTOP_FONTS" \
|
-DDESKTOP_FONTS="$DESKTOP_FONTS" \
|
||||||
-DJS_BUNDLE_PATH="$JS_BUNDLE_PATH" \
|
-DJS_BUNDLE_PATH="$JS_BUNDLE_PATH" || exit 1
|
||||||
$CMAKE_EXTRA_FLAGS || exit 1
|
|
||||||
make -S -j5 || exit 1
|
make -S -j5 || exit 1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue