Mercurial > hg > mxe-octave-anirudha
changeset 3235:f53543bd5dd6 GSoC_end
[Darwin] Copy launch_octave.sh script inside the App Bundle
author | Anirudha Bose <ani07nov@gmail.com> |
---|---|
date | Tue, 24 Sep 2013 01:33:33 +0530 |
parents | f9c5235c5688 |
children | 9d6566d9944e |
files | darwin_files/standalone.py |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/darwin_files/standalone.py +++ b/darwin_files/standalone.py @@ -12,7 +12,7 @@ ## * Make sure the MXE directory is your current working directory. Create an App Bundle "octave.app" ## and save it in the path "mxe-octave-anirudha/dist/"; then execute the following command: ## -## python -mmacholib find ./dist/octave.app/Contents/Resources/ 2>/dev/null | python ./darwin_files/standalone.py +## python -mmacholib find ./dist/Octave-3.7.5.app/Contents/Resources/ 2>/dev/null | python ./darwin_files/standalone.py ## ## Important Notes: ## * Octave should be compiled with the option -headerpad_max_install_names in the LDFLAGS. @@ -35,6 +35,7 @@ import os import sys +import subprocess def dylibs_fix(path): m = MachO(path) @@ -56,19 +57,23 @@ for path in sys.stdin: dylibs_fix(path.replace('\n','')) print("[Completed]") - Resources_dir = "./dist/octave.app/Contents/Resources/" + Resources_dir = "./dist/Octave-3.7.5.app/Contents/Resources/" print("\nBuilding Octave Forge packages ...") os.system("make octave-forge-packages") os.system("cp ./build_packages.m %s/src/"%(Resources_dir)) print("[Completed]") print("\nSetting up octaverc file ...") - f = open("./dist/octave.app/Contents/Resources/share/octave/site/m/startup/octaverc","w") + f = open("./dist/Octave-3.7.5.app/Contents/Resources/share/octave/site/m/startup/octaverc","w") f.write("EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'bin'), pathsep, EXEC_PATH));") f.close() print("[Completed]") print("\nMaking all files writable by user ...") os.system("chmod -R u+w %s"%(Resources_dir)) print("[Completed]") + print("\nCopying Octave Application Bundle launch script ...") + os.system("cp ./darwin_files/launch_octave.sh ./dist/Octave-3.7.5.app/Contents/Resources/") + os.system("chmod +x ./dist/Octave-3.7.5.app/Contents/Resources/launch_octave.sh") + print("[Completed]") if __name__ == '__main__': try: