aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/aux-files/renpy
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2021-12-17 19:59:05 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-01-15 09:41:59 +0100
commit0f9e73841e5841224b8f1f63098baa649090df4e (patch)
tree41c645bfc64077c9780cb30bd890f99c54951df3 /gnu/packages/aux-files/renpy
parent72d43df66d38c510a7ba503924d85d655a26a978 (diff)
downloadguix-0f9e73841e5841224b8f1f63098baa649090df4e.tar
guix-0f9e73841e5841224b8f1f63098baa649090df4e.tar.gz
gnu: renpy: Move renpy command to aux-files.
* gnu/packages/aux-files/renpy/renpy.in: New file. * gnu/packages/game-development.scm (renpy)[install]: Use renpy.in with substitute*. * Makefile.am (AUX_FILES): Add it here.
Diffstat (limited to 'gnu/packages/aux-files/renpy')
-rw-r--r--gnu/packages/aux-files/renpy/renpy.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/aux-files/renpy/renpy.in b/gnu/packages/aux-files/renpy/renpy.in
new file mode 100644
index 0000000000..914a735fa4
--- /dev/null
+++ b/gnu/packages/aux-files/renpy/renpy.in
@@ -0,0 +1,48 @@
+#! @PYTHON@
+# -*- mode: python -*-
+
+from __future__ import print_function
+
+import os
+import sys
+import warnings
+
+def path_to_common(renpy_base):
+ return renpy_base + "/common"
+
+def path_to_saves(gamedir, save_directory=None):
+ import renpy
+
+ if save_directory is None:
+ save_directory = renpy.config.save_directory
+ save_directory = renpy.exports.fsencode(save_directory)
+
+ if not save_directory:
+ return gamedir + "/saves"
+
+ return os.path.join(os.path.expanduser("~/.renpy"), save_directory)
+
+def main():
+ try:
+ import renpy.bootstrap
+ import renpy.arguments
+ except ImportError:
+ print("""Could not import renpy.bootstrap.
+Please ensure you decompressed Ren'py correctly, preserving the directory
+structure.""", file=sys.stderr)
+ raise
+
+ args = renpy.arguments.bootstrap()
+ if not args.basedir:
+ print("""This Ren'py requires a basedir to launch.
+The basedir is the directory, in which .rpy source files or compiled .rpyc files
+live -- usually the 'game' subdirectory of a game packaged by Ren'py.
+
+If you want the Ren'py launcher, use \"renpy-launcher\" instead.""",
+ file=sys.stderr)
+ sys.exit()
+
+ renpy.bootstrap.bootstrap("@RENPY_BASE@")
+
+if __name__ == "__main__":
+ main()