Mercurial > parpg-core
changeset 208:daa87d01adb9
Moved parpg.py and settings-dist.xml from parpg-app to the bin directory.
Removed outdated parpg.bat.in and parpg.sh.in files.
author | Beliar <KarstenBock@gmx.net> |
---|---|
date | Tue, 20 Mar 2012 14:00:34 +0100 |
parents | ae2b8aac429e |
children | c71683cda574 |
files | bin/parpg.bat.in bin/parpg.py bin/parpg.sh.in bin/settings-dist.xml |
diffstat | 4 files changed, 92 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/parpg.bat.in Fri Mar 16 15:55:10 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -@ECHO OFF - -SET PYTHONPATH=%PYTHONPATH%;@PYTHONDIR@ -CD %~dp0 -@PYTHON@ -m parpg.main "@SYSCONFDIR@" %*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/parpg.py Tue Mar 20 14:00:34 2012 +0100 @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +#TODO: Modularize this script +import sys +from optparse import OptionParser +from os import path + +usage = ('usage: %prog [options] ' + 'Example: python %prog .') + +parser = OptionParser(description='PARPG Launcher Script', usage=usage) +parser.add_option('-f', '--logfile', + help='Name of log file to save to') +parser.add_option('-l', '--loglevel', default='critical', + help='desired output level for log file') +parser.add_option('-p', '--fife-path', + help='Path to the fife module') +parser.add_option('-m', '--parpg-path', + help='Path to the parpg module') + +opts, args = parser.parse_args() + +try: + old_path = sys.path + if opts.parpg_path: + sys.path = [opts.parpg_path] + import parpg +except ImportError: + print("Could not import parpg module. Please install parpg or set the --parpg-path command line value") + parser.print_help() + sys.exit(1) +finally: + sys.path = old_path + + +from parpg.main import main +main(parser)
--- a/bin/parpg.sh.in Fri Mar 16 15:55:10 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -#!/bin/bash - -export PYTHONPATH=${PYTHONPATH}:"@PYTHONDIR@" -cd $(dirname $0) -"@PYTHON@" -m parpg.main "@SYSCONFDIR@" $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/settings-dist.xml Tue Mar 20 14:00:34 2012 +0100 @@ -0,0 +1,43 @@ +<?xml version='1.0' encoding='UTF-8'?> +<Settings> + <Module name="FIFE"> + <Setting name="FullScreen" type="bool"> False </Setting> + <Setting name="PlaySounds" type="bool"> True </Setting> + <Setting name="RenderBackend" type="str"> OpenGL </Setting> + <Setting name="ScreenResolution" type="str">800x600</Setting> + <Setting name="BitsPerPixel" type="int"> 0 </Setting> + <Setting name="InitialVolume" type="float"> 5.0 </Setting> + <Setting name="SDLRemoveFakeAlpha" type="int"> 1 </Setting> + <Setting name="GLUseFramebuffer" type="bool"> True </Setting> + <Setting name="GLUseNPOT" type="bool"> True </Setting> + <Setting name="WindowTitle" type="str"> PARPG </Setting> + <Setting name="WindowIcon" type="str">data/gui/icons/window_icon.png</Setting> + <Setting name="Font" type="str"> data/fonts/oldtypewriter.ttf </Setting> + <Setting name="FontGlyphs" strip="0" type="str"> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]" </Setting> + <Setting name="DefaultFontSize" type="int"> 12 </Setting> + <Setting name="LogModules" type="list"> controller </Setting> + <Setting name="PychanDebug" type="bool"> True </Setting> + <Setting name="LogToPrompt" type="int"> 1 </Setting> + <Setting name="LogToFile" type="int"> 0 </Setting> + </Module> + <Module name="parpg"> + <Setting name="DataPath" type="str">data</Setting> + <Setting name="MapsPath" type="str">maps</Setting> + <Setting name="MapsFile" type="str">maps.yaml</Setting> + <Setting name="Map" type="str">Mall</Setting> + <Setting name="AllAgentsFile" type="str">all_agents.yaml</Setting> + <Setting name="ObjectsPath" type="str">objects</Setting> + <Setting name="ObjectDatabaseFile" type="str">object_database.yaml</Setting> + <Setting name="DialoguesPath" type="str">dialogue</Setting> + <Setting name="QuestsPath" type="str">quests</Setting> + <Setting name="GuiPath" type="str">gui</Setting> + <Setting name="CursorPath" type="str">cursors</Setting> + <Setting name="CursorDefault" type="str">cursor_plain.png</Setting> + <Setting name="CursorUp" type="str">cursor_up.png</Setting> + <Setting name="CursorRight" type="str">cursor_right.png</Setting> + <Setting name="CursorDown" type="str">cursor_down.png</Setting> + <Setting name="CursorLeft" type="str">cursor_left.png</Setting> + <Setting name="ScrollSpeed" type="float">1.0</Setting> + <Setting name="PCSpeed" type="float">1.0</Setting> + </Module> +</Settings>