Compare commits
119 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a21aa55dc | |||
| 6c948bf046 | |||
| 8de2bda1e6 | |||
| 5e3b209ba2 | |||
| 2e45c3e609 | |||
| 8c7a3b13bf | |||
| 4a0738f2aa | |||
| 899eb6616f | |||
| 536fce4a22 | |||
| ca9e2dfe47 | |||
| 321434e95e | |||
| 41b6e689d3 | |||
| 7958f5445a | |||
| efd4cc6b5e | |||
| 35c4ba4a41 | |||
| 5361a8e9a5 | |||
| ba76f970c5 | |||
| 7d8d05107b | |||
| 2639028ce7 | |||
| beedbc0a22 | |||
| 74157a4ad6 | |||
| 25b4a17d1a | |||
| 4163c1396c | |||
| d6ab06dd1f | |||
| 3db515db3c | |||
| cc654ebfeb | |||
| f389c13b29 | |||
| c57dbe7a9d | |||
| e35fcb2e86 | |||
| 38b505ba36 | |||
| f132d49157 | |||
| ba0bc218c2 | |||
| 97331e2464 | |||
| 8d38a6ae4d | |||
| e3c4993487 | |||
| d0270729c1 | |||
| 3bc3bf3e19 | |||
| 831fb59d49 | |||
| f5555d6f1a | |||
| e7eb0e135b | |||
| bf9de85f75 | |||
| 6470a37b40 | |||
| 99a5ac89db | |||
| e46073b059 | |||
| 88ddee9d5e | |||
| d8283c958c | |||
| 31025cdadb | |||
| e66a9b8c6d | |||
| 2b5b9835b7 | |||
| 3f667e3ef1 | |||
| 823e235a1c | |||
| 1df2c15b07 | |||
| 5c5252a516 | |||
| 70bb4208bc | |||
| 2e1c09dbbd | |||
| fc5f8e0d3e | |||
| 28ae4a7c0c | |||
| ec5738c6e0 | |||
| 2da8beecd7 | |||
| e0062cbebc | |||
| 9b290e07f5 | |||
| 864feaba02 | |||
| 76b068c6dc | |||
| ebc6e66433 | |||
| f25dcea3cb | |||
| 78899cfef3 | |||
| 339c7357dc | |||
| 4a1182cdd5 | |||
| 9ff3bb67e8 | |||
| f7a5e874ea | |||
| ec758301ac | |||
| 19122e45c8 | |||
| 89d5858d2b | |||
| 5a65eea075 | |||
| 4e5dd16606 | |||
| dd61e71beb | |||
| 70f30147df | |||
| fa84f0c61e | |||
| 74339b0432 | |||
| f6f4b3bce3 | |||
| 5dbd50159a | |||
| 1e85fd051a | |||
| dc65afd6f1 | |||
| e3222ec11d | |||
| 37c78dccda | |||
| 1a7f0ca8c3 | |||
| be8831b4b2 | |||
| fc87c053c3 | |||
| 10cc039460 | |||
| fd027dbdbd | |||
| 15eb9a9c13 | |||
| 2ded06bc5d | |||
| c5cdd0038e | |||
| 8bac98c29a | |||
| 421d8cc37d | |||
| c097434036 | |||
| e3cc4be1b8 | |||
| b5711f7e11 | |||
| 8f2649e3a7 | |||
| ab42c0f6e1 | |||
| 01eacd2932 | |||
| c25f22fe4f | |||
| fe3b800cab | |||
| ccde74bdb8 | |||
| ab6f469811 | |||
| f92b70d38c | |||
| e89338342a | |||
| 62ca262aec | |||
| eb5a84d420 | |||
| 3280bcc5ff | |||
| 5c5f72659c | |||
| b9789ae25c | |||
| 58e56cff88 | |||
| 4b532ac11e | |||
| a7f16eee3f | |||
| fff2558083 | |||
| 944b7d0e9c | |||
| 7022001dbe | |||
| 0ab9444676 |
+2
-2
@@ -71,14 +71,14 @@ To return to this virtualenv later, run::
|
||||
|
||||
After activating the virtualenv, install additional dependencies::
|
||||
|
||||
pip install -U "setuptools cython<3.0.0 future six typing pefile requests ecdsa"
|
||||
pip install -U cython future six typing pefile requests ecdsa
|
||||
|
||||
Then, install pygame_sdl2 by running the following commands::
|
||||
|
||||
git clone https://www.github.com/renpy/pygame_sdl2
|
||||
pushd pygame_sdl2
|
||||
python setup.py install
|
||||
python install_headers.py $VIRTUAL_ENV
|
||||
python setup.py install_headers
|
||||
popd
|
||||
|
||||
Next, set RENPY_DEPS_INSTALL To a \:-separated (\;-separated on Windows)
|
||||
|
||||
+1
-1
@@ -328,7 +328,7 @@ define gui.vbar_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.
|
||||
define gui.vscrollbar_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
|
||||
define gui.vslider_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
|
||||
|
||||
## What to do with unscrollable scrollbars in the gui. "hide" hides them, while
|
||||
## What to do with unscrollable scrollbars in the game menu. "hide" hides them, while
|
||||
## None shows them.
|
||||
define gui.unscrollable = "hide"
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ style frame:
|
||||
## https://www.renpy.org/doc/html/screen_special.html#say
|
||||
|
||||
screen say(who, what):
|
||||
style_prefix "say"
|
||||
|
||||
window:
|
||||
id "window"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -76,14 +76,24 @@ class BinFile(object):
|
||||
self.addr = addr
|
||||
|
||||
def tostring(self):
|
||||
return self.a.tobytes()
|
||||
if PY2:
|
||||
return self.a.tostring() # type: ignore
|
||||
else:
|
||||
return self.a.tobytes()
|
||||
|
||||
def substring(self, start, len): # @ReservedAssignment
|
||||
return self.a[start:start + len].tobytes()
|
||||
if PY2:
|
||||
return self.a[start:start + len].tostring() # type: ignore
|
||||
else:
|
||||
return self.a[start:start + len].tobytes()
|
||||
|
||||
def __init__(self, data):
|
||||
self.a = array.array('B')
|
||||
self.a.frombytes(data)
|
||||
|
||||
if PY2:
|
||||
self.a.fromstring(data) # type: ignore
|
||||
else:
|
||||
self.a.frombytes(data)
|
||||
|
||||
##############################################################################
|
||||
# These functions parse data out of the file. In these functions, offset is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -432,7 +432,10 @@ fix_dlc("renios", "renios")
|
||||
for f in sorted(self, key=lambda a : a.name):
|
||||
f.hash(sha, distributor)
|
||||
|
||||
return sha.hexdigest()
|
||||
if PY2:
|
||||
return sha.hexdigest().decode("utf-8")
|
||||
else:
|
||||
return sha.hexdigest()
|
||||
|
||||
def split_by_prefix(self, prefix):
|
||||
"""
|
||||
@@ -658,6 +661,7 @@ fix_dlc("renios", "renios")
|
||||
# Build the mac app and windows exes.
|
||||
self.add_mac_files()
|
||||
self.add_windows_files()
|
||||
self.add_main_py()
|
||||
|
||||
# Add the main.py.
|
||||
self.add_main_py()
|
||||
@@ -1071,8 +1075,11 @@ fix_dlc("renios", "renios")
|
||||
|
||||
rv = self.temp_filename("Info.plist")
|
||||
|
||||
with open(rv, "wb") as f:
|
||||
plistlib.dump(plist, f)
|
||||
if PY2:
|
||||
plistlib.writePlist(plist, rv)
|
||||
else:
|
||||
with open(rv, "wb") as f:
|
||||
plistlib.dump(plist, f)
|
||||
|
||||
return rv
|
||||
|
||||
@@ -1093,12 +1100,14 @@ fix_dlc("renios", "renios")
|
||||
|
||||
prefix = py("lib/py{major}-")
|
||||
|
||||
if os.path.exists(linux_i686):
|
||||
i686fn = os.path.join(config.renpy_base, prefix + "linux-i686/renpy")
|
||||
|
||||
if os.path.exists(i686fn):
|
||||
|
||||
self.add_file(
|
||||
linux_i686,
|
||||
prefix + "linux-i686/" + self.executable_name,
|
||||
os.path.join(config.renpy_base, prefix + "linux-i686/renpy"),
|
||||
i686fn,
|
||||
True)
|
||||
|
||||
self.add_file(
|
||||
@@ -1219,8 +1228,19 @@ fix_dlc("renios", "renios")
|
||||
if os.path.exists(tmp):
|
||||
self.add_file(fl, dst, tmp)
|
||||
|
||||
write_exe("lib/py3-windows-x86_64/renpy.exe", self.exe, self.exe, windows)
|
||||
write_exe("lib/py3-windows-x86_64/pythonw.exe", "lib/py3-windows-x86_64/pythonw.exe", "pythonw-64.exe", windows)
|
||||
if PY2:
|
||||
|
||||
if self.build["include_i686"]:
|
||||
write_exe("lib/py2-windows-i686/renpy.exe", self.exe32, self.exe32, windows_i686)
|
||||
write_exe("lib/py2-windows-i686/pythonw.exe", "lib/py2-windows-i686/pythonw.exe", "pythonw-32.exe", windows_i686)
|
||||
|
||||
write_exe("lib/py2-windows-x86_64/renpy.exe", self.exe, self.exe, windows)
|
||||
write_exe("lib/py2-windows-x86_64/pythonw.exe", "lib/py2-windows-x86_64/pythonw.exe", "pythonw-64.exe", windows)
|
||||
|
||||
else:
|
||||
|
||||
write_exe("lib/py3-windows-x86_64/renpy.exe", self.exe, self.exe, windows)
|
||||
write_exe("lib/py3-windows-x86_64/pythonw.exe", "lib/py3-windows-x86_64/pythonw.exe", "pythonw-64.exe", windows)
|
||||
|
||||
|
||||
def add_main_py(self):
|
||||
@@ -1518,7 +1538,7 @@ fix_dlc("renios", "renios")
|
||||
|
||||
if self.include_update and not format.startswith("app-"):
|
||||
|
||||
with open(update_fn, "w") as f:
|
||||
with open(update_fn, "wb" if PY2 else "w") as f:
|
||||
json.dump(update, f, indent=2)
|
||||
|
||||
if (not dlc) or (format == "update"):
|
||||
@@ -1554,6 +1574,11 @@ fix_dlc("renios", "renios")
|
||||
if os.path.exists(update_fn):
|
||||
shutil.copy(update_fn, final_update_fn)
|
||||
|
||||
if not directory:
|
||||
file_hash = hash_file(path)
|
||||
else:
|
||||
file_hash = ""
|
||||
|
||||
if format == "tar.bz2" or format == "bare-tar.bz2":
|
||||
pkg = TarPackage(path, "w:bz2")
|
||||
elif format == "update":
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -158,8 +158,12 @@ screen front_page_project:
|
||||
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
for button_name, path in p.data["renpy_launcher"]["open_directory"].items():
|
||||
textbutton button_name action OpenDirectory(os.path.join(p.path, path), absolute=True)
|
||||
|
||||
textbutton "game" action OpenDirectory(os.path.join(p.path, "game"), absolute=True)
|
||||
textbutton "base" action OpenDirectory(os.path.join(p.path, "."), absolute=True)
|
||||
textbutton "images" action OpenDirectory(os.path.join(p.path, "game/images"), absolute=True)
|
||||
textbutton "audio" action OpenDirectory(os.path.join(p.path, "game/audio"), absolute=True)
|
||||
textbutton "gui" action OpenDirectory(os.path.join(p.path, "game/gui"), absolute=True)
|
||||
|
||||
vbox:
|
||||
if persistent.show_edit_funcs:
|
||||
@@ -169,8 +173,10 @@ screen front_page_project:
|
||||
frame style "l_indent":
|
||||
has vbox
|
||||
|
||||
for button_name, path in p.data["renpy_launcher"]["edit_file"].items():
|
||||
textbutton button_name action editor.Edit(path, check=True)
|
||||
textbutton "script.rpy" action editor.Edit("game/script.rpy", check=True)
|
||||
textbutton "options.rpy" action editor.Edit("game/options.rpy", check=True)
|
||||
textbutton "gui.rpy" action editor.Edit("game/gui.rpy", check=True)
|
||||
textbutton "screens.rpy" action editor.Edit("game/screens.rpy", check=True)
|
||||
|
||||
if editor.CanEditProject():
|
||||
textbutton _("Open project") action editor.EditProject()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -81,7 +81,10 @@ init python:
|
||||
|
||||
label install_live2d:
|
||||
python hide:
|
||||
_prefix = r"lib/py3-"
|
||||
if PY2:
|
||||
_prefix = r"lib/py2-"
|
||||
else:
|
||||
_prefix = r"lib/py3-"
|
||||
|
||||
patterns = [
|
||||
(r".*/Core/dll/linux/x86_64/(libLive2DCubismCore.so)", _prefix + r"linux-x86_64/\1"),
|
||||
@@ -94,6 +97,11 @@ label install_live2d:
|
||||
(r".*/Core/dll/android/(x86_64/libLive2DCubismCore.so)", r"rapt/prototype/renpyandroid/src/main/jniLibs/\1"),
|
||||
]
|
||||
|
||||
if PY2:
|
||||
patterns.extend([
|
||||
(r".*/Core/dll/windows/x86/(Live2DCubismCore.dll)", _prefix + r"windows-i686/\1"),
|
||||
])
|
||||
|
||||
install_from_zip("Live2D Cubism SDK for Native", "CubismSdkForNative-[45]-*.zip", patterns)
|
||||
|
||||
jump front_page
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -33,6 +33,10 @@ init python in interface:
|
||||
DOC_URL = "http://www.renpy.org/doc/html/"
|
||||
DOC_LOCAL_URL = "file:///" + DOC_PATH
|
||||
|
||||
# If true, the launcher should not link back to renpy.org.
|
||||
NO_LAUNCHER_LINKS = os.path.exists(os.path.join(config.renpy_base, "no_launcher_links.txt"))
|
||||
|
||||
|
||||
local_doc_exists = os.path.exists(DOC_PATH)
|
||||
|
||||
def get_doc_url(page):
|
||||
@@ -40,7 +44,7 @@ init python in interface:
|
||||
Returns the URL to the documentation page.
|
||||
"""
|
||||
|
||||
if local_doc_exists and not persistent.use_web_doc:
|
||||
if local_doc_exists and (NO_LAUNCHER_LINKS or not persistent.use_web_doc):
|
||||
from urllib.parse import urljoin
|
||||
from urllib.request import pathname2url
|
||||
|
||||
@@ -117,7 +121,10 @@ screen bottom_info:
|
||||
hbox:
|
||||
spacing INDENT
|
||||
textbutton _("Documentation") style "l_link" action interface.OpenDocumentation()
|
||||
textbutton _("Ren'Py Website") style "l_link" action OpenURL(interface.RENPY_URL)
|
||||
|
||||
if not interface.NO_LAUNCHER_LINKS:
|
||||
textbutton _("Ren'Py Website") style "l_link" action OpenURL(interface.RENPY_URL)
|
||||
|
||||
textbutton _("[interface.version]") style "l_link" action Jump("about")
|
||||
|
||||
hbox:
|
||||
@@ -133,7 +140,7 @@ screen bottom_info:
|
||||
textbutton _("preferences") style "l_link" action Jump("preferences")
|
||||
textbutton _("quit") style "l_link" action Quit(confirm=False)
|
||||
|
||||
if persistent.sponsor_message:
|
||||
if persistent.sponsor_message and not interface.NO_LAUNCHER_LINKS:
|
||||
|
||||
textbutton _("Ren'Py Sponsor Information"):
|
||||
style "l_link"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -164,6 +164,9 @@ init python:
|
||||
|
||||
print("Eliminating __pycache__...")
|
||||
|
||||
if PY2:
|
||||
return
|
||||
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -50,7 +50,7 @@ init python:
|
||||
pass
|
||||
|
||||
with interface.error_handling(_("Downloading the itch.io butler.")):
|
||||
url = "https://broth.itch.ovh/butler/{}/LATEST/archive/default".format(platform)
|
||||
url = "https://broth.itch.zone/butler/{}/LATEST/archive/default".format(platform)
|
||||
|
||||
response = requests.get(url, headers={'User-Agent' : "Renpy"}, proxies=renpy.proxies)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -34,6 +34,9 @@ label new_project:
|
||||
if persistent.projects_directory is None:
|
||||
$ interface.error(_("The projects directory could not be set. Giving up."))
|
||||
|
||||
if PY2:
|
||||
$ interface.info(_("Warning : you are using Ren'Py 7. It is recommended to start new projects using Ren'Py 8 instead."))
|
||||
|
||||
python:
|
||||
new_project_language = __("{#language name and font}")
|
||||
gui_kind = "new_gui_project"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -322,7 +322,7 @@ init python:
|
||||
"""
|
||||
|
||||
if py is True:
|
||||
py = 'pycache'
|
||||
py = 'pyo' if PY2 else 'pycache'
|
||||
|
||||
if py == 'pycache':
|
||||
build.classify_renpy(pattern + "/**__pycache__/", binary)
|
||||
@@ -357,7 +357,6 @@ init python:
|
||||
|
||||
build.classify_renpy(pattern + "/**", source)
|
||||
|
||||
build.classify_renpy("renpy/gl/", None)
|
||||
|
||||
build.classify_renpy("renpy.py", "binary")
|
||||
source_and_binary("renpy")
|
||||
@@ -411,14 +410,27 @@ init python:
|
||||
build.classify_renpy("module/libhydrogen/**", "source")
|
||||
|
||||
# all-platforms binary.
|
||||
build.classify_renpy("lib/**/libpython{}.{}.dll".format(sys.version_info.major, sys.version_info.minor), "binary")
|
||||
build.classify_renpy("lib/**/libpython*.dll", None)
|
||||
|
||||
build.classify_renpy("lib/**/*steam_api*", "steam")
|
||||
build.classify_renpy("lib/**/*Live2D*", None)
|
||||
|
||||
build.classify_renpy("lib/py3-linux-armv7l/**", None)
|
||||
build.classify_renpy("lib/py3-linux-aarch64/**", "linux_arm")
|
||||
source_and_binary("lib/py3-**", "binary", "binary")
|
||||
source_and_binary("lib/python3**", "binary", "binary", py='pyc')
|
||||
build.classify_renpy("renpy3.sh", "binary")
|
||||
|
||||
libpython = "lib/python{}.{}".format(sys.version_info.major, sys.version_info.minor)
|
||||
|
||||
if PY2:
|
||||
build.classify_renpy("lib/py2-linux-armv7l/**", "linux_arm")
|
||||
build.classify_renpy("lib/py2-linux-aarch64/**", "linux_arm")
|
||||
source_and_binary("lib/py2-**", "binary", "binary")
|
||||
source_and_binary("lib/python2**", "binary", "binary")
|
||||
build.classify_renpy("renpy2.sh", "binary")
|
||||
else:
|
||||
build.classify_renpy("lib/py3-linux-armv7l/**", "linux_arm")
|
||||
build.classify_renpy("lib/py3-linux-aarch64/**", "linux_arm")
|
||||
source_and_binary("lib/py3-**", "binary", "binary")
|
||||
source_and_binary("lib/python3**", "binary", "binary", py='pyc')
|
||||
build.classify_renpy("renpy3.sh", "binary")
|
||||
|
||||
build.classify_renpy("lib/", "binary")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -34,21 +34,106 @@ init python in distribute:
|
||||
from zipfile import crc32
|
||||
|
||||
# Since the long type doesn't exist on py3, define it here
|
||||
long = int
|
||||
if not PY2:
|
||||
long = int
|
||||
|
||||
zlib.Z_DEFAULT_COMPRESSION = 5
|
||||
|
||||
class ZipFile(zipfile.ZipFile):
|
||||
if PY2:
|
||||
|
||||
def write_with_info(self, zinfo, filename):
|
||||
class ZipFile(zipfile.ZipFile):
|
||||
|
||||
if zinfo.filename.endswith("/"):
|
||||
data = b''
|
||||
else:
|
||||
with open(filename, "rb") as f:
|
||||
data = f.read()
|
||||
def write_with_info(self, zinfo, filename):
|
||||
"""Put the bytes from filename into the archive under the name
|
||||
arcname."""
|
||||
if not self.fp:
|
||||
raise RuntimeError(
|
||||
"Attempt to write to ZIP archive that was already closed")
|
||||
|
||||
self.writestr(zinfo, data)
|
||||
st = os.stat(filename)
|
||||
isdir = stat.S_ISDIR(st.st_mode)
|
||||
|
||||
zinfo.file_size = st.st_size
|
||||
zinfo.flag_bits = 0x00
|
||||
zinfo.header_offset = self.fp.tell() # Start of header bytes
|
||||
|
||||
self._writecheck(zinfo)
|
||||
self._didModify = True
|
||||
|
||||
if isdir:
|
||||
zinfo.file_size = 0
|
||||
zinfo.compress_size = 0
|
||||
zinfo.CRC = 0
|
||||
self.filelist.append(zinfo)
|
||||
self.NameToInfo[zinfo.filename] = zinfo
|
||||
self.fp.write(zinfo.FileHeader())
|
||||
return
|
||||
|
||||
with open(filename, "rb") as fp:
|
||||
# Must overwrite CRC and sizes with correct data later
|
||||
zinfo.CRC = CRC = 0
|
||||
zinfo.compress_size = compress_size = 0
|
||||
file_size = 0
|
||||
|
||||
zip64 = self._allowZip64 and \
|
||||
zinfo.file_size * 1.05 > zipfile.ZIP64_LIMIT
|
||||
|
||||
self.fp.write(zinfo.FileHeader(zip64))
|
||||
|
||||
if zinfo.compress_type == zipfile.ZIP_DEFLATED:
|
||||
cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION,
|
||||
zlib.DEFLATED, -15)
|
||||
else:
|
||||
cmpr = None
|
||||
while 1:
|
||||
buf = fp.read(1024 * 1024)
|
||||
if not buf:
|
||||
break
|
||||
file_size = file_size + len(buf)
|
||||
CRC = crc32(buf, CRC) & 0xffffffff
|
||||
if cmpr:
|
||||
buf = cmpr.compress(buf)
|
||||
compress_size = compress_size + len(buf)
|
||||
self.fp.write(buf)
|
||||
if cmpr:
|
||||
buf = cmpr.flush()
|
||||
compress_size = compress_size + len(buf)
|
||||
self.fp.write(buf)
|
||||
zinfo.compress_size = compress_size
|
||||
else:
|
||||
zinfo.compress_size = file_size
|
||||
zinfo.CRC = CRC
|
||||
zinfo.file_size = file_size
|
||||
|
||||
if not zip64 and self._allowZip64:
|
||||
if file_size > zipfile.ZIP64_LIMIT:
|
||||
raise RuntimeError('File size has increased during compressing')
|
||||
if compress_size > zipfile.ZIP64_LIMIT:
|
||||
raise RuntimeError('Compressed size larger than uncompressed size')
|
||||
|
||||
# Seek backwards and write CRC and file sizes
|
||||
position = self.fp.tell() # Preserve current position in file
|
||||
self.fp.seek(zinfo.header_offset, 0)
|
||||
|
||||
self.fp.write(zinfo.FileHeader(zip64))
|
||||
|
||||
self.fp.seek(position, 0)
|
||||
self.filelist.append(zinfo)
|
||||
self.NameToInfo[zinfo.filename] = zinfo
|
||||
|
||||
else:
|
||||
|
||||
class ZipFile(zipfile.ZipFile):
|
||||
|
||||
def write_with_info(self, zinfo, filename):
|
||||
|
||||
if zinfo.filename.endswith("/"):
|
||||
data = b''
|
||||
else:
|
||||
with open(filename, "rb") as f:
|
||||
data = f.read()
|
||||
|
||||
self.writestr(zinfo, data)
|
||||
|
||||
|
||||
class ZipPackage(object):
|
||||
@@ -384,5 +469,3 @@ init python in distribute:
|
||||
for i in parallel_threads:
|
||||
if i.done:
|
||||
i.done()
|
||||
|
||||
parallel_threads.clear()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -116,32 +116,13 @@ init python in project:
|
||||
|
||||
try:
|
||||
with open(os.path.join(self.path, "project.json"), "w") as f:
|
||||
json.dump(self.data, f, indent=2)
|
||||
json.dump(self.data, f)
|
||||
except Exception:
|
||||
self.load_data()
|
||||
|
||||
def update_data(self):
|
||||
data = self.data
|
||||
|
||||
data.setdefault("renpy_launcher",
|
||||
{
|
||||
"open_directory":
|
||||
{
|
||||
"game": "game",
|
||||
"base": ".",
|
||||
"images": "game/images",
|
||||
"audio": "game/audio",
|
||||
"gui": "game/gui"
|
||||
},
|
||||
"edit_file":
|
||||
{
|
||||
"script.rpy": "game/script.rpy",
|
||||
"options.rpy": "game/options.rpy",
|
||||
"gui.rpy": "game/gui.rpy",
|
||||
"screens.rpy": "game/screens.rpy"
|
||||
}
|
||||
})
|
||||
|
||||
data.setdefault("build_update", False)
|
||||
data.setdefault("packages", [ "pc", "mac" ])
|
||||
data.setdefault("add_from", True)
|
||||
@@ -371,6 +352,12 @@ init python in project:
|
||||
|
||||
line = line[:1024]
|
||||
|
||||
if PY2:
|
||||
try:
|
||||
line = line.decode("utf-8")
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
m = re.search(r"#\s*TODO(\s*:\s*|\s+)(.*)", line, re.I)
|
||||
|
||||
if m is None:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate german strings:
|
||||
|
||||
# screens.rpy:9
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
# game/editor.rpy:327
|
||||
old "An exception occured while launching the text editor:\n[exception!q]"
|
||||
new "Ocorreu uma exceção ao executar o editor de texto:\[exception!q]"
|
||||
new "Ocorreu uma exceção ao executar o editor de texto:\n[exception!q]"
|
||||
|
||||
# game/editor.rpy:423
|
||||
old "Select Editor"
|
||||
|
||||
@@ -1874,7 +1874,7 @@
|
||||
|
||||
# game/androidstrings.rpy:43
|
||||
old "I was unable to use javac to compile a test file. If you haven't installed the Java Development Kit yet, please download it from:\n\n{a=https://adoptium.net/?variant=openjdk8}https://adoptium.net/?variant=openjdk8{/a}\n\nThe JDK is different from the JRE, so it's possible you have Java without having the JDK. Please make sure you installed the 'JavaSoft (Oracle) registry keys'.\n\nWithout a working JDK, I can't continue."
|
||||
new "Не удалось использовать javac для компиляции тестового файла. Если вы еще не установили Java Development Kit, загрузите его с:\n\n{a=https://adoptium.net/?variant=openjdk8}https://adoptium.net/?variant=openjdk8{/a}\n\JDK отличается от JRE, поэтому возможно, что у вас есть Java без JDK. Пожалуйста, убедитесь, что вы установили 'переменные окружения JavaSoft (Oracle)'.\n\nБез работающего JDK я не могу продолжать."
|
||||
new "Не удалось использовать javac для компиляции тестового файла. Если вы еще не установили Java Development Kit, загрузите его с:\n\n{a=https://adoptium.net/?variant=openjdk8}https://adoptium.net/?variant=openjdk8{/a}\n\nJDK отличается от JRE, поэтому возможно, что у вас есть Java без JDK. Пожалуйста, убедитесь, что вы установили 'переменные окружения JavaSoft (Oracle)'.\n\nБез работающего JDK я не могу продолжать."
|
||||
|
||||
# game/androidstrings.rpy:64
|
||||
old "I've opened the directory containing android.keystore and bundle.keystore. Please back them up, and keep them in a safe place."
|
||||
|
||||
@@ -884,7 +884,7 @@ translate spanish strings:
|
||||
|
||||
# renpy/common/00sync.rpy:593
|
||||
old "You can use this ID to download your save on another device.\nThis sync will expire in an hour.\nRen'Py Sync is supported by {a=https://www.renpy.org/sponsors.html}Ren'Py's Sponsors{/a}."
|
||||
new "Puede usar esta ID para descargar su guardado en otro dispositivo.\nEsta sincronización caducará en una hora.\RenPy Sync está para {a=https://www.renpy.org/sponsors.html}los patrocinadores de Ren'Py{/a}."
|
||||
new "Puede usar esta ID para descargar su guardado en otro dispositivo.\nEsta sincronización caducará en una hora.\nRenPy Sync está para {a=https://www.renpy.org/sponsors.html}los patrocinadores de Ren'Py{/a}."
|
||||
|
||||
# renpy/common/00sync.rpy:619
|
||||
old "Sync Error"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# 00action_file.rpy:26
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# 00console.rpy:255
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# 00gltest.rpy:70
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# gui/game/gui.rpy:2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# game/about.rpy:39
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# gui/game/options.rpy:1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
translate ukrainian strings:
|
||||
|
||||
# gui/game/screens.rpy:9
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# У цьому файлі міститься сценарій гри.
|
||||
# У цьому файлі міститься сценарій гри.
|
||||
|
||||
# Визначення персонажів для гри.
|
||||
# Аргумент color змінює колір ім’я персонажа.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+16
-11
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -440,12 +440,13 @@ init python:
|
||||
# Find the presplash and copy it over.
|
||||
presplash = None
|
||||
|
||||
for fn in [ "web-presplash.png", "web-presplash.jpg", "web-presplash.webp" ]:
|
||||
fullfn = os.path.join(project.current.path, fn)
|
||||
if not PY2:
|
||||
for fn in [ "web-presplash.png", "web-presplash.jpg", "web-presplash.webp" ]:
|
||||
fullfn = os.path.join(project.current.path, fn)
|
||||
|
||||
if os.path.exists(fullfn):
|
||||
presplash = fn
|
||||
break
|
||||
if os.path.exists(fullfn):
|
||||
presplash = fn
|
||||
break
|
||||
|
||||
if presplash:
|
||||
os.unlink(os.path.join(destination, "web-presplash.jpg"))
|
||||
@@ -455,16 +456,20 @@ init python:
|
||||
with io.open(os.path.join(WEB_PATH, "index.html"), encoding='utf-8') as f:
|
||||
html = f.read()
|
||||
|
||||
html = html.replace("Ren'Py Web Game", display_name)
|
||||
if PY2:
|
||||
html = html.replace("%%TITLE%%", display_name)
|
||||
else:
|
||||
html = html.replace("Ren'Py Web Game", display_name)
|
||||
|
||||
if presplash:
|
||||
html = html.replace("web-presplash.jpg", presplash)
|
||||
if presplash:
|
||||
html = html.replace("web-presplash.jpg", presplash)
|
||||
|
||||
with io.open(os.path.join(destination, "index.html"), "w", encoding='utf-8') as f:
|
||||
f.write(html)
|
||||
|
||||
generate_web_icons(p, destination)
|
||||
prepare_pwa_files(p, destination)
|
||||
if not PY2:
|
||||
generate_web_icons(p, destination)
|
||||
prepare_pwa_files(p, destination)
|
||||
|
||||
# Zip up the game.
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ renpy.lexersupport gen/renpy.lexersupport.c
|
||||
renpy.pydict gen/renpy.pydict.c
|
||||
renpy.style gen/renpy.style.c
|
||||
renpy.encryption gen/renpy.encryption.c
|
||||
renpy.compat.dictviews gen/renpy.compat.dictviews.c
|
||||
renpy.styledata.styleclass gen/renpy.styledata.styleclass.c
|
||||
renpy.styledata.stylesets gen/renpy.styledata.stylesets.c
|
||||
renpy.styledata.style_selected_hover_functions gen/renpy.styledata.style_selected_hover_functions.c
|
||||
@@ -24,6 +25,11 @@ renpy.display.accelerator gen/renpy.display.accelerator.c
|
||||
renpy.display.quaternion gen/renpy.display.quaternion.c
|
||||
renpy.uguu.gl gen/renpy.uguu.gl.c
|
||||
renpy.uguu.uguu gen/renpy.uguu.uguu.c
|
||||
renpy.gl.gldraw gen/renpy.gl.gldraw.c
|
||||
renpy.gl.gltexture gen/renpy.gl.gltexture.c
|
||||
renpy.gl.glenviron_shader gen/renpy.gl.glenviron_shader.c
|
||||
renpy.gl.glrtt_copy gen/renpy.gl.glrtt_copy.c
|
||||
renpy.gl.glrtt_fbo gen/renpy.gl.glrtt_fbo.c
|
||||
renpy.gl2.gl2mesh gen/renpy.gl2.gl2mesh.c
|
||||
renpy.gl2.gl2mesh2 gen/renpy.gl2.gl2mesh2.c
|
||||
renpy.gl2.gl2mesh3 gen/renpy.gl2.gl2mesh3.c
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# -*- python -*-
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -71,11 +71,7 @@ static int rwops_read(void *opaque, uint8_t *buf, int buf_size) {
|
||||
|
||||
}
|
||||
|
||||
#if (LIBAVFORMAT_VERSION_MAJOR < 61)
|
||||
static int rwops_write(void *opaque, uint8_t *buf, int buf_size) {
|
||||
#else
|
||||
static int rwops_write(void *opaque, const uint8_t *buf, int buf_size) {
|
||||
#endif
|
||||
printf("Writing to an SDL_rwops is a really bad idea.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -694,14 +690,9 @@ static void decode_audio(MediaState *ms) {
|
||||
}
|
||||
|
||||
converted_frame->sample_rate = audio_sample_rate;
|
||||
#if (LIBAVUTIL_VERSION_MAJOR < 59)
|
||||
converted_frame->channel_layout = AV_CH_LAYOUT_STEREO;
|
||||
#else
|
||||
converted_frame->ch_layout = (AVChannelLayout) AV_CHANNEL_LAYOUT_STEREO;
|
||||
#endif
|
||||
converted_frame->format = AV_SAMPLE_FMT_S16;
|
||||
|
||||
#if (LIBAVUTIL_VERSION_MAJOR < 59)
|
||||
if (!ms->audio_decode_frame->channel_layout) {
|
||||
ms->audio_decode_frame->channel_layout = av_get_default_channel_layout(ms->audio_decode_frame->channels);
|
||||
|
||||
@@ -720,26 +711,6 @@ static void decode_audio(MediaState *ms) {
|
||||
swr_set_matrix(ms->swr, stereo_matrix, 1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (ms->audio_decode_frame->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) {
|
||||
av_channel_layout_default(&ms->audio_decode_frame->ch_layout, ms->audio_decode_frame->ch_layout.nb_channels);
|
||||
|
||||
if (audio_equal_mono && (ms->audio_decode_frame->ch_layout.nb_channels == 1)) {
|
||||
swr_alloc_set_opts2(
|
||||
&ms->swr,
|
||||
&converted_frame->ch_layout,
|
||||
converted_frame->format,
|
||||
converted_frame->sample_rate,
|
||||
&ms->audio_decode_frame->ch_layout,
|
||||
ms->audio_decode_frame->format,
|
||||
ms->audio_decode_frame->sample_rate,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
swr_set_matrix(ms->swr, stereo_matrix, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(swr_convert_frame(ms->swr, converted_frame, ms->audio_decode_frame)) {
|
||||
av_frame_free(&converted_frame);
|
||||
@@ -1188,11 +1159,7 @@ static int decode_thread(void *arg) {
|
||||
|
||||
// Compute the number of samples we need to play back.
|
||||
if (ms->audio_duration < 0) {
|
||||
#if (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
if (av_fmt_ctx_get_duration_estimation_method(ctx) != AVFMT_DURATION_FROM_BITRATE) {
|
||||
#else
|
||||
if (ctx->duration_estimation_method != AVFMT_DURATION_FROM_BITRATE) {
|
||||
#endif
|
||||
|
||||
long long duration = ((long long) ctx->duration) * audio_sample_rate;
|
||||
ms->audio_duration = (unsigned int) (duration / AV_TIME_BASE);
|
||||
@@ -1352,11 +1319,7 @@ static int decode_sync_start(void *arg) {
|
||||
|
||||
// Compute the number of samples we need to play back.
|
||||
if (ms->audio_duration < 0) {
|
||||
#if (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
if (av_fmt_ctx_get_duration_estimation_method(ctx) != AVFMT_DURATION_FROM_BITRATE) {
|
||||
#else
|
||||
if (ctx->duration_estimation_method != AVFMT_DURATION_FROM_BITRATE) {
|
||||
#endif
|
||||
|
||||
long long duration = ((long long) ctx->duration) * audio_sample_rate;
|
||||
ms->audio_duration = (unsigned int) (duration / AV_TIME_BASE);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -8,25 +8,12 @@ cdef extern from "stdlib.h":
|
||||
cdef extern from "pyfreetype.h":
|
||||
#ftconfig.h
|
||||
#Some tweaking may be needed on a platform-by-platform basis
|
||||
DEF FT_SIZEOF_INT = 4
|
||||
DEF FT_SIZEOF_LONG = 4
|
||||
|
||||
ctypedef signed short FT_Int16
|
||||
ctypedef unsigned short FT_UInt16
|
||||
IF FT_SIZEOF_INT == 4:
|
||||
ctypedef signed int FT_Int32
|
||||
ctypedef unsigned int FT_UInt32
|
||||
ELIF FT_SIZEOF_LONG == 4:
|
||||
ctypedef signed long FT_Int32
|
||||
ctypedef unsigned long FT_UInt32
|
||||
|
||||
IF FT_SIZEOF_INT >= 4:
|
||||
ctypedef int FT_Fast
|
||||
ctypedef unsigned int FT_UFast
|
||||
ELIF FT_SIZEOF_LONG >= 4:
|
||||
ctypedef long FT_Fast
|
||||
ctypedef unsigned long FT_UFast
|
||||
|
||||
ctypedef signed int FT_Int32
|
||||
ctypedef unsigned int FT_UInt32
|
||||
ctypedef int FT_Fast
|
||||
ctypedef unsigned int FT_UFast
|
||||
|
||||
# Moved up.
|
||||
cdef struct FT_ModuleRec_
|
||||
|
||||
+17
-5
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -154,6 +154,10 @@ cython("renpy.style")
|
||||
|
||||
cython("renpy.encryption")
|
||||
|
||||
# renpy.compat
|
||||
if PY2:
|
||||
cython("renpy.compat.dictviews")
|
||||
|
||||
# renpy.styledata
|
||||
cython("renpy.styledata.styleclass")
|
||||
cython("renpy.styledata.stylesets")
|
||||
@@ -170,6 +174,12 @@ cython("renpy.display.quaternion", libs=[ 'm' ])
|
||||
cython("renpy.uguu.gl", libs=sdl)
|
||||
cython("renpy.uguu.uguu", libs=sdl)
|
||||
|
||||
cython("renpy.gl.gldraw", libs=sdl)
|
||||
cython("renpy.gl.gltexture", libs=sdl)
|
||||
cython("renpy.gl.glenviron_shader", libs=sdl)
|
||||
cython("renpy.gl.glrtt_copy", libs=sdl)
|
||||
cython("renpy.gl.glrtt_fbo", libs=sdl)
|
||||
|
||||
cython("renpy.gl2.gl2mesh")
|
||||
cython("renpy.gl2.gl2mesh2")
|
||||
cython("renpy.gl2.gl2mesh3")
|
||||
@@ -191,10 +201,12 @@ cython(
|
||||
[ "ftsupport.c", "ttgsubtable.c" ],
|
||||
libs=sdl + [ 'freetype', 'z', 'm' ])
|
||||
|
||||
cython(
|
||||
"renpy.text.hbfont",
|
||||
[ "ftsupport.c" ],
|
||||
libs=sdl + [ 'harfbuzz', 'freetype', 'z', 'm' ])
|
||||
if not (PY2 and emscripten):
|
||||
|
||||
cython(
|
||||
"renpy.text.hbfont",
|
||||
[ "ftsupport.c" ],
|
||||
libs=sdl + [ 'harfbuzz', 'freetype', 'z', 'm' ])
|
||||
|
||||
generate_all_cython()
|
||||
find_unnecessary_gen()
|
||||
|
||||
+5
-6
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -28,12 +28,11 @@ import os
|
||||
import sys
|
||||
import re
|
||||
import threading
|
||||
import warnings
|
||||
|
||||
import setuptools
|
||||
|
||||
warnings.simplefilter("ignore", category=setuptools.SetuptoolsDeprecationWarning)
|
||||
|
||||
if sys.version_info.major == 2:
|
||||
import distutils.core as setuptools
|
||||
else:
|
||||
import setuptools
|
||||
|
||||
# This flag determines if we are compiling for Android or not.
|
||||
android = "RENPY_ANDROID" in os.environ
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# This file is part of Ren'Py. The license below applies to Ren'Py only.
|
||||
# Games and other projects that use Ren'Py may use a different license.
|
||||
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+10
-4
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -223,6 +223,7 @@ backup_blacklist = {
|
||||
"renpy.test.testmouse",
|
||||
"renpy.test.testparser",
|
||||
"renpy.gl2",
|
||||
"renpy.gl",
|
||||
"renpycoverage",
|
||||
}
|
||||
|
||||
@@ -253,7 +254,6 @@ name_blacklist = {
|
||||
"renpy.exports.sdl_dll",
|
||||
"renpy.sl2.slast.serial",
|
||||
"renpy.gl2.gl2draw.default_position",
|
||||
"renpy.lexer._python_updatecache",
|
||||
}
|
||||
|
||||
class Backup(_object):
|
||||
@@ -405,9 +405,12 @@ def import_all():
|
||||
# Adds in the Ren'Py loader.
|
||||
import renpy.loader
|
||||
|
||||
import renpy.pyanalysis
|
||||
sys.modules["renpy.py3analysis"] = renpy.pyanalysis
|
||||
if not PY2:
|
||||
import renpy.py3analysis
|
||||
else:
|
||||
import renpy.py2analysis
|
||||
|
||||
import renpy.pyanalysis
|
||||
import renpy.parameter
|
||||
|
||||
import renpy.ast
|
||||
@@ -476,6 +479,7 @@ def import_all():
|
||||
|
||||
sys.modules[pystr('renpy.display.text')] = renpy.text.text
|
||||
|
||||
import renpy.gl
|
||||
import renpy.gl2
|
||||
|
||||
import renpy.display.layout
|
||||
@@ -718,6 +722,8 @@ if 1 == 0:
|
||||
from . import performance
|
||||
from . import persistent
|
||||
from . import preferences
|
||||
from . import py2analysis
|
||||
from . import py3analysis
|
||||
from . import pyanalysis
|
||||
from . import pydict
|
||||
from . import python
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+11
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -43,11 +43,17 @@ from renpy.parameter import Parameter, Signature, ParameterInfo, ArgumentInfo, \
|
||||
apply_arguments, EMPTY_PARAMETERS, EMPTY_ARGUMENTS
|
||||
|
||||
|
||||
# The name of the current statement.
|
||||
current_statement_name = "init"
|
||||
|
||||
def statement_name(name):
|
||||
"""
|
||||
Reports the name of this statement to systems like window auto.
|
||||
"""
|
||||
|
||||
global current_statement_name
|
||||
current_statement_name = name
|
||||
|
||||
for i in renpy.config.statement_callbacks:
|
||||
i(name)
|
||||
|
||||
@@ -157,7 +163,10 @@ class PyCode(object):
|
||||
if isinstance(source, PyExpr):
|
||||
loc = (source.filename, source.linenumber, source)
|
||||
|
||||
self.py = 3
|
||||
if PY2:
|
||||
self.py = 2
|
||||
else:
|
||||
self.py = 3
|
||||
|
||||
# The source code.
|
||||
self.source = source
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -422,7 +422,7 @@ class ATLTransformBase(renpy.object.Object):
|
||||
rv_parameters = []
|
||||
for name, value in self.context.context.items():
|
||||
if name not in self.parameters.parameters:
|
||||
rv_parameters.append(ValuedParameter(name, ValuedParameter.KEYWORD_ONLY, default=value))
|
||||
rv_parameters.append(ValuedParameter(name, ValuedParameter.KEYWORD_ONLY, value))
|
||||
if rv_parameters:
|
||||
rv_parameters = list(self.parameters.parameters.values()) + rv_parameters
|
||||
rv_parameters.sort(key=lambda p: p.kind)
|
||||
@@ -657,10 +657,10 @@ class ATLTransformBase(renpy.object.Object):
|
||||
# continue
|
||||
|
||||
if passed: # turn into elif when possible
|
||||
param = ValuedParameter(name, param.KEYWORD_ONLY, default=scope[name])
|
||||
param = ValuedParameter(name, param.KEYWORD_ONLY, scope[name])
|
||||
|
||||
elif param.has_default:
|
||||
param = ValuedParameter(name, pkind, default=scope[name])
|
||||
param = ValuedParameter(name, pkind, scope[name])
|
||||
|
||||
else:
|
||||
## not passed and no default value
|
||||
@@ -1334,7 +1334,7 @@ class RawMultipurpose(RawStatement):
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
if isinstance(i, ATLTransformBase):
|
||||
if isinstance(i, ATLTransformBase) and (i.child is None):
|
||||
i.atl.predict(ctx)
|
||||
return
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+12
-10
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -365,9 +365,12 @@ class Channel(object):
|
||||
ExecutionContext to point to the copy, and returns the copy.
|
||||
"""
|
||||
|
||||
mcd = renpy.game.context().music
|
||||
context = renpy.game.context()
|
||||
mcd = dict(context.music)
|
||||
context.music = mcd
|
||||
|
||||
ctx = self.get_context().copy()
|
||||
|
||||
mcd[self.name] = ctx
|
||||
return ctx
|
||||
|
||||
@@ -455,7 +458,11 @@ class Channel(object):
|
||||
|
||||
# Update the channel volume.
|
||||
|
||||
mixer_volume = renpy.game.preferences.volumes.get(self.mixer, 1.0)
|
||||
if self.mixer:
|
||||
mixer_volume = renpy.game.preferences.volumes.get(self.mixer, 1.0)
|
||||
else:
|
||||
mixer_volume = 1.0
|
||||
|
||||
main_volume = renpy.game.preferences.volumes.get("main", 1.0)
|
||||
|
||||
if renpy.game.preferences.self_voicing:
|
||||
@@ -720,9 +727,8 @@ class Channel(object):
|
||||
with lock:
|
||||
|
||||
for filename in filenames:
|
||||
if renpy.exports.is_seen_allowed():
|
||||
filename, _, _ = self.split_filename(filename, False)
|
||||
renpy.game.persistent._seen_audio[str(filename)] = True # type: ignore
|
||||
filename, _, _ = self.split_filename(filename, False)
|
||||
renpy.game.persistent._seen_audio[str(filename)] = True # type: ignore
|
||||
|
||||
if not loop_only:
|
||||
|
||||
@@ -1264,12 +1270,8 @@ def interact():
|
||||
|
||||
c.interact()
|
||||
|
||||
# if _music_volumes.get(i, 1.0) != c.chan_volume:
|
||||
# c.set_volume(_music_volumes.get(i, 1.0))
|
||||
|
||||
ctx = c.context
|
||||
|
||||
|
||||
# If we're in the same music change, then do nothing with the
|
||||
# music.
|
||||
if c.last_changed == ctx.last_changed:
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
ctypedef void (*apply_audio_filter_type)(object, float *, int, int, int)
|
||||
ctypedef void (*apply_audio_filter_type)(object, float *, int, int, int) noexcept
|
||||
|
||||
cdef apply_audio_filter_type *get_apply_audio_filter()
|
||||
|
||||
+18
-19
@@ -1,5 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
1#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
# (the "Software"), to deal in the Software without restriction,
|
||||
@@ -60,7 +59,7 @@ cdef struct SampleBuffer:
|
||||
# A linked list of sample buffers with 0-16 subchannels.
|
||||
cdef SampleBuffer *free_buffers[SUBCHANNELS+1]
|
||||
|
||||
cdef SampleBuffer *allocate_buffer(int subchannels, int length) nogil:
|
||||
cdef SampleBuffer *allocate_buffer(int subchannels, int length) noexcept nogil:
|
||||
"""
|
||||
Allocates a sample buffer.
|
||||
"""
|
||||
@@ -91,7 +90,7 @@ cdef SampleBuffer *allocate_buffer(int subchannels, int length) nogil:
|
||||
return buf
|
||||
|
||||
|
||||
cdef void free_buffer(SampleBuffer *buf) nogil:
|
||||
cdef void free_buffer(SampleBuffer *buf) noexcept nogil:
|
||||
"""
|
||||
Frees a sample buffer, by putting it back on the free list.
|
||||
"""
|
||||
@@ -123,7 +122,7 @@ cdef class AudioFilter:
|
||||
|
||||
raise NotImplementedError("prepare")
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
"""
|
||||
Applies the filter to the given samples.
|
||||
"""
|
||||
@@ -157,7 +156,7 @@ cdef class Null(AudioFilter):
|
||||
def prepare(self, int samplerate):
|
||||
pass
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
cdef SampleBuffer *result = allocate_buffer(samples.subchannels, samples.length)
|
||||
memcpy(result.samples, samples.samples, samples.length * samples.subchannels * sizeof(float))
|
||||
return result
|
||||
@@ -188,7 +187,7 @@ cdef class FilterList:
|
||||
def __dealloc__(self):
|
||||
free(self.filters)
|
||||
|
||||
cdef SampleBuffer *apply(self, int index, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, int index, SampleBuffer *samples) noexcept nogil:
|
||||
return (<AudioFilter> self.filters[index]).apply(samples)
|
||||
|
||||
def __iter__(self):
|
||||
@@ -223,7 +222,7 @@ cdef class Sequence(AudioFilter):
|
||||
for f in self.filters:
|
||||
f.prepare(samplerate)
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result
|
||||
cdef SampleBuffer *old_result = samples
|
||||
@@ -408,7 +407,7 @@ cdef class Biquad(AudioFilter):
|
||||
self.cy2 = a2 / a0
|
||||
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result = allocate_buffer(samples.subchannels, samples.length)
|
||||
cdef int i, j
|
||||
@@ -634,7 +633,7 @@ cdef class Crossfade(AudioFilter):
|
||||
|
||||
self.duration_samples = int(self.duration * samplerate)
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result1
|
||||
cdef SampleBuffer *result2
|
||||
@@ -705,7 +704,7 @@ cdef class Mix(AudioFilter):
|
||||
for f in self.filters:
|
||||
f.prepare(samplerate)
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result = NULL
|
||||
cdef SampleBuffer *temp
|
||||
@@ -744,7 +743,7 @@ cdef class Multiply(AudioFilter):
|
||||
def prepare(self, int samplerate):
|
||||
return
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result
|
||||
cdef int i, j
|
||||
@@ -807,7 +806,7 @@ cdef class DelayBuffer:
|
||||
def __dealloc__(self):
|
||||
free(self.buffer)
|
||||
|
||||
cdef void queue(self, SampleBuffer *samples) nogil:
|
||||
cdef void queue(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef int i, j
|
||||
|
||||
@@ -816,7 +815,7 @@ cdef class DelayBuffer:
|
||||
self.buffer[self.write_index[j]] = samples.samples[i * samples.subchannels + j]
|
||||
self.write_index[j] = (self.write_index[j] + 1) % self.length
|
||||
|
||||
cdef SampleBuffer * dequeue(self, int subchannels, int length) nogil:
|
||||
cdef SampleBuffer * dequeue(self, int subchannels, int length) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result = allocate_buffer(subchannels, length)
|
||||
cdef int i, j
|
||||
@@ -865,7 +864,7 @@ cdef class Delay(AudioFilter):
|
||||
if self.buffer is None and self.max_delay >= 0.01:
|
||||
self.buffer = DelayBuffer(self.delay, samplerate, SUBCHANNELS)
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
cdef SampleBuffer *result
|
||||
|
||||
if self.max_delay < 0.01:
|
||||
@@ -936,7 +935,7 @@ cdef class Comb(AudioFilter):
|
||||
|
||||
self.filter.prepare(samplerate)
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *delayed
|
||||
cdef SampleBuffer *result
|
||||
@@ -1001,7 +1000,7 @@ cdef class WetDry(AudioFilter):
|
||||
def prepare(self, int samplerate):
|
||||
self.filter.prepare(samplerate)
|
||||
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) nogil:
|
||||
cdef SampleBuffer *apply(self, SampleBuffer *samples) noexcept nogil:
|
||||
|
||||
cdef SampleBuffer *result
|
||||
cdef SampleBuffer *filtered
|
||||
@@ -1107,7 +1106,7 @@ def to_audio_filter(o):
|
||||
raise TypeError("Expected an AudioFilter, got {!r}.".format(o))
|
||||
|
||||
|
||||
cdef void apply_audio_filter(AudioFilter af, float *samples, int subchannels, int length, int samplerate) nogil:
|
||||
cdef void apply_audio_filter(AudioFilter af, float *samples, int subchannels, int length, int samplerate) noexcept nogil:
|
||||
"""
|
||||
:undocumented:
|
||||
"""
|
||||
@@ -1140,5 +1139,5 @@ cdef void apply_audio_filter(AudioFilter af, float *samples, int subchannels, in
|
||||
return
|
||||
|
||||
|
||||
cdef apply_audio_filter_type *get_apply_audio_filter():
|
||||
cdef apply_audio_filter_type *get_apply_audio_filter() noexcept:
|
||||
return <apply_audio_filter_type *> apply_audio_filter
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -136,6 +136,7 @@ def play(filenames, channel="music", loop=None, fadeout=None, synchro_start=None
|
||||
|
||||
t = get_serial()
|
||||
ctx.last_changed = t
|
||||
c.last_changed = t
|
||||
|
||||
if loop:
|
||||
ctx.last_filenames = filenames
|
||||
@@ -233,6 +234,7 @@ def queue(filenames, channel="music", loop=None, clear_queue=True, fadein=0, tig
|
||||
|
||||
t = get_serial()
|
||||
ctx.last_changed = t
|
||||
c.last_changed = t
|
||||
|
||||
if loop:
|
||||
ctx.last_filenames = filenames
|
||||
@@ -305,6 +307,7 @@ def stop(channel="music", fadeout=None):
|
||||
|
||||
t = get_serial()
|
||||
ctx.last_changed = t
|
||||
c.last_changed = t
|
||||
ctx.last_filenames = [ ]
|
||||
ctx.last_tight = False
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -95,7 +95,7 @@ cdef extern from "renpysound_core.h":
|
||||
|
||||
|
||||
from renpy.audio.filter cimport get_apply_audio_filter
|
||||
RPS_apply_audio_filter = <void (*)(object, float *, int, int, int)> get_apply_audio_filter()
|
||||
RPS_apply_audio_filter = <void (*)(object, float *, int, int, int) noexcept> get_apply_audio_filter()
|
||||
|
||||
|
||||
def check_error():
|
||||
@@ -518,7 +518,7 @@ def set_generate_audio_c_function(fn):
|
||||
import ctypes
|
||||
fn = ctypes.cast(fn, ctypes.c_void_p).value
|
||||
|
||||
RPS_generate_audio_c_function = <void (*)(float *, int)> <uintptr_t> fn
|
||||
RPS_generate_audio_c_function = <void (*)(float *, int) noexcept> <uintptr_t> fn
|
||||
|
||||
|
||||
# Store the sample surfaces so they stay alive.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+11
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -37,6 +37,12 @@ FSENCODING = sys.getfilesystemencoding() or "utf-8"
|
||||
old_stdout = sys.stdout
|
||||
old_stderr = sys.stderr
|
||||
|
||||
if PY2:
|
||||
sys_executable = sys.executable
|
||||
reload(sys) # type: ignore
|
||||
sys.setdefaultencoding("utf-8") # type: ignore
|
||||
sys.executable = sys_executable
|
||||
|
||||
def _setdefaultencoding(name):
|
||||
"""
|
||||
This is install in sys to prevent games from trying to change the default
|
||||
@@ -371,7 +377,10 @@ You may be using a system install of python. Please run {0}.sh,
|
||||
if hasattr(sys, "renpy_executable"):
|
||||
subprocess.Popen([sys.renpy_executable] + sys.argv[1:]) # type: ignore
|
||||
else:
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
if PY2:
|
||||
subprocess.Popen([sys.executable, "-EO"] + sys.argv)
|
||||
else:
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
|
||||
except renpy.game.ParseErrorException:
|
||||
pass
|
||||
|
||||
+8
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -714,7 +714,10 @@ def display_say(
|
||||
if scry.extend_text is renpy.ast.DoesNotExtend:
|
||||
break
|
||||
elif scry.extend_text is not None:
|
||||
extend_text += scry.extend_text
|
||||
try:
|
||||
extend_text += renpy.substitutions.substitute(scry.extend_text, scope=None, force=False, translate=True)[0]
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
scry = scry.next()
|
||||
scry_count += 1
|
||||
@@ -1295,6 +1298,9 @@ class ADVCharacter(object):
|
||||
|
||||
rv = renpy.substitutions.substitute(who)[0]
|
||||
|
||||
if PY2:
|
||||
rv = rv.encode("utf-8")
|
||||
|
||||
return rv
|
||||
|
||||
def __format__(self, spec):
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -111,7 +111,7 @@ init -1600 python hide:
|
||||
try:
|
||||
return self.dict[self.key]
|
||||
except LookupError as e:
|
||||
raise Exception("The {!r} {} does not exist.".format(key, self.kind)) from e
|
||||
raise Exception("The {!r} {} does not exist.".format(key, self.kind)) # from e # PY3 only
|
||||
|
||||
class ScreenVariable(Accessor):
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -69,6 +69,37 @@ init -1500 python:
|
||||
else:
|
||||
return false
|
||||
|
||||
|
||||
class _ActionList(Action, DictEquality):
|
||||
"""
|
||||
:undocumented:
|
||||
|
||||
Encapsulates a list of actions, so that they can be treated as a single action,
|
||||
for the purposes of SelectedIf and SensitiveIf.
|
||||
"""
|
||||
|
||||
def __init__(self, actions):
|
||||
self.actions = actions
|
||||
|
||||
def get_selected(self):
|
||||
return renpy.display.behavior.is_selected(self.actions)
|
||||
|
||||
def get_sensitive(self):
|
||||
return renpy.display.behavior.is_sensitive(self.actions)
|
||||
|
||||
def get_tooltip(self):
|
||||
return renpy.display.behavior.get_tooltip(self.actions)
|
||||
|
||||
def periodic(self, st):
|
||||
return renpy.display.behavior.run_periodic(self.actions, st)
|
||||
|
||||
def unhovered(self):
|
||||
return renpy.display.behavior.run_unhovered(self.actions)
|
||||
|
||||
def __call__(self):
|
||||
return renpy.run(self.actions)
|
||||
|
||||
|
||||
@renpy.pure
|
||||
class SelectedIf(Action, DictEquality):
|
||||
"""
|
||||
@@ -89,10 +120,13 @@ init -1500 python:
|
||||
# Note: This had been documented to take a boolean.
|
||||
|
||||
def __init__(self, expression):
|
||||
if isinstance(expression, (list, tuple)):
|
||||
expression = _ActionList(expression)
|
||||
|
||||
self.expression = expression
|
||||
|
||||
if isinstance(expression, Action):
|
||||
for i in ("get_selected", "get_sensitive", "get_tooltip", "periodic", "unhovered"):
|
||||
for i in ("get_selected", "get_sensitive", "get_tooltip", "periodic", "unhovered", "alt"):
|
||||
setattr(self, i, getattr(expression, i, None))
|
||||
|
||||
def __call__(self):
|
||||
@@ -123,10 +157,13 @@ init -1500 python:
|
||||
# Note: This had been documented to take a boolean.
|
||||
|
||||
def __init__(self, expression):
|
||||
if isinstance(expression, (list, tuple)):
|
||||
expression = _ActionList(expression)
|
||||
|
||||
self.expression = expression
|
||||
|
||||
if isinstance(expression, Action):
|
||||
for i in ("get_selected", "get_sensitive", "get_tooltip", "periodic", "unhovered"):
|
||||
for i in ("get_selected", "get_sensitive", "get_tooltip", "periodic", "unhovered", "alt"):
|
||||
setattr(self, i, getattr(expression, i, None))
|
||||
|
||||
def __call__(self):
|
||||
@@ -544,8 +581,12 @@ init -1500 python:
|
||||
if type(self) is not type(other):
|
||||
return False
|
||||
|
||||
if self.callable != other.callable:
|
||||
return False
|
||||
if PY2:
|
||||
if self.callable is not other.callable:
|
||||
return False
|
||||
else:
|
||||
if self.callable != other.callable:
|
||||
return False
|
||||
|
||||
if self.args != other.args:
|
||||
return False
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -215,7 +215,7 @@ init -1500 python:
|
||||
try:
|
||||
self.dict[self.key] = value
|
||||
except LookupError as e:
|
||||
raise Exception("The {!r} {} does not exist".format(self.key, self.kind)) from e
|
||||
raise Exception("The {!r} {} does not exist".format(self.key, self.kind)) # from e # PY3 only
|
||||
|
||||
@renpy.pure
|
||||
class FieldValue(__GenericValue):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -63,13 +63,23 @@ init -1500 python in build:
|
||||
|
||||
renpy_sh = "renpy.sh"
|
||||
|
||||
renpy_patterns = pattern_list([
|
||||
("renpy/**__pycache__/**.{}.pyc".format(sys.implementation.cache_tag), "all"),
|
||||
("renpy/**__pycache__", "all"),
|
||||
])
|
||||
if PY2:
|
||||
renpy_patterns = pattern_list([
|
||||
("renpy/**.pyo", "all"),
|
||||
("renpy/**__pycache__", None),
|
||||
])
|
||||
|
||||
if os.path.exists(os.path.join(config.renpy_base, "renpy3.sh")):
|
||||
renpy_sh = "renpy3.sh"
|
||||
if os.path.exists(os.path.join(config.renpy_base, "renpy2.sh")):
|
||||
renpy_sh = "renpy2.sh"
|
||||
|
||||
else:
|
||||
renpy_patterns = pattern_list([
|
||||
("renpy/**__pycache__/**.{}.pyc".format(sys.implementation.cache_tag), "all"),
|
||||
("renpy/**__pycache__", "all"),
|
||||
])
|
||||
|
||||
if os.path.exists(os.path.join(config.renpy_base, "renpy3.sh")):
|
||||
renpy_sh = "renpy3.sh"
|
||||
|
||||
|
||||
# Patterns that are used to classify Ren'Py.
|
||||
@@ -113,7 +123,7 @@ init -1500 python in build:
|
||||
( "lib/*/pythonw.exe", None),
|
||||
|
||||
# Ignore the wrong Python.
|
||||
( "lib/py2-*/", None),
|
||||
( "lib/py3-*/" if PY2 else "lib/py2-*/", None),
|
||||
|
||||
# Windows patterns.
|
||||
( "lib/py*-windows-i686/**", "windows_i686"),
|
||||
@@ -129,7 +139,7 @@ init -1500 python in build:
|
||||
( "lib/py*-mac-*/**", "mac"),
|
||||
|
||||
# Old Python library.
|
||||
( "lib/python2.*/**", None),
|
||||
( "lib/python3.*/**" if PY2 else "lib/python2.*/**", None),
|
||||
|
||||
# Shared patterns.
|
||||
( "lib/**", "windows linux mac android ios"),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -217,6 +217,7 @@ init -1100 python:
|
||||
|
||||
if version <= (7, 4, 4):
|
||||
config.pause_after_rollback = True
|
||||
config.gl2 = False
|
||||
config.gl_lod_bias = -1.0
|
||||
config.who_what_sub_compat = 1
|
||||
|
||||
@@ -293,6 +294,7 @@ init -1100 python:
|
||||
if _compat_versions(version, (7, 6, 1), (8, 1, 1)):
|
||||
config.tts_front_to_back = False
|
||||
_greedy_rollback = False
|
||||
config.dissolve_shrinks = True
|
||||
|
||||
if _compat_versions(version, (7, 6, 99), (8, 1, 99)):
|
||||
config.simple_box_reverse = True
|
||||
|
||||
@@ -156,8 +156,12 @@ init -1500 python in _console:
|
||||
s = s[:i] + self._ellipsis + s[len(s) - i:]
|
||||
return s
|
||||
|
||||
repr_bytes = _repr_bytes
|
||||
repr_str = _repr_string
|
||||
if PY2:
|
||||
repr_str = _repr_bytes
|
||||
repr_unicode = _repr_string
|
||||
else:
|
||||
repr_bytes = _repr_bytes
|
||||
repr_str = _repr_string
|
||||
|
||||
def repr_tuple(self, x, level):
|
||||
if not x: return "()"
|
||||
@@ -208,7 +212,7 @@ init -1500 python in _console:
|
||||
|
||||
if level <= 0: return "{...}"
|
||||
|
||||
iter_keys = self._to_shorted_list(x, self.maxdict, sort=False)
|
||||
iter_keys = self._to_shorted_list(x, self.maxdict, sort=PY2)
|
||||
iter_x = self._make_pretty_items(x, iter_keys, '{', '}')
|
||||
return self._repr_iterable(iter_x, level, '{', '}')
|
||||
|
||||
@@ -223,7 +227,7 @@ init -1500 python in _console:
|
||||
|
||||
if level <= 0: return left + "...})"
|
||||
|
||||
iter_keys = self._to_shorted_list(x, self.maxdict, sort=False)
|
||||
iter_keys = self._to_shorted_list(x, self.maxdict, sort=PY2)
|
||||
iter_x = self._make_pretty_items(x, iter_keys, left, '})')
|
||||
return self._repr_iterable(iter_x, level, left, '})')
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user