move templates and resources into print directory

pull/127/head
Lex Neva 2018-03-18 22:37:55 -04:00
rodzic 1718430664
commit 73c3f5b871
13 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -10,7 +10,7 @@ dist: distclean locales
cp *.inx dist
mkdir -p dist/inkstitch/bin/locales
cp -a locales/* dist/inkstitch/bin/locales
cp -a templates dist/inkstitch/bin/
cp -a print dist/inkstitch/bin/
if [ "$$BUILD" = "windows" ]; then \
cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
else \

Wyświetl plik

@ -79,9 +79,9 @@ class PrintPreviewServer(Thread):
def __set_resources_path(self):
if getattr(sys, 'frozen', False):
self.resources_path = os.path.join(sys._MEIPASS, 'resources')
self.resources_path = os.path.join(sys._MEIPASS, 'print', 'resources')
else:
self.resources_path = os.path.join(os.path.dirname(__file__), 'resources')
self.resources_path = os.path.join(os.path.dirname(__file__), 'print', 'resources')
def __setup_app(self):
self.__set_resources_path()
@ -126,9 +126,9 @@ class PrintPreviewServer(Thread):
class Print(InkstitchExtension):
def build_environment(self):
if getattr( sys, 'frozen', False ) :
template_dir = os.path.join(sys._MEIPASS, "templates")
template_dir = os.path.join(sys._MEIPASS, "print", "templates")
else:
template_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "templates")
template_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "print", "templates")
env = Environment(
loader = FileSystemLoader(template_dir),