collapse

* Notice

Important notice (31 July): We have recently recovered from a nearly two day downtime due to an attack. No data was lost or stolen but the server has been reinstalled as a precaution. Please let us know if you encounter any issues. We apologise for the unacceptable inconvenience. Please read here for more information.

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Python 2.7.1 for bloodlines  (Read 8867 times)

Offline ColonelAlias

  • Methuselah
  • ****
  • Posts: 327
  • Reputation: +368/-1
Re: Python 2.7.1 for bloodlines
« Reply #15 on: May 09, 2011, 03:26:30 pm »
Oh that. Well, it's funny, the game itself imports the Vampire/python paths with a hack. It adds it (them? can't recall) to the sys.path list.

I set the home relative to the exe. So i got the exe location that started the process, removed the exe name, added Bin/Python, set that as home, and presto, new self-contained python installation. The trick above still works.
« Last Edit: May 09, 2011, 03:37:55 pm by ColonelAlias »

Offline int9

  • Fledgling
  • *
  • Posts: 14
  • Reputation: +22/-0
Re: Python 2.7.1 for bloodlines
« Reply #16 on: May 09, 2011, 03:56:38 pm »
I see now that's exactly what I did for mods :). http://pastebin.com/NYnGAWNA

Had to download that from Drathian's upload.

If the problem is the forward-slashes... that's easily fixable in the script. It looks like the game originally used backslashes.

Offline ColonelAlias

  • Methuselah
  • ****
  • Posts: 327
  • Reputation: +368/-1
Re: Python 2.7.1 for bloodlines
« Reply #17 on: May 10, 2011, 12:14:37 am »
It should just follow a OS independent way to find the separator and construct the paths you want. If it runs on the game python version (always windows to wine), or outside, it then doesn't matter.

These functions should set you up:
http://docs.python.org/library/os.path.html (especially join)

If you need to find the game location, that is possible too (I did it for the python interpreter in c, but i think there should be a way in python too).

TBH i won't use a shared install like this: i keep a fully official patched version of the game zipped, that i unzip and install the latest unofficial patch i want over.
« Last Edit: May 10, 2011, 12:21:35 am by ColonelAlias »

 

SimplePortal 2.3.7 © 2008-2020, SimplePortal