Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
fc9a6399
Commit
fc9a6399
authored
Apr 11, 2016
by
Jamie Hall
Browse files
MacOs build changes.
parent
98b36526
Changes
2
Hide whitespace changes
Inline
Side-by-side
BuildServer/Darwin/build_mdanse.py
View file @
fc9a6399
...
...
@@ -33,8 +33,8 @@ if sys.platform.startswith('darwin'):
'matplotlib_backends'
:
'-'
,
'optimize'
:
'1'
,
'plist'
:
PLIST
,
'bdist_base'
:
'
scripts/
darwin/build'
,
'dist_dir'
:
'
scripts/
darwin/dist'
,
'bdist_base'
:
'
build_
darwin/build'
,
'dist_dir'
:
'
build_
darwin/dist'
,
'graph'
:
False
,
'xref'
:
False
}
...
...
BuildServer/Darwin/package.sh
View file @
fc9a6399
...
...
@@ -39,7 +39,7 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
echo
-e
"
$BLEU
""Getting last MDANSE revision"
"
$NORMAL
"
# Get revision number from git (without trailing newline)
REV_NUMBER
=
$(
git rev-list
--count
HEAD
)
export
REV_NUMBER
=
$(
git rev-list
--count
HEAD
)
echo
"
$BLEU
""Revision number is -->
${
REV_NUMBER
}
<--"
"
$NORMAL
"
# Add current revision number to python source code (will appear in "About..." dialog)
...
...
@@ -49,18 +49,18 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
# Now build last version and install it in our homebrewed python
echo
-e
"
$BLEU
""Building MDANSE"
"
$NORMAL
"
/usr/local/bin/python setup.py build
/usr/local/bin/python setup.py
install
#
/usr/local/bin/python setup.py install
TARGET_DIR
=
MDANSE-
${
BUILD_NAME
}
-b
${
REV_NUMBER
}
-MacOS
echo
-e
"
$BLEU
""Packaging MDANSE"
"
$NORMAL
"
rm
-rf
scripts/
darwin/build
rm
-rf
scripts/
darwin/dist
rm
-rf
build_
darwin/build
rm
-rf
build_
darwin/dist
# debug option for py2app, if needed
export
DISTUTILS_DEBUG
=
0
/usr/local/bin/python build_mdanse.py py2app
/usr/local/bin/python
./BuildServer/Darwin/
build_mdanse.py py2app
rc
=
$?
if
[[
$rc
!=
0
]]
;
then
echo
-e
"
$ROUGE
""Cannot build app."
"
$NORMAL
"
...
...
@@ -69,14 +69,14 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
# Do some manual cleanup, e.g.
# matplotlib/tests ==> 45.2 Mb
rm
-rf
scripts/
darwin/dist/MDANSE.app/Contents/Resources/lib/python2.7/matplotlib/tests
rm
-rf
scripts/
darwin/dist/MDANSE.app/Contents/Resources/mpl-data/sample_data
rm
-rf
build_
darwin/dist/MDANSE.app/Contents/Resources/lib/python2.7/matplotlib/tests
rm
-rf
build_
darwin/dist/MDANSE.app/Contents/Resources/mpl-data/sample_data
#Add MDANSE version file (should read the version from the bundle with pyobjc, but will figure that out later)
echo
"
$BUILD_NAME
b
$REV_NUMBER
"
>
scripts/
darwin/dist/MDANSE.app/Contents/Resources/version
echo
"
$BUILD_NAME
b
$REV_NUMBER
"
>
build_
darwin/dist/MDANSE.app/Contents/Resources/version
cd
scripts/
darwin
cd
build_
darwin
# Archive app
echo
-e
"
$BLEU
"
"Archiving
${
TARGET_DIR
}
.tar.gz ..."
"
$NORMAL
"
...
...
@@ -84,10 +84,6 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
gnutar cfp - MDANSE.app |
gzip
--best
-c
>
../../../
${
TARGET_DIR
}
.tar.gz
cd
..
# Reminder on pre-configured DmgTemplate
#>hdiutil convert DmgTemplateCompressed.dmg -format UDRW -o DmgTemplateCompressedRW.dmg
#>hdiutil convert DmgTemplateCompressedRW.dmg -format UDZO -o DmgTemplateCompressed.dmg
TODAY
=
$(
date
+
"%m-%d-%y-%Hh%Mm%S"
)
# Create sparse image for distribution
echo
-e
"
$BLEU
"
"Creating new MDANSE.dmg.sparseimage ..."
"
$NORMAL
"
...
...
@@ -96,7 +92,7 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
mv
-f
MDANSE.dmg.sparseimage MDANSE.dmg.sparseimage.
${
TODAY
}
.old
hdiutil convert DmgTemplateCompressed.dmg
-format
UDSP
-o
MDANSE.dmg.sparseimage
hdiutil resize
-size
1024m MDANSE.dmg.sparseimage
hdiutil attach
nMolDyn
.dmg.sparseimage
hdiutil attach
MDANSE
.dmg.sparseimage
echo
-e
"
$BLEU
"
"Copying MDANSE.app on dmg ..."
"
$NORMAL
"
cp
-a
dist/MDANSE.app /Volumes/MDANSE/MDANSE/
echo
-e
"
$BLEU
"
"Copying UserData/ on dmg ..."
"
$NORMAL
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment