Skip to content

Commit

Permalink
Merge branch 'hotfix/0.9.1c'
Browse files Browse the repository at this point in the history
My kingdom for a reproducible build

While I wasn't looking, Python's dylib moved and started crashing if run
from a disk image; the framework also decided that storing all of my
local site-packages was a good idea (so I have to clear those out to
avoid distributing them with Antimony.app).
  • Loading branch information
mkeeter committed May 22, 2016
2 parents 16faf8a + 7081cd5 commit 5326b40
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
16 changes: 13 additions & 3 deletions app/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,25 @@ int main(int argc, char *argv[])
QSurfaceFormat::setDefaultFormat(format);
}

// Create the Application object
App app(argc, argv);

#if defined Q_OS_MAC
if (QCoreApplication::applicationDirPath().startsWith("/Volumes/"))
{
QMessageBox::critical(NULL, "Cannot run from disk image",
"Antimony cannot run from a disk image.\n"
"Please copy it out of the disk image and relaunch.");
exit(1);
}
#endif

// Initialize various Python modules and the interpreter itself
fab::preInit();
Graph::preInit();
AppHooks::preInit();
Py_Initialize();

// Create the Application object
App app(argc, argv);

// Set locale to C to make atof correctly parse floats
setlocale(LC_NUMERIC, "C");

Expand Down
15 changes: 8 additions & 7 deletions deploy/mac/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ cd app/Antimony.app/Contents/PlugIns
rm -rf accessible audio imageformats mediaservice playlistformats position printsupport qml1tooling sensorgestures sensors

cd ../Frameworks
rm -rf QtDeclarative.framework QtMultimedia.framework QtMultimediaWidgets.framework QtPositioning.framework QtQml.framework QtQuick.framework QtScript.framework QtSensors.framework QtSql.framework QtXmlPatterns.framework
rm -rf QtDeclarative.framework QtMultimedia.framework QtMultimediaWidgets.framework QtPositioning.framework QtQml.framework QtQuick.framework QtScript.framework QtSensors.framework QtSql.framework QtXmlPatterns.framework Qt3DCore.framework Qt3DRender.framework QtLocation.framework QtSerialBus.framework QtSerialPort.framework

PY_VERSION=3.5
cp -r /usr/local/Frameworks/Python.framework .
rm -rf Python.framework/Versions/2.7 Python.framework/Versions/Current
rm -rf Python.framework/Versions/$PY_VERSION/lib/python$PY_VERSION/site-packages/*
chmod a+w libboost_python3.dylib
install_name_tool -change /usr/local/Frameworks/Python.framework/Versions/3.5/Python \
@executable_path/../Frameworks/Python.framework/Versions/3.5/Python \
libboost_python3.dylib

cd ../Resources
rm empty.lproj

cd ../MacOS
install_name_tool -change /usr/local/Frameworks/Python.framework/Versions/3.5/Python \
@executable_path/../Frameworks/Python.framework/Versions/3.5/Python \
install_name_tool -change /usr/local/opt/python3/Frameworks/Python.framework/Versions/$PY_VERSION/Python \
@executable_path/../Frameworks/Python.framework/Versions/$PY_VERSION/Python \
Antimony

cd ../../..
cp -r sb/fab Antimony.app/Contents/Frameworks/Python.framework/Versions/3.5/lib/python3.5/fab
cp -r sb/fab Antimony.app/Contents/Frameworks/Python.framework/Versions/$PY_VERSION/lib/python$PY_VERSION/fab
cp -r sb/nodes Antimony.app/Contents/Resources

sed -i "" "s:0\.0\.0:$RELEASE:g" Antimony.app/Contents/Info.plist
Expand Down

0 comments on commit 5326b40

Please sign in to comment.