diff options
Diffstat (limited to 'gnu/packages/game-development.scm')
-rw-r--r-- | gnu/packages/game-development.scm | 81 |
1 files changed, 14 insertions, 67 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 9744b3ec23..f417fae8d7 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1218,7 +1218,7 @@ to create fully featured games and multimedia programs in the python language.") (define-public python-pygame-sdl2 (let ((real-version "2.1.0") - (renpy-version "7.4.10")) + (renpy-version "7.4.11")) (package (inherit python-pygame) (name "python-pygame-sdl2") @@ -1228,7 +1228,7 @@ to create fully featured games and multimedia programs in the python language.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" renpy-version "/pygame_sdl2-" version ".tar.gz")) - (sha256 (base32 "0m0asrr722a4v24fm8199b0c53igagylay8bn9bz9rmc0r4v8si4")) + (sha256 (base32 "0nxvca16299jx6sp0ys29rqixcs21ymhqwjfkbchhss0yar7qjgz")) (modules '((guix build utils))) (snippet '(begin @@ -1273,13 +1273,13 @@ developed mainly for Ren'py.") (define-public python2-renpy (package (name "python2-renpy") - (version "7.4.10") + (version "7.4.11") (source (origin (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" version "/renpy-" version "-source.tar.bz2")) - (sha256 (base32 "1yngs2kh1l8micg28mcp9580qsvgq3aa8bkhv2xqfkg9qqrbr8y4")) + (sha256 (base32 "0zkhg2sd2hglm9dkansf4h8sq7lm7iqslzl763ambp4kyfdvd07q")) (modules '((guix build utils))) (patches (search-patches @@ -1321,9 +1321,8 @@ developed mainly for Ren'py.") ;; named "setup.py". (with-directory-excursion "module" (apply (assoc-ref %standard-phases 'build) args)) - ;; the above causes renpy.__init__ to be compiled but does not - ;; compile anything else, hence we do that here - (delete-file "renpy/__init__.pyc") + ;; The above only builds the cython modules, but nothing else, + ;; so we do that here. (invoke "python" "-m" "compileall" "renpy") #t)) (replace 'install @@ -1449,70 +1448,17 @@ are only used to bootstrap it.") ;; `-- Super Awesome Game.sh (let* ((out (assoc-ref outputs "out")) (bin/renpy (string-append out "/bin/renpy"))) - (mkdir-p (string-append out "/bin")) (copy-recursively "renpy/common" (string-append out "/share/renpy/common")) (copy-recursively "gui" (string-append out "/share/renpy/gui")) - (call-with-output-file bin/renpy - (lambda (port) - (format port "#!~a/bin/python2~%" - (assoc-ref inputs "python2")) - (format port " -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 # @UnresolvedImport - - 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.expanduser(\"~~/.renpy/\" + save_directory) - -def path_to_renpy_base(): - return \"~a\" - -def main(): - renpy_base = path_to_renpy_base() - 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 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() -" - (string-append out "/share/renpy")))) - (chmod bin/renpy #o755) - #t))) + (mkdir-p (string-append out "/bin")) + (copy-file (assoc-ref inputs "renpy.in") bin/renpy) + (substitute* bin/renpy + (("@PYTHON@") (search-input-file inputs "bin/python2")) + (("@RENPY_BASE@") (string-append out "/share/renpy"))) + (chmod bin/renpy #o755)))) (add-after 'install 'install-games (lambda* (#:key outputs #:allow-other-keys) @@ -1566,7 +1512,8 @@ if __name__ == \"__main__\": inputs)))))))) #t)))))) (inputs - `(("python2-renpy" ,python2-renpy) + `(("renpy.in" ,(search-auxiliary-file "renpy/renpy.in")) + ("python2-renpy" ,python2-renpy) ("python2-tkinter" ,python-2 "tk") ("python2" ,python-2) ; for ‘fix-commands’ and ‘wrap’ ("xdg-utils" ,xdg-utils))) |