Commit 17010329 authored by Remi Perenon's avatar Remi Perenon

Merge branch 'build-add_build_branches_and_clean_macos_dmg' into 'develop'

Build add build branches and clean macos dmg

See merge request !35
parents 79af7515 a04d2ad1
Pipeline #4344 passed with stages
in 32 minutes and 12 seconds
......@@ -40,6 +40,7 @@ deploy:ubuntu_trusty:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^build-.*$/
- tags
- web
when: on_success
......@@ -78,6 +79,7 @@ deploy:ubuntu_xenial:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^build-.*$/
- tags
- web
when: on_success
......@@ -116,6 +118,7 @@ deploy:ubuntu_bionic:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^build-.*$/
- tags
- web
when: on_success
......@@ -161,6 +164,7 @@ deploy:osx:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^build-.*$/
- tags
- web
when: on_success
......@@ -207,6 +211,7 @@ deploy:windows:
- develop
- /^release-.*$/
- /^hotfix-.*$/
- /^build-.*$/
- tags
- web
when: on_success
......
......@@ -6,3 +6,7 @@ export PYTHONEXE=/usr/bin/python
export SED_I_COMMAND=(sed -i)
# Define colors
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
......@@ -9,7 +9,6 @@ export DISTUTILS_DEBUG=0
#############################
# PREPARATION
#############################
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEBIAN_ROOT_DIR=${CI_TEMP_DIR}/dist
......@@ -75,4 +74,3 @@ if [ $status -ne 0 ]; then
echo -e "${RED}" "Cannot build app.""${NORMAL}"
exit $status
fi
......@@ -12,4 +12,3 @@ do
install_name_tool -change /usr/local/lib/libwx_$l-3.0.dylib @executable_path/../Frameworks/libwx_$l-3.0.dylib $f
done
done
......@@ -7,3 +7,7 @@ export PYTHONEXE=/usr/bin/python
# The sed -i"" is compulsory other crashes on macos
export SED_I_COMMAND=(sed -i "")
# Define colors
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
......@@ -44,7 +44,6 @@ echo "${VERSION_NAME}" > ${MDANSE_APP_DIR}/Contents/Resources/version
#############################
# Copying Python
#############################
### When launching the bundle, the executable target (i.e. MDANSE) modify the python that is shipped with the bundle (si.e. package path, dylib dependencies ...)
### see http://joaoventura.net/blog/2016/embeddable-python-osx/ for technical details
### In our case we also want the user to be able to start directly python without launching the bundle executable (e.g. to run scripts in command line) which is the reason
......@@ -62,31 +61,6 @@ install_name_tool -id @loader_path/libpython2.7.dylib ${MDANSE_APP_DIR}/Contents
ln -s ../Resources/bin/python ${MDANSE_APP_DIR}/Contents/MacOS/python
# Do some manual cleanup, e.g.
# matplotlib/tests ==> 45.2 Mb
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/matplotlib/tests
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/mpl-data/sample_data
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/scipy
#rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/zmq
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7
#mkdir ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/lib
#cp -r /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7
#rm -rf ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/*
#rm ${MDANSE_APP_DIR}/Contents/MacOS/python
#cp /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ${MDANSE_APP_DIR}/Contents/MacOS/python
#cp /System/Library/Frameworks/Python.framework/Versions/2.7/Python ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
#install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ${MDANSE_APP_DIR}/Contents/MacOS/python
#chmod 777 ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
#install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ${MDANSE_APP_DIR}/Contents/Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib
## In order that the modified python in the bundle import the zipped sitepackages located in Contents/Resources we provide a modified site.py that will
## update the sys.path accordingly
cp ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/site.py ${MDANSE_APP_DIR}/Contents/Resources/.
cp ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/site.py ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/.
......@@ -96,6 +70,19 @@ ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/change_dylib_path.sh
# Comment the 'add_system_python_extras' call that add some System path to the sys.path
"${SED_I_COMMAND[@]}" "s/^add_system_python_extras()$/#add_system_python_extras()/" ${MDANSE_APP_DIR}/Contents/Resources/__boot__.py
#############################
# Cleanup
#############################
# Removing matplotlib/tests ==> 45.2 Mb
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/matplotlib/tests
# Sample data for matplotlib is useless
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/matplotlib/mpl-data/sample_data
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/mpl-data/sample_data
# Scipy package is useless
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/scipy
# ZMQ package is useless
rm -rf ${MDANSE_APP_DIR}/Contents/Resources/lib/python2.7/zmq
#############################
# Create DMG
#############################
......@@ -104,4 +91,3 @@ sleep 5
${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/create-dmg --background "${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/dmg_background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ${CI_TEMP_DIR}/dist
mv ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/${MDANSE_DMG} ${CI_PROJECT_DIR}
......@@ -52,7 +52,6 @@ ${PYTHONEXE} setup.py install --prefix=${CI_TEMP_INSTALL_DIR}
status=$?
if [ $status -ne 0 ]; then
echo -e "${RED}" "Failed to build MDANSE""${NORMAL}"
echo -e "${RED}" "Failed to build/install MDANSE""${NORMAL}"
exit $status
fi
......@@ -32,10 +32,6 @@ if [ -z ${CI_COMMIT_REF_NAME} ]; then
export CI_COMMIT_REF_NAME
fi
export RED="\\033[1;31m"
export BLUE="\\033[1;34m"
export NORMAL="\\033[0m"
echo -e "${BLUE}""Commit id = ${CI_COMMIT_ID}""${NORMAL}"
echo -e "${BLUE}""Branch name = ${CI_COMMIT_REF_NAME}""${NORMAL}"
......@@ -64,5 +60,3 @@ else
fi
fi
export VERSION_NAME
......@@ -3,7 +3,6 @@
#############################
# PREPARATION
#############################
export PYTHONPATH=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages:${PYTHONPATH}
#############################
......@@ -43,4 +42,3 @@ if [ $status -ne 0 ]; then
echo -e "${RED}" "One or several functional tests failed"
exit $status
fi
@echo off
rem VERSION_NAME
rem MDANSE_SOURCE_DIR
rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
rem Set the location of the MDANSE CI scripts
set BUILD_SCRIPT_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows
......
@echo off
rem VERSION_NAME
rem MDANSE_SOURCE_DIR
rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
cd %MDANSE_SOURCE_DIR%
......
@echo off
rem VERSION_NAME
rem MDANSE_SOURCE_DIR
rem BUILD_TARGET
rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR
:: %1 --> the build target
......
......@@ -14,6 +14,7 @@ version 1.2.0
* FIXED issue #20 Opening the theoretical help on MacOS is now OK
* FIXED issue #18 The items of the checkable combobox are now checkable on Windows
* FIXED issue #16 The file filter combo box is now available from the input file dialog on MacOS
* CHANGED (internal) issue #33 The macOS dmg is now ligher than before
* CHANGED (internal) MDANSE is now built with system python (2.7.10)
version 1.1.3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment