#! @PYTHON@
# -*- mode: python -*-
import glob
import os
import sys
import warnings
def __renpy_files(directory):
for pattern in ['*.rpa', '*.rpyc', '*.rpy']:
for file in glob.iglob(pattern, root_dir=directory):
yield file
def path_to_gamedir(basedir, name):
candidates = [name, 'game', 'data', 'launcher/game']
if __renpy_files(basedir):
return basedir
for candidate in candidates:
gamedir = os.path.join(basedir, candidate)
if __renpy_files(gamedir):
return gamedir
return basedir
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"
prefix = os.environ.get("RENPY_PATH_TO_SAVES",
os.path.expanduser("~/.renpy"))
return os.path.join(prefix, save_directory)
def path_to_logdir(basedir):
return basedir
def predefined_searchpath(commondir):
import renpy
# The default gamedir, in private.
searchpath = [ renpy.config.gamedir ]
if env_searchpath := os.environ.get("RENPY_SEARCHPATH"):
searchpath.extend(env_searchpath.split("::"))
if commondir and os.path.isdir(commondir):
searchpath.append(commondir)
return searchpath
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()
b4cbf228fcc13cc3624e89d2'>modules.scm
Age | Commit message (Expand) | Author |
2021-12-23 | Remove VM generation dead-code....This code duplicates the (gnu system image) and (gnu build image) code. Using
VM for image generation is not needed, not portable and really slow. Remove
all the VM image generation code to make sure that only the image API is used.
* gnu/build/vm.scm: Remove it. Move the qemu-command procedure to ...
* gnu/build/marionette.scm: ... here.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it.
* tests/modules.scm: Ditto.
* gnu/tests/install.scm: Ditto.
* gnu/system/vm.scm: Adapt it and remove expression->derivation-in-linux-vm,
qemu-img, system-qemu-image/shared-store and system-docker-image procedures.
* doc/guix.texi (G-Expressions): Adapt it.
| Mathieu Othacehe |