mirror of https://github.com/KLayout/klayout.git
Adding start-console.py script to klayout.app
This commit is contained in:
parent
6438d665fc
commit
f23a4a7227
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
/Applications/klayout.app/Contents/MacOS/klayout -b -r /Applications/klayout.app/Contents/MacOS/start-console.py
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/Applications/klayout.app/Contents/MacOS/klayout -b -r
|
||||||
|
import readline
|
||||||
|
import code
|
||||||
|
import sys
|
||||||
|
variables = globals().copy()
|
||||||
|
variables.update(locals())
|
||||||
|
shell = code.InteractiveConsole(variables)
|
||||||
|
cprt = 'Type "help", "copyright", "credits" or "license" for more information.'
|
||||||
|
banner = "Python %s on %s\n%s\n(%s)" % (sys.version, sys.platform,
|
||||||
|
cprt, "KLayout Python Console")
|
||||||
|
exit_msg = 'now exiting %s...' % "KLayout Python Console"
|
||||||
|
shell.interact(banner, exit_msg)
|
||||||
|
|
@ -538,8 +538,8 @@ def DeployBinariesForBundle():
|
||||||
if not DeploymentF and not DeploymentP:
|
if not DeploymentF and not DeploymentP:
|
||||||
return 1
|
return 1
|
||||||
if DeploymentF and NonOSStdLang:
|
if DeploymentF and NonOSStdLang:
|
||||||
print( "WARNING!!! You chose <-y|--deploy> while using non-OS-standard script language.", file=sys.stderr )
|
print( " WARNING!!! You chose <-y|--deploy> while using non-OS-standard script language.", file=sys.stderr )
|
||||||
print( " Use <-Y|--DEPLOY> instead", file=sys.stderr )
|
print( " Consider using <-Y|--DEPLOY> instead", file=sys.stderr )
|
||||||
#return 1
|
#return 1
|
||||||
if not os.path.isfile(MacBuildLog):
|
if not os.path.isfile(MacBuildLog):
|
||||||
print( "!!! Build log file <%s> does not present !!!" % MacBuildLog, file=sys.stderr )
|
print( "!!! Build log file <%s> does not present !!!" % MacBuildLog, file=sys.stderr )
|
||||||
|
|
@ -792,6 +792,10 @@ def DeployBinariesForBundle():
|
||||||
print( msg % command, file=sys.stderr )
|
print( msg % command, file=sys.stderr )
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
shutil.copy2( sourceDir2 + "/start-console.py", targetDirM )
|
||||||
|
shutil.copy2( sourceDir2 + "/klayout_console", targetDirM )
|
||||||
|
os.chmod( targetDirM + "/klayout_console", 0o0755 )
|
||||||
|
|
||||||
print(" [2] Relinking dylib dependencies inside Python.framework")
|
print(" [2] Relinking dylib dependencies inside Python.framework")
|
||||||
depdict = WalkFrameworkPaths(pythonFrameworkPath)
|
depdict = WalkFrameworkPaths(pythonFrameworkPath)
|
||||||
appPythonFrameworkPath = '@executable_path/../Frameworks/Python.framework/'
|
appPythonFrameworkPath = '@executable_path/../Frameworks/Python.framework/'
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#!./klayout -b -r
|
|
||||||
import readline
|
|
||||||
import code
|
|
||||||
variables = globals().copy()
|
|
||||||
variables.update(locals())
|
|
||||||
shell = code.InteractiveConsole(variables)
|
|
||||||
self.write("Python %s on %s\n%s\n(%s)\n" %
|
|
||||||
(sys.version, sys.platform, cprt,
|
|
||||||
"KLayout Python Console"))
|
|
||||||
shell.interact(banner)
|
|
||||||
Loading…
Reference in New Issue