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
Show whitespace changes
Inline
Side-by-side
BuildServer/Darwin/build_mdanse.py
View file @
fc9a6399
...
@@ -33,8 +33,8 @@ if sys.platform.startswith('darwin'):
...
@@ -33,8 +33,8 @@ if sys.platform.startswith('darwin'):
'matplotlib_backends'
:
'-'
,
'matplotlib_backends'
:
'-'
,
'optimize'
:
'1'
,
'optimize'
:
'1'
,
'plist'
:
PLIST
,
'plist'
:
PLIST
,
'bdist_base'
:
'
scripts/
darwin/build'
,
'bdist_base'
:
'
build_
darwin/build'
,
'dist_dir'
:
'
scripts/
darwin/dist'
,
'dist_dir'
:
'
build_
darwin/dist'
,
'graph'
:
False
,
'graph'
:
False
,
'xref'
:
False
'xref'
:
False
}
}
...
...
BuildServer/Darwin/package.sh
View file @
fc9a6399
...
@@ -39,7 +39,7 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
...
@@ -39,7 +39,7 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
echo
-e
"
$BLEU
""Getting last MDANSE revision"
"
$NORMAL
"
echo
-e
"
$BLEU
""Getting last MDANSE revision"
"
$NORMAL
"
# Get revision number from git (without trailing newline)
# 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
"
echo
"
$BLEU
""Revision number is -->
${
REV_NUMBER
}
<--"
"
$NORMAL
"
# Add current revision number to python source code (will appear in "About..." dialog)
# Add current revision number to python source code (will appear in "About..." dialog)
...
@@ -49,18 +49,18 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
...
@@ -49,18 +49,18 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
# Now build last version and install it in our homebrewed python
# Now build last version and install it in our homebrewed python
echo
-e
"
$BLEU
""Building MDANSE"
"
$NORMAL
"
echo
-e
"
$BLEU
""Building MDANSE"
"
$NORMAL
"
/usr/local/bin/python setup.py build
/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
TARGET_DIR
=
MDANSE-
${
BUILD_NAME
}
-b
${
REV_NUMBER
}
-MacOS
echo
-e
"
$BLEU
""Packaging MDANSE"
"
$NORMAL
"
echo
-e
"
$BLEU
""Packaging MDANSE"
"
$NORMAL
"
rm
-rf
scripts/
darwin/build
rm
-rf
build_
darwin/build
rm
-rf
scripts/
darwin/dist
rm
-rf
build_
darwin/dist
# debug option for py2app, if needed
# debug option for py2app, if needed
export
DISTUTILS_DEBUG
=
0
export
DISTUTILS_DEBUG
=
0
/usr/local/bin/python build_mdanse.py py2app
/usr/local/bin/python
./BuildServer/Darwin/
build_mdanse.py py2app
rc
=
$?
rc
=
$?
if
[[
$rc
!=
0
]]
;
then
if
[[
$rc
!=
0
]]
;
then
echo
-e
"
$ROUGE
""Cannot build app."
"
$NORMAL
"
echo
-e
"
$ROUGE
""Cannot build app."
"
$NORMAL
"
...
@@ -69,14 +69,14 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
...
@@ -69,14 +69,14 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
# Do some manual cleanup, e.g.
# Do some manual cleanup, e.g.
# matplotlib/tests ==> 45.2 Mb
# matplotlib/tests ==> 45.2 Mb
rm
-rf
scripts/
darwin/dist/MDANSE.app/Contents/Resources/lib/python2.7/matplotlib/tests
rm
-rf
build_
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/mpl-data/sample_data
#Add MDANSE version file (should read the version from the bundle with pyobjc, but will figure that out later)
#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
# Archive app
echo
-e
"
$BLEU
"
"Archiving
${
TARGET_DIR
}
.tar.gz ..."
"
$NORMAL
"
echo
-e
"
$BLEU
"
"Archiving
${
TARGET_DIR
}
.tar.gz ..."
"
$NORMAL
"
...
@@ -84,10 +84,6 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
...
@@ -84,10 +84,6 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
gnutar cfp - MDANSE.app |
gzip
--best
-c
>
../../../
${
TARGET_DIR
}
.tar.gz
gnutar cfp - MDANSE.app |
gzip
--best
-c
>
../../../
${
TARGET_DIR
}
.tar.gz
cd
..
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"
)
TODAY
=
$(
date
+
"%m-%d-%y-%Hh%Mm%S"
)
# Create sparse image for distribution
# Create sparse image for distribution
echo
-e
"
$BLEU
"
"Creating new MDANSE.dmg.sparseimage ..."
"
$NORMAL
"
echo
-e
"
$BLEU
"
"Creating new MDANSE.dmg.sparseimage ..."
"
$NORMAL
"
...
@@ -96,7 +92,7 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
...
@@ -96,7 +92,7 @@ if [ "$BUILD_TARGET" = "darwin" ]; then
mv
-f
MDANSE.dmg.sparseimage MDANSE.dmg.sparseimage.
${
TODAY
}
.old
mv
-f
MDANSE.dmg.sparseimage MDANSE.dmg.sparseimage.
${
TODAY
}
.old
hdiutil convert DmgTemplateCompressed.dmg
-format
UDSP
-o
MDANSE.dmg.sparseimage
hdiutil convert DmgTemplateCompressed.dmg
-format
UDSP
-o
MDANSE.dmg.sparseimage
hdiutil resize
-size
1024m 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
"
echo
-e
"
$BLEU
"
"Copying MDANSE.app on dmg ..."
"
$NORMAL
"
cp
-a
dist/MDANSE.app /Volumes/MDANSE/MDANSE/
cp
-a
dist/MDANSE.app /Volumes/MDANSE/MDANSE/
echo
-e
"
$BLEU
"
"Copying UserData/ on dmg ..."
"
$NORMAL
"
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