Browse Source

symlinks for the two starter files

master
Nils 4 years ago
parent
commit
131730503d
  1. 16097
      template/calfbox/configure~
  2. 7
      template/launcher.template
  3. 4
      template/main.py.template
  4. 5
      template/start.py

16097
template/calfbox/configure~

File diff suppressed because it is too large

7
template/launcher.template

@ -3,6 +3,13 @@
#Symlink this to root dir as the program name without extension
import os
import sys
#print (__file__) #this reports the name of the symlink.
os.chdir(os.path.dirname(__file__))
sys.path.insert(0, os.getcwd())
from template import start #Executes various start up checks and sets up our environment likes search paths
from qtgui import mainwindow #which in turn imports the engine and starts the engine

4
template/main.py.template

@ -7,6 +7,10 @@ Symlink this file to root __main__.py
This file is an alternativ to the python launcher ./$(PROGRAM) when using zipapp.
Any code changes there must be manually recplicated here.
We do NOT need to change the working dir here, as in the direct launcher.
python zipapp uses indeed zip and will resolve symlinks to real files, thus this will become
a real file in the right place, resulting in the right cwd.
"""
if __name__ == '__main__':

5
template/start.py

@ -381,13 +381,14 @@ else:
if not pycboxfound:
print ("Here is some information. Please show this to the developers.")
if "calfbox" in sys.modules:
print (sys.modules["calfbox"].__file__)
if "calfbox" in sys.modules and sys.modules["calfbox"].__file__:
print (sys.modules["calfbox"], "->", os.path.abspath(sys.modules["calfbox"].__file__))
else:
print ("calfbox python module is not in sys.modules. This means it truly can't be found or you forgot --mute")
print ("sys.path start and tail:", sys.path[0:5], sys.path[-5:-1])
exitWithMessage("Calfbox module could not be loaded")
exitWithMessage("Calfbox module could not be loaded.")
#Capture Ctlr+C / SIGINT and let @atexit handle the rest.

Loading…
Cancel
Save