Commit e38598d7 authored by Jamie Hall's avatar Jamie Hall

Final changes to build process for mac

parent f972d0a1
......@@ -6,3 +6,4 @@
.eggs
dist/
.DS_Store
Tests/FunctionalTests/Jobs
......@@ -5,27 +5,18 @@ import os
if sys.platform.startswith('darwin'):
from setuptools import setup
#build_name = os.environ['BUILD_NAME']
#rev_number = os.environ['REV_NUMBER']
#version = build_name + " v" + rev_number
version = 1
build_name = "MDANSE"
build_name = os.environ['BUILD_NAME']
rev_number = os.environ['REV_NUMBER']
version = build_name + " v" + rev_number
APP = ['../../../Scripts/mdanse_gui']
PLIST = {
u'CFBundleName': u'MDANSE',
u'CFBundleShortVersionString': build_name,
u'CFBundleVersion': version,
u'CFBundleIdentifier': u'eu.ill.MDANSE-'+build_name,
u'LSMinimumSystemVersion': u'10.6',
u'LSApplicationCategoryType': u'public.app-category.science',
u'CFBundleDocumentTypes': [
{
u'CFBundleTypeRole': u'Viewer',
u'LSItemContentTypes': [u'eu.ill.MDANSE'],
u'LSHandlerRank': u'Owner',
}
]
u'LSApplicationCategoryType': u'public.app-category.science'
}
OPTIONS = {
'argv_emulation': True,
......
......@@ -47,14 +47,34 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
# Now build last version and install it in our homebrewed python
echo -e "$BLEU""Building MDANSE" "$NORMAL"
# Clean up temporary build directories
rm -rf build
rm -rf dist
# Remove previous install of MDANSE
rm /usr/local/bin/mdanse*
rm /usr/local/lib/python2.7/site-packages/MDANSE*.egg-info
rm -rf /usr/local/lib/python2.7/site-packages/MDANSE
# Build and install MDANSE to the homebrewed python
/usr/local/bin/python setup.py build
/usr/local/bin/python setup.py install
# Performs the unit tests
cd Tests/UnitTests
nosetests --verbosity=3 -P .
cd ../..
cd Tests/FunctionalTests/Jobs
python BuildJobTests.py
nosetests --verbosity=3 --exe -P .
cd ../../..
TARGET_DIR=MDANSE-${BUILD_NAME}-b${REV_NUMBER}-MacOS
echo -e "$BLEU""Packaging MDANSE" "$NORMAL"
rm -rf BuildServer/Darwin/Build/dist
rm -rf BuildServer/Darwin/Build/build
rm -rf BuildServer/Darwin/Build
mkdir BuildServer/Darwin/Build
# debug option for py2app, if needed
export DISTUTILS_DEBUG=0
......@@ -84,6 +104,8 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
hdiutil unmount /Volumes/MDANSE -force -quiet
sleep 5
../Tools/create-dmg/create-dmg --background "../Resources/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 ./dist
exit
fi
......
......@@ -161,6 +161,8 @@ echo "Mount directory: $MOUNT_DIR"
DEV_NAME=$(hdiutil attach -readwrite -noverify -noautoopen "${DMG_TEMP_NAME}" | egrep '^/dev/' | sed 1q | awk '{print $1}')
echo "Device name: $DEV_NAME"
sleep 5
if ! test -z "$BACKGROUND_FILE"; then
echo "Copying background file..."
test -d "$MOUNT_DIR/.background" || mkdir "$MOUNT_DIR/.background"
......
......@@ -310,9 +310,9 @@ or directly to the MDANSE mailing list:
def on_open_api(self, event):
mainHTML = os.path.join(PLATFORM.api_path(),'MDANSE.html')
if os.path.exists(mainHTML):
webbrowser.open(mainHTML)
webbrowser.open("file://%s" % mainHTML)
else:
LOGGER("Can not open MDANSE API. Maybe the documentation was not properly installed.", "error",['dialog'])
......
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