mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
CI build mac
This commit is contained in:
@ -104,7 +104,32 @@ build-linux:
|
|||||||
script:
|
script:
|
||||||
- make build
|
- make build
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "bridge-linux-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
|
name: "bridge-linux-$CI_COMMIT_SHORT_SHA"
|
||||||
|
paths:
|
||||||
|
- bridge_*.tgz
|
||||||
|
expire_in: 2 week
|
||||||
|
|
||||||
|
build-darwin:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||||
|
- export PATH=/usr/local/bin:$PATH
|
||||||
|
- export PATH=/usr/local/opt/git/bin:$PATH
|
||||||
|
- export PATH=/usr/local/opt/make/libexec/gnubin:$PATH
|
||||||
|
- export PATH=/usr/local/opt/go@1.13/bin:$PATH
|
||||||
|
- export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH
|
||||||
|
- export GOPATH=~/go
|
||||||
|
- export PATH=$GOPATH/bin:$PATH
|
||||||
|
cache: {}
|
||||||
|
tags:
|
||||||
|
- macOS-bridge
|
||||||
|
only:
|
||||||
|
- devel
|
||||||
|
script:
|
||||||
|
- make build
|
||||||
|
artifacts:
|
||||||
|
name: "bridge-darwin-$CI_COMMIT_SHORT_SHA"
|
||||||
paths:
|
paths:
|
||||||
- bridge_*.tgz
|
- bridge_*.tgz
|
||||||
expire_in: 2 week
|
expire_in: 2 week
|
||||||
|
|||||||
1
Makefile
1
Makefile
@ -55,6 +55,7 @@ ${DEPLOY_DIR}/darwin: ${EXE_TARGET}
|
|||||||
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebEngine.framework"
|
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebEngine.framework"
|
||||||
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebView.framework"
|
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebView.framework"
|
||||||
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebEngineCore.framework"
|
rm -rf "${DARWINAPP_CONTENTS}/Frameworks/QtWebEngineCore.framework"
|
||||||
|
./utils/remove_non_relative_links_darwin.sh "${EXE_TARGET}"
|
||||||
|
|
||||||
${DEPLOY_DIR}/windows: ${EXE_TARGET}
|
${DEPLOY_DIR}/windows: ${EXE_TARGET}
|
||||||
cp ./internal/frontend/share/icons/logo.ico ${DEPLOY_DIR}/windows/
|
cp ./internal/frontend/share/icons/logo.ico ${DEPLOY_DIR}/windows/
|
||||||
|
|||||||
47
utils/remove_non_relative_links_darwin.sh
Executable file
47
utils/remove_non_relative_links_darwin.sh
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
## Copyright (c) 2020 Proton Technologies AG
|
||||||
|
##
|
||||||
|
## This file is part of ProtonMail Bridge.
|
||||||
|
##
|
||||||
|
## ProtonMail Bridge is free software: you can redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## ProtonMail Bridge is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
## remove non-relative or non-system path: in our case env therecipe
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
path_to_binary=$1
|
||||||
|
|
||||||
|
if [ -z ${path_to_binary} ]; then
|
||||||
|
echo "The first parameter should be path to binary"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
for remove_path_qt in $(otool -l "${path_to_binary}" | grep protonapple | awk '{print $2}');
|
||||||
|
do
|
||||||
|
if [ ! -z "${remove_path_qt}" ]; then
|
||||||
|
printf "\e[0;32mRemove path to qt ${remove_path_qt} ...\033[0m\n\e[0;31m"
|
||||||
|
install_name_tool -delete_rpath "${remove_path_qt}" "${path_to_binary}" || exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rpath_rule=$(otool -l "${path_to_binary}" | grep executable_path | awk '{print $2}')
|
||||||
|
printf "\e[0;32mRPATH rules '${rpath_rule}' \033[0m\n\e[0;31m"
|
||||||
|
if [ -z ${rpath_rule} ];
|
||||||
|
then
|
||||||
|
echo "There should be at least executable path..."
|
||||||
|
printf "\e[0;32mAdding path '@executable_path/../Frameworks'\033[0m\n\e[0;31m"
|
||||||
|
install_name_tool -add_rpath "@executable_path/../Frameworks" "${path_to_binary}" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
Reference in New Issue
Block a user