source: branches/active/td2_sprint1/game/parpg_editor.py @ 711

Revision 674, 1.2 KB checked in by technomage, 9 years ago (diff)

Patch by Technomage

  • Modified the sha-bang line (#!) of the top-level entry scripts to search for python2 rather than python, since some linux systems now default to python 3.x which would break PARPG on those systems.
  • Some general cleanup of the dialogue_demo.py script.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/usr/bin/env python2
2
3#   This file is part of PARPG.
4#   PARPG is free software: you can redistribute it and/or modify
5#   it under the terms of the GNU General Public License as published by
6#   the Free Software Foundation, either version 3 of the License, or
7#   (at your option) any later version.
8#
9#   PARPG is distributed in the hope that it will be useful,
10#   but WITHOUT ANY WARRANTY; without even the implied warranty of
11#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12#   GNU General Public License for more details.
13#
14#   You should have received a copy of the GNU General Public License
15#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>.
16
17import os
18import sys
19
20"""
21This runs the editor in ..\tools\map_editor\run.py
22"""
23
24if __name__ == '__main__':
25    parpg_path = os.path.split(os.path.realpath(sys.argv[0]))[0]
26    parpg_dir = parpg_path.split('/')[-1]
27
28    args = [sys.executable, './run.py']
29
30    if len(sys.argv) > 1:
31        map_path = sys.argv[1]
32
33        args.append(os.path.join('..', parpg_dir, map_path))
34        print args
35
36    fife_editor_path = os.path.join(parpg_path, '..', 'tools', 'map_editor')
37    os.chdir(fife_editor_path)
38    os.execv(args[0], args)
Note: See TracBrowser for help on using the repository browser.