WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Publishing with external libs (https://forum.worldviz.com/showthread.php?t=5079)

fabioped 06-24-2014 08:50 AM

Publishing with external libs
 
Hi!

I'm trying to publish to EXE 3 different games. They are in folder A, B and C. And they all import a common GameLib which resides in same folder as these games (A, B, C, GameLib). The problem is that GameLib hierarquy becomes flat as its gets published.
So I have a couple of folders with images in GameLib (symbols, art, etc), and they all get published in Script/

How can I solve this?

Would it be possible to make this publishing process a bit simpler? maybe addPublishFile/addPublishDirectory should allow virtual_path argument.

Jeff 06-30-2014 12:19 PM

Are certain resources not loading with the published exe? Are you getting errors when you display the console with the running exe?

xptomoar 06-08-2017 04:25 AM

Hi!

I am having a similar problem. I have a folder with a game folders and also another folder which is imported by every game script. The situation is described below:

Main Folder
|-Game1
| |-Script1.py
|-Game2
| |-Script2.py
|-GameX
| |-Script3.py
|-CommonFolder
|-CommonFile.py

In every Script.py I write the following code to import the CommonFile:

sys.path.append("../")
from CommonFolder.CommonFile import *


When I publish as EXE, the files from the CommonFolder move to the temporary directory of the game and then it becomes impossible to perform the import as the files are in the same directory than the game and not in the CommonFolder as supposed.

Any hint how to solve this?


All times are GMT -7. The time now is 11:44 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC