Compare commits

..

23 Commits

Author SHA1 Message Date
Tom Rothamel 4967862763 Bump version. 2013-12-17 21:22:11 -05:00
Tom Rothamel fc04acb208 Update docs. 2013-12-16 22:47:56 -05:00
kyouryuukunn a9939d823d fix typo 2013-12-16 22:46:20 -05:00
Tom Rothamel 54b82d46f6 Link variables and classes in the reserved names list.
Conflicts:
	sphinx/source/inc/reserved_renpy
2013-12-16 02:26:03 -05:00
Tom Rothamel e217e96f0a Allow Ren'Py to compile with freetype 2.5.1.
Fixes #250.
2013-12-16 02:20:47 -05:00
Tom Rothamel e2fee1b9af Fix sense of environment-encoding test. 2013-12-16 01:34:40 -05:00
Tom Rothamel 9761da8585 Bump version. 2013-12-16 00:14:15 -05:00
Tom Rothamel 7c86577b5f Report NO_RAPT before NO_JDK.
On Windows, RAPT is responsible for detecting the JDK. If RAPT is
missing, the JDK will also be reported missing - even if it's
installed.

Changing the reporting order makes this less confusing.
2013-12-15 22:17:05 -05:00
Tom Rothamel 127bba619f Fix typo that broke Android.
We copied script_version.rpy onto script_version.rpyc, which
made things fail to start on Android.
2013-12-15 22:17:05 -05:00
Tom Rothamel a4673a6a38 Merge pull request #257 from LuqueDaniel/fix-rmtree
Fix delete the tmp directory
2013-12-15 22:16:45 -05:00
Tom Rothamel 51185c3628 More documentation and flagging as undocumented. 2013-12-15 22:16:02 -05:00
Tom Rothamel 3add242651 Document NoRollback as class, not function. 2013-12-15 22:16:02 -05:00
Tom Rothamel f84c2b46cf Document renpy.map_event. 2013-12-15 22:16:02 -05:00
Tom Rothamel ff7631d292 Ignore errors in OpenDirectory. 2013-12-15 22:16:02 -05:00
Tom Rothamel 74bae3eeeb Document NoRollback. 2013-12-15 22:16:02 -05:00
Tom Rothamel f94ffde48f Check in inc/disp_grid. 2013-12-15 22:15:05 -05:00
Tom Rothamel 9956d269a4 Document Grid.
Conflicts:
	sphinx/source/inc/reserved_renpy
2013-12-15 22:13:35 -05:00
Tom Rothamel 420f4351e2 Ensure that all generated documentation is included. 2013-12-15 22:12:34 -05:00
Tom Rothamel c644a64c1c Check documentation for unused includes. 2013-12-15 22:12:34 -05:00
Tom Rothamel 700fe066f5 Documentation. 2013-12-15 22:12:34 -05:00
Tom Rothamel e6b83049af Fix bug where Reply would not properly evaluate locked=None. 2013-12-07 23:57:56 -05:00
Tom Rothamel 833da0847c Change list_saved_games as well.
Thanks, zorexx.
2013-12-04 22:51:58 -05:00
Tom Rothamel 0a56acc1b6 scan_saved_game should use _save_name, not _extra_info. 2013-12-04 11:25:37 -05:00
1556 changed files with 60662 additions and 398758 deletions
+41 -122
View File
@@ -1,135 +1,54 @@
# macOS-related files
.DS_Store
.AppleDouble
.LSOverride
# Windows-related files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
[Dd]esktop.ini
# Python related files.
*.pyc
*.pyo
*.pyi
*.egg-info
# Editor/tool files.
*~
*.bak
.gdb_history
# Compiled Ren'Py files.
*.rpyc
*.rpyb
*.rpymc
*.pyc
*.pyo
*~
*.bak
saves
tmp
cache
# Ren'Py log files.
log.txt
errors.txt
traceback.txt
lint.txt
# Created directories.
saves/
tmp/
cache/
# Executables.
/renpy.exe
/renpy2.exe
/renpy3.exe
/renpy-32.exe
/renpy.sh
/renpy2.sh
/renpy3.sh
styles.txt
/android
/build
/dist
/dists
/renpy.app
/renpy2.app
/renpy3.app
/7z.sfx
# Libraries.
/lib
# Platforms.
/rapt
/rapt2
/rapt3
/renios
/renios2
/renios3
/web
/web2
/web3
# Docs.
/sphinx/source/inc
/sphinx/source/thequestion.rst
/doc
/doc-web
/LICENSE.txt
# Gui template.
/gui/game/gui
# Editors.
/jedit
/atom
/vscode
# Generated source.
/renpy/vc_version.py
/module/gen/
/module/gen3/
/module/gen-static/
/module/gen3-static/
/tutorial/game/tutorial_director.rpy
# Module build.
/module/build
/module/dist
/module/emscripten-static
# Download target.
/dl
# Pygame_sdl2.
/pygame_sdl2
# Updater.
update.pem
# Steam.
steam_appid.txt
/steamapi.py
# Android.
*.keystore
# Type analysis.
/typings
# Live2D
cubism
CubismSdkForNative-4-*.zip
# Created files.
/lint.txt
/renpy.code
/*testing*
/screenshot*
.android.json
/renpy.exe
/lib
/lib.old
/doc
/.pydevproject
/.pydevproject.bak
/.project
/.settings
/LICENSE.txt
/templates/english/README.html
/the_question/README.html
/tutorial/README.html
/renpy/angle/*.pyx
/renpy/angle/*.pxd
/renpy-ppc.zip
/module/build
/module/gen
/editra
/launcher/game/theme
/launcher/game/script_version.rpy
# Old files.
/0old
# Works in progress, throwaway scripts, etc.
/scratch
/*-dists
/c
/cg
/.vscode/launch.json
dl
renpy/vc_version.py
.externalToolBuilders
rapt-*
-214
View File
@@ -1,214 +0,0 @@
{
"files.watcherExclude": {
"**/renpy/0old/**" : true,
"**/renpy/atom/**" : true,
"**/renpy/cubism/**" : true,
"**/renpy/dists/**" : true,
"**/renpy/dl/**" : true,
"**/renpy/doc/**" : true,
"**/renpy/doc-web/**" : true,
"**/renpy/jedit/**" : true,
"**/renpy/renpy*.app/**" : true,
"**/renpy/tmp/**" : true,
"**/renpy/web/**" : true,
},
"files.exclude": {
"0old": true,
"**-dists": true,
"**/*.pyc": true,
"**/*.pyo": true,
"renpy/**/*.pyi": true,
"**/*.rpmc": true,
"**/*.rpyc": true,
"**/__pycache__": true,
"**/screenshot-*": true,
"7z.sfx": true,
"atom": true,
"cubism": true,
"dl": true,
"doc": true,
"doc-web": true,
"jedit": true,
"lib*": true,
"live2d": true,
"rapt*": true,
"renios*": true,
"renpy*.app": true,
"renpy*.exe": true,
"tmp": true,
"web": true,
"**/*.rpa": true,
"**/*.rpymc": true,
"**/cache/": true
},
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "workspace",
"python.linting.pylintEnabled": false,
"python.analysis.diagnosticSeverityOverrides": {
"reportMissingModuleSource": "none"
},
"esbonio.server.enabled": true,
"esbonio.sphinx.confDir": "",
"renpy.excludeCompiledFilesFromWorkspace": true,
"renpy.watchFoldersForChanges": false,
"renpy.warnOnInvalidVariableNames": "Disabled",
"renpy.warnOnInvalidFilenameIssues": "Disabled",
"renpy.warnOnIndentationAndSpacingIssues": "Disabled",
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "renpy.meta.plain",
"settings": {
"fontStyle": ""
}
},
{
"scope": "renpy.meta.i",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "renpy.meta.b",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": [
"renpy.meta.u",
"renpy.meta.a"
],
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "renpy.meta.s",
"settings": {
"fontStyle": "strikethrough"
}
},
{
"scope": "renpy.meta.i renpy.meta.b",
"settings": {
"fontStyle": "italic bold"
}
},
{
"scope": "renpy.meta.i renpy.meta.u",
"settings": {
"fontStyle": "italic underline"
}
},
{
"scope": "renpy.meta.i renpy.meta.s",
"settings": {
"fontStyle": "italic strikethrough"
}
},
{
"scope": "renpy.meta.b renpy.meta.u",
"settings": {
"fontStyle": "bold underline"
}
},
{
"scope": "renpy.meta.b renpy.meta.s",
"settings": {
"fontStyle": "bold strikethrough"
}
},
{
"scope": "renpy.meta.u renpy.meta.s",
"settings": {
"fontStyle": "underline strikethrough"
}
},
{
"scope": "renpy.meta.i renpy.meta.b renpy.meta.u",
"settings": {
"fontStyle": "italic bold underline"
}
},
{
"scope": "renpy.meta.i renpy.meta.b renpy.meta.s",
"settings": {
"fontStyle": "italic bold strikethrough"
}
},
{
"scope": "renpy.meta.i renpy.meta.u renpy.meta.s",
"settings": {
"fontStyle": "italic underline strikethrough"
}
},
{
"scope": "renpy.meta.b renpy.meta.u renpy.meta.s",
"settings": {
"fontStyle": "bold underline strikethrough"
}
},
{
"scope": "renpy.meta.i renpy.meta.b renpy.meta.u renpy.meta.s",
"settings": {
"fontStyle": "italic bold underline strikethrough"
}
},
{
"scope": "renpy.meta.color.text",
"settings": {
"foreground": "#ffffff"
}
},
{
"scope": "text.notes.info",
"settings": {
"foreground": "#17a2b8",
"fontStyle": "bold"
}
},
{
"scope": "text.notes.success",
"settings": {
"foreground": "#28a745",
"fontStyle": "bold"
}
},
{
"scope": "text.notes.warning",
"settings": {
"foreground": "#ffc107",
"fontStyle": "bold"
}
},
{
"scope": "text.notes.danger",
"settings": {
"foreground": "#dc3545",
"fontStyle": "bold"
}
},
{
"scope": "renpy.meta.color.#fff",
"settings": {
"foreground": "#fff"
}
},
{
"scope": "renpy.meta.color.#fcc",
"settings": {
"foreground": "#fcc"
}
},
{
"scope": "renpy.meta.color.#cfc",
"settings": {
"foreground": "#cfc"
}
}
]
},
}
BIN
View File
Binary file not shown.
+28 -151
View File
@@ -2,165 +2,48 @@
The Ren'Py Visual Novel Engine
==============================
https://www.renpy.org
Ren'Py development takes place on the ``master`` branch, and occasionally
on feature branches.
http://www.renpy.org
Getting Started
===============
Branches
========
Ren'Py depends on a number of Python modules written in Cython and C. For
changes to Ren'Py that only involve Python modules, you can use the modules
found in the latest nightly build. Otherwise, you'll have to compile the
modules yourself.
Ren'Py development takes place on two branches, ``master`` and
``devel``, as well as the occasional feature branch.
The development scripts assume a POSIX-like platform. The scripts should run
on Linux or macOS, and can be made to run on Windows using an environment
like MSYS.
Master
-----
Nightly Build
-------------
The master branch contains code that can be run using the libraries in
the latest (release or pre-release) version of Ren'Py. It's used for
bugfixes and features that do not require C or Cython code to
implement.
Nightly builds can be downloaded from:
After checking out master, run::
https://nightly.renpy.org
./after_checkout.sh <path-to-renpy>
Note that the latest nightly build is at the bottom of the list. Once you've
unpacked the nightly, change into this repository, and run::
to link in the libraries from the most recent Ren'Py. (On Windows, you
will need to run this under msys or cygwin.)
./after_checkout.sh <path-to-nightly>
Ren'Py can then be run by running renpy.exe, renpy.sh, or renpy.app as
appropriate.
Once this script completes, you should be able to run Ren'Py using renpy.sh,
renpy.app, or renpy.exe, as appropriate for your platform.
Devel
-----
If the current nightly build doesn't work, please wait 24 hours for a new
build to occur. If that build still doesn't work, contact Tom (`pytom at bishoujo.us`,
or @renpytom on twitter) to find out what's wrong.
The devel branch contains code that requires a recompile of modules
implemented in C or Cython. Building devel requires you to have the
prerequisite libraries installed. Then set RENPY_DEPS_INSTALLED to
a \::-separated list of paths containing dependencies. For example::
The ``doc`` symlink will dangle until documentation is built, as described
below.
export RENPY_DEPS_INSTALL=/usr::/usr/lib/x86_64-linux-gnu/
Compiling the Modules
----------------------
Finally, change into the modules directory, and run::
Building the modules requires you have the many dependencies installed on
your system. On Ubuntu and Debian, these dependencies can be installed with
the command::
python setup.py install
sudo apt install virtualenvwrapper python3-dev libavcodec-dev libavformat-dev \
libswresample-dev libswscale-dev libharfbuzz-dev libfreetype6-dev libfribidi-dev libsdl2-dev \
libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev
Ren'Py requires SDL_image 2.6 or greater. If your distribution doesn't include
that version, you'll need to download it from:
https://github.com/libsdl-org/SDL_image/tree/SDL2
We strongly suggest installing the Ren'Py modules into a Python
virtualenv. To create a new virtualenv, open a new terminal and run::
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
mkvirtualenv renpy
To return to this virtualenv later, run::
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
workon renpy
After activating the virtualenv, install additional dependencies::
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 setup.py install_headers
popd
Next, set RENPY_DEPS_INSTALL To a \:-separated (\;-separated on Windows)
list of paths containing the dependencies, and RENPY_CYTHON to the name
of the cython command::
export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(gcc -dumpmachine)/"
export RENPY_CYTHON=cython
Finally, use setup.py in the Ren'Py ``module`` directory to compile and
install the modules that support Ren'Py::
pushd module
python setup.py install
popd
Ren'Py will be installed into the activated virtualenv. It can then be run
using the command::
python renpy.py
Documentation
=============
Building
--------
Building the documentation requires Ren'Py to work. You'll either need to
link in a nightly build, or compile the modules as described above. You'll
also need the `Sphinx <https://www.sphinx-doc.org>`_ documentation generator.
If you have pip working, install Sphinx using::
pip install -U sphinx sphinx_rtd_theme sphinx_rtd_dark_mode
Once Sphinx is installed, change into the ``sphinx`` directory inside the
Ren'Py checkout and run::
./build.sh
Format
------
Ren'Py's documentation consists of reStructuredText files found in sphinx/source, and
generated documentation found in function docstrings scattered throughout the code. Do
not edit the files in sphinx/source/inc directly, as they will be overwritten.
Docstrings may include tags on the first few lines:
\:doc: `section` `kind`
Indicates that this function should be documented. `section` gives
the name of the include file the function will be documented in, while
`kind` indicates the kind of object to be documented (one of ``function``,
``method`` or ``class``. If omitted, `kind` will be auto-detected.
\:name: `name`
The name of the function to be documented. Function names are usually
detected, so this is only necessary when a function has multiple aliases.
\:args: `args`
This overrides the detected argument list. It can be used if some arguments
to the function are deprecated.
For example::
def warp_speed(factor, transwarp=False):
"""
:doc: warp
:name: renpy.warp_speed
:args: (factor)
Exceeds the speed of light.
"""
renpy.engine.warp_drive.engage(factor)
Translating
===========
For best practices when it comes to translating the launcher and template
game, please read:
https://lemmasoft.renai.us/forums/viewtopic.php?p=321603#p321603
Ren'Py can then be run by using python to run renpy.py.
Contributing
@@ -168,11 +51,5 @@ Contributing
For bug fixes, documentation improvements, and simple changes, just
make a pull request. For more complex changes, it might make sense
to file an issue first so we can discuss the design.
to file an issue so we can discuss the design.
License
=======
For the complete licensing terms, please read:
https://www.renpy.org/doc/html/license.html
-56
View File
@@ -1,56 +0,0 @@
This file contains the names, contact information, and notes about each
language Ren'Py is translated in. When you're adding a translation or
taking responsibility for a translation, please send a pull request updating
this file.
Pig Latin
---------
This is an automatically-generated translation that lets me test various
translation mechanisms.
* Tom Rothamel <pytom@bishoujo.us>
Russian
---------
Translation to the Russian language. Most of translation provided by Project
Gardares, especially Ria-kon.
* Project Gardares <guardares@gmail.com>
Malay
---------
Translation to the Malay language. This will be translated to both writing
systems used in Malay, namely the Latin-based Rumi script system and the
Arabic-based Jawi script system, to provide compatibility in some areas where
there is still exist Malay people who still cannot read their language in the
newer Rumi script system, or refused to use it. The translation is being made
as general and native as possible to cover the entire region that uses Malay
language, this means native words take precedence over loanwords if and only if
both native and loanwords exist and both are suitable in the context of use.
* Muhammad Nur Hidayat (MNH48) <translation@mnh48.moe>
Turkish
---------
Translation to the Turkish language. Some terms and abbreviations (especially
those related to coding) are deliberately left untranslated (or the original words
are provided in brackets) to avoid confusion, relying on their common use in
Turkish language and among Turkish developers.
* Arda Güler (WKFO) <ardaguler09@gmail.com>
Finnish
---------
Translation to the Finnish language. Most terms have been translated,
sometimes requiring some imagination to come up with suitable terms.
The quality is not perfect, but it should make sense to any developer
fluent in Finnish but not English. Adjustments will be made if better
translations are suggested.
* Lari Liuhamo (Diapolo10) <lari.liuhamo+github116504@gmail.com>
+23 -110
View File
@@ -1,26 +1,15 @@
#!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import subprocess
import sys
from renpy import version_tuple # @UnresolvedImport
from renpy import version_tuple #@UnresolvedImport
SOURCE = [
"/home/tom/ab/renpy",
"/home/tom/ab/renpy-build",
"/home/tom/ab/pygame_sdl2",
"/home/tom/ab/renpy-build/renpyweb",
]
from renpy.versions import generate_vc_version
version = generate_vc_version()["version"]
short_version = version.rpartition(".")[0]
major = version.partition(".")[0]
print("Version", version)
version = ".".join(str(i) for i in version_tuple)
short_version = ".".join(str(i) for i in version_tuple[:3])
print "Version", version
ap = argparse.ArgumentParser()
@@ -28,78 +17,9 @@ ap.add_argument("--release", action="store_true")
ap.add_argument("--prerelease", action="store_true")
ap.add_argument("--experimental", action="store_true")
ap.add_argument("--no-tag", "-n", action="store_true")
ap.add_argument("--push-tags", action="store_true")
ap.add_argument("--delete-tag")
ap.add_argument("--github", action="store_true")
ap.add_argument("--real", action="store_true")
args = ap.parse_args()
if not args.real:
print("Did you want to use scripts/add_all.sh? If not, give --real.")
sys.exit(1)
if args.github:
subprocess.call([ "git", "push", "--tags" ])
subprocess.call([ "gh", "release", "create", version, "--notes", "See https://www.renpy.org/release/" + short_version, "-t", "Ren'Py {}".format(short_version) ])
dn = "/home/tom/ab/renpy/dl/" + short_version
for fn in os.listdir(dn):
if fn == ".build_cache":
continue
if fn.endswith(".update.gz"):
continue
if fn.endswith(".update.json"):
continue
if fn.startswith("updates.json"):
continue
if fn.endswith(".zsync"):
continue
if fn.endswith(".sums"):
continue
subprocess.call([ "gh", "release", "upload", version, os.path.join(dn, fn) ])
sys.exit(0)
if args.release:
subprocess.check_call([ "/home/tom/ab/renpy/scripts/checksums.py", "/home/tom/ab/renpy/dl/" + short_version ])
if args.delete_tag:
for i in SOURCE:
os.chdir(i)
if i == SOURCE[0]:
tag = args.delete_tag
else:
tag = "renpy-" + args.delete_tag
subprocess.call([ "git", "tag", "-d", tag, ])
sys.exit(0)
if args.push_tags:
for i in SOURCE:
os.chdir(i)
if subprocess.call([ "git", "push", "--tags" ]):
print("Tags not pushed: {}".format(os.getcwd()))
sys.exit(1)
print("Pushed tags.")
sys.exit(0)
if args.release:
links = [ "release", "prerelease", "experimental" ]
tag = True
@@ -113,29 +33,24 @@ else:
links = [ ]
tag = False
if args.no_tag:
tag = False
links = [ i + "-" + major for i in links ]
def check_dirty():
if args.no_tag:
return
if tag:
for i in SOURCE:
os.chdir(i)
if subprocess.check_call([ "git", "diff", "--quiet", "HEAD" ]):
print "Directory not checked in: {}".format(os.getcwd())
sys.exit(1)
if subprocess.call([ "git", "diff", "--quiet", "HEAD" ]):
print("Directory not checked in: {}".format(os.getcwd()))
sys.exit(1)
os.chdir("/home/tom/ab/renpy")
check_dirty()
for i in SOURCE:
os.chdir("/home/tom/ab/renpy/android")
check_dirty()
subprocess.check_call([ "./add_renpy.sh", short_version ])
os.chdir(i)
if i == SOURCE[0]:
tag = version
else:
tag = "renpy-" + version
subprocess.check_call([ "git", "tag", "-a", tag, "-m", "Tagging Ren'Py + " + version + " release." ])
if not args.no_tag:
subprocess.check_call([ "git", "tag", "-a", "rapt-" + version, "-m", "Tagging RAPT release." ])
os.chdir("/home/tom/ab/renpy/dl")
@@ -144,13 +59,11 @@ for i in links:
os.unlink(i)
os.symlink(short_version, i)
os.chdir("/home/tom/ab/renpy")
if tag and not args.no_tag:
cmd = [ "git", "tag", "-a", version, "-m", "Ren'Py " + version ]
subprocess.check_call(cmd)
os.chdir("/home/tom/ab/website")
subprocess.check_call("./upload.sh")
os.chdir("/home/tom/ab/renpy/sphinx")
if args.release:
subprocess.check_call("./upload.sh")
elif args.prerelease:
subprocess.check_call("./upload_dev.sh")
print("Version", version)
-1
View File
@@ -12,5 +12,4 @@ if [ "$1" != "" ]; then
ln -s "$1/lib" "$ROOT/lib"
ln -s "$1/renpy.app" "$ROOT"
ln -s "$1/renpy.exe" "$ROOT"
ln -s "$1/renpy.sh" "$ROOT"
fi
+10
View File
@@ -0,0 +1,10 @@
# This file sets up the normal python modules. It's used to help eclipse
# do type detection, by providing an importable version of the cython code.
from distutils.core import setup
setup(
packages=['renpy', 'renpy.gl', 'renpy.angle', 'renpy.display', 'renpy.audio', 'renpy.text', 'pysdlsound'],
package_dir={ 'pysdlsound' : 'module' },
)
+2
View File
@@ -0,0 +1,2 @@
lib\windows-i686\python.exe -OO renpy.py
pause
+83 -174
View File
@@ -1,11 +1,6 @@
#!/home/tom/ab/renpy/lib/py3-linux-x86_64/python
#!/home/tom/bin/renpython -O
# Builds a distribution of Ren'Py.
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
import future.standard_library
import future.utils
PY2 = future.utils.PY2
import sys
import os
@@ -13,37 +8,8 @@ import compileall
import shutil
import subprocess
import argparse
import time
import collections
try:
from importlib import reload
except ImportError:
pass
ROOT = os.path.dirname(os.path.abspath(__file__))
def zip_rapt_symbols(destination):
"""
Zips up the rapt symbols.
"""
import zipfile
if PY2:
zf = zipfile.ZipFile(destination + "/android-native-symbols.zip", "w", zipfile.ZIP_DEFLATED)
else:
zf = zipfile.ZipFile(destination + "/android-native-symbols.zip", "w", zipfile.ZIP_DEFLATED, compresslevel=3)
for dn, dirs, files in os.walk("rapt/symbols"):
for fn in dirs + files:
fn = os.path.join(dn, fn)
arcname = os.path.relpath(fn, "rapt/symbols")
zf.write(fn, arcname)
zf.close()
CWD = os.getcwdu()
def copy_tutorial_file(src, dest):
"""
@@ -51,163 +17,102 @@ def copy_tutorial_file(src, dest):
"# end-tutorial-only" comments are omitted from the copy.
"""
sf = open(src, "rb")
df = open(dest, "wb")
# True if we want to copy the line.
copy = True
with open(src, "r") as sf, open(dest, "w") as df:
for l in sf:
if "# tutorial-only" in l:
copy = False
elif "# end-tutorial-only" in l:
copy = True
else:
if copy:
df.write(l)
for l in sf:
if "# tutorial-only" in l:
copy = False
elif "# end-tutorial-only" in l:
copy = True
else:
if copy:
df.write(l)
def link_directory(dirname):
dn = os.path.join(ROOT, dirname)
sf.close()
df.close()
if os.path.exists(dn):
os.unlink(dn)
if PY2:
source = dn + "2"
else:
source = dn + "3"
if os.path.exists(source):
os.symlink(source, dn)
def main():
start = time.time()
if not sys.flags.optimize:
raise Exception("Not running with python optimization.")
ap = argparse.ArgumentParser()
ap.add_argument("version", nargs="?")
ap.add_argument("version")
ap.add_argument("--fast", action="store_true")
ap.add_argument("--pygame", action="store", default=None)
ap.add_argument("--no-rapt", action="store_true")
ap.add_argument("--variant", action="store")
ap.add_argument("--sign", action="store_true", default=True)
ap.add_argument("--nosign", action="store_false", dest="sign")
ap.add_argument("--notarized", action="store_true", dest="notarized")
ap.add_argument("--vc-version-only", action="store_true")
ap.add_argument("--link-directories", action="store_true")
ap.add_argument("--append-version", action="store_true")
ap.add_argument("--nightly", action="store_true")
ap.add_argument("--print-version", action="store_true")
args = ap.parse_args()
link_directory("rapt")
link_directory("renios")
link_directory("web")
# Revision updating is done early, so we can do it even if the rest
# of the program fails.
import renpy.versions
renpy.versions.generate_vc_version(nightly=args.nightly)
# Determine the version. We grab the current revision, and if any
# file has changed, bump it by 1.
import renpy
if args.link_directories or args.vc_version_only:
return
match_version = ".".join(str(i) for i in renpy.version_tuple[:2]) #@UndefinedVariable
zip_version = ".".join(str(i) for i in renpy.version_tuple[:3]) #@UndefinedVariable
if not os.path.abspath(sys.executable).startswith(ROOT + "/lib"):
raise Exception("Distribute must be run with the python in lib/.")
s = subprocess.check_output([ "git", "describe", "--tags", "--dirty", "--match", match_version ])
parts = s.strip().split("-")
vc_version = int(parts[1])
if args.sign:
os.environ["RENPY_MAC_IDENTITY"] = "Developer ID Application: Tom Rothamel (XHTE5H7Z79)"
if parts[-1] == "dirty":
vc_version += 1
if PY2 and not sys.flags.optimize:
raise Exception("Not running with python optimization.")
with open("renpy/vc_version.py", "w") as f:
f.write("vc_version = {}".format(vc_version))
try:
vc_version_base = os.path.splitext(renpy.vc_version.__file__)[0]
reload(sys.modules['renpy.vc_version']) #@UndefinedVariable
except:
import renpy.vc_version # @UnusedImport
# Delete the .pyc and .pyo files, as reload can choose one of them instead
# of the new .py file.
for fn in [ vc_version_base + ".pyc", vc_version_base + ".pyo" ]:
if os.path.exists(fn):
os.unlink(fn)
reload(renpy.vc_version)
except Exception:
import renpy.vc_version
# A normal reload is fine, as renpy/__init__.py won't change.
reload(renpy)
if args.print_version:
print(renpy.version_only)
return
if args.version is None:
if args.nightly:
args.version = renpy.version_only
else:
args.version = ".".join(str(i) for i in renpy.version_tuple[:-1])
if args.append_version:
args.version += "-" + renpy.version_only
reload(sys.modules['renpy'])
# Check that the versions match.
full_version = renpy.version_only # @UndefinedVariable
full_version = ".".join(str(i) for i in renpy.version_tuple) #@UndefinedVariable
if args.version != "experimental" \
and not args.version.startswith("renpy-nightly-") \
and not full_version.startswith(args.version):
if "-" not in args.version \
and not full_version.startswith(args.version):
raise Exception("The command-line and Ren'Py versions do not match.")
os.environ['RENPY_BUILD_VERSION'] = args.version
# The destination directory.
destination = os.path.join("dl", args.version)
if args.variant:
destination += "-" + args.variant
print "Version {} ({})".format(args.version, full_version)
if os.path.exists(os.path.join(destination, "checksums.txt")):
raise Exception("The checksums.txt file exists.")
print("Version {} ({})".format(args.version, full_version))
if sys.version_info[0] >= 3:
renpy_sh = "./renpy3.sh"
else:
renpy_sh = "./renpy2.sh"
# Copy over the screens, to keep them up to date.
copy_tutorial_file("tutorial/game/screens.rpy", "templates/english/game/screens.rpy")
# Compile all the python files.
compileall.compile_dir("renpy/", ddir="renpy/", force=True, quiet=1)
compileall.compile_dir("renpy/", ddir="renpy/", force=1, quiet=1)
# Generate launcher/game/script_version.rpy
with open("launcher/game/script_version.rpy", "w") as f:
f.write("init -999 python:\n")
f.write(" config.script_version = {!r}\n".format(renpy.version_tuple[:3])) # @UndefinedVariable
# Compile the various games.
if not args.fast:
for i in [ 'tutorial', 'launcher', 'the_question' ]:
print("Compiling", i)
subprocess.check_call([renpy_sh, i, "compile" ])
for i in [ 'tutorial', 'launcher', 'templates/english', 'templates/japanese', 'the_question' ]:
print "Compiling", i
subprocess.check_call(["./renpy.sh", i, "quit" ])
# Kick off the rapt build.
if not args.fast:
print("Cleaning RAPT.")
sys.path.insert(0, os.path.join(ROOT, "rapt", "buildlib"))
import rapt.interface # type: ignore
import rapt.build # type: ignore
interface = rapt.interface.Interface()
rapt.build.distclean(interface)
print("Compiling RAPT and renios.")
compileall.compile_dir("rapt/buildlib/", ddir="rapt/buildlib/", quiet=1)
compileall.compile_dir("renios/buildlib/", ddir="renios/buildlib/", quiet=1)
if not os.path.exists(destination):
os.makedirs(destination)
zip_rapt_symbols(destination)
if args.fast:
cmd = [
renpy_sh,
"./renpy.sh",
"launcher",
"distribute",
"launcher",
@@ -220,7 +125,7 @@ def main():
else:
cmd = [
renpy_sh,
"./renpy.sh",
"launcher",
"distribute",
"launcher",
@@ -228,15 +133,27 @@ def main():
destination,
]
if args.notarized:
cmd.extend([
"--macapp",
"notarized/out",
])
print()
print
subprocess.check_call(cmd)
# Kick off the rapt build.
if not args.fast:
out = open("/tmp/rapt_build.txt", "wb")
print("Building RAPT in the background.")
android = os.path.abspath("android")
rapt_build = subprocess.Popen([
os.path.join(android, "build_renpy.sh"),
zip_version
],
cwd = android,
stdout=out,
stderr=out)
else:
rapt_build = None
# Sign the update.
if not args.fast:
subprocess.check_call([
@@ -245,21 +162,9 @@ def main():
os.path.join(destination, "updates.json"),
])
# Package pygame_sdl2.
if not args.fast:
subprocess.check_call([
"pygame_sdl2/setup.py",
"-q",
"egg_info",
"--tag-build",
"+renpy" + args.version,
"sdist",
"-d",
os.path.abspath(destination)
])
# Write 7z.exe.
sdk = "renpy-{}-sdk".format(args.version)
sdk = "renpy-{}-sdk".format(zip_version)
if not args.fast:
@@ -280,8 +185,8 @@ def main():
sys.stdout.write("Creating -sdk.7z")
p = subprocess.Popen([ "7z", "a", sdk + ".7z", sdk], stdout=subprocess.PIPE)
for i, _l in enumerate(p.stdout): # type: ignore
p = subprocess.Popen([ "7z", "a", sdk +".7z", sdk], stdout=subprocess.PIPE)
for i, _l in enumerate(p.stdout):
if i % 10 != 0:
continue
@@ -307,10 +212,14 @@ def main():
if os.path.exists(sdk + ".7z.exe"):
os.unlink(sdk + ".7z.exe")
print()
print("Distribute took {:.0f} seconds.".format(time.time() - start))
print
if rapt_build:
code = rapt_build.wait()
if code:
print "RAPT build failed. The output is in /tmp/rapt_build.txt"
else:
print "RAPT build succeeded."
if __name__ == "__main__":
main()
-481
View File
@@ -1,481 +0,0 @@
################################################################################
## Initialization
################################################################################
## The init offset statement causes the initialization statements in this file
## to run before init statements in any other file.
init offset = -2
## Calling gui.init resets the styles to sensible default values, and sets the
## width and height of the game.
init python:
gui.init(1280, 720)
## Enable checks for invalid or unstable properties in screens or transforms
define config.check_conflicting_properties = True
################################################################################
## GUI Configuration Variables
################################################################################
## Colors ######################################################################
##
## The colors of text in the interface.
## An accent color used throughout the interface to label and highlight
## text.
define gui.accent_color = "#00b8c3"
## The color used for a text button when it is neither selected nor hovered.
define gui.idle_color = "#888888"
## The small color is used for small text, which needs to be
## brighter/darker to achieve the same effect.
define gui.idle_small_color = "#aaaaaa"
## The color that is used for buttons and bars that are hovered.
define gui.hover_color = Color(gui.accent_color).tint(.6)
## The color used for a text button when it is selected but not focused.
## A button is selected if it is the current screen or preference value.
define gui.selected_color = "#ffffff"
## The color used for a text button when it cannot be selected.
define gui.insensitive_color = "#55555580"
## Colors used for the portions of bars that are not filled in. These are
## not used directly, but are used when re-generating bar image files.
define gui.muted_color = "#004e49"
define gui.hover_muted_color = "#006e75"
## The colors used for dialogue and menu choice text.
define gui.text_color = "#ffffff"
define gui.interface_text_color = "#ffffff"
## Fonts and Font Sizes ########################################################
## The font used for in-game text.
define gui.text_font = "DejaVuSans.ttf"
## The font used for character names.
define gui.name_text_font = "DejaVuSans.ttf"
## The font used for out-of-game text.
define gui.interface_text_font = "DejaVuSans.ttf"
## The size of normal dialogue text.
define gui.text_size = gui.scale(22)
## The size of character names.
define gui.name_text_size = gui.scale(30)
## The size of text in the game's user interface.
define gui.interface_text_size = gui.scale(22)
## The size of labels in the game's user interface.
define gui.label_text_size = gui.scale(24)
## The size of text on the notify screen.
define gui.notify_text_size = gui.scale(16)
## The size of the game's title.
define gui.title_text_size = gui.scale(50)
## Main and Game Menus #########################################################
## The images used for the main and game menus.
define gui.main_menu_background = "gui/main_menu.png"
define gui.game_menu_background = "gui/game_menu.png"
## Dialogue ####################################################################
##
## These variables control how dialogue is displayed on the screen one line
## at a time.
## The height of the textbox containing dialogue.
define gui.textbox_height = gui.scale(185)
## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is
## center, and 1.0 is the bottom.
define gui.textbox_yalign = 1.0
## The placement of the speaking character's name, relative to the textbox.
## These can be a whole number of pixels from the left or top, or 0.5 to center.
define gui.name_xpos = gui.scale(240)
define gui.name_ypos = gui.scale(0)
## The horizontal alignment of the character's name. This can be 0.0 for
## left-aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.name_xalign = 0.0
## The width, height, and borders of the box containing the character's
## name, or None to automatically size it.
define gui.namebox_width = None
define gui.namebox_height = None
## The borders of the box containing the character's name, in left, top,
## right, bottom order.
define gui.namebox_borders = Borders(5, 5, 5, 5)
## If True, the background of the namebox will be tiled, if False, the background
## of the namebox will be scaled.
define gui.namebox_tile = False
## The placement of dialogue relative to the textbox. These can be a whole
## number of pixels relative to the left or top side of the textbox, or 0.5
## to center.
define gui.dialogue_xpos = gui.scale(268)
define gui.dialogue_ypos = gui.scale(50)
## The maximum width of dialogue text, in pixels.
define gui.dialogue_width = gui.scale(744)
## The horizontal alignment of the dialogue text. This can be 0.0 for
## left-aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.dialogue_text_xalign = 0.0
## Buttons #####################################################################
##
## These variables, along with the image files in gui/button, control aspects
## of how buttons are displayed.
## The width and height of a button, in pixels. If None, Ren'Py computes a size.
define gui.button_width = None
define gui.button_height = None
## The borders on each side of the button, in left, top, right, bottom order.
define gui.button_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
## If True, the background image will be tiled. If False, the background image
## will be linearly scaled.
define gui.button_tile = False
## The font used by the button.
define gui.button_text_font = gui.interface_text_font
## The size of the text used by the button.
define gui.button_text_size = gui.interface_text_size
## The color of button text in various states.
define gui.button_text_idle_color = gui.idle_color
define gui.button_text_hover_color = gui.hover_color
define gui.button_text_selected_color = gui.selected_color
define gui.button_text_insensitive_color = gui.insensitive_color
## The horizontal alignment of the button text. (0.0 is left, 0.5 is center,
## 1.0 is right).
define gui.button_text_xalign = 0.0
## These variables override settings for different kinds of buttons. Please
## see the gui documentation for the kinds of buttons available, and what
## each is used for.
##
## These customizations are used by the default interface:
define gui.radio_button_borders = Borders(gui.scale(18), gui.scale(4), gui.scale(4), gui.scale(4))
define gui.check_button_borders = Borders(gui.scale(18), gui.scale(4), gui.scale(4), gui.scale(4))
define gui.confirm_button_text_xalign = 0.5
define gui.page_button_borders = Borders(gui.scale(10), gui.scale(4), gui.scale(10), gui.scale(4))
define gui.quick_button_borders = Borders(gui.scale(10), gui.scale(4), gui.scale(10), gui.scale(0))
define gui.quick_button_text_size = gui.scale(14)
define gui.quick_button_text_idle_color = gui.idle_small_color
define gui.quick_button_text_selected_color = gui.accent_color
## You can also add your own customizations, by adding properly-named variables.
## For example, you can uncomment the following line to set the width of a
## navigation button.
# define gui.navigation_button_width = 250
## Choice Buttons ##############################################################
##
## Choice buttons are used in the in-game menus.
define gui.choice_button_width = gui.scale(790)
define gui.choice_button_height = None
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(gui.scale(100), gui.scale(5), gui.scale(100), gui.scale(5))
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.5
define gui.choice_button_text_idle_color = "#cccccc"
define gui.choice_button_text_hover_color = "#ffffff"
define gui.choice_button_text_insensitive_color = "#444444"
## File Slot Buttons ###########################################################
##
## A file slot button is a special kind of button. It contains a thumbnail
## image, and text describing the contents of the save slot. A save slot
## uses image files in gui/button, like the other kinds of buttons.
## The save slot button.
define gui.slot_button_width = gui.scale(276)
define gui.slot_button_height = gui.scale(206)
define gui.slot_button_borders = Borders(gui.scale(10), gui.scale(10), gui.scale(10), gui.scale(10))
define gui.slot_button_text_size = gui.scale(14)
define gui.slot_button_text_xalign = 0.5
define gui.slot_button_text_idle_color = gui.idle_small_color
define gui.slot_button_text_selected_idle_color = gui.selected_color
define gui.slot_button_text_selected_hover_color = gui.hover_color
## The width and height of thumbnails used by the save slots.
define config.thumbnail_width = gui.scale(256)
define config.thumbnail_height = gui.scale(144)
## The number of columns and rows in the grid of save slots.
define gui.file_slot_cols = 3
define gui.file_slot_rows = 2
## Positioning and Spacing #####################################################
##
## These variables control the positioning and spacing of various user interface
## elements.
## The position of the left side of the navigation buttons, relative
## to the left side of the screen.
define gui.navigation_xpos = gui.scale(40)
## The vertical position of the skip indicator.
define gui.skip_ypos = gui.scale(10)
## The vertical position of the notify screen.
define gui.notify_ypos = gui.scale(45)
## The spacing between menu choices.
define gui.choice_spacing = gui.scale(22)
## Buttons in the navigation section of the main and game menus.
define gui.navigation_spacing = gui.scale(4)
## Controls the amount of spacing between preferences.
define gui.pref_spacing = gui.scale(10)
## Controls the amount of spacing between preference buttons.
define gui.pref_button_spacing = gui.scale(0)
## The spacing between file page buttons.
define gui.page_spacing = gui.scale(0)
## The spacing between file slots.
define gui.slot_spacing = gui.scale(10)
## The position of the main menu text.
define gui.main_menu_text_xalign = 1.0
## Frames ######################################################################
##
## These variables control the look of frames that can contain user interface
## components when an overlay or window is not present.
## Generic frames.
define gui.frame_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
## The frame that is used as part of the confirm screen.
define gui.confirm_frame_borders = Borders(gui.scale(40), gui.scale(40), gui.scale(40), gui.scale(40))
## The frame that is used as part of the skip screen.
define gui.skip_frame_borders = Borders(gui.scale(16), gui.scale(5), gui.scale(50), gui.scale(5))
## The frame that is used as part of the notify screen.
define gui.notify_frame_borders = Borders(gui.scale(16), gui.scale(5), gui.scale(40), gui.scale(5))
## Should frame backgrounds be tiled?
define gui.frame_tile = False
## Bars, Scrollbars, and Sliders ###############################################
##
## These control the look and size of bars, scrollbars, and sliders.
##
## The default GUI only uses sliders and vertical scrollbars.
## All of the other bars are only used in creator-written screens.
## The height of horizontal bars, scrollbars, and sliders. The width of
## vertical bars, scrollbars, and sliders.
define gui.bar_size = gui.scale(25)
define gui.scrollbar_size = gui.scale(12)
define gui.slider_size = gui.scale(25)
## True if bar images should be tiled. False if they should be linearly scaled.
define gui.bar_tile = False
define gui.scrollbar_tile = False
define gui.slider_tile = False
## Horizontal borders.
define gui.bar_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
define gui.scrollbar_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
define gui.slider_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
## Vertical borders.
define gui.vbar_borders = Borders(gui.scale(4), gui.scale(4), gui.scale(4), gui.scale(4))
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
## None shows them.
define gui.unscrollable = "hide"
## History #####################################################################
##
## The history screen displays dialogue that the player has already dismissed.
## The number of blocks of dialogue history Ren'Py will keep.
define config.history_length = 250
## The height of a history screen entry, or None to make the height variable
## at the cost of performance.
define gui.history_height = gui.scale(140)
## Additional space to add between history screen entries.
define gui.history_spacing = 0
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = gui.scale(155)
define gui.history_name_ypos = 0
define gui.history_name_width = gui.scale(155)
define gui.history_name_xalign = 1.0
## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = gui.scale(170)
define gui.history_text_ypos = gui.scale(2)
define gui.history_text_width = gui.scale(740)
define gui.history_text_xalign = 0.0
## NVL-Mode ###################################################################
##
## The NVL-mode screen displays the dialogue spoken by NVL-mode characters.
## The borders of the background of the NVL-mode background window.
define gui.nvl_borders = Borders(0, gui.scale(10), 0, gui.scale(20))
## The maximum number of NVL-mode entries Ren'Py will display. When more
## entries than this are to be show, the oldest entry will be removed.
define gui.nvl_list_length = 6
## The height of an NVL-mode entry. Set this to None to have the entries
## dynamically adjust height.
define gui.nvl_height = gui.scale(115)
## The spacing between NVL-mode entries when gui.nvl_height is None, and
## between NVL-mode entries and an NVL-mode menu.
define gui.nvl_spacing = gui.scale(10)
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.nvl_name_xpos = gui.scale(430)
define gui.nvl_name_ypos = 0
define gui.nvl_name_width = gui.scale(150)
define gui.nvl_name_xalign = 1.0
## The position, width, and alignment of the dialogue text.
define gui.nvl_text_xpos = gui.scale(450)
define gui.nvl_text_ypos = gui.scale(8)
define gui.nvl_text_width = gui.scale(590)
define gui.nvl_text_xalign = 0.0
## The position, width, and alignment of nvl_thought text (the text said by
## the nvl_narrator character.)
define gui.nvl_thought_xpos = gui.scale(240)
define gui.nvl_thought_ypos = gui.scale(0)
define gui.nvl_thought_width = gui.scale(780)
define gui.nvl_thought_xalign = 0.0
## The position of nvl menu_buttons.
define gui.nvl_button_xpos = gui.scale(450)
define gui.nvl_button_xalign = 0.0
## Localization ################################################################
## This controls where a line break is permitted. The default is suitable for
## most languages. A list of available values can be found at
## https://www.renpy.org/doc/html/style_properties.html#style-property-language
define gui.language = "unicode"
################################################################################
## Mobile devices
################################################################################
init python:
## This increases the size of the quick buttons to make them easier to
## touch on tablets and phones.
@gui.variant
def touch():
gui.quick_button_borders = Borders(gui.scale(40), gui.scale(14), gui.scale(40), gui.scale(0))
## This changes the size and spacing of various GUI elements to ensure
## they are easily visible on phones.
@gui.variant
def small():
## Font sizes.
gui.text_size = gui.scale(30)
gui.name_text_size = gui.scale(36)
gui.notify_text_size = gui.scale(25)
gui.interface_text_size = gui.scale(30)
gui.button_text_size = gui.scale(30)
gui.label_text_size = gui.scale(34)
## Adjust the location of the textbox.
gui.textbox_height = gui.scale(240)
gui.name_xpos = gui.scale(80)
gui.dialogue_xpos = gui.scale(90)
gui.dialogue_width = gui.scale(1100)
## Change the size and spacing of various things.
gui.slider_size = gui.scale(36)
gui.choice_button_width = gui.scale(1240)
gui.choice_button_text_size = gui.scale(30)
gui.navigation_spacing = gui.scale(20)
gui.pref_button_spacing = gui.scale(10)
gui.history_height = gui.scale(190)
gui.history_text_width = gui.scale(690)
gui.quick_button_text_size = gui.scale(20)
## File button layout.
gui.file_slot_cols = 2
gui.file_slot_rows = 2
## NVL-mode.
gui.nvl_height = gui.scale(170)
gui.nvl_name_width = gui.scale(305)
gui.nvl_name_xpos = gui.scale(325)
gui.nvl_text_width = gui.scale(915)
gui.nvl_text_xpos = gui.scale(345)
gui.nvl_text_ypos = gui.scale(5)
gui.nvl_thought_width = gui.scale(1240)
gui.nvl_thought_xpos = gui.scale(20)
gui.nvl_button_width = gui.scale(1240)
gui.nvl_button_xpos = gui.scale(20)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

-30
View File
@@ -1,30 +0,0 @@
init -100 python in gui:
def scale(n):
return int(n)
init 100 python in gui:
if not renpy.mobile:
from store import config
import sys
import os
sys.path.insert(0, os.path.join(config.renpy_base, "launcher", "game"))
from gui7.parameters import GuiParameters
from gui7.images import ImageGenerator
from gui7 import generate_gui
p = GuiParameters(
config.gamedir, config.gamedir,
config.screen_width, config.screen_height,
accent_color, "#000000", False, None,
True, False, False, "gui")
p.skip_backup = True
generate_gui(p)
_skip_backup = True
_gui_images()
-213
View File
@@ -1,213 +0,0 @@
## This file contains options that can be changed to customize your
## game.
##
## Lines beginning with two '#' marks are comments, and you shouldn't
## uncomment them. Lines beginning with a single '#' mark are
## commented-out code, and you may want to uncomment them when
## appropriate.
## Basics ######################################################################
## A human-readable name of the game. This is used to set the default
## window title, and shows up in the interface and error reports.
##
## The _() surrounding the string marks it as eligible for translation.
define config.name = _("Ren'Py 7 Default GUI")
## Determines if the title given above is shown on the main menu
## screen. Set this to False to hide the title.
define gui.show_name = True
## The version of the game.
define config.version = "1.0"
## Text that is placed on the game's about screen. Place the text between
## the triple-quotes, and leave a blank line between paragraphs.
define gui.about = _p("""
""")
## A short name for the game used for executables and directories in the
## built distribution. This must be ASCII-only, and must not contain
## spaces, colons, or semicolons.
define build.name = "gui"
## Sounds and music ############################################################
## These three variables control, among other things, which mixers are
## shown to the player by default. Setting one of these to False will
## hide the appropriate mixer.
define config.has_sound = True
define config.has_music = True
define config.has_voice = True
## To allow the user to play a test sound on the sound or voice channel,
## uncomment a line below and use it to set a sample sound to play.
# define config.sample_sound = "sample-sound.ogg"
# define config.sample_voice = "sample-voice.ogg"
## Uncomment the following line to set an audio file that will be played
## while the player is at the main menu. This file will continue playing
## into the game, until it is stopped or another file is played.
# define config.main_menu_music = "main-menu-theme.ogg"
## Transitions #################################################################
##
## These variables set transitions that are used when certain events occur.
## Each variable should be set to a transition, or None to indicate that
## no transition should be used.
## Entering or exiting the game menu.
define config.enter_transition = dissolve
define config.exit_transition = dissolve
## Between screens of the game menu.
define config.intra_transition = dissolve
## A transition that is used after a game has been loaded.
define config.after_load_transition = None
## Used when entering the main menu after the game has ended.
define config.end_game_transition = None
## A variable to set the transition used when the game starts
## does not exist. Instead, use a with statement after showing
## the initial scene.
## Window management ###########################################################
##
## This controls when the dialogue window is displayed. If "show", it is always
## displayed. If "hide", it is only displayed when dialogue is present. If
## "auto", the window is hidden before scene statements and shown again
## once dialogue is displayed.
##
## After the game has started, this can be changed with the "window show",
## "window hide", and "window auto" statements.
define config.window = "auto"
## Transitions used to show and hide the dialogue window
define config.window_show_transition = Dissolve(.2)
define config.window_hide_transition = Dissolve(.2)
## Preference defaults #########################################################
## Controls the default text speed. The default, 0, is infinite, while any
## other number is the number of characters per second to type out.
default preferences.text_cps = 0
## The default auto-forward delay. Larger numbers lead to longer waits,
## with 0 to 30 being the valid range.
default preferences.afm_time = 15
## Save directory ##############################################################
##
## Controls the platform-specific place Ren'Py will place the save
## files for this game. The save files will be placed in:
##
## Windows: %APPDATA\RenPy\<config.save_directory>
##
## Macintosh: $HOME/Library/RenPy/<config.save_directory>
##
## Linux: $HOME/.renpy/<config.save_directory>
##
## This generally should not be changed, and if it is, should always be a
## literal string, not an expression.
define config.save_directory = "gui-7"
## Icon ########################################################################
##
## The icon displayed on the taskbar or dock.
define config.window_icon = "gui/window_icon.png"
## Build configuration #########################################################
##
## This section controls how Ren'Py turns your project into distribution
## files.
init python:
## The following functions take file patterns. File patterns are case-
## insensitive, and matched against the path relative to the base
## directory, with and without a leading /. If multiple patterns match,
## the first is used.
##
## In a pattern:
##
## / is the directory separator.
##
## * matches all characters, except the directory separator.
##
## ** matches all characters, including the directory separator.
##
## For example, "*.txt" matches txt files in the base directory, "game/**.ogg"
## matches ogg files in the game directory or any of its subdirectories, and
## "**.psd" matches psd files anywhere in the project.
## Classify files as None to exclude them from the built distributions.
build.classify('**~', None)
build.classify('**.bak', None)
build.classify('**/.**', None)
build.classify('**/#**', None)
build.classify('**/thumbs.db', None)
## To archive files, classify them as 'archive'.
# build.classify('game/**.png', 'archive')
# build.classify('game/**.jpg', 'archive')
## Files matching documentation patterns are duplicated in a mac app
## build, so they appear in both the app and the zip file.
build.documentation('*.html')
build.documentation('*.txt')
## A Google Play license key is required to perform in-app purchases.
## It can be found in the Google Play developer console,
## under "Monetize" > "Monetization Setup" > "Licensing".
# define build.google_play_key = "..."
## The username and project name associated with an itch.io project,
## separated by a slash.
# define build.itch_project = "renpytom/test-project"
-1611
View File
File diff suppressed because it is too large Load Diff
-33
View File
@@ -1,33 +0,0 @@
# The script of the game goes in this file.
# Declare characters used by this game. The color argument colorizes the
# name of the character.
define e = Character("Eileen")
# The game starts here.
label start:
# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.
scene bg room
# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.
show eileen happy
# These display lines of dialogue.
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return
-160
View File
@@ -1,160 +0,0 @@
testcase default:
"Start"
pause .6
# Test rollback
"Hello, World."
"Back"
# Test history.
click
click
"History"
pause .6
# Test Help.
"Help"
"Keyboard"
# Test About
"About"
# Test Preferences
"Preferences"
"Left"
"Right"
"Disable"
"Unseen Text"
"Unseen Text"
"After Choices"
"After Choices"
"Transitions"
"Transitions"
"Mute All"
"Mute All"
"Save"
"Load"
"Return"
pause .6
run Jump("test")
"In testcase code."
# menu_1
click until "Choice A"
# input
type "Test User\n"
"Name: Test User"
# Nvl
click
click
click
click
click
click until "NVL 6"
# NVL Menu.
"Choice B"
$ renpy.unlink_save("1-1")
"Save"
pause .6
"Save slot 1"
pause .6
"Save slot 1"
"Yes"
"Main Menu"
"Yes"
"Load"
"Load slot 1"
pause .5
"Save"
pause .5
"Load"
"Load slot 1"
"No"
"Return"
# Done.
pause .5
"Done."
"Quit"
define nvle = Character("Eileen", kind=nvl)
label test:
"In testcase code."
menu menu_1:
"This is a menu."
"Choice A":
pass
"Choice B":
pass
label after_menu_1:
$ name = renpy.input("What is your name?")
"Name: [name]"
nvle "NVL 1"
nvle "NVL 2"
nvle "NVL 3"
nvl clear
nvle "NVL 4"
nvle "NVL 5"
nvle "NVL 6"
$ menu = nvl_menu
menu menu_2:
"This is a menu."
"Choice A":
pass
"Choice B":
pass
label after_menu_2:
"Done."
return
-1
View File
@@ -1 +0,0 @@
{ "type" : "hidden" }
+128
View File
@@ -0,0 +1,128 @@
<html>
<head>
<title>README</title>
<style>
BODY {
background: #fff;
color: #444;
padding-left: 20%;
padding-top: 1em;
padding-bottom: 1em;
padding-right: 20%;
font-family: sans-serif;
line-height: 1.6em;
}
DT {
font-weight: bold;
margin-top: .33em;
}
H2 {
color: #000;
margin-left: -2.5em;
}
H3 {
color: #000;
margin-left: -1.5em;
}
.editsection {
display: none;
}
</style>
</head>
<body>
<div id="renpy_help"></div>
<p><a name="Basic_Help" id="Basic_Help"></a></p>
<h2><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=1" title="Edit section: Basic Help">edit</a>]</span> <span class="mw-headline">Basic Help</span></h2>
<p>To advance through the game, <tt>left-click</tt> or press the <tt>space</tt> or <tt>enter</tt> keys. When at a menu, <tt>left-click</tt> to make a choice, or use the arrow keys to select a choice and <tt>enter</tt> to activate it.</p>
<p><a name="Game_Menu" id="Game_Menu"></a></p>
<h3><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=2" title="Edit section: Game Menu">edit</a>]</span> <span class="mw-headline">Game Menu</span></h3>
<p>When playing a game, <tt>right-click</tt> or press the <tt>escape</tt> key to enter the game menu. The game menu gives the following choices:</p>
<dl>
<dt>Return</dt>
<dd>Returns to the game.</dd>
<dt>Save Game</dt>
<dd>Allows you to save a game by clicking on a save slot.</dd>
<dt>Load Game</dt>
<dd>Allows you to load a game by clicking on a save slot. Clicking on "Auto" accesses the automatic save slots.</dd>
<dt>Preferences</dt>
<dd>Changes the game preferences (options/configuration):
<dl>
<dt>Display</dt>
<dd>Switches between fullscreen and windowed mode.</dd>
<dt>Transitions</dt>
<dd>Controls the display of transitions between game screens.</dd>
<dt>Text Speed</dt>
<dd>Controls the rate at which text displays. The further to the right this slider is, the faster the text will display. All the way to the right causes text to be shown instantly.</dd>
<dt>Joystick</dt>
<dd>Lets you control the game using a joystick.</dd>
<dt>Skip</dt>
<dd>Chooses between skipping messages that have been already seen (in any play through the game), and skipping all messages.</dd>
<dt>Begin Skipping</dt>
<dd>Returns to the game, while skipping.</dd>
<dt>After Choices</dt>
<dd>Controls if skipping stops upon reaching a menu.</dd>
<dt>Auto-Forward Time</dt>
<dd>Controls automatic advance. The further to the left this slider is, the shorter the amount of time before the game advances. All the way to the right means text will never auto-forward.</dd>
<dt>Music, Sound, and Voice Volume</dt>
<dd>Controls the volume of the Music, Sound effect, and Voice channels, respectively. The further to the right these are, the louder the volume.</dd>
</dl>
</dd>
</dl>
<dl>
<dt>Main Menu</dt>
<dd>Returns to the main menu, ending the current game.</dd>
<dt>Help</dt>
<dd>Shows this help screen.</dd>
<dt>Quit</dt>
<dd>Exits the game; the game will be closed and ended.</dd>
</dl>
<p><a name="Key_and_Mouse_Bindings" id="Key_and_Mouse_Bindings"></a></p>
<h3><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=3" title="Edit section: Key and Mouse Bindings">edit</a>]</span> <span class="mw-headline">Key and Mouse Bindings</span></h3>
<dl>
<dt>Left-click, Enter</dt>
<dd>Advances through the game, activates menu choices, buttons, and sliders.</dd>
<dt>Space</dt>
<dd>Advances through the game, but does not activate choices.</dd>
<dt>Arrow Keys</dt>
<dd>Selects menu choices, buttons, and sliders.</dd>
<dt>Ctrl</dt>
<dd>Causes skipping to occur while the ctrl key is held down.</dd>
<dt>Tab</dt>
<dd>Toggles skipping, causing it to occur until tab is pressed again.</dd>
<dt>Mousewheel-Up, PageUp</dt>
<dd>Causes rollback to occur. Rollback reverses the game back in time, showing prior text and even allowing menu choices to be changed.</dd>
<dt>Mousewheel-Down, PageDown</dt>
<dd>Causes rollforward to occur, cancelling out a previous rollback.</dd>
<dt>Right-click, Escape</dt>
<dd>Enters the game menu. When in the game menu, returns to the game.</dd>
<dt>Middle-click, H</dt>
<dd>Hides the text window and other transient displays.</dd>
<dt>F</dt>
<dd>Toggles fullscreen mode</dd>
<dt>S</dt>
<dd>Takes a screenshot, saving it in a file named screenshotxxxx.png, where xxxx is a serial number.</dd>
<dt>Alt-M, Command-H</dt>
<dd>Hides (iconifies) the window.</dd>
<dt>Alt-F4, Command-Q</dt>
<dd>Quits the game.</dd>
<dt>Delete</dt>
<dd>When a save slot is selected, deletes that save slot.</dd>
</dl>
<p><a name="Legal_Notice" id="Legal_Notice"></a></p>
<h2><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=4" title="Edit section: Legal Notice">edit</a>]</span> <span class="mw-headline">Legal Notice</span></h2>
<p>This game uses source code from a number of open source projects. For a list, and a location where the source code can be downloaded from, please view the LICENSE.txt file in the renpy directory, or visit <a href="http://www.renpy.org/wiki/renpy/License" class="external free" title="http://www.renpy.org/wiki/renpy/License" rel="nofollow">http://www.renpy.org/wiki/renpy/License</a> .</p>
</body>
</html>
-86
View File
@@ -1,86 +0,0 @@
#!/usr/bin/env python
# The path to a copy of Atom that's been installed globally, if one exists.
# This is overidden by RENPY_ATOM, if set. If either is given, that is used
# and no special handing of the .atom directory is performed.
ATOM = None
import sys
import os
import subprocess
import platform
import shutil
import renpy
class Editor(renpy.editor.Editor):
has_projects = True
def get_atom(self):
"""
Returns the path to the atom executable, if None. Also takes care
of setting up the .atom directory if it's not available.
"""
atom = os.environ.get("RENPY_ATOM", ATOM)
if atom is not None:
return atom
DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIR = os.path.join(renpy.exports.fsdecode(DIR), "atom")
if renpy.windows:
atom = os.path.join(DIR, "atom-windows", "atom.exe")
elif renpy.macintosh:
atom = os.path.join(DIR, "Atom.app", "Contents", "Resources", "app", "atom.sh")
else:
atom = os.path.join(DIR, "atom-linux-" + platform.machine(), "atom")
default_dot_atom = os.path.join(DIR, "default-dot-atom")
dot_atom = os.path.join(DIR, ".atom")
if not os.path.exists(dot_atom) and os.path.exists(default_dot_atom):
shutil.copytree(default_dot_atom, dot_atom)
return atom
def begin(self, new_window=False, **kwargs):
self.args = [ ]
def open(self, filename, line=None, **kwargs):
if line:
filename = "{}:{}".format(filename, line)
self.args.append(filename)
def open_project(self, project):
self.args.append(project)
def end(self, **kwargs):
atom = self.get_atom()
self.args.reverse()
args = [ atom ] + self.args
args = [ renpy.exports.fsencode(i) for i in args ]
subprocess.Popen(args)
def main():
e = Editor()
e.begin()
for i in sys.argv[1:]:
e.open(i)
e.end()
if __name__ == "__main__":
main()
@@ -1,89 +0,0 @@
import os
import subprocess
import sys
import renpy
class Editor(renpy.editor.Editor):
has_projects = True
def get_code(self):
"""
Returns the path to the code executable.
"""
system = __file__.endswith(" (System).edit.py")
if system:
if "RENPY_VSCODE" in os.environ:
return os.environ["RENPY_VSCODE"]
if renpy.windows:
return "code.cmd"
if renpy.macintosh and os.path.exists("/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"):
return "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"
return "code"
else:
RENPY_VSCODE = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "vscode"))
if renpy.windows:
code = os.path.join(RENPY_VSCODE, "VSCode-win32-x64", "bin", "code.cmd")
elif renpy.macintosh:
code = os.path.join(RENPY_VSCODE, "Visual Studio Code.app", "Contents", "Resources", "app", "bin", "code")
elif renpy.linux:
if renpy.arch == "aarch64":
arch = "arm64"
elif renpy.arch == "armv7l":
arch = "arm"
else:
arch = "x64"
code = os.path.join(RENPY_VSCODE, "VSCode-linux-" + arch, "bin", "code")
else:
code = "code"
return code
def open(self, filename, line=None, **kwargs):
if line:
filename = "{}:{}".format(filename, line)
self.args.append(filename)
def open_project(self, project):
self.args.append(project)
def begin(self, new_window=False, **kwargs):
self.args = [ ]
def end(self, **kwargs):
self.args.reverse()
code = self.get_code()
args = [ code, "-g" ] + self.args
args = [ renpy.exports.fsencode(i) for i in args ]
if renpy.windows:
CREATE_NO_WINDOW = 0x08000000
subprocess.Popen(args, creationflags=CREATE_NO_WINDOW)
else:
subprocess.Popen(args)
def main():
e = Editor()
e.begin()
for i in sys.argv[1:]:
e.open(i)
e.end()
if __name__ == "__main__":
main()
-89
View File
@@ -1,89 +0,0 @@
import os
import subprocess
import sys
import renpy
class Editor(renpy.editor.Editor):
has_projects = True
def get_code(self):
"""
Returns the path to the code executable.
"""
system = __file__.endswith(" (System).edit.py")
if system:
if "RENPY_VSCODE" in os.environ:
return os.environ["RENPY_VSCODE"]
if renpy.windows:
return "code.cmd"
if renpy.macintosh and os.path.exists("/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"):
return "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"
return "code"
else:
RENPY_VSCODE = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "vscode"))
if renpy.windows:
code = os.path.join(RENPY_VSCODE, "VSCode-win32-x64", "bin", "code.cmd")
elif renpy.macintosh:
code = os.path.join(RENPY_VSCODE, "Visual Studio Code.app", "Contents", "Resources", "app", "bin", "code")
elif renpy.linux:
if renpy.arch == "aarch64":
arch = "arm64"
elif renpy.arch == "armv7l":
arch = "arm"
else:
arch = "x64"
code = os.path.join(RENPY_VSCODE, "VSCode-linux-" + arch, "bin", "code")
else:
code = "code"
return code
def open(self, filename, line=None, **kwargs):
if line:
filename = "{}:{}".format(filename, line)
self.args.append(filename)
def open_project(self, project):
self.args.append(project)
def begin(self, new_window=False, **kwargs):
self.args = [ ]
def end(self, **kwargs):
self.args.reverse()
code = self.get_code()
args = [ code, "-g" ] + self.args
args = [ renpy.exports.fsencode(i) for i in args ]
if renpy.windows:
CREATE_NO_WINDOW = 0x08000000
subprocess.Popen(args, creationflags=CREATE_NO_WINDOW)
else:
subprocess.Popen(args)
def main():
e = Editor()
e.begin()
for i in sys.argv[1:]:
e.open(i)
e.end()
if __name__ == "__main__":
main()
+144
View File
@@ -0,0 +1,144 @@
import binascii
def a2b(a):
return binascii.a2b_hex(''.join(a.split()))
resources = {
260 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 c8 00 c0 80
02 00 00 00 00 00 b8 00 29 00 00 00 00 00 00 00
08 00 90 01 00 01 4d 00 53 00 20 00 53 00 68 00
65 00 6c 00 6c 00 20 00 44 00 6c 00 67 00 00 00
00 00 00 00 00 00 00 00 01 00 01 50 7f 00 14 00
32 00 0e 00 01 00 00 00 ff ff 80 00 4f 00 4b 00
00 00 00 00 00 00 00 00 00 00 00 00 04 08 00 50
07 00 07 00 aa 00 0c 00 ea 03 00 00 ff ff 81 00
00 00 00 00
'''),
261 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 c8 00 c0 80
04 00 00 00 00 00 b8 00 3a 00 00 00 00 00 00 00
08 00 90 01 00 01 4d 00 53 00 20 00 53 00 68 00
65 00 6c 00 6c 00 20 00 44 00 6c 00 67 00 00 00
00 00 00 00 00 00 00 00 80 00 81 50 07 00 14 00
aa 00 0c 00 ec 03 00 00 ff ff 81 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 01 50 7f 00 25 00
32 00 0e 00 01 00 00 00 ff ff 80 00 4f 00 4b 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 50
4a 00 25 00 32 00 0e 00 02 00 00 00 ff ff 80 00
43 00 61 00 6e 00 63 00 65 00 6c 00 00 00 00 00
00 00 00 00 00 00 00 00 04 08 00 50 07 00 07 00
aa 00 0c 00 eb 03 00 00 ff ff 81 00 00 00 00 00
'''),
262 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 c8 00 c0 80
04 00 00 00 00 00 b8 00 29 00 00 00 00 00 00 00
08 00 90 01 00 01 4d 00 53 00 20 00 53 00 68 00
65 00 6c 00 6c 00 20 00 44 00 6c 00 67 00 00 00
00 00 00 00 00 00 00 00 00 00 01 50 7f 00 14 00
32 00 0e 00 06 00 00 00 ff ff 80 00 59 00 65 00
73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
04 08 00 50 07 00 07 00 aa 00 0c 00 ed 03 00 00
ff ff 81 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 01 50 07 00 14 00 32 00 0e 00 07 00 00 00
ff ff 80 00 4e 00 6f 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 01 50 4b 00 14 00 32 00 0e 00
02 00 00 00 ff ff 80 00 43 00 61 00 6e 00 63 00
65 00 6c 00 00 00 00 00
'''),
263 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 80 00 ca 80
03 00 00 00 00 00 e2 00 29 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 81 50 07 00 14 00
97 00 0e 00 eb 03 00 00 6d 00 73 00 63 00 74 00
6c 00 73 00 5f 00 70 00 72 00 6f 00 67 00 72 00
65 00 73 00 73 00 33 00 32 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 04 08 00 50 07 00 07 00
d4 00 0c 00 ea 03 00 00 ff ff 81 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 50 a9 00 14 00
32 00 0e 00 02 00 00 00 ff ff 80 00 43 00 61 00
6e 00 63 00 65 00 6c 00 00 00 00 00
'''),
264 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 c8 00 c0 80
04 00 00 00 00 00 b8 00 3a 00 00 00 00 00 00 00
08 00 90 01 00 01 4d 00 53 00 20 00 53 00 68 00
65 00 6c 00 6c 00 20 00 44 00 6c 00 67 00 00 00
00 00 00 00 00 00 00 00 a0 00 81 50 07 00 14 00
aa 00 0c 00 ec 03 00 00 ff ff 81 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 01 50 7f 00 25 00
32 00 0e 00 01 00 00 00 ff ff 80 00 4f 00 4b 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 50
4a 00 25 00 32 00 0e 00 02 00 00 00 ff ff 80 00
43 00 61 00 6e 00 63 00 65 00 6c 00 00 00 00 00
00 00 00 00 00 00 00 00 04 08 00 50 07 00 07 00
aa 00 0c 00 eb 03 00 00 ff ff 81 00 00 00 00 00
'''),
265 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 c8 00 c8 80
12 00 00 00 00 00 d9 00 fc 00 00 00 00 00 00 00
08 00 90 01 00 01 4d 00 53 00 20 00 53 00 68 00
65 00 6c 00 6c 00 20 00 44 00 6c 00 67 00 00 00
00 00 00 00 00 00 00 00 01 00 01 50 6c 00 ea 00
30 00 0e 00 01 00 00 00 ff ff 80 00 4f 00 4b 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 50
a2 00 ea 00 30 00 0e 00 02 00 00 00 ff ff 80 00
43 00 61 00 6e 00 63 00 65 00 6c 00 00 00 00 00
00 00 00 00 00 00 00 00 07 00 00 50 06 00 06 00
cc 00 4e 00 ff ff ff ff ff ff 80 00 00 00 00 00
00 00 00 00 00 00 00 00 03 00 21 50 48 00 12 00
84 00 64 00 03 00 00 00 ff ff 85 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 02 50 0c 00 24 00
c0 00 08 00 04 00 00 00 ff ff 82 00 00 00 00 00
00 00 00 00 00 00 00 00 80 00 81 50 0c 00 30 00
c0 00 0e 00 05 00 00 00 ff ff 81 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 01 50 9c 00 42 00
30 00 0e 00 06 00 00 00 ff ff 80 00 41 00 64 00
64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
07 00 00 50 06 00 54 00 cb 00 3c 00 ff ff ff ff
ff ff 80 00 00 00 00 00 00 00 00 00 00 00 00 00
03 00 21 50 48 00 61 00 84 00 64 00 07 00 00 00
ff ff 85 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 02 50 0c 00 72 00 c0 00 08 00 08 00 00 00
ff ff 82 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 01 50 9c 00 7e 00 30 00 0e 00 09 00 00 00
ff ff 80 00 41 00 64 00 64 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 01 50 06 00 96 00
42 00 0e 00 0a 00 00 00 ff ff 80 00 41 00 64 00
64 00 20 00 66 00 69 00 6c 00 65 00 2e 00 2e 00
2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 01 50 4e 00 96 00 42 00 0e 00 0b 00 00 00
ff ff 80 00 41 00 64 00 64 00 20 00 6e 00 65 00
77 00 20 00 66 00 69 00 6c 00 65 00 2e 00 2e 00
2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 01 50 06 00 a8 00 42 00 0e 00 0c 00 00 00
ff ff 80 00 41 00 64 00 64 00 20 00 66 00 6f 00
6c 00 64 00 65 00 72 00 2e 00 2e 00 2e 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 07 00 00 50
06 00 c6 00 cc 00 1e 00 ff ff ff ff ff ff 80 00
43 00 6f 00 6d 00 6d 00 61 00 6e 00 64 00 20 00
6c 00 69 00 6e 00 65 00 3a 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 80 00 81 50 0c 00 d2 00
c0 00 0e 00 0e 00 00 00 ff ff 81 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 02 50 0c 00 14 00
3c 00 08 00 1e 00 00 00 ff ff 82 00 4f 00 70 00
74 00 69 00 6f 00 6e 00 3a 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 02 50 0c 00 63 00
3c 00 08 00 46 00 00 00 ff ff 82 00 43 00 6f 00
6d 00 6d 00 61 00 6e 00 64 00 3a 00 00 00 00 00
'''),
270 : a2b('''
01 00 ff ff 00 00 00 00 00 00 00 00 48 04 00 44
02 00 00 00 00 00 23 01 1a 00 00 00 00 00 00 00
08 00 00 00 00 00 4d 00 53 00 20 00 53 00 68 00
65 00 6c 00 6c 00 20 00 44 00 6c 00 67 00 00 00
00 00 00 00 00 00 00 00 01 00 02 50 00 00 07 00
23 01 08 00 ff ff ff ff ff ff 82 00 53 00 74 00
61 00 74 00 69 00 63 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 02 40 00 00 12 00 23 01 08 00
5f 04 00 00 ff ff 82 00 73 00 74 00 63 00 33 00
32 00 00 00 00 00
'''),
}
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
+2 -20
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
# Checks for various abilities that might be taken away from us by
# redistributors.
+4 -22
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
screen about:
@@ -32,7 +14,7 @@ screen about:
has vbox xfill True
add "images/logo.png" xalign 0.5 yoffset -5
add "logo.png" xalign 0.5 yoffset -5
null height 15
@@ -42,7 +24,7 @@ screen about:
textbutton _("View license") action interface.OpenLicense() xalign 0.5
textbutton _("Return") action Jump("front_page") style "l_left_button"
textbutton _("Back") action Jump("front_page") style "l_left_button"
label about:
call screen about
+16 -46
View File
@@ -1,60 +1,29 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
label add_file:
python hide:
import os
filename = ""
while True:
filename = interface.input(
_("FILENAME"),
_("Enter the name of the script file to create."),
allow=interface.FILENAME_LETTERS,
cancel=Jump("navigation"),
default=filename,
)
filename = filename.strip()
if not filename:
interface.error(_("The file name may not be empty."), label=None)
continue
import codecs
if "." in filename and not filename.endswith(".rpy"):
interface.error(_("The filename must have the .rpy extension."), label=None)
continue
elif "." not in filename:
filename += ".rpy"
filename = interface.input(_("FILENAME"), _("Enter the name of the script file to create."), filename="withslash", cancel=Jump("navigation"))
path = os.path.join(project.current.gamedir, filename)
dir = os.path.dirname(path)
if "." in filename and not filename.endswith(".rpy"):
interface.error(_("The filename must have the .rpy extension."), label="navigation")
elif "." not in filename:
filename += ".rpy"
if os.path.exists(path):
interface.error(_("The file already exists."), label=None)
continue
path = os.path.join(project.current.gamedir, filename)
dir = os.path.dirname(path)
break
if os.path.exists(path):
interface.error(_("The file already exists."), label="navigation")
contents = u"\uFEFF"
contents += _("# Ren'Py automatically loads all script files ending with .rpy. To use this\n# file, define a label and jump to it from another file.\n")
contents += "\n"
try:
os.makedirs(dir)
except Exception:
except:
pass
contents = u"\uFEFF"
@@ -64,3 +33,4 @@ label add_file:
f.write(contents.encode("utf-8"))
jump navigation_refresh
+213 -428
View File
@@ -1,72 +1,37 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
default persistent.android_bundle = False
# Copyright 2004-2013 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python:
ANDROID_NO_RAPT = 0
ANDROID_NO_JDK = 1
ANDROID_NO_SDK = 2
ANDROID_NO_KEY = 3
ANDROID_NO_BUNDLE_KEY = 4
ANDROID_NO_CONFIG = 5
ANDROID_NO_BUNDLE = 6
ANDROID_OK = 7
ANDROID_NO_CONFIG = 4
ANDROID_OK = 5
JDK_REQUIREMENT = 42
NO_RAPT_TEXT = _("To build Android packages, please download RAPT, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher.")
NO_JDK_TEXT = _("A 32-bit Java Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}download and install the JDK{/a}, then restart the Ren'Py launcher.")
NO_RAPT_TEXT = _("To build Android packages, please download RAPT (from {a=http://www.renpy.org/dl/android}here{/a}), unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher.")
NO_SDK_TEXT = _("RAPT has been installed, but you'll need to install the Android SDK before you can build Android packages. Choose Install SDK to do this.")
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please generate new keys, or copy android.keystore and bundle.keystore to the base directory.")
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please create a new key, or restore android.keystore.")
NO_CONFIG_TEXT = _("The current project has not been configured. Use \"Configure\" to configure it before building.")
NO_BUNDLE_TEXT = _("Please select if you want a Play Bundle (for Google Play), or a Universal APK (for sideloading and other app stores).")
OK_TEXT = _("Choose \"Build\" to build the current project, or attach an Android device and choose \"Build & Install\" to build and install it on the device.")
PHONE_TEXT = _("Attempts to emulate an Android phone.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
TABLET_TEXT = _("Attempts to emulate an Android tablet.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
OUYA_TEXT = _("Attempts to emulate a televison-based Android console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
OUYA_TEXT = _("Attempts to emulate an OUYA console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages.")
GENERATE_KEYS_TEXT = _("Generates the keys required to sign the package.")
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages. Optionally, generates the keys required to sign the package.")
CONFIGURE_TEXT = _("Configures the package name, version, and other information about this project.")
PLAY_KEYS_TEXT = _("Opens the file containing the Google Play keys in the editor.\n\nThis is only needed if the application is using an expansion APK. Read the documentation for more details.")
BUILD_TEXT = _("Builds the Android package.")
BUILD_AND_INSTALL_TEXT = _("Builds the Android package, and installs it on an Android device connected to your computer.")
BUILD_INSTALL_AND_LAUNCH_TEXT = _("Builds the Android package, installs it on an Android device connected to your computer, then launches the app on your device.")
LOGCAT_TEXT = _("Retrieves the log from the Android device and writes it to a file.")
LIST_DEVICES_TEXT = _("Lists the connected devices.")
PAIR_TEXT = _("Pairs with a device over Wi-Fi, on Android 11+.")
CONNECT_TEXT = _("Connects to a device over Wi-Fi, on Android 11+.")
DISCONNECT_TEXT = _("Disconnects a device connected over Wi-Fi.")
CLEAN_TEXT = _("Removes Android temporary files.")
PLAY_BUNDLE_TEXT = _("Builds an Android App Bundle (ABB), intended to be uploaded to Google Play. This can include up to 2GB of data.")
UNIVERSAL_APK_TEXT = _("Builds a Universal APK package, intended for sideloading and stores other than Google Play. This can include up to 2GB of data.")
import subprocess
import re
import os
import json
import glob
def find_rapt():
@@ -74,13 +39,28 @@ init python:
candidates = [ ]
RAPT_PATH = os.path.join(config.renpy_base, "rapt")
for fn in os.listdir(config.renpy_base):
if not fn.startswith("rapt-"):
continue
if not os.path.isdir(os.path.join(config.renpy_base, fn)):
continue
try:
version = fn[5:]
version = tuple(int(i) for i in version.split('.'))
except ValueError:
continue
candidates.append((version, fn))
if not candidates:
RAPT_PATH = None
else:
RAPT_PATH = os.path.join(config.renpy_base, candidates[-1][1])
if os.path.isdir(RAPT_PATH) and check_hash_txt("rapt"):
import sys
sys.path.insert(0, os.path.join(RAPT_PATH, "buildlib"))
else:
RAPT_PATH = None
find_rapt()
@@ -92,18 +72,9 @@ init python:
import rapt.configure
import rapt.install_sdk
import rapt.plat
import rapt.interface
import rapt.keys
rapt.plat.renpy = True
rapt.plat.translate = __
JDK_REQUIREMENT = rapt.plat.jdk_requirement
else:
rapt = None
def AndroidState():
"""
Determines the state of the android install, and returns it.
@@ -111,18 +82,14 @@ init python:
if RAPT_PATH is None:
return ANDROID_NO_RAPT
if not os.path.exists(rapt.plat.adb):
if renpy.windows and not "JAVA_HOME" in os.environ:
return ANDROID_NO_JDK
if not os.path.exists(os.path.join(RAPT_PATH, "android-sdk/extras/google/play_licensing")):
return ANDROID_NO_SDK
if not rapt.keys.keys_exist(project.current.path):
if not os.path.exists(os.path.join(RAPT_PATH, "android.keystore")):
return ANDROID_NO_KEY
if not any([
os.path.exists(os.path.join(project.current.path, "android.json")),
os.path.exists(os.path.join(project.current.path, ".android.json"))
]):
if not os.path.exists(os.path.join(project.current.path, ".android.json")):
return ANDROID_NO_CONFIG
if persistent.android_bundle is None:
return ANDROID_NO_BUNDLE
return ANDROID_OK
@@ -133,14 +100,14 @@ init python:
if state == ANDROID_NO_RAPT:
return NO_RAPT_TEXT
if state == ANDROID_NO_JDK:
return NO_JDK_TEXT
if state == ANDROID_NO_SDK:
return NO_SDK_TEXT
if state == ANDROID_NO_KEY:
return NO_KEY_TEXT
if state == ANDROID_NO_CONFIG:
return NO_CONFIG_TEXT
if state == ANDROID_NO_BUNDLE:
return NO_BUNDLE_TEXT
if state == ANDROID_OK:
return OK_TEXT
@@ -155,6 +122,132 @@ init python:
else:
return None
class AndroidInterface(object):
def __init__(self):
self.process = None
self.filename = project.current.temp_filename("android.txt")
self.info_msg = ""
with open(self.filename, "w"):
pass
def info(self, prompt):
self.info_msg = prompt
interface.processing(prompt, pause=False)
def yesno(self, prompt, submessage=None):
return interface.yesno(prompt, submessage=submessage)
def yesno_choice(self, prompt, default=None):
choices = [ (True, "Yes"), (False, "No") ]
return interface.choice(prompt, choices, default)
def terms(self, url, prompt):
submessage = _("{a=%s}%s{/a}") % (url, url)
return interface.yesno(prompt, submessage=submessage)
def input(self, prompt, empty=None):
if empty is None:
empty = ''
while True:
rv = interface.input(_("QUESTION"), prompt, default=empty, cancel=Jump("android"))
rv = rv.strip()
if rv:
return rv
def choice(self, prompt, choices, default):
return interface.choice(prompt, choices, default, cancel=Jump("android"))
def fail(self, prompt):
prompt = re.sub(r'(http://\S+)', r'{a=\1}\1{/a}', prompt)
# Open android.txt in the editor.
editor.EditAbsolute(self.filename)()
interface.error(prompt, label="android")
def success(self, prompt):
interface.info(prompt, pause=False)
def final_success(self, prompt):
interface.info(prompt, label="android")
def call(self, cmd, cancel=False, use_path=False):
if not use_path:
cmd = [ rapt.plat.path(cmd[0]) ] + list(cmd[1:])
self.cmd = cmd
f = open(self.filename, "a")
f.write("\n\n\n")
if cancel:
cancel_action = self.cancel
else:
cancel_action = None
startupinfo = None
if renpy.windows:
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
try:
interface.processing(self.info_msg, show_screen=True, cancel=cancel_action)
self.process = subprocess.Popen(cmd, cwd=RAPT_PATH, stdout=f, stderr=f, startupinfo=startupinfo)
renpy.call_screen("android_process", interface=self)
finally:
f.close()
interface.hide_screen()
self.process = None
def check_process(self):
rv = self.process.poll()
if rv is not None:
if rv:
raise subprocess.CalledProcessError(rv, self.cmd)
else:
return True
def download(self, url, dest):
try:
d = Downloader(url, dest)
cancel_action = [ d.cancel, Jump("android") ]
interface.processing(self.info_msg, show_screen=True, cancel=cancel_action, bar_value=DownloaderValue(d))
ui.timer(.1, action=d.check, repeat=True)
ui.interact()
finally:
interface.hide_screen()
def background(self, f):
try:
t = threading.Thread(target=f)
t.start()
interface.processing(self.info_msg, show_screen=True)
while t.is_alive():
renpy.pause(0)
t.join(0.25)
finally:
interface.hide_screen()
def cancel(self):
if self.process:
self.process.terminate()
renpy.jump("android")
class AndroidBuild(Action):
"""
@@ -167,61 +260,68 @@ init python:
def __call__(self):
renpy.jump(self.label)
def update_android_json(p, gui):
class LaunchEmulator(Action):
def __init__(self, emulator, variants):
self.emulator = emulator
self.variants = variants
def __call__(self):
env = {
"RENPY_EMULATOR" : self.emulator,
"RENPY_VARIANT" : self.variants,
}
p = project.current
p.launch(env=env)
def update_android_json():
"""
Updates .android.json to include the google play information.
`p`
The project to update json for.
"""
p.update_dump(True, gui=gui)
project.current.update_dump(True)
build = p.dump["build"]
build = project.current.dump["build"]
c = rapt.configure.Configuration(p.path)
filename = os.path.join(project.current.path, ".android.json")
with open(filename, "r") as f:
android_json = json.load(f)
if "google_play_key" in build:
c.google_play_key = build["google_play_key"]
android_json["google_play_key"] = build["google_play_key"]
else:
c.google_play_key = None
android_json.pop("google_play_key", None)
if "google_play_salt" in build:
if len(build["google_play_salt"]) != 20:
raise Exception("build.google_play_salt must be exactly 20 bytes long.")
c.google_play_salt = ", ".join(str(i) for i in build["google_play_salt"])
android_json["google_play_salt"] = ", ".join(str(i) for i in build["google_play_salt"])
else:
c.google_play_salt = None
c.save(p.path)
android_json.pop("google_play_salt", None)
def android_build(p=None, gui=True, bundle=False, install=False, launch=False, destination=None, opendir=False):
with open(filename, "w") as f:
json.dump(android_json, f)
def android_build(command):
"""
This actually builds the package.
"""
if p is None:
p = project.current
update_android_json()
update_android_json(p, gui)
dist = p.temp_filename("android.dist")
dist = project.current.temp_filename("android.dist")
if os.path.exists(dist):
shutil.rmtree(dist)
if gui:
reporter = distribute.GuiReporter()
rapt_interface = MobileInterface("android")
else:
reporter = distribute.TextReporter()
rapt_interface = rapt.interface.Interface()
distribute.Distributor(p,
reporter=reporter,
distribute.Distributor(project.current,
reporter=distribute.GuiReporter(),
packages=[ 'android' ],
build_update=False,
noarchive=True,
@@ -229,62 +329,8 @@ init python:
report_success=False,
)
def finished(files, destination=destination):
source_dir = rapt.plat.path("bin")
try:
destination_dir = destination
# Use default destination if not configured
if gui and destination is None:
build = p.dump['build']
destination = build["destination"]
if destination != "-dists":
parent = os.path.dirname(p.path)
destination_dir = os.path.join(parent, destination)
except Exception:
destination_dir = None
dir_to_open = source_dir
if destination_dir is not None:
reporter.info(_("Copying Android files to distributions directory."))
try:
os.makedirs(destination_dir)
except Exception:
pass
try:
for i in files:
shutil.copy(i, renpy.fsencode(destination_dir))
dir_to_open = destination_dir
except Exception:
import traceback
traceback.print_exc()
pass
if opendir:
dir_to_open = os.path.join(p.path, dir_to_open)
renpy.run(store.OpenDirectory(dir_to_open, absolute=True))
with interface.nolinks():
rapt.build.build(rapt_interface, dist, p.path, bundle=bundle, install=install, launch=launch, finished=finished, permissions=p.dump['build']['android_permissions'])
def android_build_argument(cmd):
return cmd + project.current.data["android_build"]
rapt.build.build(AndroidInterface(), dist, command)
# The android support can stick unicode into os.environ. Fix that.
init 100 python:
@@ -301,7 +347,7 @@ screen android_process(interface):
text "[ft.text!q]":
size 14
color TEXT
font gui.LIGHT_FONT
font "Roboto-Light.ttf"
xpos 75
ypos 350
@@ -322,7 +368,7 @@ screen android:
has vbox
label _("Android: [project.current.display_name!q]")
label _("Android: [project.current.name!q]")
add HALF_SPACER
@@ -348,19 +394,18 @@ screen android:
frame style "l_indent":
has hbox:
spacing 15
has vbox
textbutton _("Phone"):
action LaunchEmulator("touch", "small phone touch android mobile")
action LaunchEmulator("touch", "small phone touch android")
hovered tt.Action(PHONE_TEXT)
textbutton _("Tablet"):
action LaunchEmulator("touch", "medium tablet touch android mobile")
action LaunchEmulator("touch", "medium tablet touch android")
hovered tt.Action(TABLET_TEXT)
textbutton _("Television"):
action LaunchEmulator("tv", "small tv android mobile")
textbutton _("Television / OUYA"):
action LaunchEmulator("tv", "small tv ouya android")
hovered tt.Action(OUYA_TEXT)
@@ -378,32 +423,15 @@ screen android:
frame style "l_indent":
has vbox
textbutton _("Install SDK"):
textbutton _("Install SDK & Create Keys"):
action AndroidIfState(state, ANDROID_NO_SDK, Jump("android_installsdk"))
hovered tt.Action(INSTALL_SDK_TEXT)
textbutton _("Generate Keys"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_keys"))
hovered tt.Action(GENERATE_KEYS_TEXT)
textbutton _("Configure"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_configure"))
action AndroidIfState(state, ANDROID_NO_CONFIG, Jump("android_configure"))
hovered tt.Action(CONFIGURE_TEXT)
add SPACER
textbutton _("Play Bundle"):
action SetField(persistent, "android_bundle", True)
hovered tt.Action(PLAY_BUNDLE_TEXT)
style "l_checkbox"
textbutton _("Universal APK"):
action SetField(persistent, "android_bundle", False)
hovered tt.Action(UNIVERSAL_APK_TEXT)
style "l_checkbox"
add SPACER
textbutton _("Build Package"):
action AndroidIfState(state, ANDROID_OK, AndroidBuild("android_build"))
hovered tt.Action(BUILD_TEXT)
@@ -412,13 +440,6 @@ screen android:
action AndroidIfState(state, ANDROID_OK, AndroidBuild("android_build_and_install"))
hovered tt.Action(BUILD_AND_INSTALL_TEXT)
textbutton _("Build, Install & Launch"):
action AndroidIfState(state, ANDROID_OK, AndroidBuild("android_build_install_and_launch"))
hovered tt.Action(BUILD_INSTALL_AND_LAUNCH_TEXT)
add SPACER
textbutton _("Force Recompile") action DataToggle("force_recompile") style "l_checkbox"
# Right side.
@@ -431,45 +452,6 @@ screen android:
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Other:")
add HALF_SPACER
frame style "l_indent":
has vbox
textbutton _("Logcat"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("logcat"))
hovered tt.Action(LOGCAT_TEXT)
textbutton _("List Devices"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_list_devices"))
hovered tt.Action(LIST_DEVICES_TEXT)
textbutton _("Wi-Fi Debugging Pair"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_pair"))
hovered tt.Action(PAIR_TEXT)
textbutton _("Wi-Fi Debugging Connect"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_connect"))
hovered tt.Action(CONNECT_TEXT)
textbutton _("Wi-Fi Debugging Disconnect"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_disconnect"))
hovered tt.Action(DISCONNECT_TEXT)
textbutton _("Clean"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_clean"))
hovered tt.Action(CLEAN_TEXT)
add SPACER
add SEPARATOR2
frame:
style "l_indent"
has vbox
@@ -482,15 +464,10 @@ screen android:
text AndroidStateText(state)
textbutton _("Return") action Jump("front_page") style "l_left_button"
textbutton _("Back") action Jump("front_page") style "l_left_button"
label android:
if RAPT_PATH is None:
$ interface.yesno(_("Before packaging Android apps, you'll need to download RAPT, the Ren'Py Android Packaging Tool. Would you like to download RAPT now?"), no=Jump("front_page"))
$ add_dlc("rapt", restart=True)
call screen android
@@ -498,15 +475,7 @@ label android_installsdk:
python:
with interface.nolinks():
rapt.install_sdk.install_sdk(MobileInterface("android"))
jump android
label android_keys:
python:
rapt.keys.generate_keys(MobileInterface("android"), project.current.path)
rapt.install_sdk.install_sdk(AndroidInterface())
jump android
@@ -514,204 +483,20 @@ label android_keys:
label android_configure:
python:
project.current.update_dump(force=True)
rapt.configure.configure(
MobileInterface("android", edit=False),
project.current.path,
default_name=project.current.dump.get("name", None),
default_version=project.current.dump.get("version", None))
rapt.configure.configure(AndroidInterface(), project.current.path)
jump android
label android_build:
$ android_build(bundle=persistent.android_bundle, opendir=True)
$ android_build([ 'release' ])
jump android
label android_build_and_install:
$ android_build(bundle=persistent.android_bundle, install=True, opendir=True)
$ android_build([ 'release', 'install' ])
jump android
label android_build_install_and_launch:
$ android_build(bundle=persistent.android_bundle, install=True, launch=True, opendir=True)
jump android
label logcat:
python hide:
interface = MobileInterface("android", filename="logcat.txt")
interface.info(_("Retrieving logcat information from device."))
interface.call([ rapt.plat.adb, "logcat", "-d" ], cancel=True)
interface.open_editor()
jump android
label android_list_devices:
python hide:
cc = ConsoleCommand()
cc.add(rapt.plat.adb, "devices")
cc.run()
jump android
label android_pair:
python hide:
pairing_code = interface.input(
_("Wi-Fi Pairing Code"),
_("If supported, this can be found in 'Developer options', 'Wireless debugging', 'Pair device with pairing code'."),
sanitize=False,
cancel=Jump("android"),
)
host = interface.input(
_("Pairing Host & Port"),
_("If supported, this can be found in 'Developer options', 'Wireless debugging', 'Pair device with pairing code'."),
sanitize=False,
cancel=Jump("android"),
)
cc = ConsoleCommand()
cc.add(rapt.plat.adb, "pair", host, pairing_code)
cc.run()
jump android
label android_connect:
python hide:
host = interface.input(
_("IP Address & Port"),
_("If supported, this can be found in 'Developer options', 'Wireless debugging'."),
sanitize=False,
cancel=Jump("android"),
)
cc = ConsoleCommand()
cc.add(rapt.plat.adb, "connect", host)
cc.run()
jump android
label android_disconnect:
python hide:
host = interface.input(
_("IP Address & Port"),
_("This can be found in 'List Devices'."),
sanitize=False,
cancel=Jump("android"),
)
cc = ConsoleCommand()
cc.add(rapt.plat.adb, "disconnect", host)
cc.run()
jump android
label android_clean:
python hide:
import shutil
import time
interface = MobileInterface("android")
interface.info(_("Cleaning up Android project."))
# Get the android json file, for the update_always key.
try:
filename = os.path.join(project.current.path, ".android.json")
with open(filename, "rb") as f:
android_json = json.load(f)
except Exception:
android_json = {}
# Clean up the files.
def clean(path):
if os.path.exists(path):
shutil.rmtree(path)
if android_json.get("update_always", True):
try:
with open(rapt.plat.path("project/local.properties"), "r") as f:
local_properties = f.read()
except Exception:
local_properties = None
try:
with open(rapt.plat.path("project/bundle.properties"), "r") as f:
bundle_properties = f.read()
except Exception:
bundle_properties = None
try:
with open(rapt.plat.path("project/gradle.properties"), "r") as f:
gradle_properties = f.read()
except Exception:
gradle_properties = None
clean(rapt.plat.path("project"))
if local_properties or bundle_properties or gradle_properties:
os.mkdir(rapt.plat.path("project"))
if local_properties:
with open(rapt.plat.path("project/local.properties"), "w") as f:
f.write(local_properties)
if bundle_properties:
with open(rapt.plat.path("project/bundle.properties"), "w") as f:
f.write(bundle_properties)
if gradle_properties:
with open(rapt.plat.path("project/gradle.properties"), "w") as f:
f.write(gradle_properties)
clean(rapt.plat.path("bin"))
clean(project.current.temp_filename("android.dist"))
# This can go really fast, so pause so it looks like something is happening.
time.sleep(.5)
jump android
init python:
def android_build_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("android_project", help="The path to the project directory.")
ap.add_argument("--bundle", action="store_true", help="Builds an android app bundle.")
ap.add_argument("--install", action="store_true", help="Installs the app on a device.")
ap.add_argument("--launch", action="store_true", help="Launches the app after build and install complete. Implies --install.")
ap.add_argument("--destination", "--dest", default=None, action="store", help="The directory where the packaged files should be placed.")
args = ap.parse_args()
if args.launch:
args.install = True
p = project.Project(args.android_project)
android_build(p=p, gui=False, bundle=args.bundle, install=args.install, launch=args.launch, destination=args.destination)
return False
renpy.arguments.register_command("android_build", android_build_command)
-74
View File
@@ -1,74 +0,0 @@
# This file contains strings used by RAPT, so the Ren'Py translation framework
# can find them. It's automatically generated by rapt/update_translations.py, and
# hence should not be changed by hand.
init python hide:
__("{} is not a directory.")
__("{} does not contain a Ren'Py game.")
__("{} does not contain a Ren'Py game.")
__("Run configure before attempting to build the app.")
__("Updating project.")
__("Creating assets directory.")
__("Packaging internal data.")
__("I'm using Gradle to build the package.")
__("The build seems to have failed.")
__("I'm installing the bundle.")
__("Installing the bundle appears to have failed.")
__("Launching app.")
__("Launching the app appears to have failed.")
__("The build seems to have succeeded.")
__("What is the full name of your application? This name will appear in the list of installed applications.")
__("What is the short name of your application? This name will be used in the launcher, and for application shortcuts.")
__("What is the name of the package?\n\nThis is usually of the form com.domain.program or com.domain.email.program. It may only contain ASCII letters and dots. It must contain at least one dot.")
__("The package name may not be empty.")
__("The package name may not contain spaces.")
__("The package name must contain at least one dot.")
__("The package name may not contain two dots in a row, or begin or end with a dot.")
__("Each part of the package name must start with a letter, and contain only letters, numbers, and underscores.")
__("{} is a Java keyword, and can't be used as part of a package name.")
__("What is the application's version?\n\nThis should be the human-readable version that you would present to a person. It must contain only numbers and dots.")
__("The version number must contain only numbers and dots.")
__("How much RAM (in GB) do you want to allocate to Gradle?\nThis must be a positive integer number.")
__("The RAM size must contain only numbers and be positive.")
__("How would you like your application to be displayed?")
__("In landscape orientation.")
__("In portrait orientation.")
__("In the user's preferred orientation.")
__("Which app store would you like to support in-app purchasing through?")
__("Google Play.")
__("Amazon App Store.")
__("Both, in one app.")
__("Neither.")
__("Do you want to automatically update the Java source code?")
__("Yes. This is the best choice for most projects.")
__("No. This may require manual updates when Ren'Py or the project configuration changes.")
__("Unknown configuration variable: {}")
__("I'm compiling a short test program, to see if you have a working JDK on your system.")
__("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.")
__("The version of Java on your computer does not appear to be JDK 8, which is the only version supported by the Android SDK. If you need to install JDK 8, you can download it from:\n\n{a=https://adoptium.net/?variant=openjdk8}https://adoptium.net/?variant=openjdk8{/a}\n\nYou can also set the JAVA_HOME environment variable to use a different version of Java.")
__("The JDK is present and working. Good!")
__("The Android SDK has already been unpacked.")
__("Do you accept the Android SDK Terms and Conditions?")
__("I'm downloading the Android SDK. This might take a while.")
__("I'm extracting the Android SDK.")
__("I've finished unpacking the Android SDK.")
__("I'm about to download and install the required Android packages. This might take a while.")
__("I was unable to accept the Android licenses.")
__("I was unable to accept the Android licenses.")
__("I was unable to install the required Android packages.")
__("I've finished installing the required Android packages.")
__("It looks like you're ready to start packaging games.")
__("Please enter your name or the name of your organization.")
__("I found an android.keystore file in the rapt directory. Do you want to use this file?")
__("I can create an application signing key for you. This key is required to create Universal APK for sideloading and stores other than Google Play.\n\nDo you want to create a key?")
__("I will create the key in the android.keystore file.\n\nYou need to back this file up. If you lose it, you will not be able to upgrade your application.\n\nYou also need to keep the key safe. If evil people get this file, they could make fake versions of your application, and potentially steal your users' data.\n\nWill you make a backup of android.keystore, and keep it in a safe place?")
__("\n\nSaying 'No' will prevent key creation.")
__("Could not create android.keystore. Is keytool in your path?")
__("I've finished creating android.keystore. Please back it up, and keep it in a safe place.")
__("I found a bundle.keystore file in the rapt directory. Do you want to use this file?")
__("I can create a bundle signing key for you. This key is required to build an Android App Bundle (AAB) for upload to Google Play.\n\nDo you want to create a key?")
__("I will create the key in the bundle.keystore file.\n\nYou need to back this file up. If you lose it, you will not be able to upgrade your application.\n\nYou also need to keep the key safe. If evil people get this file, they could make fake versions of your application, and potentially steal your users' data.\n\nWill you make a backup of bundle.keystore, and keep it in a safe place?")
__("\n\nSaying 'No' will prevent key creation.")
__("Could not create bundle.keystore. Is keytool in your path?")
__("I've opened the directory containing android.keystore and bundle.keystore. Please back them up, and keep them in a safe place.")
+8 -27
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
# Ren'Py archiver. This builds a Ren'Py archive file, and the
# associated index file. These files are really easy to
@@ -28,9 +10,8 @@ init python in archiver:
import sys
import random
import glob
import zlib
from pickle import dumps, HIGHEST_PROTOCOL
from cPickle import dumps, HIGHEST_PROTOCOL
class Archive(object):
@@ -49,7 +30,7 @@ init python in archiver:
# A fixed key minimizes difference between archive versions.
self.key = 0x42424242
padding = b"RPA-3.0 XXXXXXXXXXXXXXXX XXXXXXXX\n"
padding = "RPA-3.0 XXXXXXXXXXXXXXXX XXXXXXXX\n"
self.f.write(padding)
def add(self, name, path):
@@ -64,23 +45,23 @@ init python in archiver:
dlen = len(data)
# Pad.
padding = b"Made with Ren'Py."
padding = "Made with Ren'Py."
self.f.write(padding)
offset = self.f.tell()
self.f.write(data)
self.index[name].append((offset ^ self.key, dlen ^ self.key, b""))
self.index[name].append((offset ^ self.key, dlen ^ self.key, ""))
def close(self):
indexoff = self.f.tell()
self.f.write(zlib.compress(dumps(self.index, HIGHEST_PROTOCOL)))
self.f.write(dumps(self.index, HIGHEST_PROTOCOL).encode("zlib"))
self.f.seek(0)
self.f.write(b"RPA-3.0 %016x %08x\n" % (indexoff, self.key))
self.f.write("RPA-3.0 %016x %08x\n" % (indexoff, self.key))
self.f.close()
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+66 -166
View File
@@ -1,60 +1,35 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# http://www.csn.ul.ie/~caolan/publink/winresdump/winresdump/doc/pefile.html
# Contains a reasonable description of the format.
from __future__ import print_function
from renpy.compat import bchr, chr, str, PY2
import struct
import sys
import array
import pefile
import pefile # @UnresolvedImport
# This class performs various operations on memory-loaded binary files,
# including modifications.
class BinFile(object):
def set_u32(self, addr, value):
self.a[addr + 0] = (value >> 0) & 0xff
self.a[addr + 1] = (value >> 8) & 0xff
self.a[addr + 2] = (value >> 16) & 0xff
self.a[addr + 3] = (value >> 24) & 0xff
self.a[addr+0] = (value >> 0) & 0xff
self.a[addr+1] = (value >> 8) & 0xff
self.a[addr+2] = (value >> 16) & 0xff
self.a[addr+3] = (value >> 24) & 0xff
def u32(self):
addr = self.addr
rv = self.a[addr]
rv |= self.a[addr + 1] << 8
rv |= self.a[addr + 2] << 16
rv |= self.a[addr + 3] << 24
rv |= self.a[addr+1] << 8
rv |= self.a[addr+2] << 16
rv |= self.a[addr+3] << 24
self.addr += 4
return rv
def u16(self):
addr = self.addr
rv = self.a[addr]
rv |= self.a[addr + 1] << 8
rv |= self.a[addr+1] << 8
self.addr += 2
return rv
@@ -68,7 +43,7 @@ class BinFile(object):
rv = u""
for _i in range(c):
rv += chr(self.u16())
rv += unichr(self.u16())
return rv
@@ -76,36 +51,23 @@ class BinFile(object):
self.addr = addr
def tostring(self):
if PY2:
return self.a.tostring() # type: ignore
else:
return self.a.tobytes()
return self.a.tostring()
def substring(self, start, len): # @ReservedAssignment
if PY2:
return self.a[start:start + len].tostring() # type: ignore
else:
return self.a[start:start + len].tobytes()
def substring(self, start, len): #@ReservedAssignment
return self.a[start:start+len].tostring()
def __init__(self, data):
self.a = array.array('B')
if PY2:
self.a.fromstring(data) # type: ignore
else:
self.a.frombytes(data)
self.a.fromstring(data)
##############################################################################
# These functions parse data out of the file. In these functions, offset is
# relative to the start of the file.
# The virtual address of the resource segment.
resource_virtual = 0
# This parses a data block out of the resources.
def parse_data(bf, offset):
bf.seek(offset)
data_offset = bf.u32()
@@ -117,20 +79,18 @@ def parse_data(bf, offset):
bf.seek(data_offset - resource_virtual)
for _i in range(data_len):
l.append(bchr(bf.u8()))
l.append(chr(bf.u8()))
return (code_page, b"".join(l))
return (code_page, "".join(l))
# This parses a resource directory.
def parse_directory(bf, offset):
bf.seek(offset)
char = bf.u32() # @UnusedVariable
timedate = bf.u32() # @UnusedVariable
major = bf.u16() # @UnusedVariable
minor = bf.u16() # @UnusedVariable
char = bf.u32() #@UnusedVariable
timedate = bf.u32() #@UnusedVariable
major = bf.u16() #@UnusedVariable
minor = bf.u16() #@UnusedVariable
n_named = bf.u16()
n_id = bf.u16()
@@ -162,33 +122,32 @@ def parse_directory(bf, offset):
def show_resources(d, prefix):
if not isinstance(d, dict):
print(prefix, "Codepage", d[0], "length", len(d[1]))
print prefix, "Codepage", d[0], "length", len(d[1])
return
for k in d:
print(prefix, k)
print prefix, k
show_resources(d[k], prefix + " ")
##############################################################################
# These functions repack the resources into a new resource segment. Here,
# the offset is relative to the start of the resource segment.
class Packer(object):
def pack(self, d):
self.data = b""
self.data = ""
self.data_offset = 0
self.entries = b""
self.entries = ""
self.entries_offset = 0
head = self.pack_dict(d, 0)
self.data = b""
self.data = ""
self.data_offset = len(head) + len(self.entries)
self.entries = b""
self.entries = ""
self.entries_offset = len(head)
return self.pack_dict(d, 0) + self.entries + self.data
@@ -198,7 +157,7 @@ class Packer(object):
l = len(s)
s = s.encode("utf-16le")
self.data += struct.pack("<H", l) + s + b"\0\0"
self.data += struct.pack("<H", l) + s + "\0\0"
return rv
@@ -208,7 +167,7 @@ class Packer(object):
rv = len(self.entries) + self.entries_offset
if len(self.data) % 2:
self.data += b"P"
self.data += "P"
daddr = len(self.data) + self.data_offset
@@ -221,17 +180,17 @@ class Packer(object):
return rv
def pack_dict(self, d, offset):
name_entries = sorted((a, b) for a, b in d.items() if isinstance(a, str))
id_entries = sorted((a, b) for a, b in d.items() if isinstance(a, int))
name_entries = sorted((a, b) for a, b in d.iteritems() if isinstance(a, unicode))
id_entries = sorted((a, b) for a, b in d.iteritems() if isinstance(a, int))
rv = struct.pack("<IIHHHH", 0, 0, 4, 0, len(name_entries), len(id_entries))
offset += len(rv) + (len(name_entries) + len(id_entries)) * 8
rest = b""
rest = ""
for (name, value) in name_entries + id_entries:
if isinstance(name, str):
if isinstance(name, unicode):
name = 0x80000000 | self.pack_name(name)
if isinstance(value, dict):
@@ -249,10 +208,8 @@ class Packer(object):
##############################################################################
# This loads in an icon file, and returns a dictionary that is suitable for
# use in the resources of an exe file.
def load_icon(fn):
f = BinFile(open(fn, "rb").read())
f = BinFile(file(fn, "rb").read())
f.seek(0)
f.u16()
@@ -279,17 +236,15 @@ def load_icon(fn):
if not f.u32():
f.set_u32(offset + 20, 0)
#rv[3][i + 1] = { 0 : (1252, f.substring(offset, size)) }
#I do not have justification for the 0x0409 entry ID, other than copying what other files do. Same for codepage of 0
rv[3][i + 1] = { 1033 : (0, f.substring(offset, size)) }
rv[3][i + 1] = { 0 : (1252, f.substring(offset, size)) }
group += struct.pack("BBBBHHIH", width, height, colors, reserved,
planes, bpp, size, i + 1)
f.seek(addr)
#rv[14] = { 1 : { 0 : (1252, group) } }
rv[14] = { 1 : { 1033 : (0, group) } }
rv[14] = { 1 : { 0 : (1252, group) } }
return rv
@@ -303,7 +258,7 @@ def change_icons(oldexe, icofn):
pe = pefile.PE(oldexe)
for s in pe.sections:
if s.Name == b".rsrc\0\0\0":
if s.Name == ".rsrc\0\0\0":
rsrc_section = s
break
else:
@@ -315,24 +270,9 @@ def change_icons(oldexe, icofn):
physize = rsrc_section.SizeOfRawData
virsize = rsrc_section.Misc_VirtualSize
f = open(oldexe, "rb")
basedata = f.read(base)
f = file(oldexe, "rb")
f.seek(base)
data = f.read(physize)
#Symbol table, I could not understand so well
# Some analysis and the little I could find on how the symbol tables were layed out show that the PE table is in two sections. One is
# a list of NumberOfSymbols*(18 bytes) symbol entries, followed immediately by a string table who's length is specified in the 4 bytes following the symbol structure list
#Again, the information *seems* to indicate that this will always follow the entire block of all sections (so be at the end of the file)
######
# As a related note, apparently this flag has been deprecated, but appears to be set (I think ..) in the renpy.exe that is used to build from..
# no idea of a consequence, just an observation
# https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#characteristics , see "IMAGE_FILE_LINE_NUMS_STRIPPED" :
# COFF line numbers have been removed. This flag is deprecated and should be zero.
# In renpy.exe, this 2-byte flag is @ 0x096 and 0x097 in little-endian
######
f.close()
bf = BinFile(data)
@@ -344,85 +284,45 @@ def change_icons(oldexe, icofn):
rsrc = Packer().pack(resources)
newExactSize = len(rsrc)
alignment = pe.OPTIONAL_HEADER.SectionAlignment
#From note about flags above regarding image flags. These two should be 0
pe.FILE_HEADER.Characteristics = pe.FILE_HEADER.Characteristics & (~pefile.IMAGE_CHARACTERISTICS["IMAGE_FILE_LINE_NUMS_STRIPPED"])
pe.FILE_HEADER.Characteristics = pe.FILE_HEADER.Characteristics & (~pefile.IMAGE_CHARACTERISTICS["IMAGE_FILE_LOCAL_SYMS_STRIPPED"])
# print "Alignment is", alignment
#Per docs, symbol table can just be removed
#https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#coff-file-header-object-and-image see "PointerToSymbolTable" and "NumberOfSymbols "
pe.FILE_HEADER.PointerToSymbolTable = 0
pe.FILE_HEADER.NumberOfSymbols = 0
#####
# Alignment requirements as I understand them
#
# SectionAlignment (misnomer.. 'memory' alignment) = 4096
# FileAlignment = 512
#
# Section, SizeOfRawData = multiple of FileAlignment (On Disk size)
# Scetion, VirtualSize is NOT aligned to any specific number, and rwdata may be > than this due to its alignment requirement (In memory size)
#
# the resource section should be padded out to meet the alignment requirement of SizeOfRawData = multiple of FileAlignment (So, in the file, since on disk)
#
#####
# RVA table virt address and size = that in the section header
#
#####
# SizeOfImage must be aligned to SectionAlignment (memory alignment)
# There is NO padding needed, the image size number simply needs to be aligned to >= the
memoryalignment = pe.OPTIONAL_HEADER.SectionAlignment
filealignment = pe.OPTIONAL_HEADER.FileAlignment
rsrc_section.Misc_VirtualSize = newExactSize
rsrc_section.Misc_PhysicalAddress = newExactSize
rsrc_section.Misc = newExactSize
#Size of resource section (and pointer, but we're not changing anything 'above' resource) is the same as virtual address in the section table
# https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#optional-header-data-directories-image-only
pe.OPTIONAL_HEADER.DATA_DIRECTORY[2].Size = rsrc_section.Misc_VirtualSize
#Alignment for raw data
if len(rsrc) % filealignment:
pad = filealignment - (len(rsrc) % filealignment)
padding = b"\0" * (pad)
if len(rsrc) % alignment:
pad = alignment - (len(rsrc) % alignment)
padding = "RENPYVNE" * (pad / 8 + 1)
padding = padding[:pad]
rsrc += padding
rsrc_section.SizeOfRawData = len(rsrc)
newsize = len(rsrc)
#Image size is the memory size of all sections + all headers, padded to memory alignment.
#There's alread a header size, and this isn't changing headers, so just add.
#imageSize = pe.OPTIONAL_HEADER.ImageBase + pe.OPTIONAL_HEADER.SizeOfHeaders
imageSize = pe.OPTIONAL_HEADER.SizeOfHeaders
for s in pe.sections:
sectionSize = s.Misc_VirtualSize
#Align every section, so add padding to size
pad = 0
if sectionSize % memoryalignment:
pad = memoryalignment - (sectionSize % memoryalignment)
imageSize += (sectionSize + pad)
pad = 0
if imageSize % memoryalignment:
pad = memoryalignment - (imageSize % memoryalignment)
pe.OPTIONAL_HEADER.SizeOfImage = imageSize + pad
rsrc_section.Misc_VirtualSize += newsize - virsize
rsrc_section.Misc_PhysicalAddress += newsize - virsize
rsrc_section.Misc += newsize - virsize
rsrc_section.SizeOfRawData += newsize - physize
pe.OPTIONAL_HEADER.SizeOfInitializedData += newsize - physize
#The symbol table is simply left off. Its size DOES factor into ImageSize, but we didn't calculate it above, so fine
#Correctly checksum the file. The entire file is involved in the calculation, so a new PE object must be generated for the calculation to work against
newFile = pe.write()[:base] + rsrc
newpe = pefile.PE(data=bytes(newFile))
newpe.OPTIONAL_HEADER.CheckSum = newpe.generate_checksum()
# Resource size.
pe.OPTIONAL_HEADER.DATA_DIRECTORY[2].Size += newsize - virsize
return bytes(newpe.write())
# Compute the total size of the image.
total_size = 0
for i in pe.sections:
sec_size = i.Misc_VirtualSize
sec_size = sec_size - (sec_size % alignment) + alignment
total_size += sec_size
pe.OPTIONAL_HEADER.SizeOfImage = total_size
return pe.write()[:base] + rsrc
if __name__ == "__main__":
f = open(sys.argv[3], "wb")
f = file(sys.argv[3], "wb")
f.write(change_icons(sys.argv[1], sys.argv[2]))
f.close()
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

-84
View File
@@ -1,84 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
init python:
try:
import _renpytfd
except Exception:
_renpytfd = None
def directory_is_writable(path):
test = os.path.join(path, "renpy test do not use")
try:
if os.path.isdir(test):
os.rmdir(test)
os.mkdir(test)
os.rmdir(test)
return True
except Exception:
return False
def choose_directory(default_path):
"""
Pops up a directory chooser.
`path`
The directory that is selected by default. If None, config.renpy_base
is selected.
Returns a (path, is_default) tuple, where path is the chosen directory,
and is_default is true if and only if it was chosen by default mechanism
rather than user choice.
"""
if _renpytfd:
path = _renpytfd.selectFolderDialog(__("Select Projects Directory"), default_path)
else:
path = None
if default_path is None:
try:
default_path = os.path.dirname(os.path.abspath(config.renpy_base))
except Exception:
default_path = os.path.abspath(config.renpy_base)
# Path being None or "" means nothing was selected.
if not path:
if default_path is None or not os.path.isdir(default_path) or not directory_is_writable(default_path):
interface.error(_("No directory was selected, but one is required."))
return default_path, True
# Apply more thorough checks to an explicit path.
path = renpy.fsdecode(path)
if not os.path.isdir(path):
interface.error(_("The selected directory does not exist."))
elif not directory_is_writable(path):
interface.error(_("The selected directory is not writable."))
return path, False
+14 -59
View File
@@ -1,30 +1,11 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python:
import random
import codecs
import re
import sys
import future.utils
def theme_names():
"""
@@ -86,25 +67,14 @@ init python:
return theme, scheme
def implement_theme(theme, scheme):
"""
Implement the current theme.
This function uses non-public APIs.
"""
global showing_theme, showing_scheme
if theme == showing_theme and scheme == showing_scheme:
return
renpy.style.restore(style_backup)
future.utils.exec_(theme_data.THEME[theme][scheme], globals(), globals())
# Rebuild the style cache.
renpy.style.rebuild(False)
# Bust the render cache, so we re-evaluate the styles.
renpy.display.interface.kill_textures()
exec theme_data.THEME[theme][scheme] in globals()
renpy.style.rebuild()
showing_theme = theme
showing_scheme = scheme
@@ -294,7 +264,7 @@ init python:
if changed:
try:
os.unlink(filename + ".bak")
except Exception:
except:
pass
os.rename(filename, filename + ".bak")
@@ -323,7 +293,7 @@ init python:
if changed:
try:
os.unlink(filename + ".bak")
except Exception:
except:
pass
os.rename(filename, filename + ".bak")
@@ -333,7 +303,7 @@ init python:
try:
# just in case
os.unlink(filename + ".new")
except Exception:
except:
pass
pass
@@ -346,7 +316,8 @@ init python:
global style_backup
style_backup = renpy.style.backup()
config.change_language_callbacks.append(make_style_backup)
translate None python:
make_style_backup()
screen theme_demo:
@@ -398,23 +369,9 @@ init -2 python:
style.soundtest_button.xalign = 1.0
screen choose_theme:
default scheme_yadjustment = ui.adjustment()
default theme_yadjustment = ui.adjustment()
default first = True
python:
if first:
theme_yinitial_value = theme_yinitial()
scheme_yinitial_value = scheme_yinitial()
else:
theme_yinitial_value = None
scheme_yinitial_value = None
first = False
frame:
style_group "l"
style "l_root"
@@ -440,9 +397,8 @@ screen choose_theme:
viewport:
scrollbars "vertical"
yinitial theme_yinitial()
mousewheel True
yadjustment theme_yadjustment
yinitial theme_yinitial_value
has vbox
@@ -466,8 +422,7 @@ screen choose_theme:
viewport:
scrollbars "vertical"
mousewheel True
yadjustment scheme_yadjustment
yinitial scheme_yinitial_value
yinitial scheme_yinitial()
has vbox
@@ -492,7 +447,7 @@ screen choose_theme:
use theme_demo
textbutton _("Return") action Jump("front_page") style "l_left_button"
textbutton _("Back") action Jump("front_page") style "l_left_button"
textbutton _("Continue") action Return(True) style "l_right_button"
@@ -505,7 +460,7 @@ label choose_theme_callable:
call screen choose_theme
python hide:
with interface.error_handling(_("changing the theme")):
with interface.error_handling("changing the theme"):
switch_theme()
return
-91
View File
@@ -1,91 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
init python:
class ConsoleCommand():
"""
This runs a series of console commands in an OS-provided
console window. This is done by creating a shell script
or batch file as appropriate, then using an OS-approved
method to run that file.
"""
def __init__(self):
if renpy.macintosh:
fn = "console.command"
nl = b"\n"
prefix = "#!/bin/sh"
elif renpy.windows:
fn = "console.bat"
nl = b"\r\n"
prefix = "@echo off"
else:
fn = "console.sh"
nl = b"\n"
prefix = "#!/bin/bash"
self.fn = project.current.temp_filename(fn)
self.f = open(self.fn, "wb")
self.nl = nl
self.f.write(renpy.fsencode(prefix, force=True) + nl)
def add(self, *args):
"""
Adds a command to be run.
"""
args = [ b'"' + renpy.fsencode(i, force=True) + b'"' for i in args]
self.f.write(b" ".join(args) + self.nl)
def write(self, *args):
"""
Adds a command to be run.
"""
args = [ renpy.fsencode(i, force=True) for i in args]
self.f.write(b" ".join(args) + self.nl)
def run(self):
"""
Runs the queued up commands.
"""
if renpy.windows:
self.write("pause")
elif renpy.linux:
self.add("echo", "Press enter to close this window...")
self.write("read")
self.f.close()
os.chmod(self.fn, 0o755)
if renpy.linux:
command = renpy.fsencode('"{}"'.format(self.fn.replace("\"", "\\\"")))
subprocess.Popen([ "x-terminal-emulator", "-e", command ])
else:
command = renpy.fsencode(self.fn)
os.startfile(command)
interface.interaction(_("INFORMATION"), _("The command is being run in a new operating system console window."), pause=2.5)
+142 -1040
View File
File diff suppressed because it is too large Load Diff
+8 -94
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python:
class PackageToggle(Action):
@@ -154,7 +136,7 @@ screen build_distributions:
has vbox
label _("Build Distributions: [project.current.display_name!q]")
label _("Build Distributions: [project.current.name!q]")
add HALF_SPACER
@@ -191,13 +173,8 @@ screen build_distributions:
has vbox
textbutton _("Edit options.rpy") action editor.Edit("game/options.rpy", check=True)
textbutton _("Add from clauses to calls, once") action Jump("add_from")
textbutton _("Update old-game") action Jump("start_update_old_game")
textbutton _("Refresh") action Jump("build_distributions")
add HALF_SPACER
textbutton _("Upload to itch.io") action Jump("itch")
# Right side.
frame:
@@ -222,72 +199,16 @@ screen build_distributions:
for pkg in packages:
if not pkg["hidden"]:
$ description = pkg["description"]
button:
action PackageToggle(pkg["name"]) style "l_checkbox"
hbox:
spacing 3
text "[description!q]"
if pkg["dlc"]:
text _("(DLC)")
textbutton "[description!q]" action PackageToggle(pkg["name"]) style "l_checkbox"
add SPACER
add HALF_SPACER
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Options:")
add HALF_SPACER
add SPACER
if project.current.dump["build"]["include_update"]:
textbutton _("Build Updates") action DataToggle("build_update") style "l_checkbox"
textbutton _("Add from clauses to calls") action DataToggle("add_from") style "l_checkbox"
textbutton _("Force Recompile") action DataToggle("force_recompile") style "l_checkbox"
textbutton _("Return") action Jump("front_page") style "l_left_button"
textbutton _("Build") action Jump("start_distribute") style "l_right_button"
label add_from_common:
python:
interface.processing(_("Adding from clauses to call statements that do not have them."))
project.current.launch([ "add_from" ], wait=True)
return
label add_from:
call add_from_common
jump build_distributions
label start_update_old_game:
call update_old_game
jump build_distributions
label add_update_pem:
python hide:
interface.info("You're trying to build an update, but an update.pem file doesn't exist.\n\nThis file is used to sign updates, and will be automatically created in your projects's base directory.\n\nYou'll need to back up update.pem and keep it safe.", cancel=Jump("build_distributions"))
import ecdsa
key = ecdsa.SigningKey.generate(curve=ecdsa.NIST256p).to_pem()
with open(os.path.join(project.current.path, "update.pem"), "wb") as f:
f.write(key)
return
label start_distribute:
if project.current.dump["build"]["include_update"] and not os.path.exists(os.path.join(project.current.path, "update.pem")):
call add_update_pem
if project.current.data["add_from"]:
call add_from_common
jump distribute
textbutton _("Back") action Jump("front_page") style "l_left_button"
textbutton _("Build") action Jump("distribute") style "l_right_button"
label build_update_dump:
python:
@@ -302,8 +223,6 @@ label build_distributions:
call build_update_dump
label post_build:
if not project.current.dump["build"]["directory_name"]:
jump build_missing
@@ -315,12 +234,7 @@ label build_missing:
interface.yesno(_("Your project does not contain build information. Would you like to add build information to the end of options.rpy?"), yes=Return(True), no=Jump("front_page"))
project_name = project.current.name
project_name = project_name.replace(" ", "_")
project_name = project_name.replace(":", "")
project_name = project_name.replace(";", "")
build_info = DEFAULT_BUILD_INFO.replace("PROJECTNAME", project_name)
build_info = DEFAULT_BUILD_INFO.replace("PROJECTNAME", project.current.name)
with open(os.path.join(project.current.path, "game", "options.rpy"), "a") as f:
f.write(build_info)
-53
View File
@@ -1,53 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# This file checks to see if we're inside a dmg, and displays an error
# message to the player if we are.
init python:
def dmgcheck():
if not renpy.macintosh:
return
fn = os.path.join(config.renpy_base, "dmgcheck.txt")
try:
if os.path.exists(fn):
os.unlink(fn)
with open(fn, "w") as f:
f.write("Testing to see if we're in a DMG.\r\n")
os.unlink(fn)
return
except Exception:
# If we're here, we didn't make it through the checks safely. So
# put up a warning message.
interface.info(
message=_("Ren'Py is running from a read only folder. Some functionality will not work."),
submessage=_("This is probably because Ren'Py is running directly from a Macintosh drive image. To fix this, quit this launcher, copy the entire %s folder somewhere else on your computer, and run Ren'Py again.") % (os.path.basename(config.renpy_base)),
)
+2 -40
View File
@@ -1,47 +1,10 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
init python:
import urllib.request
import urllib2
import os
import threading
import time
ssl_context_cache = None
def ssl_context():
"""
Returns the SSL context.
"""
global ssl_context_cache
if ssl_context_cache is None:
import ssl
import certifi
ssl_context_cache = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=certifi.where())
return ssl_context_cache
class Downloader(object):
def __init__(self, url, dest):
@@ -72,8 +35,7 @@ init python:
try:
# Open the URL.
self.urlfile = urllib.request.urlopen(url, context=ssl_context())
self.urlfile = urllib2.urlopen(url)
t = threading.Thread(target=self.thread)
t.daemon = True
+49 -167
View File
@@ -1,36 +1,17 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
# Editor Support.
#
# This contains code for scanning for editors, and for allowing the user to
# select an editor.
init 1 python in editor:
init python in editor:
from store import Action, renpy, config, persistent
import store.project as project
import store.updater as updater
import store.interface as interface
import store.util as util
import store
import glob
@@ -67,8 +48,8 @@ init 1 python in editor:
ei = EditorInfo(filename)
if ei.name in editors:
if editors[ei.name].mtime >= ei.mtime:
return
if editors[ei.name].mtime >= ei.mtime:
return
editors[ei.name] = ei
@@ -84,19 +65,8 @@ init 1 python in editor:
if d is None:
continue
if not os.path.isdir(d):
continue
for i in util.listdir(d):
i = os.path.join(d, i)
if not os.path.isdir(d):
continue
for j in util.listdir(i):
j = os.path.join(i, j)
if j.endswith(".edit.py"):
scan_editor(j)
for filename in glob.glob(d + "/*/*.edit.py"):
scan_editor(filename)
########################################################################
@@ -140,100 +110,62 @@ init 1 python in editor:
Creates the list of FancyEditorInfo objects.
"""
import platform
global fancy_editors
scan_all()
fei = fancy_editors = [ ]
# Visual Studio Code
AD1 = _("A modern editor with many extensions including advanced Ren'Py integration.")
AD2 = _("A modern editor with many extensions including advanced Ren'Py integration.\n{a=jump:reinstall_vscode}Upgrade Visual Studio Code to the latest version.{/a}")
# Editra.
ED = _("{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input.")
EDL = _("{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input. On Linux, Editra requires wxPython.")
if renpy.windows:
installed = os.path.exists(os.path.join(config.renpy_base, "vscode/VSCode-win32-x64"))
dlc = "editra-windows"
installed = os.path.exists(os.path.join(config.basedir, "editra/Editra-win32"))
description = ED
error_message = None
elif renpy.macintosh:
installed = os.path.exists(os.path.join(config.renpy_base, "vscode/Visual Studio Code.app"))
dlc = "editra-mac"
installed = os.path.exists(os.path.join(config.basedir, "editra/Editra-mac.app"))
description = ED
error_message = None
else:
if renpy.arch == "aarch64":
arch = "arm64"
elif renpy.arch == "armv7l":
arch = "arm"
else:
arch = "x64"
installed = os.path.exists(os.path.join(config.renpy_base, "vscode/VSCode-linux-" + arch))
dlc = "editra-linux"
installed = os.path.exists(os.path.join(config.basedir, "editra/Editra"))
description = EDL
error_message = _("This may have occured because wxPython is not installed on this system.")
e = FancyEditorInfo(
0,
_("Visual Studio Code"),
AD2 if installed else AD2,
"extension:vscode",
_("Up to 110 MB download required."),
None)
1,
"Editra",
description,
dlc,
_("Up to 22 MB download required."),
error_message)
e.installed = e.installed and installed
e.installed = e.installed or installed
fei.append(e)
# Atom.
AD = _("A modern and approachable text editor.")
if renpy.windows:
dlc = "atom-windows"
installed = os.path.exists(os.path.join(config.renpy_base, "atom/atom-windows"))
elif renpy.macintosh:
dlc = "atom-mac"
installed = os.path.exists(os.path.join(config.renpy_base, "atom/Atom.app"))
else:
dlc = "atom-linux"
installed = os.path.exists(os.path.join(config.renpy_base, "atom/atom-linux-" + platform.machine()))
if not (renpy.arch in [ "aarch64", "armv7l" ]):
e = FancyEditorInfo(
1,
_("Atom"),
AD,
"extension:atom",
_("Up to 150 MB download required."),
None)
e.installed = e.installed and (installed or 'RENPY_ATOM' in os.environ)
fei.append(e)
# jEdit - Only present if it exists on system.
if os.path.exists(os.path.join(config.renpy_base, "jedit")):
fei.append(FancyEditorInfo(
2,
_("jEdit"),
_("A mature editor that requires Java."),
"jedit",
_("1.8 MB download required."),
_("This may have occured because Java is not installed on this system."),
))
# jEdit
fei.append(FancyEditorInfo(
3,
_("Visual Studio Code (System)"),
_("Uses a copy of Visual Studio Code that you have installed outside of Ren'Py. It's recommended you install the language-renpy extension to add support for Ren'Py files."),
2,
"jEdit",
_("A mature editor that requires Java."),
"jedit",
_("1.8 MB download required."),
_("This may have occured because Java is not installed on this system."),
))
fei.append(FancyEditorInfo(
3,
_("System Editor"),
"System Editor",
_("Invokes the editor your operating system has associated with .rpy files."),
None))
for k in editors:
if k in [ "Visual Studio Code", "Visual Studio Code (System)", "Atom", "jEdit", "System Editor", "None" ]:
if k in [ "Editra", "jEdit", "System Editor", "None" ]:
continue
fei.append(FancyEditorInfo(
@@ -244,7 +176,7 @@ init 1 python in editor:
fei.append(FancyEditorInfo(
5,
_("None"),
"None",
_("Prevents Ren'Py from opening a text editor."),
None))
@@ -253,8 +185,7 @@ init 1 python in editor:
# If we're in a linux distro or something, assume all editors work.
if not updater.can_update():
for i in fei:
if i.dlc and not i.dlc.startswith("extension:"):
i.installed = True
i.installed = True
def fancy_activate_editor(default=False):
"""
@@ -301,12 +232,9 @@ init 1 python in editor:
if not fe.installed:
if fe.dlc.startswith("extension:"):
import installer
manifest = fe.dlc.partition(":")[2]
renpy.invoke_in_new_context(installer.manifest, "https://www.renpy.org/extensions/{}/{}.py".format(manifest, manifest), renpy=True)
else:
store.add_dlc(fe.dlc)
# We don't check the status of this because fancy_activate_editor
# will fail if the editor is not installed.
store.add_dlc(fe.dlc)
persistent.editor = fe.name
fancy_activate_editor()
@@ -339,7 +267,7 @@ init 1 python in editor:
if not set_editor:
return True
if persistent.editor and persistent.editor != "None":
if persistent.editor:
return True
return renpy.invoke_in_new_context(renpy.call_screen, "editor")
@@ -349,8 +277,6 @@ init 1 python in editor:
class Edit(Action):
alt = _("Edit [text].")
def __init__(self, filename, line=None, check=False):
"""
An action that opens the given line of the given file in a
@@ -376,7 +302,7 @@ init 1 python in editor:
return True
fn = project.current.unelide_filename(self.filename)
return os.path.exists(renpy.fsencode(fn))
return os.path.exists(fn)
def __call__(self):
@@ -396,7 +322,7 @@ init 1 python in editor:
e.open(fn, line=self.line)
e.end()
except Exception as e:
except Exception, e:
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
@@ -424,7 +350,7 @@ init 1 python in editor:
if not self.check:
return True
return os.path.exists(renpy.fsencode(self.filename))
return os.path.exists(self.filename)
def __call__(self):
@@ -442,7 +368,7 @@ init 1 python in editor:
e.open(self.filename, line=self.line)
e.end()
except Exception as e:
except Exception, e:
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
@@ -480,46 +406,10 @@ init 1 python in editor:
e.end()
except Exception as e:
except Exception, e:
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
class EditProject(Action):
"""
Opens the project's base directory in an editor.
"""
def __call__(self):
if not check_editor():
return
try:
e = renpy.editor.editor
e.begin()
e.open_project(project.current.path)
e.end()
except Exception as e:
exception = traceback.format_exception_only(type(e), e)[-1][:-1]
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
def CanEditProject():
"""
Returns True if EditProject can be used.
"""
try:
e = renpy.editor.editor
return e.has_projects
except Exception:
return False
screen editor:
frame:
@@ -569,14 +459,6 @@ screen editor:
textbutton _("Cancel") action Return(False) style "l_left_button"
label reinstall_vscode:
python hide:
manifest = "vscode"
renpy.invoke_in_new_context(installer.manifest, "https://www.renpy.org/extensions/{}/{}.py".format(manifest, manifest), renpy=True)
jump editor_preference
label editor_preference:
call screen editor
jump preferences
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
+61 -90
View File
@@ -1,29 +1,42 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
define PROJECT_ADJUSTMENT = ui.adjustment()
init python:
import datetime
import os
import subprocess
class OpenDirectory(Action):
"""
Opens `directory` in a file browser. `directory` is relative to
the project root.
"""
def __init__(self, directory, absolute=False):
if absolute:
self.directory = directory
else:
self.directory = os.path.join(project.current.path, directory)
def get_sensitive(self):
return os.path.exists(self.directory)
def __call__(self):
try:
directory = renpy.fsencode(self.directory)
if renpy.windows:
os.startfile(directory)
elif renpy.macintosh:
subprocess.Popen([ "open", directory ])
else:
subprocess.Popen([ "xdg-open", directory ])
except:
pass
# Used for testing.
def Relaunch():
@@ -31,8 +44,6 @@ init python:
screen front_page:
frame:
alt ""
style_group "l"
style "l_root"
@@ -55,7 +66,7 @@ screen front_page:
has hbox:
xfill True
text _("PROJECTS:") style "l_label_text" size 36 yoffset 10
text "PROJECTS:" style "l_label_text" size 36 yoffset 10
textbutton _("refresh"):
xalign 1.0
@@ -88,6 +99,8 @@ screen front_page:
left_margin (HALF_INDENT)
action Jump("new_project")
# Project section - on right.
if project.current is not None:
@@ -95,7 +108,6 @@ screen front_page:
if project.current is not None:
textbutton _("Launch Project") action project.Launch() style "l_right_button"
key "K_F5" action project.Launch()
@@ -113,7 +125,6 @@ screen front_page_project_list:
textbutton _("[p.name!q] (template)"):
action project.Select(p)
alt _("Select project [text].")
style "l_list"
null height 12
@@ -124,13 +135,12 @@ screen front_page_project_list:
textbutton "[p.name!q]":
action project.Select(p)
alt _("Select project [text].")
style "l_list"
null height 12
textbutton _("Tutorial") action project.SelectTutorial() style "l_list" alt _("Select project [text].")
textbutton _("The Question") action project.Select("the_question") style "l_list" alt _("Select project [text].")
textbutton _("Tutorial") action project.Select("tutorial") style "l_list"
textbutton _("The Question") action project.Select("the_question") style "l_list"
# This is used for the right side of the screen, which is where the project-specific
@@ -145,7 +155,7 @@ screen front_page_project:
frame style "l_label":
has hbox xfill True
text "[p.display_name!q]" style "l_label_text"
text "[p.name!q]" style "l_label_text"
label _("Active Project") style "l_alternate"
grid 2 1:
@@ -159,33 +169,33 @@ screen front_page_project:
frame style "l_indent":
has vbox
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)
textbutton _("game") action OpenDirectory("game")
textbutton _("base") action OpenDirectory(".")
# textbutton _("images") action OpenDirectory("game/images") style "l_list"
# textbutton _("save") action None style "l_list"
vbox:
if persistent.show_edit_funcs:
label _("Edit File") style "l_label_small"
label _("Edit File") style "l_label_small"
frame style "l_indent":
has vbox
frame style "l_indent":
has vbox
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()
else:
textbutton _("All script files") action editor.EditAll()
textbutton "script.rpy" action editor.Edit("game/script.rpy", check=True)
textbutton "options.rpy" action editor.Edit("game/options.rpy", check=True)
textbutton "screens.rpy" action editor.Edit("game/screens.rpy", check=True)
textbutton _("All script files") action editor.EditAll()
add SPACER
add SEPARATOR
add SPACER
label _("Actions") style "l_label_small"
frame style "l_indent":
has vbox
textbutton _("Navigate Script") text_size 30 action Jump("navigation")
add SPACER
grid 2 1:
xfill True
@@ -194,17 +204,9 @@ screen front_page_project:
frame style "l_indent":
has vbox
textbutton _("Navigate Script") action Jump("navigation")
textbutton _("Check Script (Lint)") action Jump("lint")
if project.current.exists("game/gui.rpy"):
textbutton _("Change/Update GUI") action Jump("change_gui")
else:
textbutton _("Change Theme") action Jump("choose_theme")
textbutton _("Change Theme") action Jump("choose_theme")
textbutton _("Delete Persistent") action Jump("rmpersistent")
textbutton _("Force Recompile") action Jump("force_recompile")
# textbutton "Relaunch" action Relaunch
@@ -215,8 +217,6 @@ screen front_page_project:
textbutton _("Build Distributions") action Jump("build_distributions")
textbutton _("Android") action Jump("android")
textbutton _("iOS") action Jump("ios")
textbutton _("Web") + " " + _("(Beta)") action Jump("web")
textbutton _("Generate Translations") action Jump("translate")
textbutton _("Extract Dialogue") action Jump("extract_dialogue")
@@ -225,30 +225,8 @@ label main_menu:
label start:
show screen bottom_info
$ dmgcheck()
jump expression renpy.session.pop("launcher_start_label", "front_page")
default persistent.has_chosen_language = False
default persistent.has_update = False
label front_page:
if (not persistent.has_chosen_language) or ("RENPY_CHOOSE_LANGUAGE" in os.environ):
if (_preferences.language is None) or ("RENPY_CHOOSE_LANGUAGE" in os.environ):
hide screen bottom_info
call choose_language
show screen bottom_info
$ persistent.has_chosen_language = True
if persistent.daily_update_check and ((not persistent.last_update_check) or (datetime.date.today() > persistent.last_update_check)):
python hide:
persistent.last_update_check = datetime.date.today()
renpy.invoke_in_thread(fetch_update_channels)
call screen front_page
jump front_page
@@ -259,7 +237,7 @@ label lint:
interface.processing(_("Checking script for potential problems..."))
lint_fn = project.current.temp_filename("lint.txt")
project.current.launch([ 'lint', lint_fn, ] + list(persistent.lint_options), wait=True)
project.current.launch([ 'lint', lint_fn ], wait=True)
e = renpy.editor.editor
e.begin(True)
@@ -276,10 +254,3 @@ label rmpersistent:
jump front_page
label force_recompile:
python hide:
interface.processing(_("Recompiling all rpy files into rpyc files..."))
project.current.launch([ 'compile' ], wait=True)
jump front_page
-450
View File
@@ -1,450 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
define gui.project_system_font = None
define gui.asian = False
init -1 python:
import gui7
from gui7 import translate_define, translate_copy, translate_code
import os
from store import config
def translate_font(language, font):
"""
Selects the font file that is used when translating `language`.
`font`
Is the name of the font file used for both the launcher and
the new GUI template. This should be a string giving the name
of the font file.
"""
def callback():
gui.REGULAR_FONT = font
gui.LIGHT_FONT = font
gui.REGULAR_BOLD = True
style._default.font = font
style.default.font = font
gui.system_font = font
gui.project_system_font = font
config.language_callbacks[language].append(callback)
def s(s):
return '"' + s + '"'
gui7.translate_copy(language, "sdk-fonts/" + font, font)
gui7.translate_define(language, "gui.text_font", s(font))
gui7.translate_define(language, "gui.name_text_font", s(font))
gui7.translate_define(language, "gui.interface_text_font", s(font))
for fn in [ "gui.rpy", "options.rpy", "screens.rpy" ]:
fn = os.path.join(config.renpy_base, "gui", "game", fn)
if os.path.exists(fn):
config.translate_files.append(fn)
config.translate_comments = config.translate_files
DARK_COLORS = [
"#0099cc",
"#99ccff",
"#66cc00",
"#cccc00",
"#cc6600",
# "#cc3300",
"#0066cc",
"#9933ff",
"#00cc99",
"#cc0066",
"#cc0000",
]
LIGHT_COLORS = [
"#003366", # Dark Blue
"#0099ff", # Light Blue
"#336600", # Green
"#000000", # Black
"#cc6600", # Orange
"#000066", # Darkest Blue
"#660066", # Purple
"#006666", # Dark Green
"#cc0066", # Pinkish
"#990000", # Red
]
# LIGHT_COLORS = DARK_COLORS
COLOR_OPTIONS = [
(i, "#000000", False) for i in DARK_COLORS
] + [
(i, "#ffffff", True) for i in LIGHT_COLORS
]
screen gui_swatches():
grid 5 4:
for accent, bg, light in COLOR_OPTIONS:
frame:
style "empty"
xysize (85, 60)
add Color(accent).replace_hsv_saturation(.25).replace_value(.5)
if light:
add Color(bg).opacity(.9)
else:
add Color(bg).opacity(.8)
button:
style "empty"
if light:
selected_background "#000"
else:
selected_background "#fff"
xpadding 3
ypadding 3
xmargin 10
ymargin 10
action SetVariable("gui_color", (accent, bg, light))
idle_child Solid(accent)
hover_child Solid(Color(accent).tint(.6))
screen gui_demo(accent, boring, light, display):
$ p = gui7.GuiParameters(
"-",
"-",
1280,
720,
accent,
boring,
light,
None,
False,
False,
False,
"-"
)
frame:
style "empty"
add p.menu_color
if light:
add Solid(p.boring_color.opacity(.9))
else:
add Solid(p.boring_color.opacity(.8))
frame:
style "empty"
xpadding 10
ypadding 10
has vbox
text _("Display"):
style "empty"
font (gui.system_font or "DejaVuSans.ttf")
color p.accent_color
size 24
for i in [ _("Window"), _("Fullscreen"), _("Planetarium") ]:
textbutton i:
action (None if i == "Planetarium" else SetScreenVariable("display", i))
style "empty"
text_style "empty"
text_font (gui.system_font or "DejaVuSans.ttf")
text_size 24
text_color p.idle_color
text_hover_color p.hover_color
text_selected_color p.selected_color
text_insensitive_color p.insensitive_color
xmargin 4
ymargin 4
left_padding 21
selected_background Solid(p.accent_color, xsize=5)
null height 30
text _("Text Speed"):
style "empty"
color p.accent_color
size 24
font (gui.system_font or "DejaVuSans.ttf")
bar:
value ScreenVariableValue("value", 1.0)
style "empty"
base_bar Solid(p.muted_color)
hover_base_bar Solid(p.hover_muted_color)
thumb Solid(p.accent_color, xsize=10)
hover_thumb Solid(p.hover_color, xsize=10)
ysize 30
screen choose_gui_color():
default display = "Window"
default value = 0.5
frame:
style_group "l"
style "l_root"
window:
has vbox
label _("Select Accent and Background Colors")
frame:
style "l_indent"
has hbox:
yfill True
frame:
style "l_default"
xsize 425
has vbox
text _("Please click on the color scheme you wish to use, then click Continue. These colors can be changed and customized later.")
add SPACER
use gui_swatches()
# Preview
frame:
xsize 350
style "l_default"
background Frame(PATTERN, 0, 0, tile=True)
xpadding 5
ypadding 5
xfill True
yfill True
xmargin 20
bottom_margin 6
use gui_demo(gui_color[0], gui_color[1], gui_color[2], display)
textbutton _("Return") action Jump("front_page") style "l_left_button"
if gui_color:
textbutton _("Continue") action Return(True) style "l_right_button"
key "input_enter" action Return(True)
label change_gui:
python:
gui_new = False
gui_replace_images = True
gui_update_code = True
gui_replace_code = False
project.current.update_dump(True)
gui_size = tuple(project.current.dump["size"])
project_dir = project.current.path
project_name = project.current.name
mode = interface.choice(
__("{b}Warning{/b}\nContinuing will overwrite customized bar, button, save slot, scrollbar, and slider images.\n\nWhat would you like to do?") +
__("{size=-4}\n\nThis will not overwrite gui/main_menu.png, gui/game_menu.png, and gui/window_icon.png, but will create files that do not exist.{/size}"),
[
("change", _("Choose new colors, then regenerate image files.")),
("regenerate", _("Regenerate the image files using the colors in gui.rpy.")),
],
None,
cancel=Jump("front_page"),
)
if mode == "change":
jump gui_project_common
else:
jump gui_generate_images
label new_gui_project:
python:
gui_new = True
gui_replace_images = True
gui_replace_code = True
gui_update_code = True
label gui_project_size:
python:
default_size = (1920, 1080)
gui_size = interface.choice(
_("What resolution should the project use? Although Ren'Py can scale the window up and down, this is the initial size of the window, the size at which assets should be drawn, and the size at which the assets will be at their sharpest.\n\nThe default of [default_size[0]]x[default_size[1]] is a reasonable compromise."),
[
((1280, 720), "1280x720"),
((1920, 1080), "1920x1080"),
((2560, 1440), "2560x1440"),
((3840, 2160), "3840x2160"),
("custom", _("Custom. The GUI is optimized for a 16:9 aspect ratio.")),
],
default_size,
cancel=Jump("front_page"),
)
if gui_size == "custom":
gui_width = ""
while True:
gui_width = interface.input(
_("WIDTH"),
_("Please enter the width of your game, in pixels."),
cancel=Jump("front_page"),
allow=interface.DIGITS_LETTERS,
)
try:
gui_width = int(gui_width)
except Exception:
interface.error(_("The width must be a number."), label=None)
continue
break
gui_height = ""
while True:
gui_height = interface.input(
_("HEIGHT"),
_("Please enter the height of your game, in pixels."),
cancel=Jump("front_page"),
allow=interface.DIGITS_LETTERS,
)
try:
gui_height = int(gui_height)
except Exception:
interface.error(_("The height must be a number."), label=None)
continue
break
gui_size = (gui_width, gui_height)
label gui_project_common:
$ gui_color = (DARK_COLORS[0], "#000000", False)
call screen choose_gui_color
python hide:
width, height = gui_size
accent, boring, light = gui_color
prefix = os.path.join(project_dir, "game")
if not os.path.isdir(prefix) and not gui_new:
interface.error("{} does not appear to be a Ren'Py game.".format(prefix))
template = os.path.join(config.renpy_base, "gui", "game")
if not os.path.isdir(template):
interface.error("{} does not appear to be a Ren'Py game.".format(template))
p = gui7.GuiParameters(
prefix,
template,
width,
height,
accent,
boring,
light,
_preferences.language,
gui_replace_images,
gui_replace_code,
gui_update_code,
project_name,
)
if gui_new:
interface.processing(_("Creating the new project..."))
else:
interface.processing(_("Updating the project..."))
with interface.error_handling(_("creating a new project")):
gui7.generate_gui(p)
# Activate the project.
with interface.error_handling(_("activating the new project")):
project.manager.scan()
project.Select(project.manager.get(project_name))()
if gui_new:
call update_renpy_strings_common
python hide:
if gui.project_system_font:
with open(os.path.join(project.current.gamedir, "tl/None/common.rpym"), "ab") as f:
f.write("define gui.system_font = {!r}\r\n".format(gui.project_system_font).encode("utf-8"))
label gui_generate_images:
python:
interface.processing(_("Updating the project..."))
project.current.launch([ 'gui_images' ], env={ "RENPY_VARIANT" : "small phone" }, wait=True)
project.current.launch([ 'gui_images' ], wait=True)
jump front_page
-99
View File
@@ -1,99 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from gui7.code import CodeGenerator, translate_define, translate_copy, translate_code
from gui7.images import ImageGenerator
from gui7.parameters import GuiParameters
import renpy.arguments
import os
def generate_gui(p):
ImageGenerator(p).generate_all()
CodeGenerator(p).generate_gui("gui.rpy", defines=True)
CodeGenerator(p).generate_gui("screens.rpy")
CodeGenerator(p).generate_code("options.rpy")
CodeGenerator(p).copy_script("script.rpy")
CodeGenerator(p).copy_files()
for dn in [ "images", "audio" ]:
fulldn = os.path.join(p.prefix, dn)
if not os.path.exists(fulldn):
os.mkdir(fulldn)
def generate_gui_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("target", action="store", help="The game into which the generated gui should be placed.")
ap.add_argument("--width", default=1280, action="store", type=int, help="The width of the generated gui.")
ap.add_argument("--height", default=720, action="store", type=int, help="The height of the generated gui.")
ap.add_argument("--accent", default="#00b8c3", action="store", help="The accent color used throughout the gui.")
ap.add_argument("--boring", default="#000000", action="store", help="The boring color used for the gui background.")
ap.add_argument("--light", default=False, action="store_true", help="True if this is considered a light theme.")
ap.add_argument("--template", default="gui", action="store", help="The template directory containing source code.")
ap.add_argument("--language", default=None, action="store", help="The language to translate strings and comments to.")
ap.add_argument("--start", default=False, action="store_true", help="Starts a new project, replacing images and code.")
ap.add_argument("--replace-images", default=False, action="store_true", help="True if existing images should be overwritten.")
ap.add_argument("--replace-code", default=False, action="store_true", help="True if an existing gui.rpy file should be overwritten.")
ap.add_argument("--update-code", default=False, action="store_true", help="True if an existing gui.rpy file should be update.")
args = ap.parse_args()
if args.start:
args.replace_images = True
args.replace_code = True
args.update_code = True
prefix = os.path.join(args.target, "game")
if not os.path.isdir(prefix):
ap.error("{} does not appear to be a Ren'Py game.".format(prefix))
template = os.path.join(args.template, "game")
if not os.path.isdir(template):
ap.error("{} does not appear to be a Ren'Py game.".format(template))
p = GuiParameters(
prefix,
template,
args.width,
args.height,
args.accent,
args.boring,
args.light,
args.language,
args.replace_images,
args.replace_code,
args.update_code,
os.path.basename(args.target),
)
generate_gui(p)
renpy.arguments.register_command("generate_gui", generate_gui_command)
-433
View File
@@ -1,433 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from __future__ import unicode_literals
import os
import codecs
import re
import math
import textwrap
import collections
import shutil
import renpy
class Define(object):
def __init__(self, name, value, comment):
self.name = name
self.value = value
self.comment = comment
# A map from language name to a list of defines.
language_defines = collections.defaultdict(list)
def translate_define(language, name, value, comment=None):
"""
This function should be called to register the value of a define that is
set when generating code in `language`.
`name`
A string giving the name of the define.
`value`
A string giving the value of the define. Be sure to quote it properly,
or use repr().
`comment`
If not None, a comment that will be generated before the define. The
comment will only be generated if the define does not exist in
gui.rpy. There is no need to use "## ", as the comment will be
added and wrapped automatically.
"""
language_defines[language].append(Define(name, value, comment))
# A map from a language name to a list of (src, dst) pairs. Each represents a
# file that is copied into place.
language_copies = collections.defaultdict(list)
def translate_copy(language, src, dst):
"""
This function should be called to copy a file from `src` to `dst`
when generating code in `language`.
`src`
A path, relative to the launcher game directory.
`dst`
A path, relative to the game directory of the new game.
"""
language_copies[language].append((src, dst))
# A map from language name and filename to code that should be added to the
# end of a newly-generated file.
language_code = collections.defaultdict(list)
def translate_code(language, filename, code):
"""
This function can be called to include a block of code verbatim
into `file` when a game is generated in `language`.
"""
language_code[language, filename].extend([''] + code.split("\n"))
class CodeGenerator(object):
"""
This is used to generate and update the GUI code.
"""
def __init__(self, parameters):
"""
Generates or updates gui.rpy.
"""
self.p = parameters
def load_template(self, filename):
target = os.path.join(self.p.prefix, filename)
if os.path.exists(target) and not self.p.replace_code:
template = target
else:
template = os.path.join(self.p.template, filename)
with codecs.open(template, "r", "utf-8") as f:
self.lines = [ i.rstrip().replace(u"\ufeff", "") for i in f ]
def remove_scale(self):
def scale(m):
original = int(m.group(1))
scaled = int(math.ceil(original * self.p.scale))
return str(scaled)
lines = [ ]
for l in self.lines:
l = re.sub(r'gui.scale\((.*?)\)', scale, l)
lines.append(l)
self.lines = lines
def update_size(self):
gui_init = "gui.init({}, {})".format(self.p.width, self.p.height)
lines = [ ]
for l in self.lines:
l = re.sub(r'gui.init\(.*?\)', gui_init, l)
lines.append(l)
self.lines = lines
def update_defines(self, replacements, additions=[]):
"""
Replaces define statements in gui.rpy.
"""
replacements = dict(replacements)
for d in additions:
replacements[d.name] = d.value
seen = set()
lines = [ ]
for l in self.lines:
m = re.match('^(\s*)define (.*?) =', l)
if m:
indent = m.group(1)
variable = m.group(2)
if variable in replacements:
l = "{}define {} = {}".format(indent, variable, replacements[variable])
seen.add(variable)
lines.append(l)
for d in additions:
if d.name in seen:
continue
seen.add(d.name)
lines.append("")
if d.comment:
for s in textwrap.wrap(d.comment):
lines.append("## " + s)
lines.append("define {} = {}".format(d.name, d.value))
self.lines = lines
def update_gui_defines(self):
"""
Replaces define statements in gui.rpy.
"""
replacements = {
'gui.accent_color' : repr(self.p.accent_color.hexcode),
'gui.selected_color' : repr(self.p.selected_color.hexcode),
'gui.hover_color' : repr(self.p.hover_color.hexcode),
'gui.muted_color' : repr(self.p.muted_color.hexcode),
'gui.hover_muted_color' : repr(self.p.hover_muted_color.hexcode),
'gui.title_color' : repr(self.p.title_color.hexcode),
'gui.idle_color' : repr(self.p.idle_color.hexcode),
'gui.idle_small_color' : repr(self.p.idle_small_color.hexcode),
'gui.insensitive_color' : repr(self.p.insensitive_color.hexcode),
'gui.text_color' : repr(self.p.text_color.hexcode),
'gui.interface_text_color' : repr(self.p.text_color.hexcode),
'gui.choice_button_text_idle_color' : repr(self.p.idle_color.hexcode),
'gui.choice_button_text_insensitive_color' : repr(self.p.insensitive_color.hexcode),
}
self.update_defines(replacements, language_defines[self.p.language])
def update_options_defines(self):
"""
Replaces define statements in options.rpy.
"""
def quote(s):
s = s.replace("\\", "\\\\")
s = s.replace("\"", "\\\"")
return '"' + s + '"'
replacements = {
'config.name' : "_({})".format(quote(self.p.name)),
'build.name' : quote(self.p.simple_name),
'config.save_directory' : quote(self.p.savedir),
}
self.update_defines(replacements)
def write_target(self, filename):
target = os.path.join(self.p.prefix, filename)
if os.path.exists(target):
backup = 1
while True:
bfn = "{}.{}.bak".format(target, backup)
if not os.path.exists(bfn):
break
backup += 1
if not self.p.skip_backup:
os.rename(target, bfn)
with codecs.open(target, "w", "utf-8") as f:
f.write(u"\ufeff")
for l in self.lines:
f.write(l + "\r\n")
def translate_strings(self):
def replace(m):
s = eval(m.group(1))
s = renpy.translation.translate_string(s, language=self.p.language)
s = renpy.translation.quote_unicode(s)
quote = m.group(1)[0]
s = u"_({}{}{})".format(quote, s, quote)
return s
lines = [ ]
for l in self.lines:
l = re.sub(r'_\((\".*?\")\)', replace, l)
l = re.sub(r'_\((\'.*?\')\)', replace, l)
lines.append(l)
self.lines = lines
def translate_comments(self):
lines = [ ]
comment = [ ]
indent = ""
for l in self.lines:
m = re.match(r'^(\s*## )(.*)', l.rstrip())
if m:
indent = m.group(1)
c = m.group(2)
if comment:
c = c.strip()
comment.append(c)
else:
if comment:
s = "## " + ' '.join(comment)
if s.endswith("#"):
hashpad = True
s = s.rstrip('# ')
else:
hashpad = False
s = renpy.translation.translate_string(s, language=self.p.language)
m = re.match(r'## ?([ *]*)(.*)', s)
if m is None:
raise Exception("Comment translation doesn't start with '## ': {}".format(s))
prefix = m.group(1)
empty = ' ' * len(prefix)
rest = m.group(2)
len_prefix = len(indent) + len(prefix)
len_wrap = 80 - len_prefix
import store.gui
for i, s in enumerate(renpy.text.extras.textwrap(rest, len_wrap, store.gui.asian)):
if i == 0:
s = indent + prefix + s
else:
s = indent + empty + s
if hashpad and len(s) < 79:
s = s + ' ' + "#" * (79 - len(s))
lines.append(s)
comment = [ ]
lines.append(l)
self.lines = lines
def copy_files(self):
for src, dst in language_copies[self.p.language]:
src = os.path.join(renpy.config.renpy_base, src)
dst = os.path.join(self.p.prefix, dst)
if os.path.exists(dst):
continue
dstdir = os.path.dirname(dst)
if not os.path.exists(dstdir):
os.makedirs(dstdir, 0o777)
shutil.copy(src, dst)
def copy_script(self, name):
dst = os.path.join(self.p.prefix, name)
if os.path.exists(dst):
return
language = renpy.store._preferences.language # @UndefinedVariable
if language is None:
language = "None"
src = os.path.join(renpy.config.gamedir, "tl", language, name + "m")
if not os.path.exists(src):
src = os.path.join(self.p.template, name)
self.load_template(src)
self.remove_scale()
self.write_target(dst)
def add_code(self, fn):
if not self.p.replace_code:
return
self.lines.extend(language_code[self.p.language, fn])
def generate_gui(self, fn, defines=False):
if not self.p.update_code:
return
self.load_template(fn)
if defines:
self.update_gui_defines()
if self.p.replace_code:
self.remove_scale()
self.update_size()
self.translate_strings()
self.translate_comments()
self.add_code(fn)
self.write_target(fn)
def generate_code(self, fn):
target = os.path.join(self.p.prefix, fn)
if os.path.exists(target):
return
self.load_template(fn)
self.translate_strings()
self.translate_comments()
self.update_options_defines()
self.add_code(fn)
self.write_target(fn)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

-447
View File
@@ -1,447 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import pygame_sdl2
import os
from renpy.store import config
import renpy.display
class ImageGenerator(object):
def __init__(self, parameters):
pygame_sdl2.image.init()
self.p = p = parameters
self.width = p.width
self.height = p.height
self.scale = p.scale
self.accent_color = p.accent_color
self.boring_color = p.boring_color
self.hover_color = p.hover_color
self.muted_color = p.muted_color
self.hover_muted_color = p.hover_muted_color
self.menu_color = p.menu_color
self.prefix = os.path.join(p.prefix, "gui", "")
try:
os.mkdir(self.prefix, 0o777)
except Exception:
pass
self.full_width = self.width / self.scale
self.full_height = self.height / self.scale
self.overwrite = p.replace_images
def scale_int(self, n):
rv = int(n * self.scale)
if rv < 1:
rv = 1
return rv
def rescale_template(self, t):
rv = [ ]
for pos, opacity in t:
rv.append((pos * self.scale, opacity))
return rv
def generate_line(self, template):
size = int(max(i[0] for i in template))
rv = [ ]
right_pos, right_value = template[0]
for i in range(size):
if i == right_pos:
rv.append(right_value)
continue
while i >= right_pos:
left_pos = right_pos
left_value = right_value
right_pos, right_value = template.pop(0)
done = 1.0 * (i - left_pos) / (right_pos - left_pos)
rv.append(left_value + done * (right_value - left_value))
return rv
def crop_line(self, line, size):
"""
Crops the center `size` pixels out of `line`.
"""
if len(line) <= size:
return line
start = (len(line) - size) // 2
return line[start:start + size ]
def save(self, s, filename, overwrite=True):
fn = self.prefix + filename + ".png"
dn = os.path.dirname(fn)
try:
os.makedirs(dn, 0o777)
except Exception:
pass
if os.path.exists(fn):
if not overwrite:
return
if not self.overwrite:
return
index = 1
while True:
bfn = u"{}.{}.bak".format(fn, index)
if not os.path.exists(bfn):
break
index += 1
if not self.p.skip_backup:
os.rename(fn, bfn)
pygame_sdl2.image.save(s, fn, 3)
def make_surface(self, width, height):
return pygame_sdl2.Surface((width, height), pygame_sdl2.SRCALPHA)
def generate_image(self, filename, xtmpl, ytmpl, color=(0, 0, 0, 255)):
r, g, b, a = color
xtmpl = self.rescale_template(xtmpl)
ytmpl = self.rescale_template(ytmpl)
xline = self.generate_line(xtmpl)
yline = self.generate_line(ytmpl)
xline = self.crop_line(xline, self.width)
yline = self.crop_line(yline, self.height)
s = self.make_surface(len(xline), len(yline))
for x, xv in enumerate(xline):
for y, yv in enumerate(yline):
v = xv * yv
s.set_at((x, y), (r, g, b, int(a * v)))
self.save(s, filename)
def generate_textbox(self):
XSIZE = self.full_width
XINSIDE = (XSIZE - 744) // 2
YSIZE = 185
YBORDER = 5
X = [
(0, 0.0),
(XINSIDE, 1.0),
(XSIZE - XINSIDE, 1.0),
(XSIZE, 0.0),
]
Y = [
(0, 0.0),
(YBORDER, 1.0),
(YSIZE, 1.0),
]
self.generate_image("textbox", X, Y, self.boring_color.opacity(.8))
YSIZE = 240
YBORDER = 5
X = [ (0, 1.0), (self.full_width, 1.0) ]
Y = [
(0, 0.0),
(YBORDER, 1.0),
(YSIZE, 1.0),
]
self.generate_image("phone/textbox", X, Y, self.boring_color.opacity(.8))
width = self.scale_int(300)
height = self.scale_int(36)
s = self.make_surface(width, height)
self.save(s, "namebox")
def generate_nvl(self):
XSIZE = self.full_width
XINSIDE = (XSIZE - 800) // 2
YSIZE = self.full_height
X = [
(0, 0.0),
(XINSIDE, 1.0),
(XSIZE - XINSIDE, 1.0),
(XSIZE, 0.0),
]
Y = [
(0, 1.0),
(YSIZE, 1.0),
]
self.generate_image("nvl", X, Y, self.boring_color.opacity(.8))
X = [
(0, 1.0),
(XSIZE, 1.0),
]
Y = [
(0, 1.0),
(YSIZE, 1.0),
]
self.generate_image("phone/nvl", X, Y, self.boring_color.opacity(.8))
def generate_choice_button(self):
XSIZE = 790
XINSIDE = 100
YSIZE = 35
YBORDER = 3
X = [
(0, 0.0),
(XINSIDE, 1.0),
(XSIZE - XINSIDE, 1.0),
(XSIZE, 0.0),
]
Y = [
(0, 0.0),
(YBORDER, 1.0),
(YSIZE - YBORDER, 1.0),
(YSIZE, 0.0),
]
self.generate_image("button/choice_idle_background", X, Y, self.boring_color.opacity(.8))
self.generate_image("button/choice_hover_background", X, Y, self.accent_color.opacity(.95))
self.generate_image("phone/button/choice_idle_background", X, Y, self.boring_color.opacity(.8))
self.generate_image("phone/button/choice_hover_background", X, Y, self.accent_color.opacity(.95))
def generate_overlay(self):
width = self.scale_int(280)
phone_width = self.scale_int(340)
game_y = self.scale_int(120)
game_height = self.scale_int(570)
line_width = self.scale_int(3)
if self.p.light:
opacity = 0.9
else:
opacity = 0.8
# Main menu.
mm = self.make_surface(self.width, self.height)
mm.subsurface((0, 0, width, self.height)).fill(self.boring_color.opacity(opacity))
mm.subsurface((width - line_width, 0, line_width, self.height)).fill(self.accent_color)
self.save(mm, "overlay/main_menu")
mm = self.make_surface(self.width, self.height)
mm.subsurface((0, 0, phone_width, self.height)).fill(self.boring_color.opacity(opacity))
mm.subsurface((phone_width - line_width, 0, line_width, self.height)).fill(self.accent_color)
self.save(mm, "phone/overlay/main_menu")
# Game menu.
gm = self.make_surface(self.width, self.height)
gm.fill(self.boring_color.opacity(opacity))
gm.subsurface((width - line_width, game_y, line_width, game_height)).fill(self.accent_color)
self.save(gm, "overlay/game_menu")
gm = self.make_surface(self.width, self.height)
gm.fill(self.boring_color.opacity(opacity))
gm.subsurface((phone_width - line_width, game_y, line_width, game_height)).fill(self.accent_color)
self.save(gm, "phone/overlay/game_menu")
# Confirm.
gm = self.make_surface(self.width, self.height)
gm.fill(self.boring_color.opacity(.6))
self.save(gm, "overlay/confirm")
def generate_frame(self):
width = self.scale_int(600)
height = self.scale_int(250)
border = self.scale_int(3)
s = self.make_surface(width, height)
s.fill(self.accent_color)
s.subsurface((border, border, width - 2 * border, height - 2 * border)).fill(self.boring_color)
self.save(s, "frame")
def generate_quick_buttons(self):
width = self.scale_int(100)
height = self.scale_int(30)
s = self.make_surface(width, height)
self.save(s, "button/quick_idle_background")
self.save(s, "button/quick_hover_background")
def generate_skip(self):
XSIZE = 240
XRIGHT = 50
YSIZE = 43
X = [
(0, 1.0),
(XSIZE - XRIGHT, 1.0),
(XSIZE, 0.0),
]
Y = [
(0, 1.0),
(YSIZE, 1.0),
]
self.generate_image("skip", X, Y, self.boring_color.opacity(.8))
def generate_notify(self):
XSIZE = 922
XRIGHT = 50
YSIZE = 43
X = [
(0, 1.0),
(XSIZE - XRIGHT, 1.0),
(XSIZE, 0.0),
]
Y = [
(0, 1.0),
(YSIZE, 1.0),
]
self.generate_image("notify", X, Y, self.boring_color.opacity(.8))
def generate_icon(self):
icon_fn = os.path.join(config.renpy_base, "launcher", "game", "gui7", "icon.png")
icon = pygame_sdl2.image.load(icon_fn)
width, height = icon.get_size()
surf = pygame_sdl2.Surface((width, height), pygame_sdl2.SRCALPHA)
ro, go, bo, _ao = tuple(self.accent_color)
ro -= 23
go -= 23
bo -= 23
for y in range(height):
for x in range(width):
r, g, b, a = icon.get_at((x, y))
r = max(0, min(r + ro, 255))
g = max(0, min(g + go, 255))
b = max(0, min(b + bo, 255))
surf.set_at((x, y), (r, g, b, a))
self.save(surf, "window_icon", overwrite=False)
def generate_menus(self):
s = self.make_surface(self.width, self.height)
s.fill(self.menu_color)
self.save(s, "main_menu", overwrite=False)
self.save(s, "game_menu", overwrite=False)
def generate_bubble(self):
import shutil
for fn in [ "bubble.png", "thoughtbubble.png" ]:
source = os.path.join(config.renpy_base, "gui", "game", "gui", fn)
dest = os.path.join(self.prefix, fn)
if source == dest:
return
shutil.copyfile(source, dest)
def generate_all(self):
self.generate_textbox()
self.generate_choice_button()
self.generate_overlay()
self.generate_frame()
self.generate_nvl()
self.generate_quick_buttons()
self.generate_skip()
self.generate_notify()
self.generate_menus()
self.generate_icon()
self.generate_bubble()
if __name__ == "__main__":
import argparse
ap = argparse.ArgumentParser()
ap.add_argument("prefix")
ap.add_argument("width", type=int)
ap.add_argument("height", type=int)
args = ap.parse_args()
ImageGenerator(args.prefix, args.width, args.height).generate_all()
-109
View File
@@ -1,109 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from renpy.store import Color
import time
# The target width used in templates.
WIDTH = 1280
HEIGHT = 720
class GuiParameters(object):
"""
This represents the parameters to the gui. This is used to initialize
the ImageGenerator and CodeGenerator objects to a consistent set of
parameters.
"""
def __init__(self, prefix, template, width, height, accent, boring, light, language, replace_images, replace_code, update_code, name=None):
self.prefix = prefix
self.template = template
self.width = width
self.height = height
self.scale = min(1.0 * width / WIDTH, 1.0 * height / HEIGHT)
self.accent_color = Color(accent)
self.boring_color = Color(boring)
# tint = n * color + (1-n) * white
# shade = n * color + (1-n) * black
self.light = light
if light:
self.hover_color = self.accent_color # .tint(.95)
self.muted_color = self.accent_color.tint(.6)
self.hover_muted_color = self.accent_color.tint(.4)
else:
self.hover_color = self.accent_color.tint(.6)
self.muted_color = self.accent_color.shade(.4)
self.hover_muted_color = self.accent_color.shade(.6)
self.menu_color = self.accent_color.replace_hsv_saturation(.25).replace_value(.5)
self.title_color = self.accent_color.replace_hsv_saturation(.5).replace_value(1.0)
if light:
self.selected_color = Color("#555555")
self.idle_color = Color("#707070")
self.idle_small_color = Color("#606060")
self.text_color = Color("#404040")
self.choice_color = Color("#cccccc")
else:
self.selected_color = Color("#ffffff")
self.idle_color = Color("#888888")
self.idle_small_color = Color("#aaaaaa")
self.text_color = Color("#ffffff")
self.choice_color = Color("#cccccc")
self.insensitive_color = self.idle_color.replace_opacity(.5)
self.language = language
if replace_code:
update_code = True
self.replace_images = replace_images
self.replace_code = replace_code
self.update_code = update_code
self.skip_backup = False
name = name or ''
self.name = name
GOOD_CHARACTERS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"
simple_name = "".join(i for i in name if i in GOOD_CHARACTERS)
if not simple_name:
simple_name = "game"
self.simple_name = simple_name
self.savedir = self.simple_name + "-" + str(int(time.time()))
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

-205
View File
@@ -1,205 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
init python:
import fnmatch
import re
import zipfile
def install_from_zip(name, zipglob, patterns):
# Determine the filename matching the zipglob, and put it into filename.
filenames = [ i for i in os.listdir(config.renpy_base) if fnmatch.fnmatch(i.lower(), zipglob.lower()) ]
if not filenames:
interface.error(
_("Could not install [name!t], as a file matching [zipglob] was not found in the Ren'Py SDK directory."),
label="install",
name=name,
zipglob=zipglob,
)
filenames.sort(key=lambda a : a.lower())
filename = filenames[-1]
# The zipfile.
zf = zipfile.ZipFile(os.path.join(config.renpy_base, filename))
for fn in zf.namelist():
matchfn = fn.replace("\\", "/")
dstfn = None
renpy.write_log(fn)
for src, dst in patterns:
if re.match(src, matchfn):
dstfn = re.sub(src, dst, matchfn)
break
if not dstfn:
continue
dstfn = os.path.join(config.renpy_base, dstfn)
if not os.path.exists(os.path.dirname(dstfn)):
try:
os.makedirs(os.path.dirname(dstfn))
except Exception:
pass
renpy.write_log(fn + " -> " + dstfn)
data = zf.read(fn)
with open(dstfn, "wb") as f:
f.write(data)
try:
os.chmod(dstfn, 0o755)
except Exception:
pass
interface.info(_("Successfully installed [name!t]."), name=name)
label install_live2d:
python hide:
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"),
(r".*/Core/dll/windows/x86_64/(Live2DCubismCore.dll)", _prefix + r"windows-x86_64/\1"),
(r".*/Core/dll/macos/(libLive2DCubismCore.dylib)", _prefix + r"mac-universal/\1"),
(r".*/Core/dll/experimental/rpi/(libLive2DCubismCore.so)", _prefix + r"linux-armv7l/\1"),
(r".*/Core/dll/android/(armeabi-v7a/libLive2DCubismCore.so)", r"rapt/prototype/renpyandroid/src/main/jniLibs/\1"),
(r".*/Core/dll/android/(arm64-v8a/libLive2DCubismCore.so)", r"rapt/prototype/renpyandroid/src/main/jniLibs/\1"),
(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-4-*.zip", patterns)
jump front_page
screen install_preferences():
frame:
style "l_indent"
has vbox
text _("This screen allows you to install libraries that can't be distributed with Ren'Py. Some of these libraries may require you to agree to a third-party license before being used or distributed.")
add SPACER
if not achievement.has_steam:
textbutton _("Install Steam Support"):
action Jump("install_steam")
add HALF_SPACER
frame:
style "l_indent"
has vbox
text _("Before installing Steam support, please make sure you are a {a=https://partner.steamgames.com/}Steam partner{/a}.")
else:
textbutton _("Install Steam Support")
add HALF_SPACER
frame:
style "l_indent"
has vbox
text _("Steam support has already been installed.")
add SPACER
textbutton _("Install Live2D Cubism SDK for Native"):
action Jump("prompt_live2d")
screen install_live2d():
frame:
style_group "l"
style "l_root"
window:
has vbox
label _("Install Libraries")
add HALF_SPACER
hbox:
frame:
style "l_indent"
xfill True
viewport:
scrollbars "vertical"
mousewheel True
has vbox
add SPACER
textbutton _("Install Live2D Cubism SDK for Native"):
action Jump("install_live2d")
add HALF_SPACER
frame:
style "l_indent"
has vbox
text _("The {a=https://www.live2d.com/en/download/cubism-sdk/download-native/}Cubism SDK for Native{/a} adds support for displaying Live2D models. Place CubismSdkForNative-4-{i}version{/i}.zip in the Ren'Py SDK directory, and then click Install. Distributing a game with Live2D requires you to accept a license from Live2D, Inc.")
add SPACER
text _("Live2D in Ren'Py doesn't support the Web, Android x86_64 (including emulators and Chrome OS), and must be added to iOS projects manually. Live2D must be reinstalled after upgrading Ren'Py or installing Android support.")
textbutton _("Cancel") action Return(False) style "l_left_button"
textbutton _("Open Ren'Py SDK Directory") action OpenDirectory(config.renpy_base, absolute=True) style "l_right_button"
timer 2.0 action renpy.restart_interaction repeat True
label prompt_live2d:
call screen install_live2d
jump preferences
label install_steam:
$ add_dlc("steam", restart=True)
jump install
-499
View File
@@ -1,499 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import hashlib
import os
import time
import requests
import zipfile
import tarfile
import shutil
import subprocess
import renpy
import stat
VERSION = 1
# True if the installer should run in quiet mode.
quiet = False
from store import _, config, interface, project, Jump # type: ignore
temp_exists = False
def _ensure_temp():
"""
Ensures that the directories needed by the extension API are present.
"""
global temp_exists
if temp_exists:
return
backups = os.path.join(config.renpy_base, "tmp", "installer", "backups")
try:
if not os.path.exists(backups):
os.makedirs(os.path.dirname(backups))
except Exception:
pass
temp_exists = True
# The target directory that the extensions API operates on.
target = None
def set_target(directory):
"""
This sets the directory that the extension API targets. This is where
packages are unpacked to and the default working directory where the
programs are run.
"""
global target
target = directory
_clean("temp:", 3)
def _path(filename):
"""
Returns the full path to `filename`. If `filename` starts with the
prefix temp:, it's placed in the temp directory. If the filename
starts with backup, a backup filename is returned. Otherwise,
the path is interpreted relative to the target directory.
"""
_ensure_temp()
tempdir = os.path.join(config.renpy_base, "tmp", "installer")
backups = os.path.join(config.renpy_base, "tmp", "installer", "backups")
prefix, _, rest = filename.partition(":")
if prefix == "temp":
return os.path.join(tempdir, rest)
if prefix == "backup":
base = os.path.basename(rest.rpartition(":")[2])
return os.path.join(backups, base + "." + str(time.time()))
if prefix == "renpy":
return os.path.join(config.renpy_base, rest)
if target is None:
raise Exception("The target directory has not been set.")
return os.path.join(target, filename)
def _clean(directory, age=3):
"""
Removes files from `directory` that are older than `age` days.
"""
directory = _path(directory)
for root, dirs, files in os.walk(directory, topdown=False):
for f in files:
filename = os.path.join(root, f)
mtime = os.stat(filename).st_mtime
if time.time() - mtime > age * 86400:
try:
os.unlink(filename)
except Exception:
pass
if root != directory:
try:
os.rmdir(root)
except Exception:
pass
def _friendly(filename):
"""
Returns a version of the filename without any leading prefix.
"""
return filename.rpartition(":")[2]
def _check_hash(filename, hashj):
"""
Returns a cryptographic hash of `filename`. `filename` should
be a full path, one returned by temp or path.
"""
try:
sha = hashlib.sha256()
with open(filename, "rb") as f:
while True:
data = f.read(1024 * 1024)
if not data:
break
sha.update(data)
return sha.hexdigest() == hash
except Exception:
return False
# The name and url of the file that is currently being downloaded. This is meant to
# to be used by the interface screens to show the user what files are being
# downloaded.
download_file = ""
download_url = ""
def download(url, filename, hash=None):
"""
Downloads `url` to `filename`, a tempfile.
"""
global download_url
global download_file
download_url = url
download_file = _friendly(filename)
filename = _path(filename)
if hash is not None:
if _check_hash(filename, hash):
return
progress_time = time.time()
try:
response = requests.get(url, stream=True)
response.raise_for_status()
total_size = int(response.headers.get('content-length', 1))
downloaded = 0
with open(filename, "wb") as f:
for i in response.iter_content(65536):
f.write(i)
downloaded += len(i)
if time.time() - progress_time > 0.1:
progress_time = time.time()
if not quiet:
interface.processing(
_("Downloading [installer.download_file]..."),
complete=downloaded, total=total_size)
except requests.HTTPError as e:
if not quiet:
raise
interface.error(_("Could not download [installer.download_file] from [installer.download_url]:\n{b}[installer.download_error]"))
if hash is not None:
if not quiet:
raise Exception("Hash check failed.")
if not _check_hash(filename, hash):
interface.error(_("The downloaded file [installer.download_file] from [installer.download_url] is not correct."))
class _FixedZipFile(zipfile.ZipFile):
"""
A patched version of zipfile.ZipFile that adds support for:
* Unix permissions bits.
* Unix symbolic links.
"""
def _extract_member(self, member, targetpath, pwd):
if not isinstance(member, zipfile.ZipInfo):
member = self.getinfo(member)
# build the destination pathname, replacing
# forward slashes to platform specific separators.
arcname = member.filename.replace('/', os.path.sep)
if os.path.altsep:
arcname = arcname.replace(os.path.altsep, os.path.sep)
# interpret absolute pathname as relative, remove drive letter or
# UNC path, redundant separators, "." and ".." components.
arcname = os.path.splitdrive(arcname)[1]
invalid_path_parts = ('', os.path.curdir, os.path.pardir)
arcname = os.path.sep.join(x for x in arcname.split(os.path.sep) if x not in invalid_path_parts)
targetpath = os.path.join(targetpath, arcname)
targetpath = os.path.normpath(targetpath)
# Create all upper directories if necessary.
upperdirs = os.path.dirname(targetpath)
if upperdirs and not os.path.exists(upperdirs):
os.makedirs(upperdirs)
if member.filename.endswith("/"):
if not os.path.isdir(targetpath):
os.mkdir(targetpath)
return targetpath
attr = member.external_attr >> 16
if stat.S_ISLNK(attr):
with self.open(member, pwd=pwd) as source:
linkto = source.read()
os.symlink(linkto, targetpath)
else:
with self.open(member, pwd=pwd) as source, open(targetpath, "wb") as target:
shutil.copyfileobj(source, target)
if attr:
os.chmod(targetpath, attr)
return targetpath
# The name of the archive being unpacked.
unpack_archive = ""
def unpack(archive, destination):
"""
Unpacks `archive` to `destination`. `archive` should be the name of
a zip or (perhaps compressed) tar file. `destination` should be a
directory that the contents are unpacked into.
"""
global unpack_archive
unpack_archive = _friendly(archive)
if not quiet:
interface.processing(_("Unpacking [installer.unpack_archive]..."))
archive = _path(archive)
destination = _path(destination)
if not os.path.exists(destination):
os.makedirs(destination)
old_cwd = os.getcwd()
try:
os.chdir(destination)
if tarfile.is_tarfile(archive):
tar = tarfile.open(archive)
tar.extractall(".")
tar.close()
elif zipfile.is_zipfile(archive):
zip = _FixedZipFile(archive)
zip.extractall(".")
zip.close()
else:
raise Exception("Unknown file type.")
finally:
os.chdir(old_cwd)
def exists(filename):
"""
Returns true if `filename` exists.
"""
return os.path.exists(_path(filename))
def remove(filename):
"""
Removes a file or directory from the target directory, backing it up
the temporary directory.
"""
if not exists(filename):
return
backup = _path("backup:" + filename)
shutil.move(_path(filename), backup)
# Now, touch everything so _cleanup doesn't get it too quickly.
if os.path.isdir(backup):
for root, dirs, files in os.walk(backup):
for f in files:
try:
os.utime(os.path.join(root, f), None)
except Exception:
pass
else:
try:
os.utime(backup, None)
except Exception:
pass
def move(old_filename, new_filename):
"""
Moves a filename from `old_filename` to `new_filename`.
"""
remove(new_filename)
shutil.move(_path(old_filename), _path(new_filename))
def mkdir(dirname):
"""
Makes the named directory.
"""
if not os.path.exists(_path(dirname)):
os.makedirs(_path(dirname))
def info(message, **kwargs):
"""
Displays `message` to the user, asking them to click through or
cancel.
"""
interface.info(message, cancel=Jump("front_page"), **kwargs)
def processing(message, **kwargs):
"""
Displays `message` to the user, without waiting.
"""
interface.processing(message, **kwargs)
def error(message, **kwargs):
"""
Displays `message` to the user, as an error.
"""
interface.error(message)
install_args = [ ]
install_error = ""
def run(*args, **kwargs):
"""
Runs a program with the given arguments, in the target directory.
"""
environ = { renpy.exports.fsencode(k) : renpy.exports.fsencode(v) for k, v in os.environ.items() }
for k, v in kwargs.pop("environ", {}).items():
environ[renpy.exports.fsencode(k)] = renpy.exports.fsencode(v)
global install_args
global install_error
args = [ renpy.exports.fsencode(i) for i in args ]
try:
subprocess.check_call(args, cwd=target, env=environ) # type: ignore
except Exception as e:
install_args = args
install_error = str(e)
interface.error(_("Could not run [installer.install_args!r]:\n[installer.install_error]"))
_renpy = renpy
def manifest(url, renpy=False, insecure=False):
"""
Executes the manifest at `url`.
`renpy`
If true, the manifest applies to Ren'Py. If False, the manifest applies
to the current project.
`insecure`
If true, verificaiton is disabled.
"""
import ecdsa
download(url, "temp:manifest.py")
with open(_path("temp:manifest.py"), "rb") as f:
manifest = f.read()
if not insecure:
download(url + ".sig", "temp:manifest.py.sig")
with open(_path("temp:manifest.py.sig"), "rb") as f:
sig = f.read()
key = ecdsa.VerifyingKey.from_pem(_renpy.exports.file("renpy_ecdsa_public.pem").read())
if not key.verify(sig, manifest):
error(_("The manifest signature is not valid."))
return
if renpy:
set_target(config.renpy_base)
else:
if project.current is None:
error(_("No project has been selected."))
return
set_target(project.current.path)
exec(manifest.decode("utf-8"), {}, {})
def local_manifest(filename, renpy=False):
"""
Executes the manifest in `filename`.
`renpy`
If true, the manifest applies to Ren'Py. If False, the manifest applies
to the current project.
"""
if renpy:
set_target(config.renpy_base)
else:
if project.current is None:
error(_("No project has been selected."))
return
set_target(project.current.path)
with open(filename, "r") as f:
exec(f.read(), {}, {})
-12
View File
@@ -1,12 +0,0 @@
# This file imports the extensions API into the default store, and makes it
# also contains the strings used by the extensions API, so the Ren'Py translation
# framework can find them.
init python:
import installer
init python hide:
_("Downloading [extension.download_file].")
_("Could not download [extension.download_file] from [extension.download_url]:\n{b}[extension.download_error]")
_("The downloaded file [extension.download_file] from [extension.download_url] is not correct.")
+27 -117
View File
@@ -1,34 +1,17 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
################################################################################
# Interface actions.
init python in interface:
from store import OpenURL, config, Return, _preferences
from store import OpenURL, config, Return
import store
import os.path
import contextlib
RENPY_URL = "http://www.renpy.org"
RENPY_GAMES_URL = "http://games.renpy.org"
DOC_PATH = os.path.join(config.renpy_base, "doc/index.html")
DOC_URL = "http://www.renpy.org/doc/html/"
@@ -65,15 +48,6 @@ init python in interface:
else:
return OpenURL(LICENSE_URL)
def get_sponsor_url():
"""
Returns the URL to the sponsors page.
"""
return "https://www.renpy.org/sponsors.html?version={}&language={}".format(
renpy.version_only,
_preferences.language or "english"
)
# Should we display the bottom links?
links = True
@@ -88,10 +62,6 @@ init python in interface:
finally:
links = True
# Version.
import re
version = re.sub(r'\.\d+(\w*)$', r'\1', renpy.version())
# This displays the bottom of the screen. If the tooltip is not None, this displays the
# tooltip. Otherwise, it displays a list of links (to various websites, and to the
# preferences and update screen), or is just blank.
@@ -111,9 +81,6 @@ screen bottom_info:
ypos 536
yanchor 0.0
has vbox:
spacing 20
hbox:
xfill True
@@ -121,35 +88,19 @@ screen bottom_info:
spacing INDENT
textbutton _("Documentation") style "l_link" action interface.OpenDocumentation()
textbutton _("Ren'Py Website") style "l_link" action OpenURL(interface.RENPY_URL)
textbutton _("[interface.version]") style "l_link" action Jump("about")
textbutton _("Ren'Py Games List") style "l_link" action OpenURL(interface.RENPY_GAMES_URL)
textbutton _("About") style "l_link" action Jump("about")
hbox:
spacing INDENT
xalign 1.0
if ability.can_update:
textbutton _("update") action Jump("update") style "l_link":
if persistent.has_update:
text_color "#F96854"
text_hover_color Color("#F96854").tint(.8)
textbutton _("update") action Jump("update") style "l_link"
textbutton _("preferences") style "l_link" action Jump("preferences")
textbutton _("quit") style "l_link" action Quit(confirm=False)
if persistent.sponsor_message:
textbutton _("Ren'Py Sponsor Information"):
style "l_link"
text_color "#F96854"
text_hover_color Color("#F96854").tint(.8)
xalign 0.0
yalign 1.0
yoffset -10
action OpenURL(interface.get_sponsor_url())
screen common:
@@ -170,7 +121,7 @@ screen common:
has vbox
text message:
textalign 0.5
text_align 0.5
xalign 0.5
layout "subtitle"
@@ -200,15 +151,7 @@ screen common:
add SPACER
for v, l in choices:
textbutton l:
action SetScreenVariable("selected", v)
selected_background REVERSE_IDLE
selected_hover_background REVERSE_HOVER
xpadding 20
size_group "choice"
text_selected_idle_color REVERSE_TEXT
text_selected_hover_color REVERSE_TEXT
text_xalign 0.5
textbutton l action SetScreenVariable("selected", v)
if selected is not None:
$ continue_ = Return(selected)
@@ -219,7 +162,7 @@ screen common:
add SPACER
text submessage:
textalign 0.5
text_align 0.5
xalign 0.5
layout "subtitle"
@@ -236,19 +179,16 @@ screen common:
label title text_color title_color style "l_info_label"
if back:
textbutton _("Return") action back style "l_left_button"
textbutton _("Back") action back style "l_left_button"
elif cancel:
textbutton _("Cancel") action cancel style "l_left_button"
if continue_:
textbutton _("Continue") action continue_ style "l_right_button"
key "input_enter" action continue_
screen launcher_input:
default value = default
frame:
style "l_root"
@@ -258,19 +198,13 @@ screen launcher_input:
has vbox
text message:
textalign 0.5
text_align 0.5
xalign 0.5
layout "subtitle"
add SPACER
input style "l_default":
value ScreenVariableInputValue("value", returnable=True)
size 24
xalign 0.5
color INPUT_COLOR
allow allow
copypaste True
input style "l_default" size 24 xalign 0.5 default default color INPUT_COLOR
if filename:
add SPACER
@@ -281,14 +215,10 @@ screen launcher_input:
if cancel:
textbutton _("Cancel") action cancel style "l_left_button"
textbutton _("Continue") action Return(value) style "l_right_button"
init python in interface:
import traceback
from store import Jump
import store._errorhandling as _errorhandling
def common(title, title_color, message, submessage=None, back=None, continue_=None, pause0=False, show_screen=False, **kwargs):
"""
@@ -373,13 +303,6 @@ init python in interface:
common(_("ERROR"), store.ERROR_COLOR, message=message, submessage=submessage, back=action, **kwargs)
store._ignore_action = Jump("front_page")
_errorhandling.rollback = False
_errorhandling.ignore = True
_errorhandling.reload = False
_errorhandling.console = False
@contextlib.contextmanager
def error_handling(what, label="front_page"):
"""
@@ -395,28 +318,24 @@ init python in interface:
As an example of usage::
with interface.error_handling(_("opening the log file")):
with interface.error_handling("opening the log file"):
f = open("log.txt", "w")
"""
try:
yield
except Exception as e:
renpy.renpy.error.report_exception(e, editor=False)
except Exception, e:
import traceback
traceback.print_exc()
error(_("While [what!qt], an error occured:"),
error(_("While [what!q], an error occured:"),
_("[exception!q]"),
what=what,
label=label,
exception=traceback.format_exception_only(type(e), e)[-1][:-1])
import string
DIGITS_LETTERS = string.digits
PROJECT_LETTERS = string.digits + string.ascii_letters + " _"
FILENAME_LETTERS = PROJECT_LETTERS + "\\/"
TRANSLATE_LETTERS = string.ascii_letters + string.digits + "_"
def input(title, message, filename=False, sanitize=True, cancel=None, allow=None, default=""):
def input(title, message, filename=False, sanitize=True, cancel=None, default=""):
"""
Requests typewritten input from the user.
"""
@@ -425,15 +344,7 @@ init python in interface:
while True:
rv = renpy.call_screen(
"launcher_input",
title=title,
message=message,
filename=filename or (allow in [PROJECT_LETTERS, FILENAME_LETTERS]),
allow=allow,
cancel=cancel,
default=rv
)
rv = renpy.call_screen("launcher_input", title=title, message=message, filename=filename, cancel=cancel, default=rv)
if sanitize:
if ("[" in rv) or ("{" in rv):
@@ -447,7 +358,7 @@ init python in interface:
try:
rv.encode("ascii")
except Exception:
except:
error(_("File and directory names must consist of ASCII characters."), label=None)
continue
@@ -474,7 +385,7 @@ init python in interface:
common(_("INFORMATION"), store.INFO_COLOR, message, submessage, pause0=True, **kwargs)
def interaction(title, message, submessage=None, pause=0, **kwargs):
def interaction(title, message, submessage=None, **kwargs):
"""
Put up on the screen while an interaction with an external program occurs.
This shows the message, then immediately returns.
@@ -487,13 +398,9 @@ init python in interface:
`submessage`
An optional sub message.
`pause`
The amount of time to pause for after showing the message.
"""
common(title, store.INTERACTION_COLOR, message, submessage=submessage, pause=pause, show_screen=True, **kwargs)
renpy.pause(pause)
common(title, store.INTERACTION_COLOR, message, submessage, pause0=True, **kwargs)
def processing(message, submessage=None, complete=None, total=None, **kwargs):
"""
@@ -547,3 +454,6 @@ init python in interface:
"""
return common(_("CHOICE"), store.QUESTION_COLOR, message, choices=choices, selected=selected, **kwargs)
-457
View File
@@ -1,457 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
init python:
IOS_NO_RENIOS = 0
IOS_NO_DIRECTORY = 1
IOS_NO_PROJECT = 2
IOS_OK = 3
IOS_NO_RENIOS_TEXT = _("To build iOS packages, please download renios, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher.")
IOS_NO_DIRECTORY_TEXT = _("The directory in where Xcode projects will be placed has not been selected. Choose 'Select Directory' to select it.")
IOS_NO_PROJECT_TEXT = _("There is no Xcode project corresponding to the current Ren'Py project. Choose 'Create Xcode Project' to create one.")
IOS_OK_TEXT = _("An Xcode project exists. Choose 'Update Xcode Project' to update it with the latest game files, or use Xcode to build and install it.")
IPHONE_TEXT = _("Attempts to emulate an iPhone.\n\nTouch input is emulated through the mouse, but only when the button is held down.")
IPAD_TEXT = _("Attempts to emulate an iPad.\n\nTouch input is emulated through the mouse, but only when the button is held down.")
IOS_SELECT_DIRECTORY_TEXT = _("Selects the directory where Xcode projects will be placed.")
IOS_CREATE_PROJECT_TEXT = _("Creates an Xcode project corresponding to the current Ren'Py project.")
IOS_UPDATE_PROJECT_TEXT = _("Updates the Xcode project with the latest game files. This must be done each time the Ren'Py project changes.")
IOS_XCODE_TEXT = _("Opens the Xcode project in Xcode.")
IOS_OPEN_DIRECTORY_TEXT = _("Opens the directory containing Xcode projects.")
def find_renios():
global RENIOS_PATH
candidates = [ ]
RENIOS_PATH = os.path.join(config.renpy_base, "renios")
if os.path.isdir(RENIOS_PATH) and check_hash_txt("renios"):
import sys
sys.path.insert(0, os.path.join(RENIOS_PATH, "buildlib"))
else:
RENIOS_PATH = None
find_renios()
if RENIOS_PATH:
import renios.create
import renios.image
def IOSState():
if not RENIOS_PATH:
return IOS_NO_RENIOS
elif not persistent.xcode_projects_directory:
return IOS_NO_DIRECTORY
elif not os.path.exists(xcode_project()):
return IOS_NO_PROJECT
else:
return IOS_OK
def IOSStateText(state):
if state == IOS_NO_RENIOS:
return IOS_NO_RENIOS_TEXT
elif state == IOS_NO_DIRECTORY:
return IOS_NO_DIRECTORY_TEXT
elif state == IOS_NO_PROJECT:
return IOS_NO_PROJECT_TEXT
else:
return IOS_OK_TEXT
def IOSIfState(state, needed, action):
"""
If `state` is `needed` or better, `action` is returned. Otherwise,
returns None, disabling the button.
"""
if state >= needed:
return action
else:
return None
xcode_name_cache = { }
def xcode_name(s):
"""
Returns a version of `s` that's safe to use in Xcode.
"""
if s in xcode_name_cache:
return xcode_name_cache[s]
s = re.sub(r'[^\w\-\.]', '', s)
xcode_name_cache[s] = s
return s
def xcode_project(p=None, target=None):
"""
Return the path to the Xcode project corresponding to `p`, or the current
project if `p` is None
"""
if target is not None:
return target
if p is None:
p = project.current
if persistent.xcode_projects_directory is None:
raise Exception("The Xcode projects directory has not been set.")
return os.path.join(persistent.xcode_projects_directory, xcode_name(p.name))
def ios_create(p=None, gui=True, target=None):
project.current.update_dump(force=True, gui=gui)
name = project.current.dump.get("name", None)
version = project.current.dump.get("version", None)
dest = xcode_project(p, target)
if gui:
iface = MobileInterface("ios")
else:
iface = rapt.interface.Interface()
if os.path.exists(dest):
if not iface.yesno(_("The Xcode project already exists. Would you like to rename the old project, and replace it with a new one?")):
return
i = 0
while True:
i += 1
backup = dest + "." + str(i)
if not os.path.exists(backup):
break
os.rename(dest, backup)
renios.create.create_project(iface, dest, name, version)
ios_populate(p, gui=gui, target=target)
def eliminate_pycache(directory):
"""
Eliminates the __pycache__ directory, and moves the files in it up a level,
renaming them to remove the cache tag.
"""
print("Eliminating __pycache__...")
if PY2:
return
import pathlib
import sys
paths = list(pathlib.Path(directory).glob("**/__pycache__/*.pyc"))
for p in paths:
name = p.stem.partition(".")[0]
p.rename(p.parent.parent / (name + ".pyc"))
paths = list(pathlib.Path(directory).glob("**/__pycache__"))
for p in paths:
p.rmdir()
def ios_populate(p=None, gui=True, target=None):
"""
This actually builds the package.
"""
import shutil
if p is None:
p = project.current
dist = os.path.join(xcode_project(p, target), "base")
if os.path.exists(dist):
shutil.rmtree(dist)
if gui:
reporter = distribute.GuiReporter()
else:
reporter = distribute.TextReporter()
distribute.Distributor(p,
reporter=reporter,
packages=[ 'ios' ],
build_update=False,
noarchive=True,
packagedest=dist,
report_success=False,
)
eliminate_pycache(dist)
main_fn = os.path.join(dist, "main.py")
for fn in os.listdir(dist):
if fn.endswith(".py"):
py_fn = os.path.join(dist, fn)
break
else:
raise Exception("Could not find a .py file.")
with open(py_fn, "r") as py_f:
with open(main_fn, "w") as main_f:
for l in py_f:
if l.startswith("#!"):
continue
main_f.write(l)
os.unlink(py_fn)
ios_image(p, "ios-icon.png", "Media.xcassets/AppIcon.appiconset", True, target)
# ios_image(p, "ios-launchimage.png", "Media.xcassets/LaunchImage.launchimage", False, target)
def ios_image(p, source, destination, scale, target):
source = os.path.join(p.path, source)
destination = os.path.join(xcode_project(p, target), destination)
renios.image.generate(source, destination, scale)
def launch_xcode():
dist = xcode_project(None)
if not os.path.exists(dist):
return
for fn in os.listdir(dist):
if fn.endswith(".xcodeproj"):
xcodeproj = os.path.join(dist, fn)
subprocess.call([ 'open', renpy.fsencode(xcodeproj) ])
break
screen ios:
default tt = Tooltip(None)
$ state = IOSState()
frame:
style_group "l"
style "l_root"
window:
has vbox
label _("iOS: [project.current.display_name!q]")
add HALF_SPACER
hbox:
# Left side.
frame:
style "l_indent"
xmaximum ONEHALF
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Emulation:")
add HALF_SPACER
frame style "l_indent":
has hbox:
spacing 15
textbutton _("iPhone"):
action LaunchEmulator("ios-touch", "small phone touch ios mobile")
hovered tt.Action(IPHONE_TEXT)
textbutton _("iPad"):
action LaunchEmulator("ios-touch", "medium tablet touch ios mobile")
hovered tt.Action(IPAD_TEXT)
add SPACER
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Build:")
add HALF_SPACER
frame style "l_indent":
has vbox
textbutton _("Select Xcode Projects Directory"):
action IOSIfState(state, IOS_NO_DIRECTORY, Jump("select_xcode_projects_directory"))
hovered tt.Action(IOS_SELECT_DIRECTORY_TEXT)
textbutton _("Create Xcode Project"):
action IOSIfState(state, IOS_NO_PROJECT, Jump("create_xcode_project"))
hovered tt.Action(IOS_CREATE_PROJECT_TEXT)
textbutton _("Update Xcode Project"):
action IOSIfState(state, IOS_NO_PROJECT, Jump("update_xcode_project"))
hovered tt.Action(IOS_UPDATE_PROJECT_TEXT)
if renpy.macintosh:
textbutton _("Launch Xcode"):
action IOSIfState(state, IOS_OK, launch_xcode)
hovered tt.Action(IOS_XCODE_TEXT)
add SPACER
textbutton _("Force Recompile") action DataToggle("force_recompile") style "l_checkbox"
add SPACER
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Other:")
add HALF_SPACER
frame style "l_indent":
has vbox
textbutton _("Open Xcode Projects Directory"):
action IOSIfState(state, IOS_NO_PROJECT, OpenDirectory(persistent.xcode_projects_directory, absolute=True))
hovered tt.Action(IOS_OPEN_DIRECTORY_TEXT)
# Right side.
frame:
style "l_indent"
xmaximum ONEHALF
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
add SPACER
text _("There are known issues with the iOS simulator on Apple Silicon. Please test on x86_64 or iOS devices.")
add SPACER
if tt.value:
text tt.value
else:
text IOSStateText(state)
textbutton _("Return") action Jump("front_page") style "l_left_button"
label ios:
if RENIOS_PATH is None:
$ interface.yesno(_("Before packaging iOS apps, you'll need to download renios, Ren'Py's iOS support. Would you like to download renios now?"), no=Jump("front_page"))
$ add_dlc("renios", restart=True)
call screen ios
label select_xcode_projects_directory:
python hide:
interface.interaction(_("XCODE PROJECTS DIRECTORY"), _("Please choose the Xcode Projects Directory using the directory chooser.\n{b}The directory chooser may have opened behind this window.{/b}"))
path, is_default = choose_directory(persistent.xcode_projects_directory)
if is_default:
interface.info(_("Ren'Py has set the Xcode Projects Directory to:"), "[path!q]", path=path)
persistent.xcode_projects_directory = path
jump ios
label create_xcode_project:
$ ios_create(None, True)
jump ios
label update_xcode_project:
$ ios_populate(None, True)
jump ios
init python:
def ios_create_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("project", help="The path to the Ren'Py project.")
ap.add_argument("destination", help="The path the iOS project that will be created.")
args = ap.parse_args()
p = project.Project(args.project)
ios_create(p, False, args.destination)
return False
renpy.arguments.register_command("ios_create", ios_create_command)
def ios_populate_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("project", help="The path to the Ren'Py project.")
ap.add_argument("destination", help="The path the iOS project that will be created.")
args = ap.parse_args()
p = project.Project(args.project)
ios_populate(p, False, args.destination)
return False
renpy.arguments.register_command("ios_populate", ios_populate_command)
-150
View File
@@ -1,150 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
init python:
def find_itch_butler():
import requests
if renpy.windows:
platform = "windows-amd64"
exe = "butler.exe"
elif renpy.macintosh:
platform = "darwin-amd64"
exe = "butler"
else:
platform = "linux-amd64"
exe = "butler"
dn = os.path.join(config.renpy_base, "tmp", "butler-" + platform)
zip = os.path.join(dn, "butler.zip")
exe = os.path.join(dn, exe)
if os.path.exists(exe):
return exe
interface.processing(_("Downloading the itch.io butler."))
try:
os.makedirs(dn)
except Exception:
pass
with interface.error_handling(_("Downloading the itch.io butler.")):
url = "https://broth.itch.ovh/butler/{}/LATEST/archive/default".format(platform)
response = requests.get(url, headers={'User-Agent' : "Renpy"})
with open(zip, "wb") as f:
f.write(response.content)
import zipfile
with zipfile.ZipFile(zip) as zf:
zf.extractall(dn)
try:
os.chmod(exe, 0o755)
except Exception:
pass
return exe
label itch:
call build_update_dump
python hide:
butler = find_itch_butler()
build = project.current.dump["build"]
destination = build["destination"]
parent = os.path.dirname(project.current.path)
destination = os.path.join(parent, destination)
version = build["version"]
if not os.path.exists(destination):
interface.error(
_("The built distributions could not be found. Please choose 'Build' and try again."),
label="build_distributions"
)
# A list of full filename, channel tuples.
files = [ ]
for fn in os.listdir(destination):
for pattern, channel in reversed(build['itch_channels'].items()):
if fnmatch.fnmatch(fn, pattern):
break
else:
continue
fn = os.path.join(destination, fn)
files.append((fn, channel))
if not os.path.exists(destination):
interface.error(
_("No uploadable files were found. Please choose 'Build' and try again."),
label="build_distributions"
)
if not butler:
interface.error(
_("The butler program was not found."),
_("Please install the itch.io app, which includes butler, and try again."),
label="build_distributions"
)
itch_project = project.current.dump["build"].get("itch_project", None)
if itch_project is None or ("/" not in itch_project):
interface.error(
_("The name of the itch project has not been set."),
_("Please {a=https://itch.io/game/new}create your project{/a}, then add a line like \n{vspace=5}define build.itch_project = \"user-name/game-name\"\n{vspace=5} to options.rpy."),
label="build_distributions"
)
cc = ConsoleCommand()
for filename, channel in files:
cc.add(
butler,
"push",
filename,
itch_project + ":" + channel,
"--userversion",
build["version"],
)
cc.run()
jump build_distributions
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

-271
View File
@@ -1,271 +0,0 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# This file contains mobile build things that are shared by the android
# and iOS builds.
init -1 python:
def check_hash_txt(module):
fn1 = module + "_hash.txt"
fn2 = renpy.fsencode(os.path.join(config.renpy_base, module, "hash.txt"))
# No hash file? We're in dev mode - ignore.
if not renpy.loadable(fn1):
return True
hash1 = renpy.file(fn1).read().decode("utf-8")
if not os.path.exists(fn2):
return False
hash2 = open(fn2).read()
return hash1.strip() == hash2.strip()
class LaunchEmulator(Action):
def __init__(self, emulator, variants):
self.emulator = emulator
self.variants = variants
def __call__(self):
env = {
"RENPY_EMULATOR" : self.emulator,
"RENPY_VARIANT" : self.variants,
}
p = project.current
p.launch(env=env)
class MobileInterface(object):
"""
This is used to interface between the launcher and RAPT/RENIOS.
"""
def __init__(self, platform, edit=True, filename=None):
"""
`platform`
The name of the platform we're using for. Used for libraries,
cancel labels, and logfiles.
`edit`
If true, we launch the log file in the editor on failure.
"""
self.platform = platform
self.edit = edit
self.process = None
if filename is None:
filename = platform + ".txt"
self.filename = project.current.temp_filename(filename)
self.info_msg = ""
with open(self.filename, "w") as f:
f.write(renpy.version() + "\n")
pass
def log(self, msg):
with open(self.filename, "a") as f:
f.write("\n")
f.write(unicode(msg))
f.write("\n")
def info(self, prompt):
self.info_msg = prompt
interface.processing(prompt, pause=False)
self.log(prompt)
def open_directory(self, directory, prompt):
renpy.run(store.OpenDirectory(directory, absolute=True))
interface.info(prompt)
def yesno(self, prompt, submessage=None):
return interface.yesno(prompt, submessage=submessage)
def yesno_choice(self, prompt, default=None):
choices = [ (True, "Yes"), (False, "No") ]
return interface.choice(prompt, choices, default)
def terms(self, url, prompt):
submessage = _("{a=%s}%s{/a}") % (url, url)
if not interface.yesno(prompt, submessage=submessage):
self.fail("You must accept the terms and conditions to proceed.", edit=False)
def input(self, prompt, empty=None):
if empty is None:
empty = ''
while True:
rv = interface.input(_("QUESTION"), prompt, default=empty, cancel=Jump("android"))
rv = rv.strip()
if rv:
return rv
def choice(self, prompt, choices, default):
return interface.choice(prompt, choices, default, cancel=Jump("android"))
def fail(self, prompt, edit=True):
self.log(prompt)
prompt = re.sub(r'(http://\S+)', r'{a=\1}\1{/a}', prompt)
# Open android.txt in the editor.
if edit and self.edit:
self.open_editor()
interface.error(prompt, label="android")
def open_editor(self):
editor.EditAbsolute(self.filename)()
def success(self, prompt):
self.log(prompt)
interface.info(prompt, pause=False)
def final_success(self, prompt):
self.log(prompt)
interface.info(prompt, label="android")
def run_yes_thread(self):
import time
try:
while self.run_yes:
self.process.stdin.write(b'y\n')
self.process.stdin.flush()
time.sleep(.2)
except Exception:
pass
def call(self, cmd, cancel=False, use_path=False, yes=False):
renpy.not_infinite_loop(30)
cmd = [ renpy.fsencode(i) for i in cmd ]
self.cmd = cmd
f = open(self.filename, "a")
f.write("\n\n\n")
if cancel:
cancel_action = self.cancel
else:
cancel_action = None
startupinfo = None
if renpy.windows:
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
self.yes_thread = None
try:
interface.processing(self.info_msg, show_screen=True, cancel=cancel_action)
kwargs = { }
try:
self.process = subprocess.Popen(cmd, cwd=renpy.fsencode(RAPT_PATH), stdout=f, stderr=f, stdin=subprocess.PIPE, startupinfo=startupinfo, **kwargs)
# avoid SIGTTIN caused by e.g. gradle doing empty read on terminal stdin
if not yes:
self.process.stdin.close()
except Exception:
import traceback
traceback.print_exc(file=f)
raise
if yes:
import threading
self.run_yes = True
self.yes_thread = threading.Thread(target=self.run_yes_thread)
self.yes_thread.daemon = True
self.yes_thread.start()
renpy.call_screen("android_process", interface=self)
finally:
f.close()
interface.hide_screen()
if yes and self.yes_thread:
self.run_yes = False
self.yes_thread.join()
try:
self.process.stdin.close()
except Exception:
pass
self.process = None
self.yes_thread = None
def check_process(self):
rv = self.process.poll()
if rv is not None:
renpy.not_infinite_loop(30)
if rv:
raise subprocess.CalledProcessError(rv, self.cmd)
else:
return True
def download(self, url, dest):
try:
d = Downloader(url, dest)
cancel_action = [ d.cancel, Jump(self.platform) ]
interface.processing(self.info_msg, show_screen=True, cancel=cancel_action, bar_value=DownloaderValue(d))
ui.timer(.1, action=d.check, repeat=True)
ui.interact()
finally:
interface.hide_screen()
def background(self, f):
try:
t = threading.Thread(target=f)
t.start()
interface.processing(self.info_msg, show_screen=True)
while t.is_alive():
renpy.pause(0)
t.join(0.25)
finally:
interface.hide_screen()
def cancel(self):
if self.process:
self.process.terminate()
renpy.jump(self.platform)
+6 -25
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python in navigation:
import store.interface as interface
@@ -165,8 +147,7 @@ screen navigation:
frame style "l_label":
has hbox xfill True
text _("Navigate: [project.current.display_name!q]") style "l_label_text"
alt _("Navigate Script")
text _("Navigate: [project.current.name]") style "l_label_text"
frame:
style "l_alternate"
@@ -193,7 +174,6 @@ screen navigation:
hbox:
spacing HALF_INDENT
text _("Category:")
alt ""
textbutton _("files") action navigation.ChangeKind("file")
textbutton _("labels") action navigation.ChangeKind("label")
@@ -249,7 +229,7 @@ screen navigation:
if persistent.navigation == "todo":
text _("No TODO comments found.\n\nTo create one, include \"# TODO\" in your script."):
textalign 0.5
text_align 0.5
xalign 0.5
yalign 0.5
@@ -259,7 +239,7 @@ screen navigation:
xalign 0.5
yalign 0.5
textbutton _("Return") action Jump("front_page") style "l_left_button"
textbutton _("Back") action Jump("front_page") style "l_left_button"
textbutton _("Launch Project") action project.Launch() style "l_right_button"
label navigation:
@@ -279,3 +259,4 @@ label navigation_loop:
label navigation_refresh:
$ project.current.update_dump(True)
jump navigation_loop
+30 -119
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python:
import shutil
@@ -25,96 +7,9 @@ init python:
import time
import re
def check_language_support():
language = _preferences.language
new = False
legacy = False
# Check for a translation of the words "New GUI Interface".
if (language is None) or (__("New GUI Interface") != "New GUI Interface"):
new = True
try:
if (language is None) or os.path.exists(os.path.join(config.renpy_base, "templates", language)):
legacy = True
except Exception:
pass
if new and legacy:
store.language_support = _("Both interfaces have been translated to your language.")
elif new:
store.language_support = _("Only the new GUI has been translated to your language.")
elif legacy:
store.language_support = _("Only the legacy theme interface has been translated to your language.")
else:
store.language_support = _("Neither interface has been translated to your language.")
label new_project:
if persistent.projects_directory is None:
call choose_projects_directory
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:
if persistent.legacy:
check_language_support()
gui_kind = interface.choice(
_("Which interface would you like to use? The new GUI has a modern look, supports wide screens and mobile devices, and is easier to customize. Legacy themes might be necessary to work with older example code.\n\n[language_support!t]\n\nIf in doubt, choose the new GUI, then click Continue on the bottom-right."),
[ ( 'new_gui_project', _("New GUI Interface") ), ( 'new_theme_project', _("Legacy Theme Interface")) ],
"new_gui_project",
cancel=Jump("front_page"),
)
else:
new_project_language = __("{#language name and font}")
gui_kind = "new_gui_project"
# When translating this, feel free to replace [new_project_language] with the translation of your language.
interface.info(_("You will be creating an [new_project_language]{#this substitution may be localized} language project. Change the launcher language in preferences to create a project in another language."), cancel=Jump("front_page"))
python:
project_name = ""
while True:
project_name = interface.input(
_("PROJECT NAME"),
_("Please enter the name of your project:"),
allow=interface.PROJECT_LETTERS,
cancel=Jump("front_page"),
default=project_name,
)
project_name = project_name.strip()
if not project_name:
interface.error(_("The project name may not be empty."), label=None)
continue
project_dir = os.path.join(persistent.projects_directory, project_name)
if project.manager.get(project_name) is not None:
interface.error(_("[project_name!q] already exists. Please choose a different project name."), project_name=project_name, label=None)
continue
if os.path.exists(project_dir):
interface.error(_("[project_dir!q] already exists. Please choose a different project name."), project_dir=project_dir, label=None)
continue
break
jump expression gui_kind
screen select_template:
default result = project.manager.get("english")
default result = project.manager.get("template")
frame:
style_group "l"
@@ -145,13 +40,35 @@ screen select_template:
text _("Please select a template to use for your new project. The template sets the default font and the user interface language. If your language is not supported, choose 'english'.")
textbutton _("Return") action Jump("front_page") style "l_left_button"
textbutton _("Back") action Jump("front_page") style "l_left_button"
textbutton _("Continue") action Return(result) style "l_right_button"
label new_theme_project:
label new_project:
if persistent.projects_directory is None:
call choose_projects_directory
python hide:
project_name = interface.input(
_("PROJECT NAME"),
_("Please enter the name of your project:"),
filename=True,
cancel=Jump("front_page"))
project_name = project_name.strip()
if not project_name:
interface.error(_("The project name may not be empty."))
project_dir = os.path.join(persistent.projects_directory, project_name)
if project.manager.get(project_name) is not None:
interface.error(_("[project_name!q] already exists. Please choose a different project name."), project_name=project_name)
if os.path.exists(project_dir):
interface.error(_("[project_dir!q] already exists. Please choose a different project name."), project_dir=project_dir)
if len(project.manager.templates) == 1:
template = project.manager.templates[0]
else:
@@ -159,8 +76,8 @@ label new_theme_project:
template_path = template.path
with interface.error_handling(_("creating a new project")):
shutil.copytree(template_path, project_dir, symlinks=False)
with interface.error_handling("creating a new project"):
shutil.copytree(template_path, project_dir)
# Delete the tmp directory, if it exists.
if os.path.isdir(os.path.join(project_dir, "tmp")):
@@ -180,14 +97,8 @@ label new_theme_project:
with open(fn, "wb") as f:
f.write(options.encode("utf-8"))
font = template.data.get("font", None)
if font is not None:
src = os.path.join(config.gamedir, "fonts", font)
dst = os.path.join(project_dir, "game", "tl", "None", font)
shutil.copy(src, dst)
# Activate the project.
with interface.error_handling(_("activating the new project")):
with interface.error_handling("activating the new project"):
project.manager.scan()
project.Select(project.manager.get(project_name))()
+135 -287
View File
@@ -1,51 +1,30 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
# This file contains some of the options that can be changed to customize
# your Ren'Py game. It only contains the most common options... there
# is quite a bit more customization you can do.
#
# Lines beginning with two '#' marks are comments, and you shouldn't
# uncomment them. Lines beginning with a single '#' mark are
# commented-out code, and you may want to uncomment them when
# appropriate.
## This file contains some of the options that can be changed to customize
## your Ren'Py game. It only contains the most common options... there
## is quite a bit more customization you can do.
##
## Lines beginning with two '#' marks are comments, and you shouldn't
## uncomment them. Lines beginning with a single '#' mark are
## commented-out code, and you may want to uncomment them when
## appropriate.
init -1 python hide:
# Update the searchpath to find additional fonts.
config.searchpath.append(config.renpy_base + "/sdk-fonts")
# Should we enable the use of developer tools? This should be
# set to False before the game is released, so the user can't
# cheat using developer tools.
## Should we enable the use of developer tools? This should be
## set to False before the game is released, so the user can't
## cheat using developer tools.
config.developer = True
# These control the width and height of the screen.
## These control the width and height of the screen.
config.screen_width = 800
config.screen_height = 600
# This controls the title of the window, when Ren'Py is
# running in a window.
## This controls the title of the window, when Ren'Py is
## running in a window.
config.window_title = u"Ren'Py Launcher"
@@ -54,209 +33,187 @@ init -1 python hide:
config.name = "Ren'Py Launcher"
config.version = renpy.version().split()[1]
#####################
#########################################
# Themes
# We then want to call a theme function. themes.roundrect is
# a theme that features the use of rounded rectangles. It's
# the only theme we currently support.
#
# The theme function takes a number of parameters that can
# customize the color scheme.
## We then want to call a theme function. themes.roundrect is
## a theme that features the use of rounded rectangles. It's
## the only theme we currently support.
##
## The theme function takes a number of parameters that can
## customize the color scheme.
theme.roundrect(
# Theme: Roundrect
# Color scheme: Basic Blue
## Theme: Roundrect
## Color scheme: Basic Blue
# The color of an idle widget face.
## The color of an idle widget face.
widget = "#003c78",
# The color of a focused widget face.
## The color of a focused widget face.
widget_hover = "#0050a0",
# The color of the text in a widget.
## The color of the text in a widget.
widget_text = "#c8ffff",
# The color of the text in a selected widget. (For
# example, the current value of a preference.)
## The color of the text in a selected widget. (For
## example, the current value of a preference.)
widget_selected = "#ffffc8",
# The color of a disabled widget face.
## The color of a disabled widget face.
disabled = "#404040",
# The color of disabled widget text.
## The color of disabled widget text.
disabled_text = "#c8c8c8",
# The color of informational labels.
## The color of informational labels.
label = "#ffffff",
# The color of a frame containing widgets.
## The color of a frame containing widgets.
frame = "#6496c8",
# The background of the main menu. This can be a color
# beginning with '#', or an image filename. The latter
# should take up the full height and width of the screen.
## The background of the main menu. This can be a color
## beginning with '#', or an image filename. The latter
## should take up the full height and width of the screen.
mm_root = "#dcebff",
# The background of the game menu. This can be a color
# beginning with '#', or an image filename. The latter
# should take up the full height and width of the screen.
## The background of the game menu. This can be a color
## beginning with '#', or an image filename. The latter
## should take up the full height and width of the screen.
gm_root = "#dcebff",
# If this is True, the in-game window is rounded. If False,
# the in-game window is square.
## If this is True, the in-game window is rounded. If False,
## the in-game window is square.
rounded_window = False,
# And we're done with the theme. The theme will customize
# various styles, so if we want to change them, we should
# do so below.
## And we're done with the theme. The theme will customize
## various styles, so if we want to change them, we should
## do so below.
)
#####################
# Help.
#########################################
## Help.
# This lets you configure the help option on the Ren'Py menus.
# It may be:
# - A label in the script, in which case that label is called to
# show help to the user.
# - A file name relative to the base directory, which is opened in a
# web browser.
# - None, to disable help.
## This lets you configure the help option on the Ren'Py menus.
## It may be:
## - A label in the script, in which case that label is called to
## show help to the user.
## - A file name relative to the base directory, which is opened in a
## web browser.
## - None, to disable help.
config.help = "README.html"
#####################
# Transitions.
#########################################
## Transitions.
# Used when entering the game menu from the game.
## Used when entering the game menu from the game.
config.enter_transition = None
# Used when exiting the game menu to the game.
## Used when exiting the game menu to the game.
config.exit_transition = None
# Used between screens of the game menu.
## Used between screens of the game menu.
config.intra_transition = None
# Used when entering the game menu from the main menu.
## Used when entering the game menu from the main menu.
config.main_game_transition = None
# Used when returning to the main menu from the game.
## Used when returning to the main menu from the game.
config.game_main_transition = None
# Used when entering the main menu from the splashscreen.
## Used when entering the main menu from the splashscreen.
config.end_splash_transition = None
# Used when entering the main menu after the game has ended.
## Used when entering the main menu after the game has ended.
config.end_game_transition = None
# Used when a game is loaded.
## Used when a game is loaded.
config.after_load_transition = None
# Used when the window is shown.
## Used when the window is shown.
config.window_show_transition = None
# Used when the window is hidden.
## Used when the window is hidden.
config.window_hide_transition = None
#####################
# This is the name of the directory where the game's data is
# stored. (It needs to be set early, before any other init code
# is run, so the persistent information can be found by the init code.)
#########################################
## This is the name of the directory where the game's data is
## stored. (It needs to be set early, before any other init code
## is run, so the persistent information can be found by the init code.)
python early:
config.save_directory = "launcher-4"
init -1 python hide:
#####################
# Default values of Preferences.
#########################################
## Default values of Preferences.
# Note: These options are only evaluated the first time a
# game is run. To have them run a second time, delete
# game/saves/persistent
## Note: These options are only evaluated the first time a
## game is run. To have them run a second time, delete
## game/saves/persistent
# Should we start in fullscreen mode?
## Should we start in fullscreen mode?
config.default_fullscreen = False
# The default text speed in characters per second. 0 is infinite.
## The default text speed in characters per second. 0 is infinite.
config.default_text_cps = 0
#####################
# More customizations can go here.
#########################################
## More customizations can go here.
config.sound = False
config.quit_action = Quit(confirm=False)
config.window_icon = "images/logo.png"
config.gl_resize = False
config.window_icon = "logo.png"
config.windows_icon = "logo32.png"
config.has_autosave = False
config.log_enable = False
config.mouse_hide_time = None
config.mouse_hide_time = 86400 * 366
_game_menu_screen = None
config.underlay = [
renpy.Keymap(
screenshot = _screenshot,
reload_game = _reload_game,
developer = _developer,
quit = renpy.quit_event,
iconify = renpy.iconify,
help = _help,
choose_renderer = renpy.curried_call_in_new_context("_choose_renderer"),
console = _console.enter,
profile_once = _profile_once,
memory_profile = _memory_profile,
self_voicing = Preference("self voicing", "toggle"),
clipboard_voicing = Preference("clipboard voicing", "toggle"),
debug_voicing = Preference("debug voicing", "toggle"),
progress_screen = _progress_screen,
),
]
]
config.rollback_enabled = False
# This section controls how to build Ren'Py. (Building the launcher is how
# we build Ren'Py distributions.)
## This section controls how to build Ren'Py. (Building the launcher is how
## we build Ren'Py distributions.)
init python:
# We're building Ren'Py tonight.
## We're building Ren'Py tonight.
build.renpy = True
# The version number that's supplied to the updater.
## The version number that's supplied to the updater.
build.version = "Ren'Py {}".format(config.version)
# The name that's used for directories and archive files. For example, if
# this is 'mygame-1.0', the windows distribution will be in the
# directory 'mygame-1.0-win', in the 'mygame-1.0-win.zip' file.
## The name that's used for directories and archive files. For example, if
## this is 'mygame-1.0', the windows distribution will be in the
## directory 'mygame-1.0-win', in the 'mygame-1.0-win.zip' file.
if 'RENPY_BUILD_VERSION' in os.environ:
build.directory_name = "renpy-" + os.environ['RENPY_BUILD_VERSION']
if 'RENPY_NIGHTLY' in os.environ:
build.directory_name = os.environ['RENPY_NIGHTLY']
else:
build.directory_name = "renpy-" + config.version.rsplit('.', 1)[0]
# The name that's uses for executables - the program that users will run
# to start the game. For example, if this is 'mygame', then on Windows,
# users can click 'mygame.exe' to start the game.
## The name that's uses for executables - the program that users will run
## to start the game. For example, if this is 'mygame', then on Windows,
## users can click 'mygame.exe' to start the game.
build.executable_name = "renpy"
# If True, Ren'Py will include update information into packages. This
# allows the updater to run.
## If True, Ren'Py will include update information into packages. This
## allows the updater to run.
build.include_update = True
# Build both kinds of updates.
build.update_formats = [ "zsync", "rpu" ]
# Allow empty directories, so we can distribute the images directory.
build.exclude_empty_directories = False
# Mac signing options.
import os
build.mac_identity = os.environ.get("RENPY_MAC_IDENTITY", None)
build.mac_codesign_command = [ config.renpy_base + "/scripts/mac/mac_sign_client.sh", "{identity}", "{app}" ]
build.mac_create_dmg_command = [ config.renpy_base + "/scripts/mac/mac_dmg_client.sh", "{identity}", "{volname}", "{sourcedir}", "{dmg}" ]
build.mac_codesign_dmg_command = [ "/bin/true" ]
# Clear out various file patterns.
## Clear out various file patterns.
build.renpy_patterns = [ ]
build.early_base_patterns = [ ]
build.base_patterns = [ ]
@@ -265,108 +222,32 @@ init python:
# We don't need to clear out the executable patterns, since they're
# correct for Ren'Py.
# Now, add the Ren'Py distribution in using classify_renpy.
## Now, add the Ren'Py distribution in using classify_renpy.
build.classify_renpy("**~", None)
build.classify_renpy("**/#*", None)
build.classify_renpy("**/thumbs.db", None)
build.classify_renpy("**/.*", None)
build.classify_renpy("rapt/**/libLive2DCubismCore.so", None)
build.classify_renpy("rapt/symbols/", None)
build.classify_renpy("rapt/**", "rapt")
build.executable("rapt/prototype/gradlew")
build.classify_renpy("renios/prototype/base/", None)
build.classify_renpy("renios/prototype/prototype.xcodeproj/*.xcworkspace/", None)
build.classify_renpy("renios/prototype/prototype.xcodeproj/xcuserdata/", None)
build.classify_renpy("renios/prototype/**", "renios")
build.classify_renpy("renios/buildlib/**", "renios")
build.classify_renpy("renios/ios.py", "renios")
build.classify_renpy("renios/version.txt", "renios")
build.classify_renpy("renios/", "renios")
build.classify_renpy("web/game.zip", None)
build.classify_renpy("web/**", "web")
build.classify_renpy("**.old", None)
build.classify_renpy("**.new", None)
build.classify_renpy("**.bak", None)
build.classify_renpy("**.pyc", None)
build.classify_renpy("**/log.txt", None)
build.classify_renpy("**/traceback.txt", None)
build.classify_renpy("**/errors.txt", None)
build.classify_renpy("**/steam_appid.txt", None)
build.classify_renpy("**/saves/", None)
build.classify_renpy("**/tmp/", None)
build.classify_renpy("**/.Editra", None)
# main source.
def source_and_binary(pattern, source="source", binary="binary", py=True):
"""
Classifies source and binary files beginning with `pattern`.
.pyo, .rpyc, .rpycm, and .rpyb go into binary, everything
else but .pyi files go into source.
"""
if py is True:
py = 'pyo' if PY2 else 'pycache'
if py == 'pycache':
build.classify_renpy(pattern + "/**__pycache__/", binary)
build.classify_renpy(pattern + "/**__pycache__/*.{}.pyc".format(sys.implementation.cache_tag), binary)
build.classify_renpy(pattern + "/**.pyc", None)
build.classify_renpy(pattern + "/**.pyo", None)
elif py == 'pyc':
build.classify_renpy(pattern + "/**__pycache__/", None)
build.classify_renpy(pattern + "/**.pyc", binary)
build.classify_renpy(pattern + "/**.pyo", None)
elif py == 'pyo':
build.classify_renpy(pattern + "/**__pycache__/", None)
build.classify_renpy(pattern + "/**.pyc", None)
build.classify_renpy(pattern + "/**.pyo", binary)
else:
build.classify_renpy(pattern + "/**__pycache__/", None)
build.classify_renpy(pattern + "/**.pyc", None)
build.classify_renpy(pattern + "/**.pyo", None)
build.classify_renpy(pattern + "/**.pyi", None)
build.classify_renpy(pattern + "/**.rpyc", binary)
build.classify_renpy(pattern + "/**.rpymc", binary)
build.classify_renpy(pattern + "/**/" + renpy.script.BYTECODE_FILE, binary)
build.classify_renpy(pattern + "/**/cache/bytecode-*.rpyb", None)
build.classify_renpy(pattern + "/**/cache/*", binary)
build.classify_renpy(pattern + "/**", source)
build.classify_renpy("renpy.py", "binary")
source_and_binary("renpy")
build.classify_renpy("renpy.py", "source")
build.classify_renpy("renpy/**", "source")
# games.
build.classify_renpy("launcher/game/theme/", None)
build.classify_renpy("gui/game/gui/", "source")
build.classify_renpy("gui/game/gui/bubble.png", "source")
build.classify_renpy("gui/game/gui/thoughtbubble.png", "source")
build.classify_renpy("gui/game/gui/*", None)
source_and_binary("launcher", py=False)
source_and_binary("gui", binary=None, py=False)
source_and_binary("the_question")
source_and_binary("tutorial")
# extra fonts.
build.classify_renpy("sdk-fonts/**", "source")
build.classify_renpy("launcher/**", "source")
build.classify_renpy("templates/**", "source")
build.classify_renpy("the_question/**", "source")
build.classify_renpy("tutorial/**", "source")
# docs.
build.classify_renpy("doc/", "source")
@@ -375,83 +256,50 @@ init python:
build.classify_renpy("doc/**", "source")
build.classify_renpy("LICENSE.txt", "source")
build.classify_renpy("sphinx/", "source_only")
build.classify_renpy("sphinx/build.sh", "source_only")
build.classify_renpy("sphinx/checks.py", "source_only")
build.classify_renpy("sphinx/game/**", "source_only")
build.classify_renpy("sphinx/source/inc/", None)
build.classify_renpy("sphinx/source/**", "source_only")
# module.
build.classify_renpy("module/", "source")
build.classify_renpy("module/*.c", "source")
build.classify_renpy("module/gen/", None)
build.classify_renpy("module/gen/", "source")
build.classify_renpy("module/gen/*.c", "source")
build.classify_renpy("module/*.h", "source")
build.classify_renpy("module/*.py*", "source")
build.classify_renpy("module/include/", "source")
build.classify_renpy("module/include/*.pxd", "source")
build.classify_renpy("module/include/*.pxi", "source")
build.classify_renpy("module/pysdlsound/", "source")
build.classify_renpy("module/pysdlsound/*.py", "source")
build.classify_renpy("module/pysdlsound/*.pyx", "source")
build.classify_renpy("module/fribidi-src/**", "source")
build.classify_renpy("module/tinyfiledialogs/**", "source")
build.classify_renpy("module/libhydrogen/**", "source")
# all-platforms binary.
build.classify_renpy("lib/**/*steam_api*", "steam")
build.classify_renpy("lib/**/*Live2D*", None)
build.classify_renpy("lib/*/renpy", None)
build.classify_renpy("lib/*/renpy.exe", None)
build.classify_renpy("lib/**", "binary")
build.classify_renpy("renpy.sh", "binary")
build.classify_renpy("renpy.exe", "binary")
# renpy.app is now built from scratch from distribute.rpy.
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")
# jedit rules.
build.classify_renpy("jedit/**", "jedit")
build.classify_renpy("lib/", "binary")
# editra rules.
build.classify_renpy("editra/", "editra-all")
build.classify_renpy("editra/Editra.edit.py", "editra-all")
build.classify_renpy("editra/Editra/**", "editra-linux editra-windows")
build.classify_renpy("editra/Editra-mac.app/**", "editra-mac")
build.classify_renpy("editra/lib/**", "editra-windows")
build.classify_renpy("editra/editra.exe", "editra-windows")
# Executable rules.
build.executable("editra/Editra/Editra")
# Packages.
build.packages = [ ]
build.package("sdk", "zip tar.bz2 dmg", "source binary")
build.package("sdkarm", "tar.bz2", "source binary linux_arm")
build.package("source", "tar.bz2", "source source_only", update=False)
build.package("steam", "zip", "steam", dlc=True)
build.package("sdk", "zip tar.bz2", "source binary")
build.package("source", "tar.bz2", "source", update=False)
build.package("rapt", "zip", "rapt", dlc=True)
build.package("renios", "zip", "renios", dlc=True)
build.package("web", "zip", "web", dlc=True)
build.package("jedit", "zip", "jedit")
build.package("editra-linux", "tar.bz2", "editra-all editra-linux", dlc=True)
build.package("editra-mac", "zip", "editra-all editra-mac", dlc=True)
build.package("editra-windows", "zip", "editra-all editra-windows", dlc=True)
# The identifier for the SDK.
define build.mac_info_plist["CFBundleIdentifier"] = "org.renpy.sdk"
# Enable the special launcher translation mode.
define config.translate_launcher = True
# Allow clicks that focus the window to be processed.
define config.mouse_focus_clickthrough = True
# Reduce the rate of screen updates.
default preferences.gl_powersave = True
# Enable rtl.
define config.rtl = True
# Disable steam.
python early:
config.enable_steam = False
# Since the launcher can be run directly or can be run from the SDK directory,
# uneliding files needs to be handled slightly differently.
define config.alternate_unelide_path = os.path.join(config.basedir, "launcher")
# Disable skipping.
define config.allow_skipping = False
+84 -322
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python in distribute:
@@ -28,112 +10,77 @@ init python in distribute:
import struct
import stat
import shutil
import sys
import threading
from zipfile import crc32
# Since the long type doesn't exist on py3, define it here
if not PY2:
long = int
zlib.Z_DEFAULT_COMPRESSION = 9
zlib.Z_DEFAULT_COMPRESSION = 5
class ZipFile(zipfile.ZipFile):
if PY2:
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")
class ZipFile(zipfile.ZipFile):
st = os.stat(filename)
isdir = stat.S_ISDIR(st.st_mode)
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")
zinfo.file_size = st.st_size
zinfo.flag_bits = 0x00
zinfo.header_offset = self.fp.tell() # Start of header bytes
st = os.stat(filename)
isdir = stat.S_ISDIR(st.st_mode)
self._writecheck(zinfo)
self._didModify = True
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)
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
else:
class ZipFile(zipfile.ZipFile):
def write_with_info(self, zinfo, filename):
if zinfo.filename.endswith("/"):
data = b''
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
zinfo.file_size = file_size = 0
self.fp.write(zinfo.FileHeader())
if zinfo.compress_type == zipfile.ZIP_DEFLATED:
cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION,
zlib.DEFLATED, -15)
else:
with open(filename, "rb") as f:
data = f.read()
self.writestr(zinfo, data)
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
# Seek backwards and write CRC and file sizes
position = self.fp.tell() # Preserve current position in file
self.fp.seek(zinfo.header_offset + 14, 0)
self.fp.write(struct.pack("<LLL", zinfo.CRC, zinfo.compress_size,
zinfo.file_size))
self.fp.seek(position, 0)
self.filelist.append(zinfo)
self.NameToInfo[zinfo.filename] = zinfo
class ZipPackage(object):
@@ -142,28 +89,7 @@ init python in distribute:
"""
def __init__(self, filename):
self.zipfile = ZipFile(filename, "w", zipfile.ZIP_DEFLATED, True)
def get_date_time(self, path):
"""
Gets the datetime for a file. If the time doesn't exist or is
weird, use the current time instead.
"""
try:
s = os.stat(path)
rv = time.gmtime(s.st_mtime)[:6]
# Check that the time is sensible.
if rv[0] < 2000:
rv = None
except Exception:
rv = None
if rv is None:
rv = time.gmtime()[:6]
return rv
self.zipfile = ZipFile(filename, "w", zipfile.ZIP_DEFLATED)
def add_file(self, name, path, xbit):
@@ -171,14 +97,20 @@ init python in distribute:
raise Exception("path for " + name + " must not be None.")
zi = zipfile.ZipInfo(name)
zi.date_time = self.get_date_time(path)
try:
s = os.stat(path)
zi.date_time = time.gmtime(s.st_mtime)[:6]
except:
zi.date_time = time.gmtime()[:6]
zi.compress_type = zipfile.ZIP_DEFLATED
zi.create_system = 3
if xbit:
zi.external_attr = long(0o100755) << 16
zi.external_attr = long(0100755) << 16
else:
zi.external_attr = long(0o100644) << 16
zi.external_attr = long(0100644) << 16
self.zipfile.write_with_info(zi, path)
@@ -187,14 +119,16 @@ init python in distribute:
return
zi = zipfile.ZipInfo(name + "/")
zi.date_time = self.get_date_time(path)
s = os.stat(path)
zi.date_time = time.gmtime(s.st_mtime)[:6]
zi.compress_type = zipfile.ZIP_STORED
zi.create_system = 3
zi.external_attr = (long(0o040755) << 16) | 0x10
zi.external_attr = (long(0040755) << 16) | 0x10
self.zipfile.write_with_info(zi, path)
def close(self, progress=None):
def close(self):
self.zipfile.close()
@@ -206,7 +140,7 @@ init python in distribute:
If true, times will be forced to the epoch.
"""
self.tarfile = tarfile.open(filename, mode, format=tarfile.PAX_FORMAT)
self.tarfile = tarfile.open(filename, mode)
self.tarfile.dereference = True
self.notime = notime
@@ -221,9 +155,9 @@ init python in distribute:
info.type = tarfile.DIRTYPE
if xbit:
info.mode = 0o755
info.mode = 0755
else:
info.mode = 0o644
info.mode = 0644
info.uid = 1000
info.gid = 1000
@@ -242,205 +176,33 @@ init python in distribute:
def add_directory(self, name, path):
self.add_file(name, path, True)
def close(self, progress=None):
def close(self):
self.tarfile.close()
class UpdatePackage(TarPackage):
def __init__(self, filename, basename, destination):
self.path = filename
self.basename = basename
self.destination = destination
TarPackage.__init__(self, filename, "w", notime=True)
def close(self, progress=None):
TarPackage.close(self)
cmd = [
updater.zsync_path("zsyncmake"),
"-z",
# -u url to gzipped data - not a local filename!
"-u", self.basename + ".update.gz",
"-o", os.path.join(self.destination, self.basename + ".zsync"),
os.path.abspath(self.path),
]
subprocess.check_call([ renpy.fsencode(i) for i in cmd ])
# Build the sums file. This is a file with an adler32 hash of each 64k block
# of the zsync file. It's used to help us determine how much of the file is
# downloaded.
with open(self.path, "rb") as src:
with open(renpy.fsencode(os.path.join(self.destination, self.basename + ".sums")), "wb") as sums:
while True:
data = src.read(65536)
if not data:
break
sums.write(struct.pack("<I", zlib.adler32(data) & 0xffffffff))
class DirectoryPackage(object):
def mkdir(self, path):
if not os.path.isdir(path):
os.makedirs(path, 0o755)
os.mkdir(path, 0755)
def __init__(self, path):
self.path = path
if os.path.isdir(path):
shutil.rmtree(path)
self.mkdir(path)
def add_file(self, name, path, xbit):
fn = os.path.join(self.path, name)
# If this is not a directory, ensure all parent directories
# have been created
self.mkdir(os.path.dirname(fn))
shutil.copy(path, fn)
shutil.copy2(path, fn)
if xbit:
os.chmod(fn, 0o755)
os.chmod(fn, 0755)
else:
os.chmod(fn, 0o644)
os.chmod(fn, 0644)
def add_directory(self, name, path):
fn = os.path.join(self.path, name)
self.mkdir(fn)
def close(self, progress=None):
def close(self):
return
class ExternalZipPackage(object):
def __init__(self, path):
self.path = path
self.directory = path + ".zd"
self.dp = DirectoryPackage(self.directory)
def add_file(self, name, path, xbit):
self.dp.add_file(name, path, xbit)
def add_directory(self, name, path):
self.dp.add_directory(name, path)
def close(self, progress=None):
self.dp.close()
if os.path.exists(self.path):
os.unlink(self.path)
p = subprocess.Popen([
"zip",
"-9rq",
os.path.abspath(self.path),
] + os.listdir(self.directory),
cwd=os.path.abspath(self.directory)
)
p.wait()
shutil.rmtree(self.directory)
class DMGPackage(DirectoryPackage):
def __init__(self, path, make_dmg):
self.make_dmg = make_dmg
DirectoryPackage.__init__(self, path)
def close(self, progress=None):
DirectoryPackage.close(self)
self.make_dmg()
class RPUPackage(object):
def __init__(self, directory, variant):
import renpy.update.common
self.directory = directory + "/rpu"
self.variant = variant
self.file_list = renpy.update.common.FileList()
if not os.path.exists(self.directory):
os.mkdir(self.directory)
def add_file(self, name, path, xbit):
self.file_list.add_file(name, path, xbit)
def add_directory(self, name, _path):
self.file_list.add_directory(name)
def close(self, progress=None):
import renpy.update.generate
renpy.update.generate.BlockGenerator(self.variant, self.file_list, self.directory, progress)
parallel_threads = [ ]
class ParallelPackage(object):
def __init__(self, package, done, what):
self.package = package
self.done = done
self.what = what
self.worklist = [ ]
def add_file(self, name, path, xbit):
self.worklist.append((False, name, path, xbit))
def add_directory(self, name, path):
self.worklist.append((True, name, path, True))
def close(self, progress=None):
t = threading.Thread(target=self.run)
t.start()
self.thread = t
parallel_threads.append(self)
def run(self):
for i in self.worklist:
directory, name, path, xbit = i
if directory:
self.package.add_directory(name, path)
else:
self.package.add_file(name, path, xbit)
self.package.close()
def wait_parallel_threads():
t = 0
while parallel_threads:
alive = [ ]
for i in parallel_threads:
i.thread.join(0)
if i.thread.is_alive():
alive.append(i)
if not alive:
break
t += 1
print("\r " + str(t) + " " + " ".join(sorted([ i.what for i in alive ])))
time.sleep(1)
for i in parallel_threads:
if i.done:
i.done()
Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

File diff suppressed because it is too large Load Diff
+125 -362
View File
@@ -1,96 +1,37 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
default persistent.show_edit_funcs = True
default persistent.windows_console = False
default persistent.lint_options = { # the ones which should be enabled by default
"--orphan-tl",
}
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python:
from math import ceil
if persistent.gl_enable is None:
persistent.gl_enable = True
def scan_translations(piglatin=True):
config.gl_enable = persistent.gl_enable
if persistent.windows_console is None:
persistent.windows_console = False
def scan_translations():
languages = renpy.known_languages()
if not languages:
return None
languages.remove("piglatin")
rv = [ ( "English", None) ]
rv = [(i, renpy.translate_string("{#language name and font}", i)) for i in languages ]
rv.sort(key=lambda a : renpy.filter_text_tags(a[1], allow=[]).lower())
for i in languages:
rv.append((i.title(), i))
rv.insert(0, (None, "English"))
if piglatin:
rv.append(("piglatin", "Igpay Atinlay"))
bound = ceil(len(rv)/3.)
return (rv[:bound], rv[bound:2*bound], rv[2*bound:])
show_legacy = os.path.exists(os.path.join(config.renpy_base, "templates", "english", "game", "script.rpy"))
class RestartAtPreferences(Action):
def __call__(self):
renpy.session["launcher_start_label"] = "preferences"
renpy.utter_restart()
default persistent.legacy = False
default persistent.force_new_tutorial = False
default persistent.sponsor_message = True
default persistent.daily_update_check = True
default persistent.daily_update_check_once = False
# Keep the default update check from triggering until tomorrow.
default persistent.last_update_check = datetime.date.today()
# Should we try to skip the splashscreen?
default persistent.skip_splashscreen = False
init python:
if not persistent.daily_update_check_once:
persistent.daily_update_check_once = True
persistent.daily_update_check = True
return rv
default preference_tab = "general"
define preference_tabs = {
"general" : _("General"),
"options" : _("Options"),
"theme" : _("Theme"),
"install" : _("Install Libraries"),
"actions" : _("Actions"),
"lint" : _("Lint Options"),
}
screen preferences:
screen preferences():
default translations = scan_translations()
$ translations = scan_translations()
frame:
style_group "l"
style "l_root"
alt "Preferences"
window:
@@ -109,44 +50,126 @@ screen preferences():
has vbox
# Projects directory selection.
add SEPARATOR2
add HALF_SPACER
for i, l in preference_tabs.items():
textbutton l action SetVariable("preference_tab", i) style "l_list"
if preference_tab == "general":
frame:
style "l_indent"
xmaximum TWOTHIRDS
xfill True
yminimum 75
has vbox
add SEPARATOR2
text _("Projects Directory:")
add HALF_SPACER
frame style "l_indent":
if persistent.projects_directory:
textbutton _("[persistent.projects_directory!q]") action Jump("projects_directory_preference")
else:
textbutton _("Not Set") action Jump("projects_directory_preference")
add SPACER
# Text editor selection.
add SEPARATOR2
frame:
style "l_indent"
yminimum 75
has vbox
text _("Text Editor:")
add HALF_SPACER
frame style "l_indent":
if persistent.editor:
textbutton persistent.editor action Jump("editor_preference")
else:
textbutton _("Not Set") action Jump("editor_preference")
add SPACER
if ability.can_update:
# Update URL selection.
add SEPARATOR2
frame:
style "l_indent"
yminimum 75
has vbox
text _("Projects Directory:")
text _("Update Channel:")
add HALF_SPACER
frame style "l_indent":
if persistent.projects_directory:
textbutton _("[persistent.projects_directory!q]"):
action Jump("projects_directory_preference")
alt _("Projects directory: [text]")
else:
textbutton _("Not Set"):
action Jump("projects_directory_preference")
alt _("Projects directory: [text]")
textbutton persistent.update_channel action Jump("update_preference")
frame:
style "l_indent"
xmaximum ONETHIRD
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
yminimum 75
has vbox
text _("Navigation Options:")
add HALF_SPACER
textbutton _("Include private names") style "l_checkbox" action ToggleField(persistent, "navigate_private")
textbutton _("Include library names") style "l_checkbox" action ToggleField(persistent, "navigate_library")
add SPACER
add SEPARATOR2
frame:
style "l_indent"
yminimum 75
has vbox
text _("Launcher Options:")
add HALF_SPACER
textbutton _("Hardware rendering") style "l_checkbox" action ToggleField(persistent, "gl_enable")
textbutton _("Show templates") style "l_checkbox" action ToggleField(persistent, "show_templates")
if renpy.windows:
textbutton _("Console output") style "l_checkbox" action ToggleField(persistent, "windows_console")
frame:
style "l_indent"
xmaximum ONETHIRD
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
yminimum 75
has vbox
text _("Actions:")
add HALF_SPACER
textbutton _("Open launcher project") style "l_nonbox" action [ project.Select("launcher"), Jump("front_page") ]
if translations:
add SPACER
@@ -155,209 +178,20 @@ screen preferences():
frame:
style "l_indent"
has vbox
text _("Text Editor:")
add HALF_SPACER
frame style "l_indent":
if persistent.editor:
textbutton persistent.editor action Jump("editor_preference") alt _("Text editor: [text]")
else:
textbutton _("Not Set") action Jump("editor_preference") alt _("Text editor: [text]")
add SPACER
add SEPARATOR2
frame:
style "l_indent"
yminimum 75
has vbox
text _("Language:")
add HALF_SPACER
hbox:
for tran in translations:
vbox:
for tlid, tlname in tran:
textbutton tlname:
xmaximum (TWOTHIRDS//3)
action [Language(tlid), project.SelectTutorial(True)]
style "l_list"
# frame style "l_indent":
elif preference_tab == "options":
frame:
style "l_indent"
xmaximum TWOTHIRDS
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Navigation Options:")
add HALF_SPACER
textbutton _("Include private names") style "l_checkbox" action ToggleField(persistent, "navigate_private")
textbutton _("Include library names") style "l_checkbox" action ToggleField(persistent, "navigate_library")
add SPACER
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Game Options:")
add HALF_SPACER
if renpy.windows:
textbutton _("Console output") style "l_checkbox" action ToggleField(persistent, "windows_console")
textbutton _("Skip splashscreen") style "l_checkbox" action ToggleField(persistent, "skip_splashscreen")
add SPACER
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Launcher Options:")
add HALF_SPACER
textbutton _("Show edit file section") style "l_checkbox" action ToggleField(persistent, "show_edit_funcs")
textbutton _("Large fonts") style "l_checkbox" action [ ToggleField(persistent, "large_print"), renpy.utter_restart ]
textbutton _("Sponsor message") style "l_checkbox" action ToggleField(persistent, "sponsor_message")
if ability.can_update:
textbutton _("Daily check for update") style "l_checkbox" action [ToggleField(persistent, "daily_update_check"), SetField(persistent, "last_update_check", None)] selected persistent.daily_update_check
elif preference_tab == "theme":
frame:
style "l_indent"
xmaximum TWOTHIRDS
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Launcher Theme:")
add HALF_SPACER
textbutton _("Default theme") style "l_checkbox" action [SetField(persistent, "theme", None), RestartAtPreferences() ]
textbutton _("Dark theme") style "l_checkbox" action [SetField(persistent, "theme", "dark"), RestartAtPreferences()]
textbutton _("Custom theme") style "l_checkbox" action [SetField(persistent, "theme", "custom"), RestartAtPreferences()]
add SPACER
text _("Information about creating a custom theme can be found {a=https://www.renpy.org/doc/html/skins.html}in the Ren'Py Documentation{/a}.")
elif preference_tab == "install":
frame:
style "l_indent"
xmaximum TWOTHIRDS
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Install Libraries:")
add HALF_SPACER
use install_preferences
elif preference_tab == "actions":
frame:
style "l_indent"
xmaximum TWOTHIRDS
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Actions:")
add HALF_SPACER
textbutton _("Open launcher project") style "l_nonbox" action [ project.Select("launcher"), Jump("front_page") ]
textbutton _("Reset window size") style "l_nonbox" action Preference("display", 1.0)
textbutton _("Clean temporary files") style "l_nonbox" action Jump("clean_tmp")
elif preference_tab == "lint":
frame:
style "l_indent"
xmaximum TWOTHIRDS
xfill True
has vbox
add SEPARATOR2
frame:
style "l_indent"
has vbox
text _("Lint toggles:")
add HALF_SPACER
textbutton _("Orphan translations"):
style "l_checkbox"
action ToggleSetMembership(persistent.lint_options, "--orphan-tl")
textbutton _("Parameters overriding builtin names"):
style "l_checkbox"
action ToggleSetMembership(persistent.lint_options, "--builtins-parameters")
textbutton _("Word count and character count for speaking characters"):
style "l_checkbox"
action ToggleSetMembership(persistent.lint_options, "--words-char-count")
add SPACER
textbutton _("Check Script (Lint)") action Jump("lint")
for tlname, tlvalue in translations:
textbutton tlname action Language(tlvalue) style "l_list"
textbutton _("Return") action Jump("front_page") style "l_left_button"
label clean_tmp:
python hide:
installer.processing(_("Cleaning temporary files..."))
installer._clean("renpy:tmp", 0)
time.sleep(0.5)
jump preferences
textbutton _("Back") action Jump("front_page") style "l_left_button"
label projects_directory_preference:
call choose_projects_directory
@@ -367,74 +201,3 @@ label projects_directory_preference:
label preferences:
call screen preferences
jump preferences
screen choose_language():
default local_lang = _preferences.language
default chosen_lang = _preferences.language
default translations = scan_translations(piglatin=False)
add BACKGROUND
vbox:
xalign .5
yalign .5
fixed:
ysize 0
text renpy.translate_string(_("{#in language font}Welcome! Please choose a language"), local_lang):
xalign .5
yanchor 1.0
ypos 1.0
style "l_label_text"
size 36
textalign .5
layout "subtitle"
add SPACER
add SPACER
hbox:
xalign .5
for tran in translations:
vbox:
for tlid, tlname in tran:
textbutton tlname:
xmaximum (TWOTHIRDS//3)
action [ SetScreenVariable("chosen_lang", tlid), Language(tlid), project.SelectTutorial(True), Return() ]
hovered SetScreenVariable("local_lang", tlid)
unhovered SetScreenVariable("local_lang", chosen_lang)
style "l_list"
text_xalign .5
add SPACER
add SPACER
$ lang_name = renpy.translate_string("{#language name and font}", local_lang)
fixed:
ysize 0
textbutton renpy.translate_string(_("{#in language font}Start using Ren'Py in [lang_name]"), local_lang):
xalign .5
action [Language(chosen_lang), project.SelectTutorial(True), Return()]
style "l_default"
text_style "l_default"
text_size 30
text_textalign .5
text_layout "subtitle"
label choose_language:
call screen choose_language
return
translate None strings:
# game/new_project.rpy:77
old "{#language name and font}"
new "English"
+129 -452
View File
@@ -1,31 +1,18 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
# Code that manages projects.
init python:
try:
import EasyDialogsWin as EasyDialogs
except:
EasyDialogs = None
import os
init python in project:
from store import persistent, config, Action, renpy, _preferences, MultiPersistent
from store import persistent, config, Action, renpy
import store.util as util
import store.interface as interface
@@ -36,35 +23,18 @@ init python in project:
import re
import tempfile
multipersistent = MultiPersistent("launcher.renpy.org")
if persistent.blurb is None:
persistent.blurb = 0
project_filter = [ i.strip() for i in os.environ.get("RENPY_PROJECT_FILTER", "").split(":") if i.strip() ]
LAUNCH_BLURBS = [
_("After making changes to the script, press shift+R to reload your game."),
_("Press shift+O (the letter) to access the console."),
_("Press shift+D to access the developer menu."),
_("Have you backed up your projects recently?"),
_("Lint checks your game for potential mistakes, and gives you statistics."),
]
class Project(object):
def __init__(self, path, name=None):
def __init__(self, path):
while path.endswith("/"):
path = path[:-1]
if name is None:
name = os.path.basename(path)
if not os.path.exists(path):
raise Exception("{} does not exist.".format(path))
self.name = name
# The name of the project.
self.name = os.path.basename(path)
# The path to the project.
self.path = path
@@ -79,9 +49,6 @@ init python in project:
# Load the data.
self.load_data()
# A name to display the project.
self.display_name = self.data.get("display_name", self.name)
# The project's temporary directory.
self.tmp = None
@@ -93,68 +60,36 @@ init python in project:
self.dump_mtime = 0
def get_dump_filename(self):
if os.path.exists(os.path.join(self.gamedir, "saves")):
return os.path.join(self.gamedir, "saves", "navigation.json")
self.make_tmp()
return os.path.join(self.tmp, "navigation.json")
def load_data(self):
try:
with open(os.path.join(self.path, "project.json"), "r") as f:
self.data = json.load(f)
except Exception:
f = open(os.path.join(self.path, "project.json"), "rb")
self.data = json.load(f)
f.close()
except:
self.data = { }
self.update_data()
def save_data(self):
"""
Saves the project data.
"""
try:
with open(os.path.join(self.path, "project.json"), "w") as f:
with open(os.path.join(self.path, "project.json"), "wb") as f:
json.dump(self.data, f)
except Exception:
except:
self.load_data()
def update_data(self):
data = self.data
data.setdefault("build_update", False)
data.setdefault("packages", [ "pc", "mac" ])
data.setdefault("add_from", True)
data.setdefault("force_recompile", True)
data.setdefault("android_build", "Release")
data.setdefault("tutorial", False)
if "renamed_all" not in data:
dp = data["packages"]
if "all" in dp:
dp.remove("all")
if "pc" not in dp:
dp.append("pc")
if "mac" not in dp:
dp.append("mac")
data["renamed_all"] = True
if "renamed_steam" not in data:
dp = data["packages"]
if "steam" in dp:
dp.remove("steam")
if "market" not in dp:
dp.append("market")
data["renamed_steam"] = True
data.setdefault("packages", [ "all" ])
def make_tmp(self):
"""
@@ -165,31 +100,16 @@ init python in project:
if self.tmp and os.path.isdir(self.tmp):
return
tmp = os.path.join(config.renpy_base, "tmp", self.name)
tmp = os.path.join(self.path, "tmp")
try:
os.makedirs(tmp)
except Exception:
os.mkdir(tmp)
except:
pass
if os.path.isdir(tmp):
try:
fn = os.path.join(tmp, "write_test.txt")
if os.path.exists(fn):
os.unlink(fn)
with open(fn, "w") as f:
f.write("Test")
os.unlink(fn)
self.tmp = tmp
return
except Exception:
pass
self.tmp = tmp
return
self.tmp = tempfile.mkdtemp()
@@ -219,7 +139,7 @@ init python in project:
self.make_tmp()
# Find the python executable to run.
executable_path = os.path.dirname(renpy.fsdecode(sys.executable))
executable_path = os.path.dirname(sys.executable)
if renpy.renpy.windows:
extension = ".exe"
@@ -241,7 +161,7 @@ init python in project:
raise Exception("Python interpreter not found: %r", executables)
# Put together the basic command line.
cmd = [ executable, sys.argv[0] ]
cmd = [ executable, "-EO", sys.argv[0] ]
cmd.append(self.path)
cmd.extend(args)
@@ -256,47 +176,21 @@ init python in project:
if persistent.navigate_library:
cmd.append("--json-dump-common")
cmd.append("--errors-in-editor")
environ = dict(os.environ)
environ["RENPY_LAUNCHER_LANGUAGE"] = _preferences.language or "english"
if persistent.skip_splashscreen:
environ["RENPY_SKIP_SPLASHSCREEN"] = "1"
environ.update(env)
# Filter out system PYTHON* environment variables.
if hasattr(sys, "renpy_executable"):
environ = { k : v for k, v in environ.items() if not k.startswith("PYTHON") }
encoded_environ = { }
for k, v in environ.items():
if v is None:
continue
encoded_environ[renpy.fsencode(k)] = renpy.fsencode(v)
for k in environ:
environ[k] = renpy.fsencode(environ[k])
# Launch the project.
cmd = [ renpy.fsencode(i) for i in cmd ]
p = subprocess.Popen(cmd, env=encoded_environ)
p = subprocess.Popen(cmd, env=environ)
if wait:
if p.wait():
p.wait()
print("Launch failed. command={!r}, returncode={!r}".format(cmd, p.returncode))
if args and not self.is_writeable():
interface.error(_("Launching the project failed."), _("This may be because the project is not writeable."))
else:
interface.error(_("Launching the project failed."), _("Please ensure that your project launches normally before running this command."))
renpy.not_infinite_loop(30)
def update_dump(self, force=False, gui=True, compile=False):
def update_dump(self, force=False, gui=True):
"""
If the dumpfile does not exist, runs Ren'Py to create it. Otherwise,
loads it in iff it's newer than the one that's already loaded.
@@ -309,10 +203,7 @@ init python in project:
if gui:
interface.processing(_("Ren'Py is scanning the project..."))
if compile:
self.launch(["compile", "--keep-orphan-rpyc" ], wait=True)
else:
self.launch(["quit"], wait=True)
self.launch(["quit"], wait=True)
if not os.path.exists(dump_filename):
self.dump["error"] = True
@@ -330,7 +221,7 @@ init python in project:
# add todo list to dump data
self.update_todos()
except Exception:
except:
self.dump["error"] = True
def update_todos(self):
@@ -345,20 +236,17 @@ init python in project:
for f in files:
data = open(self.unelide_filename(f), encoding="utf-8")
data = file(self.unelide_filename(f))
for l, line in enumerate(data):
l += 1
line = line[:1024]
try:
line = line.decode("utf-8")
except:
continue
if PY2:
try:
line = line.decode("utf-8")
except Exception:
continue
m = re.search(r"#\s*TODO(\s*:\s*|\s+)(.*)", line, re.I)
m = re.search(r".*#\s*TODO(\s*:\s*|\s+)(.*)", line, re.I)
if m is None:
continue
@@ -370,7 +258,7 @@ init python in project:
while not todo_text or todo_text in todos:
index += 1
todo_text = u"{0} ({1})".format(raw_todo_text, index)
todo_text = "{0} ({1})".format(raw_todo_text, index)
todos[todo_text] = [f, l]
@@ -380,8 +268,6 @@ init python in project:
Unelides the filename relative to the project base.
"""
fn = os.path.normpath(fn)
fn1 = os.path.join(self.path, fn)
if os.path.exists(fn1):
return fn1
@@ -399,36 +285,11 @@ init python in project:
can be included in the project.
"""
def is_script(fn):
fn = fn.lower()
for i in [ ".rpy", ".rpym", "_ren.py" ]:
if fn.endswith(i):
return True
return False
rv = [ ]
rv.extend(i for i, isdir in util.walk(self.path)
if (not isdir) and is_script(i) and (not i.startswith("tmp/")) )
rv.extend(i for i, isdir in util.walk(self.path) if (not isdir) and (i.endswith(".rpy") or i.endswith(".rpym")) )
return rv
def exists(self, fn):
"""
Returns true if the file exists in the game.
"""
return os.path.exists(os.path.join(self.path, fn))
def is_writeable(self):
"""
Returns true if it's possible to write a file in the projects
directory.
"""
return os.access(self.path, os.W_OK)
class ProjectManager(object):
"""
@@ -438,46 +299,31 @@ init python in project:
def __init__(self):
# The projects directory.
self.projects_directory = ""
# The projects directory.
self.projects_directory = ""
# Normal projects, in alphabetical order by lowercase name.
self.projects = [ ]
# Normal projects, in alphabetical order by lowercase name.
self.projects = [ ]
# Template projects.
self.templates = [ ]
# Template projects.
self.templates = [ ]
# All projects - normal, template, and hidden.
self.all_projects = [ ]
# All projects - normal, template, and hidden.
self.all_projects = [ ]
# Directories that have been scanned.
self.scanned = set()
# Directories that have been scanned.
self.scanned = set()
# The tutorial game, and the language it's for.
self.tutoral = None
self.tutorial_language = "the meowing of a cat"
self.scan()
self.scan()
def scan(self):
"""
Scans for projects.
"""
global current
if persistent.projects_directory is None:
if multipersistent.projects_directory is not None:
persistent.projects_directory = multipersistent.projects_directory
if (persistent.projects_directory is not None) and not os.path.isdir(persistent.projects_directory):
persistent.projects_directory = None
if persistent.projects_directory is not None:
if multipersistent.projects_directory is None:
multipersistent.projects_directory = persistent.projects_directory
multipersistent.save()
self.projects_directory = persistent.projects_directory
self.projects = [ ]
@@ -488,51 +334,12 @@ init python in project:
if self.projects_directory is not None:
self.scan_directory(self.projects_directory)
self.scan_directory(config.renpy_base)
self.scan_directory(os.path.join(config.renpy_base, "templates"))
self.projects.sort(key=lambda p : p.name.lower())
self.templates.sort(key=lambda p : p.name.lower())
# Select the default project.
if persistent.active_project is not None:
p = self.get(persistent.active_project)
if (p is not None) and (p.name not in [ "tutorial", "tutorial_7" ]):
current = p
return
current = self.get_tutorial()
def find_basedir(self, d):
"""
Try to find a project basedir in d.
"""
def has_game(dn):
return os.path.isdir(os.path.join(dn, "game"))
if has_game(d):
return d
dn = os.path.join(d, "Contents", "Resources", "autorun")
if has_game(dn):
return dn
for dn in os.listdir(d):
if not dn.endswith(".app"):
continue
dn = os.path.join(d, dn, "Contents", "Resources", "autorun")
if has_game(dn):
return dn
return None
def scan_directory(self, d):
"""
Scans for projects in directories directly underneath `d`.
@@ -545,63 +352,50 @@ init python in project:
if not os.path.isdir(d):
return
for pdir in util.listdir(d):
for pdir in os.listdir(d):
ppath = os.path.join(d, pdir)
self.scan_directory_direct(ppath, pdir)
# If a file called "projects.txt" exists, include any projects listed in it.
extra_projects_fn = os.path.join(d, "projects.txt")
# A project must be a directory.
if not os.path.isdir(ppath):
continue
if os.path.exists(extra_projects_fn):
# A project has either a game/ directory, or a project.json
# file.
if (not os.path.isdir(os.path.join(ppath, "game"))) and (not os.path.exists(os.path.join(ppath, "project.json"))):
continue
with open(extra_projects_fn, "r") as f:
if ppath in self.scanned:
continue
self.scanned.add(ppath)
for path in f:
path = path.strip()
if len(path) > 0:
self.scan_directory_direct(path)
# We have a project directory, so create a Project.
p = Project(ppath)
project_type = p.data.get("type", "normal")
def scan_directory_direct(self, ppath, name=None):
"""
Checks if there is a project in `ppath` and creates a project
object with the name `name` if so.
"""
if project_type == "hidden":
pass
elif project_type == "template":
self.templates.append(p)
else:
self.projects.append(p)
# A project must be a directory.
if not os.path.isdir(ppath):
self.all_projects.append(p)
# Select the default project.
if persistent.active_project is not None:
p = self.get(persistent.active_project)
if p is not None:
current = p
return
p = self.get("tutorial")
if p is not None:
current = p
return
try:
ppath = self.find_basedir(ppath)
except Exception:
return
if ppath is None:
return
if ppath in self.scanned:
return
self.scanned.add(ppath)
# We have a project directory, so create a Project.
p = Project(ppath, name)
if project_filter and (p.name not in project_filter):
return
project_type = p.data.get("type", "normal")
if project_type == "hidden":
pass
elif project_type == "template":
self.templates.append(p)
else:
self.projects.append(p)
self.all_projects.append(p)
current = None
def get(self, name):
@@ -617,37 +411,6 @@ init python in project:
return None
def get_tutorial(self):
language = _preferences.language
if persistent.force_new_tutorial:
language = None
if language == self.tutorial_language:
return self.tutorial
rv = self.get("oldtutorial")
p = self.get("tutorial")
if p is not None:
if language is None:
rv = p
elif rv is None:
rv = p
elif os.path.exists(os.path.join(p.path, "game", "tl", _preferences.language)):
rv = p
elif not os.path.exists(os.path.join(rv.path, "game", "tl", _preferences.language)):
rv = p
self.tutorial_language = language
self.tutorial = rv
return rv
manager = ProjectManager()
# The current project.
@@ -699,55 +462,6 @@ init python in project:
if self.label is not None:
renpy.jump(self.label)
class SelectTutorial(Action):
"""
Selects the tutorial.
"""
def __init__(self, if_tutorial=False):
"""
Only selects if we're already in a tutorial.
"""
self.if_tutorial = if_tutorial
def __call__(self):
p = manager.get_tutorial()
if p is None:
return
global current
if self.if_tutorial:
if (current is not None) and current.name not in [ "tutorial", "oldtutorial" ]:
return None
current = p
persistent.active_project = p.name
renpy.restart_interaction()
def get_sensitive(self):
if self.if_tutorial:
return True
return (manager.get_tutorial() is not None)
def get_selected(self):
if self.if_tutorial:
return False
p = manager.get_tutorial()
if p is None:
return False
if current is None:
return False
return current.path == p.path
class Launch(Action):
"""
@@ -766,21 +480,8 @@ init python in project:
def get_sensitive(self):
return self.project is not None
def post_launch(self):
blurb = LAUNCH_BLURBS[persistent.blurb % len(LAUNCH_BLURBS)]
persistent.blurb += 1
if persistent.skip_splashscreen:
submessage = _("Splashscreen skipped in launcher preferences.")
else:
submessage = None
interface.interaction(_("Launching"), blurb, submessage=submessage, pause=2.5)
def __call__(self):
self.project.launch()
renpy.invoke_in_new_context(self.post_launch)
class Rescan(Action):
def __call__(self):
@@ -797,19 +498,6 @@ init python in project:
if isinstance(persistent.projects_directory, str):
persistent.projects_directory = renpy.fsdecode(persistent.projects_directory)
init 10 python:
if persistent.projects_directory is not None:
if not directory_is_writable(persistent.projects_directory):
persistent.projects_directory = None
label after_load:
python:
if project.current is not None:
project.current.update_dump()
return
###############################################################################
# Code to choose the projects directory.
@@ -819,64 +507,53 @@ label choose_projects_directory:
interface.interaction(_("PROJECTS DIRECTORY"), _("Please choose the projects directory using the directory chooser.\n{b}The directory chooser may have opened behind this window.{/b}"), _("This launcher will scan for projects in this directory, will create new projects in this directory, and will place built projects into this directory."),)
path, is_default = choose_directory(persistent.projects_directory)
path = persistent.projects_directory
if is_default:
if path:
default_path = path
else:
try:
default_path = os.path.dirname(os.path.abspath(config.renpy_base))
except:
default_path = os.path.abspath(config.renpy_base)
if EasyDialogs:
choice = EasyDialogs.AskFolder(defaultLocation=default_path, wanted=unicode)
if choice is not None:
path = choice
else:
path = None
else:
try:
cmd = [ "/usr/bin/python", os.path.join(config.gamedir, "tkaskdir.py"), renpy.fsencode(default_path) ]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
choice = p.stdout.read()
p.wait()
if choice:
path = renpy.fsdecode(choice)
except:
import traceback
traceback.print_exc()
path = None
interface.error(_("Ren'Py was unable to run python with tkinter to choose the projects directory."), label=None)
if path is None:
path = default_path
interface.info(_("Ren'Py has set the projects directory to:"), "[path!q]", path=path)
persistent.projects_directory = path
project.multipersistent.projects_directory = path
project.multipersistent.save()
path = renpy.fsdecode(path)
persistent.projects_directory = path
project.manager.scan()
return
init python:
def set_projects_directory_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("projects", help="The path to the projects directory.")
args = ap.parse_args()
persistent.projects_directory = renpy.fsdecode(args.projects)
project.multipersistent.projects_directory = persistent.projects_directory
project.multipersistent.save()
renpy.save_persistent()
return False
renpy.arguments.register_command("set_projects_directory", set_projects_directory_command)
def get_projects_directory_command():
ap = renpy.arguments.ArgumentParser()
args = ap.parse_args()
if persistent.projects_directory is not None:
print(persistent.projects_directory)
return False
renpy.arguments.register_command("get_projects_directory", get_projects_directory_command)
def set_project_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("project", help="The full path to the project to select.")
args = ap.parse_args()
projects = os.path.dirname(os.path.abspath(args.project))
name = os.path.basename(args.project)
persistent.projects_directory = renpy.fsdecode(projects)
project.multipersistent.projects_directory = persistent.projects_directory
persistent.active_project = name
project.multipersistent.save()
renpy.save_persistent()
return False
renpy.arguments.register_command("set_project", set_project_command)
-4
View File
@@ -1,4 +0,0 @@
-----BEGIN PUBLIC KEY-----
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEmkuXOrZ2viRe4fRCrlqUFGdgRqy9IcWt
5lJvsUqRN619pWZIefz/bau9Sd8vcJt6VKwexOeBmMhzXwZ/1Lm3OQ==
-----END PUBLIC KEY-----
Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

+201 -448
View File
@@ -1,84 +1,8 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Defaults for custom theme properties.
init -99 python:
# The color of non-interactive text.
custom_text = "#545454"
# Colors for buttons in various states.
custom_idle = "#42637b"
custom_hover = "#d86b45"
custom_disable = "#808080"
# Colors for reversed text buttons (selected list entries).
custom_reverse_idle = "#78a5c5"
reverse_hover = "#d86b45"
custom_reverse_text = "#ffffff"
# Colors for the scrollbar thumb.
custom_scrollbar_idle = "#dfdfdf"
custom_scrollbar_hover = "#d86b45"
# An image used as a separator pattern.
custom_pattern = "images/pattern.png"
# A displayable used for the background of everything.
custom_background = "images/background.png"
# A displayable used for the background of the projects list.
custom_projects_window = Null()
# A displayable used the background of information boxes.
custom_info_window = "#f9f9f9c0"
# Colors for the titles of information boxes.
custom_error_color = "#d15353"
custom_info_color = "#545454"
custom_interaction_color = "#d19753"
custom_question_color = "#d19753"
# The color of input text.
custom_input_color = "#d86b45"
# A displayable used for the background of windows
# containing commands, preferences, and navigation info.
custom_window = Frame(Fixed(Solid(custom_reverse_idle, xsize=4, xalign=0), Solid(custom_info_window, xsize=794, xalign=1.0), xsize=800, ysize=600), 0, 0, tile=True)
init -1:
# Fonts.
define gui.LIGHT_FONT = "fonts/Roboto-Light.ttf"
define gui.REGULAR_FONT = "fonts/Roboto-Regular.ttf"
# Used to scale the size of fonts.
define gui.FONT_SCALE = 1.0
# Should places where the regular font used be bolded?
define gui.REGULAR_BOLD = False
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init -1 python:
config.defer_styles = True
# The color of non-interactive text.
TEXT = "#545454"
@@ -97,14 +21,14 @@ init -1 python:
SCROLLBAR_HOVER = "#d86b45"
# An image used as a separator pattern.
PATTERN = "images/pattern.png"
PATTERN = "pattern.png"
# A displayable used for the background of everything.
BACKGROUND = "background"
BACKGROUND = "background.png"
# A displayable used for the background of windows
# containing commands, preferences, and navigation info.
WINDOW = Frame("window", 0, 0, tile=True)
WINDOW = Frame("window.png", 0, 0, tile=True)
# A displayable used for the background of the projects list.
PROJECTS_WINDOW = Null()
@@ -121,167 +45,8 @@ init -1 python:
# The color of input text.
INPUT_COLOR = "#d86b45"
if persistent.theme == 'dark':
# The color of non-interactive text.
TEXT = "#ababab"
# Colors for buttons in various states.
IDLE = "#709cbe"
HOVER = "#d86b45"
DISABLED = "#7f7f7f"
# Colors for reversed text buttons (selected list entries).
REVERSE_IDLE = "#78a5c5"
REVERSE_HOVER = "#d86b45"
REVERSE_TEXT = "#0a0a0a"
# Colors for the scrollbar thumb.
SCROLLBAR_IDLE = "#282828"
SCROLLBAR_HOVER = "#d86b45"
# An image used as a separator pattern.
PATTERN = "images/pattern.png"
# A displayable used for the background of everything.
BACKGROUND = Fixed(Solid(REVERSE_TEXT), xsize=800, ysize=600)
# A displayable used for the background of the projects list.
PROJECTS_WINDOW = Null()
# A displayable used the background of information boxes.
INFO_WINDOW = "#101010"
# Colors for the titles of information boxes.
ERROR_COLOR = "#d15353"
INFO_COLOR = "#ababab"
INTERACTION_COLOR = "#d19753"
QUESTION_COLOR = "#d19753"
# The color of input text.
INPUT_COLOR = "#d86b45"
# A displayable used for the background of windows
# containing commands, preferences, and navigation info.
WINDOW = Frame(Fixed(Solid(REVERSE_IDLE, xsize=4, xalign=0), Solid(INFO_WINDOW, xsize=794, xalign=1.0), xsize=800, ysize=600), 0, 0, tile=True)
elif persistent.theme == 'clear':
# The color of non-interactive text.
TEXT = "#545454"
# Colors for buttons in various states.
IDLE = "#42637b"
HOVER = "#d86b45"
DISABLED = "#808080"
# Colors for reversed text buttons (selected list entries).
REVERSE_IDLE = "#78a5c5"
REVERSE_HOVER = "#d86b45"
REVERSE_TEXT = "#ffffff"
# Colors for the scrollbar thumb.
SCROLLBAR_IDLE = "#dfdfdf"
SCROLLBAR_HOVER = "#d86b45"
# An image used as a separator pattern.
PATTERN = "images/pattern.png"
# A displayable used for the background of everything.
BACKGROUND = Fixed(Solid(REVERSE_TEXT), xsize=800, ysize=600)
# A displayable used for the background of the projects list.
PROJECTS_WINDOW = Null()
# A displayable used the background of information boxes.
INFO_WINDOW = "#f9f9f9"
# Colors for the titles of information boxes.
ERROR_COLOR = "#d15353"
INFO_COLOR = "#545454"
INTERACTION_COLOR = "#d19753"
QUESTION_COLOR = "#d19753"
# The color of input text.
INPUT_COLOR = "#d86b45"
# A displayable used for the background of windows
# containing commands, preferences, and navigation info.
WINDOW = Frame(Fixed(Solid(REVERSE_IDLE, xsize=4, xalign=0), Solid(INFO_WINDOW, xsize=794, xalign=1.0), xsize=800, ysize=600), 0, 0, tile=True)
elif persistent.theme == 'custom':
# The color of non-interactive text.
TEXT = custom_text
# Colors for buttons in various states.
IDLE = custom_idle
HOVER = custom_hover
DISABLED = custom_disable
# Colors for reversed text buttons (selected list entries).
REVERSE_IDLE = custom_reverse_idle
REVERSE_HOVER = reverse_hover
REVERSE_TEXT = custom_reverse_text
# Colors for the scrollbar thumb.
SCROLLBAR_IDLE = custom_scrollbar_idle
SCROLLBAR_HOVER = custom_scrollbar_hover
# An image used as a separator pattern.
PATTERN = custom_pattern
# A displayable used for the background of everything.
BACKGROUND = custom_background
# A displayable used for the background of the projects list.
PROJECTS_WINDOW = custom_projects_window
# A displayable used the background of information boxes.
INFO_WINDOW = custom_info_window
# Colors for the titles of information boxes.
ERROR_COLOR = custom_error_color
INFO_COLOR = custom_info_color
INTERACTION_COLOR = custom_interaction_color
QUESTION_COLOR = custom_question_color
# The color of input text.
INPUT_COLOR = custom_input_color
# A displayable used for the background of windows
# containing commands, preferences, and navigation info.
WINDOW = custom_window
init 1 python:
if not renpy.has_image('scrollbar_center'):
renpy.image('scrollbar_center', Fixed(Solid(REVERSE_TEXT, area=(2, 2, 2, 4)), Solid(REVERSE_TEXT, area=(8, 2, 2, 4)), Solid(REVERSE_TEXT, area=(14, 2, 2, 4)), xysize=(18, 8)))
if not renpy.has_image('vscrollbar_center'):
renpy.image('vscrollbar_center', Fixed(Solid(REVERSE_TEXT, area=(2, 2, 4, 2)), Solid(REVERSE_TEXT, area=(2, 8, 4, 2)), Solid(REVERSE_TEXT, area=(2, 14, 4, 2)), xysize=(8, 18)))
def size(n):
"""
Adjusts the font size if we're in large-print mode.
"""
if persistent.large_print and n < 18:
n = 18
n = int(n * gui.FONT_SCALE)
return n
def light_font():
if persistent.large_print:
return gui.REGULAR_FONT
return gui.LIGHT_FONT
def regular_font():
return gui.REGULAR_FONT
INDENT = 20
HALF_INDENT = 10
@@ -290,261 +55,249 @@ init 1 python:
SEPARATOR = Frame(PATTERN, 0, 0, tile=True, ymaximum=5, yalign=1.0)
SEPARATOR2 = Frame(PATTERN, 0, 0, tile=True, ymaximum=10, yalign=1.0)
SPACER_HEIGHT = 8
SPACER_HEIGHT = 12
SPACER = Null(height=SPACER_HEIGHT)
HALF_SPACER_HEIGHT = 4
HALF_SPACER_HEIGHT = 6
HALF_SPACER = Null(height=HALF_SPACER_HEIGHT)
# FONTS/WEIGHTS
LIGHT = "Roboto-Light.ttf"
REGULAR = "Roboto-Regular.ttf"
DARK = "Roboto-Medium.ttf"
# DIVIDING THE SCREEN
ONETHIRD = 258
TWOTHIRDS = 496
ONEHALF = 377
def checkbox(full, color):
if renpy.has_image('checkbox_full'):
check = im.Twocolor(''.join(["images/checkbox_", "full" if full else "empty", ".png"]), color, color)
else:
check = Fixed(Solid(color, xsize=1, xalign=.0), Solid(color, xsize=1, xalign=1.0), Solid(color, ysize=1, yalign=.0), Solid(color, ysize=1, yalign=1.0), xsize=10, ysize=10)
if full:
check = Fixed(check, Solid(color, xsize=6, ysize=6, align=(.5, .5)), xsize=10, ysize=10)
return At(check, l_checkbox_box)
# Default style.
style.l_default = Style(style.default)
style.l_default.font = LIGHT
style.l_default.color = TEXT
style.l_default.idle_color = IDLE
style.l_default.hover_color = HOVER
style.l_default.size = 18
style.l_text = Style(style.l_default)
style.l_button = Style(style.l_default)
style.l_button_text = Style(style.l_default)
style.l_button_text.insensitive_color = DISABLED
style.l_button_text.selected_font = REGULAR
# A small button, used at the bottom of the screen.
style.l_link = Style(style.l_default)
style.l_link_text = Style(style.l_default)
style.l_link_text.size = 14
style.l_link_text.font = LIGHT
# Action buttons on the bottom of the screen.
style.l_right_button = Style(style.l_default)
style.l_right_button.xalign = 1.0
style.l_right_button.ypos = 600 - 128 + 12
style.l_right_button.left_margin = 8 + INDENT
style.l_right_button.right_margin = 10 + INDENT
style.l_right_button_text = Style(style.l_default)
style.l_right_button_text.size = 30
style.l_left_button = Style(style.l_right_button)
style.l_left_button.xalign = 0.0
style.l_left_button_text = Style(style.l_right_button_text)
# The root frame. This contains everything but the bottom navigation, back
# button, and tooltip button.
style.l_root = Style(style.l_default)
style.l_root.background = BACKGROUND
style.l_root.xpadding = 10
style.l_root.top_padding = 64
style.l_root.bottom_padding = 128
# The default style.
style l_default is default:
font light_font()
color TEXT
idle_color IDLE
hover_color HOVER
size size(18)
# An inner window.
style.l_window = Style(style.l_default)
style l_text is l_default
style.l_window.background = WINDOW
style l_button is l_default
style l_button_text is l_default:
insensitive_color DISABLED
selected_font regular_font()
selected_bold gui.REGULAR_BOLD
# A small button, used at the bottom of the screen.
style l_link is l_default
style l_link_text is l_default:
size size(14)
font light_font()
# Action buttons on the bottom of the screen.
style l_right_button is l_default:
xalign 1.0
ypos 600 - 128 + 12
left_margin 8 + INDENT
right_margin 10 + INDENT
style l_right_button_text is l_default:
size size(30)
style l_left_button is l_right_button:
xalign 0.0
style l_left_button_text is l_right_button_text
style.l_window.left_padding = 6
style.l_window.xfill = True
style.l_window.yfill = True
# The root frame. This contains everything but the bottom navigation,
# and buttons.
style l_root is l_default:
background BACKGROUND
xpadding 10
top_padding 64
bottom_padding 128
# Normal-sized labels.
style.l_label = Style(style.l_default)
style.l_label.xfill = True
style.l_label.top_padding = 10
style.l_label.bottom_padding = 8
style.l_label.bottom_margin = 12
style.l_label.background = SEPARATOR
style.l_label_text = Style(style.l_default)
style.l_label_text.size = 24
style.l_label_text.xpos = INDENT
style.l_label_text.yoffset = 6
# An inner window.
style l_window is l_default:
background WINDOW
left_padding 6
xfill True
yfill True
# Small labels.
style.l_label_small = Style(style.l_default)
style.l_label_small.xfill = True
style.l_label_small.bottom_padding = 8
style.l_label_small.bottom_margin = HALF_SPACER_HEIGHT
style.l_label_small.background = SEPARATOR
style.l_label_small_text = Style(style.l_default)
style.l_label_small_text.xpos = INDENT
style.l_label_small_text.yoffset = 6
style.l_label_small_text.size = 20
# Normal size labels.
style l_label is l_default:
xfill True
top_padding 10
bottom_padding 8
bottom_margin 12
background SEPARATOR
# Alternate labels. This nests inside an l_label, and gives a button
# or label that's nested inside another label.
style.l_alternate = Style(style.l_default)
style.l_alternate.xalign = 1.0
style.l_alternate.yalign = 1.0
style.l_alternate.yoffset = 4
style.l_alternate.right_margin = INDENT
style.l_alternate_text = Style(style.l_default)
style.l_alternate_text.size = 14
style.l_alternate_text.font = LIGHT
style.l_alternate_text.text_align = 1.0
style l_label_text is l_default:
size size(24)
xpos INDENT
yoffset 6
style.l_small_button = Style(style.l_button)
style.l_small_button_text = Style(style.l_button_text)
style.l_small_button_text.size = 14
style.l_small_text = Style(style.l_text)
style.l_small_text.size = 14
style l_label_small is l_default:
xfill True
bottom_padding 8
bottom_margin HALF_SPACER_HEIGHT
background SEPARATOR
# Indents its contents.
style.l_indent = Style(style.l_default)
style.l_indent.left_margin = INDENT
# Small labels.
style l_label_small_text is l_default:
xpos INDENT
yoffset 6
size size(20)
# Indents its contents and pads them vertically.
style.l_indent_margin = Style(style.l_indent)
style.l_indent_margin.ymargin = 6
# Alternate labels. This nests inside an l_label, and gives a button
# or label that's nested inside another label.
# List button.
style.l_list = Style(style.l_default)
style.l_list.left_padding = HALF_INDENT
style.l_list.xfill = True
style.l_list.selected_background = REVERSE_IDLE
style.l_list.selected_hover_background = REVERSE_HOVER
style.l_list_text = Style(style.l_default)
style.l_list_text.idle_color = IDLE
style.l_list_text.hover_color = HOVER
style.l_list_text.selected_idle_color = REVERSE_TEXT
style.l_list_text.selected_hover_color = REVERSE_TEXT
style.l_list_text.insensitive_color = DISABLED
style l_alternate is l_default:
xalign 1.0
yalign 1.0
yoffset 4
right_margin INDENT
style.l_list2 = Style(style.l_list)
style.l_list2.left_padding = HALF_INDENT + INDENT
style.l_list2_text = Style(style.l_list_text)
style l_alternate_text is l_default:
size size(14)
font light_font()
textalign 1.0
style l_small_button is l_button
style l_small_button_text is l_button_text:
size size(14)
style l_small_text is l_text:
size size(14)
# Indents its contents.
style l_indent is l_default:
left_margin INDENT
# Indents its contents and pads vertically.
style l_indent_margin is l_indent:
ymargin 6
# Lists.
style l_list is l_default:
left_padding HALF_INDENT
xfill True
selected_background REVERSE_IDLE
selected_hover_background REVERSE_HOVER
style l_list_text is l_default:
idle_color IDLE
hover_color HOVER
selected_idle_color REVERSE_TEXT
selected_hover_color REVERSE_TEXT
insensitive_color DISABLED
style l_list2 is l_list:
left_padding (HALF_INDENT + INDENT)
style l_list2_text is l_list_text
# Scrollbar.
style l_vscrollbar is l_default:
thumb Fixed(
# Scrollbar.
style.l_vscrollbar = Style(style.l_default)
style.l_vscrollbar.thumb = Fixed(
Solid(SCROLLBAR_IDLE, xmaximum=8, xalign=0.5),
Transform('vscrollbar_center', xalign=0.5, yalign=0.5),
Image("vscrollbar_center.png", xalign=0.5, yalign=0.5),
xmaximum = SCROLLBAR_SIZE)
hover_thumb Fixed(
style.l_vscrollbar.hover_thumb = Fixed(
Solid(SCROLLBAR_HOVER, xmaximum=8, xalign=0.5),
Transform('vscrollbar_center', xalign=0.5, yalign=0.5),
Image("vscrollbar_center.png", xalign=0.5, yalign=0.5),
xmaximum = SCROLLBAR_SIZE)
xmaximum SCROLLBAR_SIZE
bar_vertical True
bar_invert True
unscrollable "hide"
style.l_vscrollbar.xmaximum = SCROLLBAR_SIZE
style.l_vscrollbar.bar_vertical = True
style.l_vscrollbar.bar_invert = True
style.l_vscrollbar.unscrollable = "hide"
# Information window.
style l_info_vbox is vbox:
yalign 0.5
xalign 0.5
xfill True
style l_info_frame is l_default:
ypadding 21
xfill True
background Fixed(
# Information window.
style.l_info_vbox = Style(style.vbox)
style.l_info_vbox.yalign = 0.5
style.l_info_vbox.xalign = 0.5
style.l_info_vbox.xfill = True
style.l_info_frame = Style(style.l_default)
style.l_info_frame.ypadding = 21
style.l_info_frame.xfill = True
style.l_info_frame.background = Fixed(
INFO_WINDOW,
Frame(PATTERN, 0, 0, tile=True, ymaximum=5, yalign=0.0, yoffset=8),
Frame(PATTERN, 0, 0, tile=True, ymaximum=5, yalign=1.0, yoffset=-8),
)
yminimum 180
ypos 75
style l_info_label is l_default:
xalign 0.5
ypos 75
yanchor 1.0
yoffset 12
style.l_info_frame.yminimum = 180
style.l_info_frame.ypos = 75
style l_info_label_text is l_default:
size size(36)
style.l_info_label = Style(style.l_default)
style.l_info_label.xalign = 0.5
style.l_info_label.ypos = 75
style.l_info_label.yanchor = 1.0
style.l_info_label.yoffset = 12
style.l_info_label_text = Style(style.l_default)
style.l_info_label_text.size = 36
style l_info_text is l_default:
xalign 0.5
style.l_info_text = Style(style.l_default)
style.l_info_text.xalign = 0.5
style l_info_button is l_button:
xalign 0.5
xmargin 50
style.l_info_button = Style(style.l_button)
style.l_info_button.xalign = 0.5
style.l_info_button.xmargin = 50
style.l_info_button_text = Style(style.l_button_text)
style.l_info_button_text.text_align = 0.5
style.l_info_button_text.layout = "subtitle"
style l_info_button_text is l_button_text:
textalign 0.5
layout "subtitle"
# Code navigation
style.l_navigation_button = Style(style.l_button)
style.l_navigation_button.size_group = "navigation"
style.l_navigation_button.right_margin = INDENT
style.l_navigation_button.top_margin = 3
style.l_navigation_button_text = Style(style.l_button_text)
style.l_navigation_button_text.size = 14
style.l_navigation_button_text.font = REGULAR
# Progress bar.
style l_progress_frame is l_default:
background Frame(PATTERN, 0, 0, tile=True)
ypadding 5
style.l_navigation_text = Style(style.l_text)
style.l_navigation_text.size = 12
style.l_navigation_text.font = LIGHT
style.l_navigation_text.color = TEXT
style l_progress_bar is l_default:
left_bar REVERSE_IDLE
right_bar Null()
ymaximum 24
# Check boxes
style.l_checkbox = Style(style.l_button)
style.l_checkbox.left_padding = INDENT
# Navigation.
style l_navigation_button is l_button:
size_group "navigation"
right_margin INDENT
top_margin 3
def checkbox(full, color):
if full:
return im.Twocolor("checkbox_full.png", color, color, yalign=0.5)
else:
return im.Twocolor("checkbox_empty.png", color, color, yalign=0.5)
style l_navigation_button_text is l_button_text:
size size(14)
font regular_font()
style.l_checkbox.background = checkbox(False, IDLE)
style.l_checkbox.hover_background = checkbox(False, HOVER)
style.l_checkbox.selected_idle_background = checkbox(True, IDLE)
style.l_checkbox.selected_hover_background = checkbox(True, HOVER)
style.l_checkbox.insensitive_background = checkbox(False, DISABLED)
style l_navigation_text is l_text:
size size(14)
font light_font()
color TEXT
style.l_checkbox_text = Style(style.l_button_text)
style.l_checkbox_text.selected_font = LIGHT
# Checkboxes.
style l_checkbox is l_button:
left_padding INDENT
background checkbox(False, IDLE)
hover_background checkbox(False, HOVER)
selected_idle_background checkbox(True, IDLE)
selected_hover_background checkbox(True, HOVER)
insensitive_background checkbox(False, DISABLED)
# A normal button that lines up with checkboxes.
style.l_nonbox = Style(style.l_button)
style.l_nonbox.xpadding = INDENT
style.l_nonbox_text = Style(style.l_button_text)
style.l_nonbox_text.selected_font = LIGHT
transform l_checkbox_box:
ycenter 11
# A progress bar and its frame.
style.l_progress_frame = Style(style.l_default)
style.l_progress_frame.background = Frame(PATTERN, 0, 0, tile=True)
style.l_progress_frame.ypadding = 5
style l_checkbox_text is l_button_text:
selected_font light_font()
selected_bold False
style.l_progress_bar = Style(style.l_default)
style.l_progress_bar.left_bar = REVERSE_IDLE
style.l_progress_bar.right_bar = Null()
style.l_progress_bar.ymaximum = 24
# Lines up with a checkbox.
style l_nonbox is l_button:
xpadding INDENT
# The projects window.
style.l_projects = Style(style.l_default)
style.l_projects.background = PROJECTS_WINDOW
style l_nonbox_text is l_button_text:
selected_font light_font()
# Projects list.
style l_projects is l_default:
background PROJECTS_WINDOW
style hyperlink_text:
size size(18)
font light_font()
color IDLE
hover_color HOVER
style.hyperlink_text.size = 18
style.hyperlink_text.font = LIGHT
style.hyperlink_text.color = IDLE
style.hyperlink_text.hover_color = HOVER
+6 -36
View File
@@ -1,28 +1,9 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2013 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python:
class FileTail(object):
def __init__(self, filename, lines=8):
@@ -32,20 +13,9 @@ init python:
def update(self):
def filter_text(s):
if "Unknown chunk type '200'" in s:
return False
return True
try:
with open(self.filename) as f:
text = f.read()
try:
text = renpy.fsdecode(text)
except Exception:
text = text.decode("latin-1")
text = text.strip()
text = text.split("\n")
@@ -55,9 +25,6 @@ init python:
if "\r" in l:
_head, _sep, l = l.rpartition("\r")
if not filter_text(l):
continue
while l:
newtext.append(l[:100])
l = l[100:]
@@ -70,5 +37,8 @@ init python:
self.text = text
renpy.restart_interaction()
except Exception:
except:
pass
-191
View File
@@ -1,191 +0,0 @@
init python:
TEST_PROJECTS = u"/tmp/renpy-moé"
import shutil
testcase default:
call new_project
call translate_project
call extract_dialogue
"Delete Persistent"
"Force Recompile"
call build_project
"quit"
testcase new_project:
python:
if os.path.exists(TEST_PROJECTS):
shutil.rmtree(TEST_PROJECTS)
os.mkdir(TEST_PROJECTS, 0o777)
persistent.projects_directory = TEST_PROJECTS
"refresh"
"Create New Project"
"Continue"
# Name
type "Test Project"
"Continue"
# Size
"1280x720"
"Continue"
# Color Selection
"Continue"
testcase choose_colors:
"Change/Update GUI"
"Choose new colors"
"Continue"
"Continue"
"Change/Update GUI"
"Regenerate the"
"Continue"
testcase delete10:
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
type BACKSPACE
testcase delete30:
call delete10
call delete10
call delete10
testcase translate_project:
"Generate Translations"
call delete30
type "piglatin"
"Generate Translations"
"Continue"
"Generate Translations"
"Extract String Translations"
"Continue"
"Generate Translations"
"Merge String Translations"
"Continue"
"Generate Translations"
"Update Default"
testcase build_project:
"Build Distributions"
"Build"
testcase extract_dialogue_common:
"Extract Dialogue"
"Strip text tags"
"Escape quotes"
"Extract all"
testcase extract_dialogue:
call extract_dialogue_common
"Tab-delimited"
"Continue"
"Continue"
call extract_dialogue_common
"Text Only"
"Continue"
"Continue"
testcase android:
$ _test.timeout = 60.0
$ _test.maximum_framerate = False
"Tutorial"
"Android"
# Download and install RAPT.
if "Yes":
"Yes"
"Proceed"
"Install SDK"
"Yes" until "Continue"
# We have to create the key.
if "Cancel":
type "Test Key"
"Continue"
"Continue"
# Configure the application.
"Configure"
$ _test.maximum_framerate = True
call delete30
type "Ren'Py Tutorial"
"Continue"
call delete30
type "Ren'Py Tutorial"
"Continue"
call delete30
type "org.renpy.tutorial"
"Continue"
call delete30
type "1.2.3"
"Continue"
call delete30
type "10203"
"Continue"
$ _test.maximum_framerate = False
"In landscape"
"Continue"
"Neither"
"Continue"
"No."
"Continue"
"Android 4.0"
"Continue"
# Access the internet.
"No"
"Continue"
# Build the package.
"Build Package"
"Continue"
"quit"
+4 -27
View File
@@ -1,23 +1,5 @@
# Copyright 2004-2023 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
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
init python in theme_data:
@@ -534,7 +516,7 @@ init python in theme_data:
THEME_FUNCTIONS.add(function)
THEME_SCREEN_OPERATIONS[theme] = roundrect_screen_ops
for scheme, colors in ROUNDRECT_SCHEMES.items():
for scheme, colors in ROUNDRECT_SCHEMES.iteritems():
subs = dict(colors)
subs["function"] = function
subs["theme"] = theme
@@ -572,11 +554,6 @@ init python in theme_data:
## should take up the full height and width of the screen.
gm_root = "%(gm_root)s",
## The fonts used by this theme. The default fonts may not be
## suitable for non-English languages.
regular_font = "_theme_awt/Quicksand-Regular.ttf",
bold_font = "_theme_awt/Quicksand-Bold.ttf",
## And we're done with the theme. The theme will customize
## various styles, so if we want to change them, we should
## do so below.
@@ -587,7 +564,7 @@ init python in theme_data:
THEME_SCREEN_OPERATIONS["A White Tulip"] = awt_screen_ops
for scheme, colors in ROUNDRECT_SCHEMES.items():
for scheme, colors in ROUNDRECT_SCHEMES.iteritems():
subs = dict(colors)
subs["scheme"] = scheme
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
# See LICENSE.txt for license details.
# This is used on Linux and Mac to prompt the user for the projects
# directory.
import sys
# Python3 and Python2-style imports.
try:
from tkinter import Tk
from tkinter.filedialog import askdirectory
except ImportError:
from Tkinter import Tk
from tkFileDialog import askdirectory
# Create the TK canvas.
if __name__ == "__main__":
root = Tk()
root.withdraw()
result = askdirectory(initialdir=sys.argv[1], parent=root, title="Select Ren'Py Projects Directory")
sys.stdout.write(result)
-335
View File
@@ -1,335 +0,0 @@
translate arabic strings:
# 00action_file.rpy:26
old "{#weekday}Monday"
new "{#weekday}الأثنين"
# 00action_file.rpy:26
old "{#weekday}Tuesday"
new "{#weekday}الثلاثاء"
# 00action_file.rpy:26
old "{#weekday}Wednesday"
new "{#weekday}الأربعاء"
# 00action_file.rpy:26
old "{#weekday}Thursday"
new "{#weekday}الخميس"
# 00action_file.rpy:26
old "{#weekday}Friday"
new "{#weekday}الجمعة"
# 00action_file.rpy:26
old "{#weekday}Saturday"
new "{#weekday}السبت"
# 00action_file.rpy:26
old "{#weekday}Sunday"
new "{#weekday}الأحد"
# 00action_file.rpy:37
old "{#weekday_short}Mon"
new "{#weekday_short}اثن"
# 00action_file.rpy:37
old "{#weekday_short}Tue"
new "{#weekday_short}ثلا"
# 00action_file.rpy:37
old "{#weekday_short}Wed"
new "{#weekday_short}أرب"
# 00action_file.rpy:37
old "{#weekday_short}Thu"
new "{#weekday_short}خمي"
# 00action_file.rpy:37
old "{#weekday_short}Fri"
new "{#weekday_short}جمع"
# 00action_file.rpy:37
old "{#weekday_short}Sat"
new "{#weekday_short}سبت"
# 00action_file.rpy:37
old "{#weekday_short}Sun"
new "{#weekday_short}أحد"
# 00action_file.rpy:47
old "{#month}January"
new "{#month}يناير"
# 00action_file.rpy:47
old "{#month}February"
new "{#month}فبراير"
# 00action_file.rpy:47
old "{#month}March"
new "{#month}مارس"
# 00action_file.rpy:47
old "{#month}April"
new "{#month}أبريل"
# 00action_file.rpy:47
old "{#month}May"
new "{#month}مايو"
# 00action_file.rpy:47
old "{#month}June"
new "{#month}يونيو"
# 00action_file.rpy:47
old "{#month}July"
new "{#month}يوليو"
# 00action_file.rpy:47
old "{#month}August"
new "{#month}أغسطس"
# 00action_file.rpy:47
old "{#month}September"
new "{#month}سبتمبر"
# 00action_file.rpy:47
old "{#month}October"
new "{#month}أكتوبر"
# 00action_file.rpy:47
old "{#month}November"
new "{#month}نوفمبر"
# 00action_file.rpy:47
old "{#month}December"
new "{#month}ديسمبر"
# 00action_file.rpy:63
old "{#month_short}Jan"
new "{#month_short}ينا"
# 00action_file.rpy:63
old "{#month_short}Feb"
new "{#month_short}فبر"
# 00action_file.rpy:63
old "{#month_short}Mar"
new "{#month_short}مار"
# 00action_file.rpy:63
old "{#month_short}Apr"
new "{#month_short}ابر"
# 00action_file.rpy:63
old "{#month_short}May"
new "{#month_short}ماي"
# 00action_file.rpy:63
old "{#month_short}Jun"
new "{#month_short}يون"
# 00action_file.rpy:63
old "{#month_short}Jul"
new "{#month_short}يول"
# 00action_file.rpy:63
old "{#month_short}Aug"
new "{#month_short}أغس"
# 00action_file.rpy:63
old "{#month_short}Sep"
new "{#month_short}سبتم"
# 00action_file.rpy:63
old "{#month_short}Oct"
new "{#month_short}أكت"
# 00action_file.rpy:63
old "{#month_short}Nov"
new "{#month_short}نوف"
# 00action_file.rpy:63
old "{#month_short}Dec"
new "{#month_short}ديس"
# 00action_file.rpy:235
old "%b %d, %H:%M"
new "%b %d, %H:%M"
# 00action_file.rpy:820
old "Quick save complete."
new "تم الحفظ السريع"
# 00gui.rpy:227
old "Are you sure?"
new "هل انت متأكد؟"
# 00gui.rpy:228
old "Are you sure you want to delete this save?"
new "هل انت متأكد من رغبتك في حذف خانة الحفظ هذه؟"
# 00gui.rpy:229
old "Are you sure you want to overwrite your save?"
new "هل انت متأكد من رغبتك في الحفظ على هذه الخانة؟"
# 00gui.rpy:230
old "Loading will lose unsaved progress.\nAre you sure you want to do this?"
new "الاسترجاع سيضيع كل ما فعلته منذ خانة الحفظ السابقة. \n هل انت متأكد من رغبتك في الاسترجاع إلى هذه النقطة؟"
# 00gui.rpy:231
old "Are you sure you want to quit?"
new "هل انت متأكد من رغبتك في الخروج؟"
# 00gui.rpy:232
old "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
new "هل انت متأكد من رغبتك في العودة للقائمة الرئيسية؟ \n كل ما لم تقم بحفظة سيضيع."
# 00gui.rpy:233
old "Are you sure you want to end the replay?"
new "هل أنت متأكد من رغبتك في الخروج من الإعادة؟"
# 00gui.rpy:234
old "Are you sure you want to begin skipping?"
new "هل أنت متأكد من رغبتك في البدء بالتسريع؟"
# 00gui.rpy:235
old "Are you sure you want to skip to the next choice?"
new "هل انت متأكد من رغبتك في التسريع حتى الخيار التالي؟"
# 00gui.rpy:236
old "Are you sure you want to skip unseen dialogue to the next choice?"
new "هل أنت متأكد من رغبتك في تسريع كل الحوارات حتى التي لم تسبق رؤيتها؟"
# 00keymap.rpy:250
old "Saved screenshot as %s."
new "تم حفظ الصورة كـ %s"
# 00library.rpy:142
old "Self-voicing disabled."
new "تم الغاء تفعيل النطق التلقائي."
# 00library.rpy:143
old "Clipboard voicing enabled. "
new "تم تفعيل النطق التلقائي من لوح الحفظ. "
# 00library.rpy:144
old "Self-voicing enabled. "
new "تم تفعيل النطق التلقائي."
# 00library.rpy:179
old "Skip Mode"
new "وضع التسريع"
# 00library.rpy:262
old "This program contains free software under a number of licenses, including the MIT License and GNU Lesser General Public License. A complete list of software, including links to full source code, can be found {a=https://www.renpy.org/l/license}here{/a}."
new "This program contains free software under a number of licenses, including the MIT License and GNU Lesser General Public License. A complete list of software, including links to full source code, can be found {a=https://www.renpy.org/l/license}here{/a}."
# 00preferences.rpy:422
old "Clipboard voicing enabled. Press 'shift+C' to disable."
new "تشغيل الأصوات من الحافظة مفعّل. إضغط لإيقافه زريّ: Shift+C"
# 00preferences.rpy:424
old "Self-voicing would say \"[renpy.display.tts.last]\". Press 'alt+shift+V' to disable."
new "Self-voicing would say \"[renpy.display.tts.last]\". Press 'alt+shift+V' to disable."
# 00preferences.rpy:426
old "Self-voicing enabled. Press 'v' to disable."
new "النطق التلقائي مفعَل. لإيقافه إضغط زر V"
# 00iap.rpy:217
old "Contacting App Store\nPlease Wait..."
new "Contacting App Store\nPlease Wait..."
# 00updater.rpy:367
old "The Ren'Py Updater is not supported on mobile devices."
new "تحديث برنامج رينباي غير مدعوم على الأجهزة المحمولة."
# 00updater.rpy:486
old "An error is being simulated."
new "يتم محاكاة خطأ الآن."
# 00updater.rpy:662
old "Either this project does not support updating, or the update status file was deleted."
new "هذا المشروع لا يدعم التحديث، أو أن ملف حالة نسخة البرنامج محذوفة."
# 00updater.rpy:676
old "This account does not have permission to perform an update."
new "هذا الحساب ليست لديه الصلاحية ليقوم بالتحديث."
# 00updater.rpy:679
old "This account does not have permission to write the update log."
new " هذا الحساب ليست لديه الصلاحية ليكتب ملف التحديث."
# 00updater.rpy:704
old "Could not verify update signature."
new "لم نتمكن من التحقق من توقيع التحديث update signature."
# 00updater.rpy:975
old "The update file was not downloaded."
new "لم يتم تحميل ملف التحديث."
# 00updater.rpy:993
old "The update file does not have the correct digest - it may have been corrupted."
new "ملف التحديث لا يحتوي على المختصرات الصحيحة - قد يكون معطوباً."
# 00updater.rpy:1049
old "While unpacking {}, unknown type {}."
new "عند فك الحزمة {}، نوع مجهول {}."
# 00updater.rpy:1393
old "Updater"
new "برنامج التحديث"
# 00updater.rpy:1404
old "This program is up to date."
new "هذه النسخة هي الأحدث"
# 00updater.rpy:1406
old "[u.version] is available. Do you want to install it?"
new "النسخة [u.version] متوفرة, هل ترغب في تنصيبها؟"
# 00updater.rpy:1408
old "Preparing to download the updates."
new "يتم التجهيز لتحميل البرنامج من الانترنت"
# 00updater.rpy:1410
old "Downloading the updates."
new "يتم تنزيل التحديثات"
# 00updater.rpy:1412
old "Unpacking the updates."
new "يتم فك الضغط عن التحديثات"
# 00updater.rpy:1416
old "The updates have been installed. The program will restart."
new "تم التحديث.. سيتم إعادة تشغيل البرنامج."
# 00updater.rpy:1418
old "The updates have been installed."
new "تم التحديث."
# 00updater.rpy:1420
old "The updates were cancelled."
new "تم إلغاء التحديث."
# 00gallery.rpy:563
old "Image [index] of [count] locked."
new "يوجد عدد صور [index] من أصل [count] مقفل"
# 00gallery.rpy:583
old "prev"
new "السابق"
# 00gallery.rpy:584
old "next"
new "التالي"
# 00gallery.rpy:585
old "slideshow"
new "عرض الشرائح"
# 00gallery.rpy:586
old "return"
new "العودة"
-179
View File
@@ -1,179 +0,0 @@
translate arabic strings:
# _developer/developer.rpym:38
old "Developer Menu"
new "قائمة المبرمج"
# _developer/developer.rpym:43
old "Reload Game (Shift+R)"
new "إعادة تشغيل اللعبة (Shift+R)"
# _developer/developer.rpym:45
old "Console (Shift+O)"
new "لوحة التحكم (Shift+O)"
# _developer/developer.rpym:47
old "Variable Viewer"
new "مستعرض الأوامر"
# _developer/developer.rpym:49
old "Theme Test"
new "اختبار القوالب"
# _developer/developer.rpym:51
old "Image Location Picker"
new "مكان الصور المطلوبة"
# _developer/developer.rpym:53
old "Filename List"
new "قائمة اسماء الملفات"
# _developer/developer.rpym:57
old "Show Image Load Log"
new "عرض قائمة الصور "
# _developer/developer.rpym:60
old "Hide Image Load Log"
new "إخفاء قائمة الصور"
# _developer/developer.rpym:95
old "Nothing to inspect."
new "لا يوجد شيء ليتم اختباره"
# _developer/developer.rpym:217
old "Return to the developer menu"
new "العودة للوحة المبرمج"
# _developer/developer.rpym:373
old "Rectangle: %r"
new "مثلث: %r"
# _developer/developer.rpym:378
old "Mouse position: %r"
new "مكان المؤشر: %r"
# _developer/developer.rpym:383
old "Right-click or escape to quit."
new "إضغط بالزر الايمن او إضغط زر الخروح للإغلاق"
# _developer/developer.rpym:412
old "Rectangle copied to clipboard."
new "تم نسخ المربع إلى الحافظة."
# _developer/developer.rpym:415
old "Position copied to clipboard."
new "تم نسخ الموضع إلى الحافظة."
# _developer/developer.rpym:524
old "✔ "
new "✔ "
# _developer/developer.rpym:527
old "✘ "
new "✘ "
# _developer/developer.rpym:532
old "\n{color=#cfc}✔ predicted image (good){/color}\n{color=#fcc}✘ unpredicted image (bad){/color}\n{color=#fff}Drag to move.{/color}"
new "\n{color=#cfc}✔ predicted image (good){/color}\n{color=#fcc}✘ unpredicted image (bad){/color}\n{color=#fff}Drag to move.{/color}"
# _developer/inspector.rpym:38
old "Displayable Inspector"
new "اختبار المستعرضات"
# _developer/inspector.rpym:61
old "Size"
new "حجم"
# _developer/inspector.rpym:65
old "Style"
new "مظهر"
# _developer/inspector.rpym:71
old "Location"
new "الموقع"
# _developer/inspector.rpym:122
old "Inspecting Styles of [displayable_name!q]"
new "يتم اختبار المظهر الخاص بـ [displayable_name!q]"
# _developer/inspector.rpym:139
old "displayable:"
new "مستعرضات"
# _developer/inspector.rpym:145
old " (no properties affect the displayable)"
new " (لا توجد اي مؤثرات على هذا المستعرض)"
# _developer/inspector.rpym:147
old " (default properties omitted)"
new " (تم استبعاد تأثير المؤثرات القياسية)"
# _developer/inspector.rpym:185
old "<repr() failed>"
new "<repr() failed>"
# 00console.rpy:182
old "Press <esc> to exit console. Type help for help.\n"
new "إضغط زر الخروج لإغلاق لوحة التحكم, اكتب كلمة help للمساعدة"
# 00console.rpy:186
old "Ren'Py script enabled."
new "لغة برمحة رينباي متاحه"
# 00console.rpy:188
old "Ren'Py script disabled."
new "لغة برمجة رينباي غير متاحه"
# 00console.rpy:398
old "help: show this help"
new "مساعده: عرض هذه المساعده"
# 00console.rpy:403
old "commands:\n"
new "أوامر: \n"
# 00console.rpy:413
old " <renpy script statement>: run the statement\n"
new "<renpy script statement>: عرض الأوامر\n"
# 00console.rpy:415
old " <python expression or statement>: run the expression or statement"
new " <python expression or statement>: عرض التعبير او الأوامر"
# 00console.rpy:423
old "clear: clear the console history"
new "clear: مسح تاريخ لوحة التحكم"
# 00console.rpy:427
old "exit: exit the console"
new "exit: الخروج من لوحة التحكم"
# 00console.rpy:435
old "load <slot>: loads the game from slot"
new "استرجاع <slot>: يقوم باسترجاع اللعب من نقطة الحفظ"
# 00console.rpy:448
old "save <slot>: saves the game in slot"
new "حفظ <slot>: يقوم بحفظ اللعب في نقطة الحفظ"
# 00console.rpy:459
old "reload: reloads the game, refreshing the scripts"
new "reload: يعيد تشغيل اللعبة مع عرض التغييرات في النص"
# 00console.rpy:467
old "watch <expression>: watch a python expression"
new "مشاهده <expression>: يقوم بعرض تعبيرات بايثون"
# 00console.rpy:493
old "unwatch <expression>: stop watching an expression"
new "unwatch <expression>: يقوم بإيقاف تعبير بايثون"
# 00console.rpy:519
old "unwatchall: stop watching all expressions"
new "unwatchall: يقوم بإيقاف كل تعبيرات بايثون"
# 00console.rpy:536
old "jump <label>: jumps to label"
new "jump <label>: يقفز للعنوان"
-179
View File
@@ -1,179 +0,0 @@
translate arabic strings:
# 00gltest.rpy:64
old "Graphics Acceleration"
new "تسريع الرسومات"
# 00gltest.rpy:70
old "Automatically Choose"
new "إختيار اوتوماتيكي"
# 00gltest.rpy:75
old "Force Angle/DirectX Renderer"
new "فرض الزاوية/دايركت × ومحركاته"
# 00gltest.rpy:79
old "Force OpenGL Renderer"
new "فرض محرك OpenGL"
# 00gltest.rpy:83
old "Force Software Renderer"
new "فرض محركات البرامج"
# 00gltest.rpy:93
old "Enable"
new "تفعيل"
# 00gltest.rpy:109
old "Changes will take effect the next time this program is run."
new "التغييرات سيتم تطبيقها في المرة القادمة تفتح البرنامج"
# 00gltest.rpy:141
old "Performance Warning"
new "تحذير تشغيلي"
# 00gltest.rpy:146
old "This computer is using software rendering."
new "هذا الحاسوب يستعمل محركات البرامج software rendering"
# 00gltest.rpy:148
old "This computer is not using shaders."
new "هذا الحاسوب لا يستعمل اي shaders"
# 00gltest.rpy:150
old "This computer is displaying graphics slowly."
new "هذا الحاسوب يستعرض الرسوميات بشكل بطيء"
# 00gltest.rpy:152
old "This computer has a problem displaying graphics: [problem]."
new "هذا الحاسوب يواجه مشكلة في عرض الرسوميات [problem]"
# 00gltest.rpy:157
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem."
new "محركات الرسوميات قد تكون قديمة او لا تعمل بشكل صحيح. قد يسبب ذلك بطء او اخطاء في الاستعراض, القيام بتحديث directX قد يساعد في حل المشكلة."
# 00gltest.rpy:159
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display."
new " محركات الرسوميات قد تكون قديمة او لا تعمل بشكل صحيح. قد يسبب ذلك بطء او اخطاء في الاستعراض."
# 00gltest.rpy:164
old "Update DirectX"
new "تحديث DirectX"
# 00gltest.rpy:170
old "Continue, Show this warning again"
new "استمرار, الرجاء عرض هذا التحذير في المرة الثادمة ايضاً"
# 00gltest.rpy:174
old "Continue, Don't show warning again"
new "استمرار, لا تعرض هذا التحذير مرة اخرى"
# 00gltest.rpy:192
old "Updating DirectX."
new "يتم تحديث DirectX"
# 00gltest.rpy:196
old "DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX."
new "يتم الآن تنصيب DirectX, قد يبدأ ذلك بشكل مصغر في شريط المهام. الرجاء اتباع التعليمات لاكمال التنصيب."
# 00gltest.rpy:200
old "{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box."
new "{b}ملاحظة:{/b} مايكروسوفت دايركت أكس يقوم تلقائياً بتنصيب شريط بينق Bing toolbar. إذا لم ترغب بذلك الرجاء القيام بإلغاء تحديد خانة الاختيار"
# 00gltest.rpy:204
old "When setup finishes, please click below to restart this program."
new "حيثن ينتهي التنصيب, الرجاء الضغط ادناه لإعادة تشغيل البرنامج"
# 00gltest.rpy:206
old "Restart"
new "إعادة تشغيل"
# 00gamepad.rpy:32
old "Select Gamepad to Calibrate"
new "الرجاء اختيار يد التحكم التي ترغب في تهيئتها"
# 00gamepad.rpy:35
old "No Gamepads Available"
new "لا توجد يد تحكم"
# 00gamepad.rpy:54
old "Calibrating [name] ([i]/[total])"
new "يتم تهيئة [name] ([i]/[total])"
# 00gamepad.rpy:58
old "Press or move the [control!s] [kind]."
new "الرجاء ضغط الزر او تحريك [control!s] [kind]."
# 00gamepad.rpy:66
old "Skip (A)"
new "تخطي (A)"
# 00gamepad.rpy:69
old "Back (B)"
new "عودة (B)"
# _errorhandling.rpym:495
old "Open Traceback"
new "قراءة التقرير"
# _errorhandling.rpym:497
old "Opens the traceback.txt file in a text editor."
new "يفتح تقرير الخطأ في برنامج الملفات النصية."
# _errorhandling.rpym:499
old "Copy to Clipboard"
new "نسخ إلى الحافظة"
# _errorhandling.rpym:501
old "Copies the traceback.txt file to the clipboard."
new "ينسخ ملف trackback.txt إلى الحافظة."
# _errorhandling.rpym:519
old "An exception has occurred."
new "حصل استثناء"
# _errorhandling.rpym:538
old "Rollback"
new "تراجع"
# _errorhandling.rpym:540
old "Attempts a roll back to a prior time, allowing you to save or choose a different choice."
new "يقوم بالتراجع لنقطة سابقة لكي تستطيع اختيار شيء آخر"
# _errorhandling.rpym:543
old "Ignore"
new "تجاهل"
# _errorhandling.rpym:545
old "Ignores the exception, allowing you to continue. This often leads to additional errors."
new "يتجاهل الاستثناء مما يستمح لك بالاستمرار. قد يسبب هذا المزيد من الاخطاء."
# _errorhandling.rpym:548
old "Reload"
new "إعادة المحاولة"
# _errorhandling.rpym:550
old "Reloads the game from disk, saving and restoring game state if possible."
new "يعيد تشغيل اللعبة من القرص الصلب, مع محاولة استعمادة آخر نقطة وحفظها عند الإستطاعة."
# _errorhandling.rpym:560
old "Quits the game."
new "يخرج من اللعبة."
# _errorhandling.rpym:582
old "Parsing the script failed."
new "حصل خطأ أثناء تشغيل النص."
# _errorhandling.rpym:606
old "Open Parse Errors"
new "يفتح قائمة اخطاء التشغيل."
# _errorhandling.rpym:608
old "Opens the errors.txt file in a text editor."
new "يفتح ملف errors.txt في برنامج الملفات النصية"
# _errorhandling.rpym:612
old "Copies the errors.txt file to the clipboard."
new "Copies the errors.txt file to the clipboard."
-411
View File
@@ -1,411 +0,0 @@
translate arabic strings:
# gui.rpy:2
old "## Initialization"
new "## تتم التهيئة الآن"
# gui.rpy:5
old "## The init offset statement causes the init code in this file to run before init code in any other file."
new "## The init offset statement causes the init code in this file to run before init code in any other file."
# gui.rpy:9
old "## Calling gui.init resets the styles to sensible default values, and sets the width and height of the game."
new "## Calling gui.init resets the styles to sensible default values, and sets the width and height of the game."
# gui.rpy:21
old "## Colors"
new "## الألوان"
# gui.rpy:23
old "## The colors of text in the interface."
new "## ألوان الخطوط الظاهرة في الواجهة."
# gui.rpy:25
old "## An accent color used throughout the interface to label and highlight text."
new "## لون إضافي ينطبق على الوسوم و العناوين الرئيسية في اماكن مختلفة من الواجهة."
# gui.rpy:29
old "## The color used for a text button when it is neither selected nor hovered."
new "## اللون المطلوب للأزرار حين لا تكون قيد الاستعمال ولا مظللة."
# gui.rpy:32
old "## The small color is used for small text, which needs to be brighter/darker to achieve the same effect."
new "## اللون الصغير هو اللون الذي ينطبق على الخطوط الصغيرة, والتي تحتاج ان تكون ذات لون فاتح او داكن اكثر مما حولها لتظهر بشكل واضح."
# gui.rpy:36
old "## The color that is used for buttons and bars that are hovered."
new "## اللون الذي ينطبق على الازرار و اشرطة التمرير عند تظليلها بالمؤشر."
# gui.rpy:39
old "## The color used for a text button when it is selected but not focused. A button is selected if it is the current screen or preference value."
new "## اللون الذي ينطبق على الزر المفعّل الآن لكن ليس حين يكون مظللا. تفعيل الزر هو ما يظهر عندما تكون في الصفحه الخاصة به او الصفحة التي يؤدي إليها."
# gui.rpy:43
old "## The color used for a text button when it cannot be selected."
new "## اللون الخاص بالزر حين يكون غير قابل للضغط."
# gui.rpy:46
old "## Colors used for the portions of bars that are not filled in. These are not used directly, but are used when re-generating bar image files."
new "## اللون الذي يتم استعماله لملء الفراغات في اشرطة التمرير. هذا اللون لا يظهر فعليا, لكن يتم استعماله عند اعادة تكوين الصور الخاصة باشرطة التمرير."
# gui.rpy:51
old "## The colors used for dialogue and menu choice text."
new "## اللون الخاص بالنص عند الحوار و في ازرار القائمة الرئيسية."
# gui.rpy:56
old "## Fonts and Font Sizes"
new "##نوع الخط و حجمه."
# gui.rpy:58
old "## The font used for in-game text."
new "##نوع الخط المستخدم داخل نص اللعبة."
# gui.rpy:61
old "## The font used for character names."
new "##نوع الخط المستخدم في أسماء الشخصيات."
# gui.rpy:64
old "## The font used for out-of-game text."
new "##نوع الخط المستخدم في النصوص خارج الحوار في اللعبة."
# gui.rpy:67
old "## The size of normal dialogue text."
new "##حجم الخط المستخدم في الحوار."
# gui.rpy:70
old "## The size of character names."
new "##حجم الخط المستخدم لأسماء الشخصيات."
# gui.rpy:73
old "## The size of text in the game's user interface."
new "##حجم الخط المستخدم في واجهة اللعبة التشغيلية."
# gui.rpy:76
old "## The size of labels in the game's user interface."
new "## حجم العناوين الرئيسية في واجهة اللعبة التشغيلية."
# gui.rpy:79
old "## The size of text on the notify screen."
new "##حجم الخط المستخدم في صفحة الملاحظات."
# gui.rpy:82
old "## The size of the game's title."
new "## حجم الخط المستخدم لعنوان اللعبة الرئيسي."
# gui.rpy:86
old "## Main and Game Menus"
new "## القائمة الرئيسية و قائمة اللعبة."
# gui.rpy:88
old "## The images used for the main and game menus."
new "## الصور المستخدمة في القائمة الرئيسية و قوائم اللعبة."
# gui.rpy:92
old "## Should we show the name and version of the game?"
new "## هل سنقوم بعرض اسم و نسخه اللعبة الحالية؟"
# gui.rpy:96
old "## Dialogue"
new "## الحوار"
# gui.rpy:98
old "## These variables control how dialogue is displayed on the screen one line at a time."
new "## هذه المتغيرات تقوم بتحديد طريقة عرض الحوار الظاهر على الشاشة سطراً سطراً."
# gui.rpy:101
old "## The height of the textbox containing dialogue."
new "## ارتفاع الصندوق الذي يحتوي على النصوص."
# gui.rpy:104
old "## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is center, and 1.0 is the bottom."
new "## مكان صندوق الحوار عموديا على الشاشة. 0.0 يضعه في الأعلى, 0.5 في المنتصف, و 1.0 يضع الصندوق في أسفل الشاشة."
# gui.rpy:109
old "## The placement of the speaking character's name, relative to the textbox. These can be a whole number of pixels from the left or top, or 0.5 to center."
new "##مكان الخانة الخاصة بعرض اسم الشخصية و تناسبها مع صندوق الحوار الرئيسي. يمكن وضع ارقام تعبر عن عدد البكسلات بينها و بين الجزء العلوي الأيسر من الشاشة, او استعمال نسبة مثل 0.5 لوضعها في المنتصف."
# gui.rpy:114
old "## The horizontal alignment of the character's name. This can be 0.0 for left-aligned, 0.5 for centered, and 1.0 for right-aligned."
new "##هذا يحدد مكان ظهور اسم الشخصية, يمكن ان يكون 0.0 ليقارب اليسار, 0.5 ليكون في المنتصف, و 1.0 ليقارب اليمين."
# gui.rpy:118
old "## The width, height, and borders of the box containing the character's name, or None to automatically size it."
new "## طول و عرض و ارتفاع الصندوق الذي يحتوي على اسم الشخصية, او None ليتم استعمال حجم قياسي."
# gui.rpy:123
old "## The borders of the box containing the character's name, in left, top, right, bottom order."
new "## حجم الخط الذي يحيط بصندوق اسم الشخصية, الاحجام بالترتيب هي اليسار, الأعلى, اليمين, و الأسفل."
# gui.rpy:127
old "## If True, the background of the namebox will be tiled, if False, the background of the namebox will be scaled."
new "## عندما يتم اختيار True سيتم تكرار الخلفية حتى تغطي الصندوق, عند اختيار False سيتم تمديد الصورة لتغطي الصندوق."
# gui.rpy:132
old "## The placement of dialogue relative to the textbox. These can be a whole number of pixels relative to the left or top side of the textbox, or 0.5 to center."
new "## مكان نص الحوار و تناسبه مع صندوق الحوار الرئيسي. يمكن وضع ارقام تعبر عن عدد البكسلات بينها و بين الجزء العلوي الأيسر من الشاشة, او استعمال نسبة مثل 0.5 لوضعه في المنتصف."
# gui.rpy:138
old "## The maximum width of dialogue text, in pixels."
new "## عدد البكسلات القصوى التي يمكن ان يتمدد إليها صندوق الحوار بالعرض."
# gui.rpy:141
old "## The horizontal alignment of the dialogue text. This can be 0.0 for left-aligned, 0.5 for centered, and 1.0 for right-aligned."
new "## اتجاه النص عرضياً: يمكن استعمال 0.0 ليقارب اليسار, 0.5 ليكون في المنتصف, و 1.0 ليقارب اليمين."
# gui.rpy:146
old "## Buttons"
new "## أزرار"
# gui.rpy:148
old "## These variables, along with the image files in gui/button, control aspects of how buttons are displayed."
new "## هذه المتغيرات تتشارك مع ملفات الصور في gui/button في تحديد مظهر الأزرار."
# gui.rpy:151
old "## The width and height of a button, in pixels. If None, Ren'Py computes a size."
new "## طول و عرض الزر بالبكسل. لو تم استعمال None سيقوم رينباي باختيار حجم مناسب."
# gui.rpy:155
old "## The borders on each side of the button, in left, top, right, bottom order."
new "## حجم الخط الذي يحيط بصندوق الزر, الاحجام بالترتيب هي اليسار, الأعلى, اليمين, و الأسفل."
# gui.rpy:158
old "## If True, the background image will be tiled. If False, the background image will be linearly scaled."
new "## عندما يتم اختيار True سيتم تكرار الخلفية حتى تغطي المساحه بأكملها, عند اختيار False سيتم تمديد الصورة."
# gui.rpy:162
old "## The font used by the button."
new "## الخط المستخدم في الزر."
# gui.rpy:165
old "## The size of the text used by the button."
new "## حجم الخط المستخدم في الزر."
# gui.rpy:179
old "## These variables override settings for different kinds of buttons. Please see the gui documentation for the kinds of buttons available, and what each is used for."
new "## هذه المتغيرات تقوم بتجاهل الخيارات التي تنطبق على انواع الازرار الأخرى. الرجاء قراءة دليل المستخدم الخاص بالواجهة للتعرف على انواع الازرار المتاحه و كيفية استعمالها."
# gui.rpy:183
old "## These customizations are used by the default interface:"
new "## هذه الخيارات تنطبق على الواجهة القياسية:"
# gui.rpy:198
old "## You can also add your own customizations, by adding properly-named variables. For example, you can uncomment the following line to set the width of a navigation button."
new "## يمكنك اضافة تغييرات يدويا عن طريق اضافة متغيرات بأسماء مميزة. مثلا, يمكنك ازالة اقتباسات الحماية ## عن السطر التالي لتغيير طول و عرض الازرار الخاصة بالقائمة."
# gui.rpy:205
old "## Choice Buttons"
new "## أزرار الخيارات"
# gui.rpy:207
old "## Choice buttons are used in the in-game menus."
new "## أزرار الخيارات يتم استعمالها داخل قوائم اللعبة."
# gui.rpy:220
old "## File Slot Buttons"
new "## أزرار قائمة الحفظ."
# gui.rpy:222
old "## A file slot button is a special kind of button. It contains a thumbnail image, and text describing the contents of the save slot. A save slot uses image files in gui/button, like the other kinds of buttons."
new "## زر خانة الحفظ هو زر مميز عن غيره لانه يعرض صورة رمزية و نص يشرح محتويات الخانة. زر الحفظ يستعمل صور من مجلد الواجهة مثل باقي الأزرار في gui/button."
# gui.rpy:226
old "## The save slot button."
new "## زر خانة الحفظ."
# gui.rpy:234
old "## The width and height of thumbnails used by the save slots."
new "## طول و عرض الصورة الرمزية لخانة الحفظ."
# gui.rpy:238
old "## The number of columns and rows in the grid of save slots."
new "## عدد الخانات الطولية و العرضية التي يمكن الحفظ فيها."
# gui.rpy:243
old "## Positioning and Spacing"
new "## مكان الخانات و المساحه بينها."
# gui.rpy:245
old "## These variables control the positioning and spacing of various user interface elements."
new "## هذه المتغيرات تحدد المساحة و مكان عرض عدة عناصر خاصة بالواجهة."
# gui.rpy:248
old "## The position of the left side of the navigation buttons, relative to the left side of the screen."
new "## مكان الجزء الأيسر من ازرار القوائم وتناسبه مع الحد الأيسر من الشاشة."
# gui.rpy:252
old "## The vertical position of the skip indicator."
new "## موقع مؤشر استمرار الحوار رأسياً."
# gui.rpy:255
old "## The vertical position of the notify screen."
new "## موقع شاشة التنبيهات رأسياً."
# gui.rpy:258
old "## The spacing between menu choices."
new "## الفراغات بين خيارات القوائم."
# gui.rpy:261
old "## Buttons in the navigation section of the main and game menus."
new "## الأزرار في صفحات الخيارات و القائمة الرئيسية."
# gui.rpy:264
old "## Controls the amount of spacing between preferences."
new "## يتحكم في المساحه بين الخيارات."
# gui.rpy:267
old "## Controls the amount of spacing between preference buttons."
new "## يتحكم في المساحه بين ازرار الخيارات."
# gui.rpy:270
old "## The spacing between file page buttons."
new "## المساحه بين ازرار صفحات الحفظ."
# gui.rpy:273
old "## The spacing between file slots."
new "## المساحه بين خانات الحفظ."
# gui.rpy:277
old "## Frames"
new "## الإطارات"
# gui.rpy:279
old "## These variables control the look of frames that can contain user interface components when an overlay or window is not present."
new "## هذه المتغيرات تحدد شكل الإطارات الخاصة بعناصر الواجهة عند انعدام نافذة تتحكم بظهورها."
# gui.rpy:282
old "## Generic frames that are introduced by player code."
new "## إطارات قياسية يتم تقديمها حسب برمجة اللاعب."
# gui.rpy:285
old "## The frame that is used as part of the confirm screen."
new "## الإطار الخاص بصفحة التأكيد."
# gui.rpy:288
old "## The frame that is used as part of the skip screen."
new "## الإطار المستخدم في صفحة التسريع."
# gui.rpy:291
old "## The frame that is used as part of the notify screen."
new "## الإطار المستخدم في صفحة التنبيهات."
# gui.rpy:294
old "## Should frame backgrounds be tiled?"
new "## هل تريد ان تكون خلفية الإطار متكررة؟"
# gui.rpy:298
old "## Bars, Scrollbars, and Sliders"
new "## أشرطة التمرير, الأشرطة, و العناصر المنزلقة."
# gui.rpy:300
old "## These control the look and size of bars, scrollbars, and sliders."
new "## هذه تتحكم بشكل و حجم الأشرطة والعناصر المنزلقة."
# gui.rpy:302
old "## The default GUI only uses sliders and vertical scrollbars. All of the other bars are only used in creator-written code."
new "## الواجهة القياسية لا تستخدم سوى العناصر المنزلقة و الأشرطة رأسياً, الأشرطة الباقية لا يتم استعمالها إلا عندما يقرر ذلك صانع اللعبة."
# gui.rpy:305
old "## The height of horizontal bars, scrollbars, and sliders. The width of vertical bars, scrollbars, and sliders."
new "## ارتفاع الأشرطة و العناصر المنزلقة الأفقية. سماكة الأشرطة و العناصر المنزلقة الرأسية."
# gui.rpy:311
old "## True if bar images should be tiled. False if they should be linearly scaled."
new "## استعمل True لتكون الصورة المستخدمة في الأشرطة المنزلقة متكررة, False ليتم تمديدها على حجم الشريط."
# gui.rpy:316
old "## Horizontal borders."
new "## الحاشية بالعرض."
# gui.rpy:321
old "## Vertical borders."
new "## الحاضية بالطول."
# gui.rpy:326
old "## What to do with unscrollable scrollbars in the gui. \"hide\" hides them, while None shows them."
new "## ماذا سنفعل بالأشرطة التي لا يمكن سحبها؟ يمكن استعمال hide لإخفائها, او None لتكون ظاهره في كل الاوقات."
# gui.rpy:331
old "## History"
new "## الحوار السابق"
# gui.rpy:333
old "## The history screen displays dialogue that the player has already dismissed."
new "## صفحة الحوار السابق تعرض الحوارات التي سبق للاعب قرائتها."
# gui.rpy:335
old "## The number of blocks of dialogue history Ren'Py will keep."
new "## عدد فقاعات الحوار التي سيحتفظ بها رينباي في صفحة الحوار السابق."
# gui.rpy:338
old "## The height of a history screen entry, or None to make the height variable at the cost of performance."
new "## ارتفاع صفحة عرض الحوار السابق, او None ليكون الإرتفاع متغير مع ملاحظة انه يؤثر في الأداء العام."
# gui.rpy:342
old "## The position, width, and alignment of the label giving the name of the speaking character."
new "## الموقع, العرض, و اتجاه النص الخاص باسم الشخصية المعروض."
# gui.rpy:349
old "## The position, width, and alignment of the dialogue text."
new "## الموقع, العرض و اتجاه النص الخاص بالحوار المعروض."
# gui.rpy:356
old "## NVL-Mode"
new "## NVL-Mode أسلوب عرض الحوار الروائي."
# gui.rpy:358
old "## The NVL-mode screen displays the dialogue spoken by NVL-mode characters."
new "## شاشة عرض الأسلوب الروائي تعرض ما قالته شخصيات تم تخصيصها للحوار الروائي."
# gui.rpy:360
old "## The borders of the background of the NVL-mode background window."
new "## حاشية الخلفية المستخدمة في نافذة الحوار الخاصة بالحوار الروائي."
# gui.rpy:363
old "## The height of an NVL-mode entry. Set this to None to have the entries dynamically adjust height."
new "## إرتفاع النافذة الخاصة بعرض الحوار الروائي. استعمل None لتناسب النافذة الحوار المعروض لكل فقاعه حوار."
# gui.rpy:367
old "## The spacing between NVL-mode entries when gui.nvl_height is None, and between NVL-mode entries and an NVL-mode menu."
new "## المساحه بين العناصر عندما يكون النظام الروائي يستعمل متغير None في سطر gui.nvl_height و المساحه بين اجزاء الحوار والقائمة في الحوار الروائي."
# gui.rpy:384
old "## The position, width, and alignment of nvl_thought text (the text said by the nvl_narrator character.)"
new "## موقع, عرض و اتجاه النص الخاص بشخصية التفكير nvl_thought, الحوار المنطوق من قبل شخصية nvl_narrator تم تحديدها في ملف حوار اللعبة."
# gui.rpy:391
old "## The position of nvl menu_buttons."
new "## موقع ازرار القائمة في nvl menu_buttons."
# gui.rpy:403
old "## This increases the size of the quick buttons to make them easier to touch on tablets and phones."
new "## يقوم بتكبير المساحه الخاصة بازرار الاختصارات ليكون استعمالها اسهل على شاشات الاجهزة المحمولة و التابلت."
# gui.rpy:409
old "## This changes the size and spacing of various GUI elements to ensure they are easily visible on phones."
new "## يقوم بتغيير المساحات بين العناصر في اماكن مختلفة من الواجهة لتكون اسهل في الرؤية و الاستعمال على شاشات المحمول و التابلت."
# gui.rpy:413
old "## Font sizes."
new "## حجم النص."
# gui.rpy:421
old "## Adjust the location of the textbox."
new "## تحديد مكان مربع الحوار."
# gui.rpy:427
old "## Change the size and spacing of items in the game menu."
new "## تغيير الحجم و المساحه بين العناصر في قائمة اللعبة."
# gui.rpy:436
old "## File button layout."
new "## ترتيب ازرار الملفات."
# gui.rpy:440
old "## NVL-mode."
new "## NVL-mode نظام الحوار الروائي."
# gui.rpy:456
old "## Quick buttons."
new "## إختصارات."
File diff suppressed because it is too large Load Diff
-27
View File
@@ -1,27 +0,0 @@
translate arabic strings:
# _layout/classic_joystick_preferences.rpym:94
old "Joystick Mapping"
new "خيارات عصى التحكم"
# _layout/classic_load_save.rpym:138
old "Empty Slot."
new "خانة فارغة"
# _layout/classic_load_save.rpym:170
old "a"
new "a"
# _layout/classic_load_save.rpym:179
old "q"
new "q"
# _compat/gamemenu.rpym:355
old "Previous"
new "السابق"
# _compat/gamemenu.rpym:362
old "Next"
new "التالي"
-195
View File
@@ -1,195 +0,0 @@
translate arabic strings:
# options.rpy:1
old "## This file contains options that can be changed to customize your game."
new "## هذا الملف يحتوي على الخيارات التي تستطيع تعديلها لتغيير محتويات لعبتك."
# options.rpy:4
old "## Lines beginning with two '#' marks are comments, and you shouldn't uncomment them. Lines beginning with a single '#' mark are commented-out code, and you may want to uncomment them when appropriate."
new "## الأسطر التي تبدأ بهذا الشعار مرتين'#' هي أسطر مقتبسه و لا يفترض عليك تغييرها. الأسطر التي تحتوي على '#' واحده هي أسطر برمجة يمكنك الغاء الاقتباس عندها لتفعيلها."
# options.rpy:10
old "## Basics"
new "## الأساسيات"
# options.rpy:12
old "## A human-readable name of the game. This is used to set the default window title, and shows up in the interface and error reports."
new "## الإسم الرسمي للعبه. يتم استعمال هذا السطر كإسم النافذة و يظهرفي واجهة النظام التشغيلية و ملفات حصر الأخطاء."
# options.rpy:15
old "## The _() surrounding the string marks it as eligible for translation."
new "## رمز _() حول النصوص يجعلها قابلة للترجمة."
# options.rpy:17
old "Ren'Py 7 Default GUI"
new "الواجهة التشغيلية القياسية لـ رينباي7"
# options.rpy:20
old "## Determines if the title given above is shown on the main menu screen. Set this to False to hide the title."
new "## يحدد إذا ما تم إظهار العنوان في القائمة الرئيسية. لإخفاء العنوان اجعله False."
# options.rpy:26
old "## The version of the game."
new "## نسخه اللعبة."
# options.rpy:31
old "## Text that is placed on the game's about screen. To insert a blank line between paragraphs, write \\n\\n."
new "## النص الظاهر على شاشة اللعبه. لإظهار سطر فارغ بين اجزاء النص اكتب \\n\\n."
# options.rpy:37
old "## A short name for the game used for executables and directories in the built distribution. This must be ASCII-only, and must not contain spaces, colons, or semicolons."
new "## اسم مختصر للعبه يتم استعماله في ملفات التشغيل و نسخ النشر. يجب ان يحتوي على احرف انجليزية فقط, دون فراغات ولا فواصل ولا فواصل منقوطة."
# options.rpy:44
old "## Sounds and music"
new "## الصوت و الموسيقى"
# options.rpy:46
old "## These three variables control which mixers are shown to the player by default. Setting one of these to False will hide the appropriate mixer."
new "## هذه المتغيرات الثلاثة تحدد معالجات الأصوات الظاهره بشكل قياسي للاعب. إلغاء أحدها يجعله يختفي من الواجهة عن طريق اختيار False."
# options.rpy:55
old "## To allow the user to play a test sound on the sound or voice channel, uncomment a line below and use it to set a sample sound to play."
new "## يسمح للاعب ان يسمع صوتا لاختبار ارتفاع الصوت او النطق, إمسح الاقتباس عن السطر التالي ليتم تفعيل زر العينة الصوتية."
# options.rpy:62
old "## Uncomment the following line to set an audio file that will be played while the player is at the main menu. This file will continue playing into the game, until it is stopped or another file is played."
new "## Uncomment the following line to set an audio file that will be played while the player is at the main menu. This file will continue playing into the game, until it is stopped or another file is played."
# options.rpy:69
old "## Transitions"
new "## الإنتقال"
# options.rpy:71
old "## These variables set transitions that are used when certain events occur. Each variable should be set to a transition, or None to indicate that no transition should be used."
new "## These variables set transitions that are used when certain events occur. Each variable should be set to a transition, or None to indicate that no transition should be used."
# options.rpy:75
old "## Entering or exiting the game menu."
new "## الدخول او الخروج من قائمة اللعبة."
# options.rpy:81
old "## A transition that is used after a game has been loaded."
new "## الإنتقال الذي يحصل بعد ان تنتهي اللعبة من الإقلاع."
# options.rpy:86
old "## Used when entering the main menu after the game has ended."
new "## يظهر عند الدخول إلى القائمة الرئيسية بعد انتهاء اللعبة."
# options.rpy:91
old "## A variable to set the transition used when the game starts does not exist. Instead, use a with statement after showing the initial scene."
new "## A variable to set the transition used when the game starts does not exist. Instead, use a with statement after showing the initial scene."
# options.rpy:96
old "## Window management"
new "## خيارات النافذة"
# options.rpy:98
old "## This controls when the dialogue window is displayed. If \"show\", it is always displayed. If \"hide\", it is only displayed when dialogue is present. If \"auto\", the window is hidden before scene statements and shown again once dialogue is displayed."
new "## This controls when the dialogue window is displayed. If \"show\", it is always displayed. If \"hide\", it is only displayed when dialogue is present. If \"auto\", the window is hidden before scene statements and shown again once dialogue is displayed."
# options.rpy:103
old "## After the game has started, this can be changed with the \"window show\", \"window hide\", and \"window auto\" statements."
new "## After the game has started, this can be changed with the \"window show\", \"window hide\", and \"window auto\" statements."
# options.rpy:109
old "## Transitions used to show and hide the dialogue window"
new "## الإنتقالات البصرية المستخدمه عند إظهار و إخفاء مربع الحوار"
# options.rpy:115
old "## Preference defaults"
new "## الخيارات القياسية"
# options.rpy:117
old "## Controls the default text speed. The default, 0, is infinite, while any other number is the number of characters per second to type out."
new "## Controls the default text speed. The default, 0, is infinite, while any other number is the number of characters per second to type out."
# options.rpy:123
old "## The default auto-forward delay. Larger numbers lead to longer waits, with 0 to 30 being the valid range."
new "## The default auto-forward delay. Larger numbers lead to longer waits, with 0 to 30 being the valid range."
# options.rpy:129
old "## Save directory"
new "## مجلد الحفظ"
# options.rpy:131
old "## Controls the platform-specific place Ren'Py will place the save files for this game. The save files will be placed in:"
new "## Controls the platform-specific place Ren'Py will place the save files for this game. The save files will be placed in:"
# options.rpy:134
old "## Windows: %APPDATA\\RenPy\\<config.save_directory>"
new "## Windows: %APPDATA\\RenPy\\<config.save_directory>"
# options.rpy:136
old "## Macintosh: $HOME/Library/RenPy/<config.save_directory>"
new "## Macintosh: $HOME/Library/RenPy/<config.save_directory>"
# options.rpy:138
old "## Linux: $HOME/.renpy/<config.save_directory>"
new "## Linux: $HOME/.renpy/<config.save_directory>"
# options.rpy:140
old "## This generally should not be changed, and if it is, should always be a literal string, not an expression."
new "## This generally should not be changed, and if it is, should always be a literal string, not an expression."
# options.rpy:146
old "## Icon ########################################################################'"
new "## أيقونة ########################################################################'"
# options.rpy:148
old "## The icon displayed on the taskbar or dock."
new "## الأيقونة الظاهرة في شريط البرامج."
# options.rpy:153
old "## Build configuration"
new "## معلومات ملف النشر"
# options.rpy:155
old "## This section controls how Ren'Py turns your project into distribution files."
new "## هذا الجزء يتحكم بالمعلومات التي يستعملها رينباي لتحويل مشروعك إلى ملفات يمكن نشرها."
# options.rpy:160
old "## The following functions take file patterns. File patterns are case- insensitive, and matched against the path relative to the base directory, with and without a leading /. If multiple patterns match, the first is used."
new "## The following functions take file patterns. File patterns are case- insensitive, and matched against the path relative to the base directory, with and without a leading /. If multiple patterns match, the first is used."
# options.rpy:165
old "## In a pattern:"
new "## In a pattern:"
# options.rpy:167
old "## / is the directory separator."
new "## / is the directory separator."
# options.rpy:169
old "## * matches all characters, except the directory separator."
new "## * matches all characters, except the directory separator."
# options.rpy:171
old "## ** matches all characters, including the directory separator."
new "## ** matches all characters, including the directory separator."
# options.rpy:173
old "## For example, \"*.txt\" matches txt files in the base directory, \"game/**.ogg\" matches ogg files in the game directory or any of its subdirectories, and \"**.psd\" matches psd files anywhere in the project."
new "## For example, \"*.txt\" matches txt files in the base directory, \"game/**.ogg\" matches ogg files in the game directory or any of its subdirectories, and \"**.psd\" matches psd files anywhere in the project."
# options.rpy:177
old "## Classify files as None to exclude them from the built distributions."
new "## Classify files as None to exclude them from the built distributions."
# options.rpy:185
old "## To archive files, classify them as 'archive'."
new "## To archive files, classify them as 'archive'."
# options.rpy:190
old "## Files matching documentation patterns are duplicated in a mac app build, so they appear in both the app and the zip file."
new "## Files matching documentation patterns are duplicated in a mac app build, so they appear in both the app and the zip file."
# options.rpy:196
old "## A Google Play license key is required to download expansion files and perform in-app purchases. It can be found on the \"Services & APIs\" page of the Google Play developer console."
new "## A Google Play license key is required to download expansion files and perform in-app purchases. It can be found on the \"Services & APIs\" page of the Google Play developer console."
# options.rpy:203
old "## The username and project name associated with an itch.io project, separated by a slash."
new "## The username and project name associated with an itch.io project, separated by a slash."
-642
View File
@@ -1,642 +0,0 @@
translate arabic strings:
# screens.rpy:9
old "## Styles"
new "## Styles"
# screens.rpy:87
old "## In-game screens"
new "## In-game screens"
# screens.rpy:91
old "## Say screen"
new "## Say screen"
# screens.rpy:93
old "## The say screen is used to display dialogue to the player. It takes two parameters, who and what, which are the name of the speaking character and the text to be displayed, respectively. (The who parameter can be None if no name is given.)"
new "## The say screen is used to display dialogue to the player. It takes two parameters, who and what, which are the name of the speaking character and the text to be displayed, respectively. (The who parameter can be None if no name is given.)"
# screens.rpy:98
old "## This screen must create a text displayable with id \"what\", as Ren'Py uses this to manage text display. It can also create displayables with id \"who\" and id \"window\" to apply style properties."
new "## This screen must create a text displayable with id \"what\", as Ren'Py uses this to manage text display. It can also create displayables with id \"who\" and id \"window\" to apply style properties."
# screens.rpy:102
old "## https://www.renpy.org/doc/html/screen_special.html#say"
new "## https://www.renpy.org/doc/html/screen_special.html#say"
# screens.rpy:169
old "## Input screen"
new "## Input screen"
# screens.rpy:171
old "## This screen is used to display renpy.input. The prompt parameter is used to pass a text prompt in."
new "## This screen is used to display renpy.input. The prompt parameter is used to pass a text prompt in."
# screens.rpy:174
old "## This screen must create an input displayable with id \"input\" to accept the various input parameters."
new "## This screen must create an input displayable with id \"input\" to accept the various input parameters."
# screens.rpy:177
old "## http://www.renpy.org/doc/html/screen_special.html#input"
new "## http://www.renpy.org/doc/html/screen_special.html#input"
# screens.rpy:205
old "## Choice screen"
new "## Choice screen"
# screens.rpy:207
old "## This screen is used to display the in-game choices presented by the menu statement. The one parameter, items, is a list of objects, each with caption and action fields."
new "## This screen is used to display the in-game choices presented by the menu statement. The one parameter, items, is a list of objects, each with caption and action fields."
# screens.rpy:211
old "## http://www.renpy.org/doc/html/screen_special.html#choice"
new "## http://www.renpy.org/doc/html/screen_special.html#choice"
# screens.rpy:221
old "## When this is true, menu captions will be spoken by the narrator. When false, menu captions will be displayed as empty buttons."
new "## When this is true, menu captions will be spoken by the narrator. When false, menu captions will be displayed as empty buttons."
# screens.rpy:244
old "## Quick Menu screen"
new "## Quick Menu screen"
# screens.rpy:246
old "## The quick menu is displayed in-game to provide easy access to the out-of-game menus."
new "## The quick menu is displayed in-game to provide easy access to the out-of-game menus."
# screens.rpy:261
old "Back"
new "عودة"
# screens.rpy:262
old "History"
new "سجل الحوار"
# screens.rpy:263
old "Skip"
new "تخطي"
# screens.rpy:264
old "Auto"
new "تلقائي"
# screens.rpy:265
old "Save"
new "حفظ"
# screens.rpy:266
old "Q.Save"
new "حفظ سريع"
# screens.rpy:267
old "Q.Load"
new "استرجاع سريع"
# screens.rpy:268
old "Prefs"
new "خيارات"
# screens.rpy:271
old "## This code ensures that the quick_menu screen is displayed in-game, whenever the player has not explicitly hidden the interface."
new "## This code ensures that the quick_menu screen is displayed in-game, whenever the player has not explicitly hidden the interface."
# screens.rpy:291
old "## Navigation screen"
new "## Navigation screen"
# screens.rpy:293
old "## This screen is included in the main and game menus, and provides navigation to other menus, and to start the game."
new "## This screen is included in the main and game menus, and provides navigation to other menus, and to start the game."
# screens.rpy:308
old "Start"
new "إبدأ"
# screens.rpy:316
old "Load"
new "استرجاع"
# screens.rpy:318
old "Preferences"
new "خيارات"
# screens.rpy:322
old "End Replay"
new "End Replay"
# screens.rpy:326
old "Main Menu"
new "القائمة الرئيسية"
# screens.rpy:328
old "About"
new "معلومات"
# screens.rpy:332
old "## Help isn't necessary or relevant to mobile devices."
new "## Help isn't necessary or relevant to mobile devices."
# screens.rpy:333
old "Help"
new "مساعدة"
# screens.rpy:335
old "## The quit button is banned on iOS and unnecessary on Android."
new "## The quit button is banned on iOS and unnecessary on Android."
# screens.rpy:336
old "Quit"
new "خروج"
# screens.rpy:350
old "## Main Menu screen"
new "## Main Menu screen"
# screens.rpy:352
old "## Used to display the main menu when Ren'Py starts."
new "## Used to display the main menu when Ren'Py starts."
# screens.rpy:354
old "## http://www.renpy.org/doc/html/screen_special.html#main-menu"
new "## http://www.renpy.org/doc/html/screen_special.html#main-menu"
# screens.rpy:369
old "## The use statement includes another screen inside this one. The actual contents of the main menu are in the navigation screen."
new "## The use statement includes another screen inside this one. The actual contents of the main menu are in the navigation screen."
# screens.rpy:413
old "## Game Menu screen"
new "## Game Menu screen"
# screens.rpy:415
old "## This lays out the basic common structure of a game menu screen. It's called with the screen title, and displays the background, title, and navigation."
new "## This lays out the basic common structure of a game menu screen. It's called with the screen title, and displays the background, title, and navigation."
# screens.rpy:418
old "## The scroll parameter can be None, or one of \"viewport\" or \"vpgrid\". This screen is intended to be used with one or more children, which are transcluded (placed) inside it."
new "## The scroll parameter can be None, or one of \"viewport\" or \"vpgrid\". This screen is intended to be used with one or more children, which are transcluded (placed) inside it."
# screens.rpy:476
old "Return"
new "عودة"
# screens.rpy:539
old "## About screen"
new "## About screen"
# screens.rpy:541
old "## This screen gives credit and copyright information about the game and Ren'Py."
new "## This screen gives credit and copyright information about the game and Ren'Py."
# screens.rpy:544
old "## There's nothing special about this screen, and hence it also serves as an example of how to make a custom screen."
new "## There's nothing special about this screen, and hence it also serves as an example of how to make a custom screen."
# screens.rpy:551
old "## This use statement includes the game_menu screen inside this one. The vbox child is then included inside the viewport inside the game_menu screen."
new "## This use statement includes the game_menu screen inside this one. The vbox child is then included inside the viewport inside the game_menu screen."
# screens.rpy:561
old "Version [config.version!t]\n"
new "Version [config.version!t]\n"
# screens.rpy:563
old "## gui.about is usually set in options.rpy."
new "## gui.about is usually set in options.rpy."
# screens.rpy:567
old "Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]"
new "Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]"
# screens.rpy:570
old "## This is redefined in options.rpy to add text to the about screen."
new "## This is redefined in options.rpy to add text to the about screen."
# screens.rpy:582
old "## Load and Save screens"
new "## Load and Save screens"
# screens.rpy:584
old "## These screens are responsible for letting the player save the game and load it again. Since they share nearly everything in common, both are implemented in terms of a third screen, file_slots."
new "## These screens are responsible for letting the player save the game and load it again. Since they share nearly everything in common, both are implemented in terms of a third screen, file_slots."
# screens.rpy:588
old "## https://www.renpy.org/doc/html/screen_special.html#save https://www.renpy.org/doc/html/screen_special.html#load"
new "## https://www.renpy.org/doc/html/screen_special.html#save https://www.renpy.org/doc/html/screen_special.html#load"
# screens.rpy:607
old "Page {}"
new "صفحة {}"
# screens.rpy:607
old "Automatic saves"
new "الحفظ التلقائي"
# screens.rpy:607
old "Quick saves"
new "الحفظ السريع"
# screens.rpy:613
old "## This ensures the input will get the enter event before any of the buttons do."
new "## This ensures the input will get the enter event before any of the buttons do."
# screens.rpy:629
old "## The grid of file slots."
new "## The grid of file slots."
# screens.rpy:649
old "{#file_time}%A, %B %d %Y, %H:%M"
new "{#file_time}%A, %B %d %Y, %H:%M"
# screens.rpy:649
old "empty slot"
new "خانة فارغة"
# screens.rpy:657
old "## Buttons to access other pages."
new "## Buttons to access other pages."
# screens.rpy:666
old "<"
new "<"
# screens.rpy:668
old "{#auto_page}A"
new "{#auto_page}ت"
# screens.rpy:670
old "{#quick_page}Q"
new "{#quick_page}س"
# screens.rpy:676
old ">"
new ">"
# screens.rpy:711
old "## Preferences screen"
new "## Preferences screen"
# screens.rpy:713
old "## The preferences screen allows the player to configure the game to better suit themselves."
new "## The preferences screen allows the player to configure the game to better suit themselves."
# screens.rpy:716
old "## https://www.renpy.org/doc/html/screen_special.html#preferences"
new "## https://www.renpy.org/doc/html/screen_special.html#preferences"
# screens.rpy:738
old "Display"
new "عرض"
# screens.rpy:739
old "Window"
new "نافذة"
# screens.rpy:740
old "Fullscreen"
new "ملء الشاشة"
# screens.rpy:744
old "Rollback Side"
new "Rollback Side"
# screens.rpy:745
old "Disable"
new "غير مفعّل"
# screens.rpy:746
old "Left"
new "يسار"
# screens.rpy:747
old "Right"
new "يمين"
# screens.rpy:752
old "Unseen Text"
new "النصوص التي لم تُشاهَد بعد"
# screens.rpy:753
old "After Choices"
new "بعد الإختيار"
# screens.rpy:754
old "Transitions"
new "التأثيرات البصرية"
# screens.rpy:756
old "## Additional vboxes of type \"radio_pref\" or \"check_pref\" can be added here, to add additional creator-defined preferences."
new "## Additional vboxes of type \"radio_pref\" or \"check_pref\" can be added here, to add additional creator-defined preferences."
# screens.rpy:767
old "Text Speed"
new "سرعة النص"
# screens.rpy:771
old "Auto-Forward Time"
new "وقت التسريع التلقائي"
# screens.rpy:778
old "Music Volume"
new "مستوى الموسيقى"
# screens.rpy:785
old "Sound Volume"
new "مستوى الأصوات"
# screens.rpy:791
old "Test"
new "تجربة"
# screens.rpy:795
old "Voice Volume"
new "مستوى صوت الكلام"
# screens.rpy:806
old "Mute All"
new "كتم الكل"
# screens.rpy:882
old "## History screen"
new "## History screen"
# screens.rpy:884
old "## This is a screen that displays the dialogue history to the player. While there isn't anything special about this screen, it does have to access the dialogue history stored in _history_list."
new "## This is a screen that displays the dialogue history to the player. While there isn't anything special about this screen, it does have to access the dialogue history stored in _history_list."
# screens.rpy:888
old "## https://www.renpy.org/doc/html/history.html"
new "## https://www.renpy.org/doc/html/history.html"
# screens.rpy:894
old "## Avoid predicting this screen, as it can be very large."
new "## Avoid predicting this screen, as it can be very large."
# screens.rpy:905
old "## This lays things out properly if history_height is None."
new "## This lays things out properly if history_height is None."
# screens.rpy:914
old "## Take the color of the who text from the Character, if set."
new "## Take the color of the who text from the Character, if set."
# screens.rpy:921
old "The dialogue history is empty."
new "The dialogue history is empty."
# screens.rpy:965
old "## Help screen"
new "## Help screen"
# screens.rpy:967
old "## A screen that gives information about key and mouse bindings. It uses other screens (keyboard_help, mouse_help, and gamepad_help) to display the actual help."
new "## A screen that gives information about key and mouse bindings. It uses other screens (keyboard_help, mouse_help, and gamepad_help) to display the actual help."
# screens.rpy:986
old "Keyboard"
new "لوحة المفاتيح"
# screens.rpy:987
old "Mouse"
new "الفأرة"
# screens.rpy:990
old "Gamepad"
new "عصا اللعب"
# screens.rpy:1003
old "Enter"
new "Enter"
# screens.rpy:1004
old "Advances dialogue and activates the interface."
new "التقدم في الحوار والتفاعل مع الواجهة."
# screens.rpy:1007
old "Space"
new "Space"
# screens.rpy:1008
old "Advances dialogue without selecting choices."
new "التقدم في الحوار دون تحديد الخيارات."
# screens.rpy:1011
old "Arrow Keys"
new "مفاتيح الأسهم"
# screens.rpy:1012
old "Navigate the interface."
new "لتصفح الواجهة."
# screens.rpy:1015
old "Escape"
new "Escape"
# screens.rpy:1016
old "Accesses the game menu."
new "للوصول لقائمة اللعبة."
# screens.rpy:1019
old "Ctrl"
new "Ctrl"
# screens.rpy:1020
old "Skips dialogue while held down."
new "لتخطي الحوار عند الإستمرار بالضغط."
# screens.rpy:1023
old "Tab"
new "Tab"
# screens.rpy:1024
old "Toggles dialogue skipping."
new "للتبديل بين أنظمة تخطي الحوار."
# screens.rpy:1027
old "Page Up"
new "Page Up"
# screens.rpy:1028
old "Rolls back to earlier dialogue."
new "للعودة للنص السابق."
# screens.rpy:1031
old "Page Down"
new "Page Down"
# screens.rpy:1032
old "Rolls forward to later dialogue."
new "للإستمرار للنص اللاحق."
# screens.rpy:1036
old "Hides the user interface."
new "لإخفاء الواجهة."
# screens.rpy:1040
old "Takes a screenshot."
new "إلتقاط صورة من الشاشة."
# screens.rpy:1044
old "Toggles assistive {a=https://www.renpy.org/l/voicing}self-voicing{/a}."
new "تفعيل مساعدة {a=https://www.renpy.org/l/voicing}الصوت التلقائي{/a}."
# screens.rpy:1050
old "Left Click"
new "النقر بالزر الأيسر"
# screens.rpy:1054
old "Middle Click"
new "النقر بالزر الأوسط"
# screens.rpy:1058
old "Right Click"
new "النقر بالزر الأيمن"
# screens.rpy:1062
old "Mouse Wheel Up\nClick Rollback Side"
new "تحريك عجلة الفأرة لأعلى\nClick Rollback Side"
# screens.rpy:1066
old "Mouse Wheel Down"
new "تحريك عجلة الفأرة لأسفل"
# screens.rpy:1073
old "Right Trigger\nA/Bottom Button"
new "Right Trigger\nA/Bottom Button"
# screens.rpy:1074
old "Advance dialogue and activates the interface."
new "التقدم في الحوار والتفاعل مع الواجهة."
# screens.rpy:1078
old "Roll back to earlier dialogue."
new "للعودة للنص السابق."
# screens.rpy:1081
old "Right Shoulder"
new "Right Shoulder"
# screens.rpy:1082
old "Roll forward to later dialogue."
new "للإستمرار للنص اللاحق."
# screens.rpy:1085
old "D-Pad, Sticks"
new "D-Pad, Sticks"
# screens.rpy:1089
old "Start, Guide"
new "Start, Guide"
# screens.rpy:1090
old "Access the game menu."
new "Access the game menu."
# screens.rpy:1093
old "Y/Top Button"
new "Y/Top Button"
# screens.rpy:1096
old "Calibrate"
new "Calibrate"
# screens.rpy:1124
old "## Additional screens"
new "## Additional screens"
# screens.rpy:1128
old "## Confirm screen"
new "## Confirm screen"
# screens.rpy:1130
old "## The confirm screen is called when Ren'Py wants to ask the player a yes or no question."
new "## The confirm screen is called when Ren'Py wants to ask the player a yes or no question."
# screens.rpy:1133
old "## http://www.renpy.org/doc/html/screen_special.html#confirm"
new "## http://www.renpy.org/doc/html/screen_special.html#confirm"
# screens.rpy:1137
old "## Ensure other screens do not get input while this screen is displayed."
new "## Ensure other screens do not get input while this screen is displayed."
# screens.rpy:1161
old "Yes"
new "نعم"
# screens.rpy:1162
old "No"
new "لا"
# screens.rpy:1164
old "## Right-click and escape answer \"no\"."
new "## Right-click and escape answer \"no\"."
# screens.rpy:1191
old "## Skip indicator screen"
new "## Skip indicator screen"
# screens.rpy:1193
old "## The skip_indicator screen is displayed to indicate that skipping is in progress."
new "## The skip_indicator screen is displayed to indicate that skipping is in progress."
# screens.rpy:1196
old "## https://www.renpy.org/doc/html/screen_special.html#skip-indicator"
new "## https://www.renpy.org/doc/html/screen_special.html#skip-indicator"
# screens.rpy:1208
old "Skipping"
new "جاري التخطي"
# screens.rpy:1215
old "## This transform is used to blink the arrows one after another."
new "## This transform is used to blink the arrows one after another."
# screens.rpy:1247
old "## Notify screen"
new "## Notify screen"
# screens.rpy:1249
old "## The notify screen is used to show the player a message. (For example, when the game is quicksaved or a screenshot has been taken.)"
new "## The notify screen is used to show the player a message. (For example, when the game is quicksaved or a screenshot has been taken.)"
# screens.rpy:1252
old "## https://www.renpy.org/doc/html/screen_special.html#notify-screen"
new "## https://www.renpy.org/doc/html/screen_special.html#notify-screen"
# screens.rpy:1286
old "## NVL screen"
new "## NVL screen"
# screens.rpy:1288
old "## This screen is used for NVL-mode dialogue and menus."
new "## This screen is used for NVL-mode dialogue and menus."
# screens.rpy:1290
old "## http://www.renpy.org/doc/html/screen_special.html#nvl"
new "## http://www.renpy.org/doc/html/screen_special.html#nvl"
# screens.rpy:1301
old "## Displays dialogue in either a vpgrid or the vbox."
new "## Displays dialogue in either a vpgrid or the vbox."
# screens.rpy:1314
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
new "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
# screens.rpy:1344
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
new "## This controls the maximum number of NVL-mode entries that can be displayed at once."
# screens.rpy:1406
old "## Mobile Variants"
new "## Mobile Variants"
# screens.rpy:1413
old "## Since a mouse may not be present, we replace the quick menu with a version that uses fewer and bigger buttons that are easier to touch."
new "## Since a mouse may not be present, we replace the quick menu with a version that uses fewer and bigger buttons that are easier to touch."
# screens.rpy:1429
old "Menu"
new "Menu"
-85
View File
@@ -1,85 +0,0 @@
# هذا الملف يحتوي على كل نصوص اللعبه
# استعمل السطر التالي لإظهار الصور في شاشة اللعب
# image eileen happy = "eileen_happy.png"
# من هي شخصيات هذه اللعبه؟
define e = Character('إيلين', color="#c8ffc8")
# اللعبه تبدأ هنا
label start:
e "لقد بدأت حكاية رينباي جديدة."
e "كل ما عليك فعله هو إضافة نصوص و صور و إرسالها للعالم!"
return
########################################################### من اليمين الى اليسار
define config.rtl = True
define gui.textalign = 1.0
define gui.button_text_xalign = 1.0
define gui.prompt_text_xalign = 1.0
define gui.navigation_xpos = 240
define gui.name_xalign = 1.0
define gui.dialogue_text_xalign = 1.0
define gui.button_text_xalign = 1.0
define gui.main_menu_text_xalign = 1.0
define gui.history_name_xalign = 0.0
define gui.history_text_xalign = 1.0
define gui.nvl_name_xalign = 0.0
define gui.nvl_text_xalign = 1.0
define gui.nvl_thought_xalign = 1.0
define gui.nvl_button_xalign = 1.0
define gui.help_label_text_xalign = 0.0
define gui.name_xpos = gui.scale(1040)
define gui.dialogue_xpos = gui.scale(1012)
define gui.history_name_xpos = gui.scale(763)
define gui.history_text_xpos = gui.scale(748)
define gui.nvl_name_xpos = gui.scale(850)
define gui.nvl_text_xpos = gui.scale(830)
define gui.nvl_thought_xpos = gui.scale(1040)
define gui.nvl_button_xpos = gui.scale(830)
style game_menu_label:
xalign 1.0
xoffset gui.scale(-50)
style navigation_vbox:
xanchor 1.0
style return_button:
xanchor 1.0
style radio_button:
xalign 1.0
style radio_label:
xalign 1.0
style check_button:
xalign 1.0
style check_label:
xalign 1.0
style slider_label:
xpos gui.scale(350)
xalign 1.0
style help_hbox:
box_reverse True
xalign 1.0
spacing gui.scale(20)
style help_label_text:
xalign 0.0
style mute_all_button:
xalign 0.0
-7
View File
@@ -1,7 +0,0 @@
translate arabic python:
gui.REGULAR_FONT = "DejaVuSans.ttf"
gui.LIGHT_FONT = "DejaVuSans.ttf"
gui.FONT_SCALE = .9
gui.REGULAR_BOLD = True
config.rtl = True
-943
View File
@@ -1,943 +0,0 @@
translate finnish strings:
# 00action_file.rpy:26
old "{#weekday}Monday"
new "{#weekday}Maanantai"
# 00action_file.rpy:26
old "{#weekday}Tuesday"
new "{#weekday}Tiistai"
# 00action_file.rpy:26
old "{#weekday}Wednesday"
new "{#weekday}Keskiviikko"
# 00action_file.rpy:26
old "{#weekday}Thursday"
new "{#weekday}Torstai"
# 00action_file.rpy:26
old "{#weekday}Friday"
new "{#weekday}Perjantai"
# 00action_file.rpy:26
old "{#weekday}Saturday"
new "{#weekday}Lauantai"
# 00action_file.rpy:26
old "{#weekday}Sunday"
new "{#weekday}Sunnuntai"
# 00action_file.rpy:37
old "{#weekday_short}Mon"
new "{#weekday_short}Ma"
# 00action_file.rpy:37
old "{#weekday_short}Tue"
new "{#weekday_short}Ti"
# 00action_file.rpy:37
old "{#weekday_short}Wed"
new "{#weekday_short}Ke"
# 00action_file.rpy:37
old "{#weekday_short}Thu"
new "{#weekday_short}To"
# 00action_file.rpy:37
old "{#weekday_short}Fri"
new "{#weekday_short}Pe"
# 00action_file.rpy:37
old "{#weekday_short}Sat"
new "{#weekday_short}La"
# 00action_file.rpy:37
old "{#weekday_short}Sun"
new "{#weekday_short}Su"
# 00action_file.rpy:47
old "{#month}January"
new "{#month}Tammikuu"
# 00action_file.rpy:47
old "{#month}February"
new "{#month}Helmikuu"
# 00action_file.rpy:47
old "{#month}March"
new "{#month}Maaliskuu"
# 00action_file.rpy:47
old "{#month}April"
new "{#month}Huhtikuu"
# 00action_file.rpy:47
old "{#month}May"
new "{#month}Toukokuu"
# 00action_file.rpy:47
old "{#month}June"
new "{#month}Kesäkuu"
# 00action_file.rpy:47
old "{#month}July"
new "{#month}Heinäkuu"
# 00action_file.rpy:47
old "{#month}August"
new "{#month}Elokuu"
# 00action_file.rpy:47
old "{#month}September"
new "{#month}Syyskuu"
# 00action_file.rpy:47
old "{#month}October"
new "{#month}Lokakuu"
# 00action_file.rpy:47
old "{#month}November"
new "{#month}Marraskuu"
# 00action_file.rpy:47
old "{#month}December"
new "{#month}Joulukuu"
# 00action_file.rpy:63
old "{#month_short}Jan"
new "{#month_short}Tammi"
# 00action_file.rpy:63
old "{#month_short}Feb"
new "{#month_short}Helmi"
# 00action_file.rpy:63
old "{#month_short}Mar"
new "{#month_short}Maalis"
# 00action_file.rpy:63
old "{#month_short}Apr"
new "{#month_short}Huhti"
# 00action_file.rpy:63
old "{#month_short}May"
new "{#month_short}Touko"
# 00action_file.rpy:63
old "{#month_short}Jun"
new "{#month_short}Kesä"
# 00action_file.rpy:63
old "{#month_short}Jul"
new "{#month_short}Heinä"
# 00action_file.rpy:63
old "{#month_short}Aug"
new "{#month_short}Elo"
# 00action_file.rpy:63
old "{#month_short}Sep"
new "{#month_short}Syys"
# 00action_file.rpy:63
old "{#month_short}Oct"
new "{#month_short}Loka"
# 00action_file.rpy:63
old "{#month_short}Nov"
new "{#month_short}Marras"
# 00action_file.rpy:63
old "{#month_short}Dec"
new "{#month_short}Joulu"
# 00action_file.rpy:235
old "%b %d, %H:%M"
new "%b %d, %H:%M"
# 00action_file.rpy:820
old "Quick save complete."
new "Pikatallennus suoritettu."
# 00gui.rpy:227
old "Are you sure?"
new "Oletko varma?"
# 00gui.rpy:228
old "Are you sure you want to delete this save?"
new "Oletko varma, että haluat poistaa tämän tallennuksen?"
# 00gui.rpy:229
old "Are you sure you want to overwrite your save?"
new "Oletko varma, että haluat korvata tallennuksen uudella?"
# 00gui.rpy:230
old "Loading will lose unsaved progress.\nAre you sure you want to do this?"
new "Lataamalla tallennuksen menetät tallentamattoman edistyksen.\nOletko varma, että haluat tehdä näin?"
# 00gui.rpy:231
old "Are you sure you want to quit?"
new "Haluatko varmasti lopettaa?"
# 00gui.rpy:232
old "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
new "Haluatko varmasti palata päävalikkoon?\nMenetät kaikki tallentamattomat tiedot."
# 00gui.rpy:233
old "Are you sure you want to end the replay?"
new "Oletko varma, että haluat lopettaa tämän uusinnan?"
# 00gui.rpy:234
old "Are you sure you want to begin skipping?"
new "Oletko varma, että haluat alkaa dialogin sivuuttamisen?"
# 00gui.rpy:235
old "Are you sure you want to skip to the next choice?"
new "Oletko varma, että haluat siirtyä suoraan seuraavaan valintaan?"
# 00gui.rpy:236
old "Are you sure you want to skip unseen dialogue to the next choice?"
# Automatic translation.
new "Oletko varma, että haluat ohittaa näkymättömän dialogin seuraavaan vaihtoehtoon?"
# 00keymap.rpy:250
old "Saved screenshot as %s."
new "Näytönkaappaus tallennettu nimellä %s."
# 00library.rpy:142
old "Self-voicing disabled."
new "Tietokoneen ääninäyttely lopetettu."
# 00library.rpy:143
old "Clipboard voicing enabled. "
new "Leikepöydän ääneen toisto käytössä. "
# 00library.rpy:144
old "Self-voicing enabled. "
new "Ääneen toisto poissa käytöstä."
# 00library.rpy:179
old "Skip Mode"
new "Ylihyppäystila"
# 00library.rpy:262
old "This program contains free software under a number of licenses, including the MIT License and GNU Lesser General Public License. A complete list of software, including links to full source code, can be found {a=https://www.renpy.org/l/license}here{/a}."
# Automatic translation.
new "Tämä ohjelma sisältää vapaita ohjelmistoja useiden lisenssien alla, mukaan lukien MIT-lisenssi ja GNU Lesser General Public License. Täydellinen luettelo ohjelmistoista, mukaan lukien linkit täydelliseen lähdekoodiin, löytyy {a=https://www.renpy.org/l/license}täältä{/a}."
# 00preferences.rpy:422
old "Clipboard voicing enabled. Press 'shift+C' to disable."
new "Leikepöydän ääneen toisto käytössä. Paina 'shift+C' lopettaaksesi."
# 00preferences.rpy:424
old "Self-voicing would say \"[renpy.display.tts.last]\". Press 'alt+shift+V' to disable."
new "Tietokoneen ääninäyttely sanoisi \"[renpy.display.tts.last]\". Paina 'alt+shift+V' lopettaaksesi."
# 00preferences.rpy:426
old "Self-voicing enabled. Press 'v' to disable."
new "Tietokoneen ääninäyttely käytössä. Paina 'v' lopettaaksesi."
# 00iap.rpy:217
old "Contacting App Store\nPlease Wait..."
# Automatic translation.
new "Yhteydenotto App Storeen\nOdottakaa..."
# 00updater.rpy:367
old "The Ren'Py Updater is not supported on mobile devices."
new "Mobiililaitteet eivät tue Ren'Py Updater -toimintoa."
# 00updater.rpy:486
old "An error is being simulated."
new "Simuloidaan havaittua ongelmaa."
# 00updater.rpy:662
old "Either this project does not support updating, or the update status file was deleted."
new "Tämä projekti ei tue päivittämistä tai päivityksen statustiedosto poistettiin."
# 00updater.rpy:676
old "This account does not have permission to perform an update."
new "Tällä käyttäjällä ei ole oikeutta päivityksen suorittamiseen."
# 00updater.rpy:679
old "This account does not have permission to write the update log."
new "Tällä käyttäjällä ei ole oikeutta kirjoittaa dataa päivityslokiin."
# 00updater.rpy:704
old "Could not verify update signature."
new "Päivityksen allekirjoitusta ei voitu vahvistaa."
# 00updater.rpy:975
old "The update file was not downloaded."
new "Päivitystiedostoa ei ladattu."
# 00updater.rpy:993
old "The update file does not have the correct digest - it may have been corrupted."
new "Päivitystiedosto ei sisällä oikeaa tiivistelmää - se on saattanut korruptoitua."
# 00updater.rpy:1049
old "While unpacking {}, unknown type {}."
new "Purettaessa {}, tuntematon tyyppi {}."
# 00updater.rpy:1393
old "Updater"
new "Päivittäjä"
# 00updater.rpy:1404
old "This program is up to date."
new "Käytät jo uuinta versiota."
# 00updater.rpy:1406
old "[u.version] is available. Do you want to install it?"
new "[u.version] on saatavilla. Haluatko asentaa sen?"
# 00updater.rpy:1408
old "Preparing to download the updates."
new "Valmistellaan päivitysten lataamista."
# 00updater.rpy:1410
old "Downloading the updates."
new "Ladataan päivityksiä."
# 00updater.rpy:1412
old "Unpacking the updates."
new "Puretaan päivityksiä."
# 00updater.rpy:1416
old "The updates have been installed. The program will restart."
new "Päivitykset on asennettu. Ohjelma käynnistyy nyt uudelleen."
# 00updater.rpy:1418
old "The updates have been installed."
new "Päivitykset on asennettu."
# 00updater.rpy:1420
old "The updates were cancelled."
new "Päivitykset peruttiin."
# 00gallery.rpy:563
old "Image [index] of [count] locked."
new "Kuva [index]/[count] on lukittu."
# 00gallery.rpy:583
old "prev"
new "edellinen"
# 00gallery.rpy:584
old "next"
new "seuraava"
# 00gallery.rpy:585
old "slideshow"
new "diaesitys"
# 00gallery.rpy:586
old "return"
new "palaa"
translate finnish strings:
# renpy/common/00accessibility.rpy:32
old "bar"
new "palkki"
# renpy/common/00accessibility.rpy:33
old "selected"
# Automatic translation.
new "valittu"
# renpy/common/00accessibility.rpy:34
old "viewport"
new "viewport"
# renpy/common/00accessibility.rpy:35
old "horizontal scroll"
# Automatic translation.
new "vaakasuora vieritys"
# renpy/common/00accessibility.rpy:36
old "vertical scroll"
# Automatic translation.
new "pystysuora vieritys"
# renpy/common/00accessibility.rpy:37
old "activate"
# Automatic translation.
new "aktivoi"
# renpy/common/00accessibility.rpy:38
old "deactivate"
# Automatic translation.
new "deaktivoi"
# renpy/common/00accessibility.rpy:39
old "increase"
new "lisää"
# renpy/common/00accessibility.rpy:40
old "decrease"
new "vähennä"
# renpy/common/00accessibility.rpy:138
old "Font Override"
# Automatic translation.
new "Fontin ohitus"
# renpy/common/00accessibility.rpy:142
old "Default"
# Automatic translation.
new "Oletus"
# renpy/common/00accessibility.rpy:146
old "DejaVu Sans"
new "DejaVu Sans"
# renpy/common/00accessibility.rpy:150
old "Opendyslexic"
new "Opendyslexic"
# renpy/common/00accessibility.rpy:156
old "Text Size Scaling"
# Automatic translation.
new "Tekstin koon skaalaus"
# renpy/common/00accessibility.rpy:162
old "Reset"
# Automatic translation.
new "Nollaa"
# renpy/common/00accessibility.rpy:168
old "Line Spacing Scaling"
new "Rivivälin skaalaus"
# renpy/common/00accessibility.rpy:180
old "High Contrast Text"
# Automatic translation.
new "Korkean kontrastin teksti"
# renpy/common/00accessibility.rpy:193
old "Self-Voicing"
new "Tietokoneen ääninäyttely"
# renpy/common/00accessibility.rpy:197
old "Off"
new "Pois päältä"
# renpy/common/00accessibility.rpy:201
old "Text-to-speech"
# Automatic translation.
new "Tekstistä puheeksi"
# renpy/common/00accessibility.rpy:205
old "Clipboard"
# Automatic translation.
new "Leikepöytä"
# renpy/common/00accessibility.rpy:209
old "Debug"
# Automatic translation.
new "Vianmääritys"
# renpy/common/00accessibility.rpy:223
old "Self-Voicing Volume Drop"
new "Tietokoneen ääninäyttelyn äänenvoimakkuuden pudotus"
# renpy/common/00accessibility.rpy:234
old "The options on this menu are intended to improve accessibility. They may not work with all games, and some combinations of options may render the game unplayable. This is not an issue with the game or engine. For the best results when changing fonts, try to keep the text size the same as it originally was."
new "Tämän valikon vaihtoehtojen tarkoituksena on parantaa saavutettavuutta. Ne eivät välttämättä toimi kaikissa peleissä, ja joidenkin vaihtoehtojen yhdistelmät saattavat tehdä pelistä pelikelvottoman. Tämä ei johdu pelistä tai moottorista. Saat fontteja vaihtaessa parhaat tulokset kun yrität pitää tekstin koon samana kuin se oli alun perin."
# renpy/common/00action_file.rpy:378
old "Save slot %s: [text]"
new "Tallennuspaikka %s: [text]"
# renpy/common/00action_file.rpy:461
old "Load slot %s: [text]"
new "Lataa tallennus %s: [text]"
# renpy/common/00action_file.rpy:514
old "Delete slot [text]"
new "Poista tallennus [text]"
# renpy/common/00action_file.rpy:593
old "File page auto"
new "Tiedoston sivu: auto"
# renpy/common/00action_file.rpy:595
old "File page quick"
new "Tiedoston sivu: pika"
# renpy/common/00action_file.rpy:597
old "File page [text]"
new "Tiedoston sivu: [text]"
# renpy/common/00action_file.rpy:796
old "Next file page."
new "Seuraava tiedoston sivu."
# renpy/common/00action_file.rpy:868
old "Previous file page."
new "Edellinen tiedoston sivu."
# renpy/common/00action_file.rpy:944
old "Quick save."
new "Pikatallennus."
# renpy/common/00action_file.rpy:963
old "Quick load."
# Automatic translation.
new "Pikalataus."
# renpy/common/00action_other.rpy:381
old "Language [text]"
# Automatic translation.
new "Kieli [text]"
# renpy/common/00director.rpy:705
old "The interactive director is not enabled here."
# Automatic translation.
new "Vuorovaikutteinen ohjaaja ei ole käytössä täällä."
# renpy/common/00director.rpy:1504
old "⬆"
new "⬆"
# renpy/common/00director.rpy:1510
old "⬇"
new "⬇"
# renpy/common/00director.rpy:1574
old "Done"
# Automatic translation.
new "Valmis"
# renpy/common/00director.rpy:1584
old "(statement)"
# Automatic translation.
new "(lausunto)"
# renpy/common/00director.rpy:1585
old "(tag)"
new "(tag)"
# renpy/common/00director.rpy:1586
old "(attributes)"
# Automatic translation.
new "(attribuutit)"
# renpy/common/00director.rpy:1587
old "(transform)"
new "(transform)"
# renpy/common/00director.rpy:1612
old "(transition)"
new "(transition)"
# renpy/common/00director.rpy:1624
old "(channel)"
# Automatic translation.
new "(kanava)"
# renpy/common/00director.rpy:1625
old "(filename)"
# Automatic translation.
new "(tiedostonimi)"
# renpy/common/00director.rpy:1654
old "Change"
# Automatic translation.
new "Muuta"
# renpy/common/00director.rpy:1656
old "Add"
# Automatic translation.
new "Lisää"
# renpy/common/00director.rpy:1662
old "Remove"
# Automatic translation.
new "Poista"
# renpy/common/00director.rpy:1697
old "Statement:"
# Automatic translation.
new "Lausunto:"
# renpy/common/00director.rpy:1718
old "Tag:"
new "Tag:"
# renpy/common/00director.rpy:1734
old "Attributes:"
# Automatic translation.
new "Ominaisuudet:"
# renpy/common/00director.rpy:1745
old "Click to toggle attribute, right click to toggle negative attribute."
# Automatic translation.
new "Napsauttamalla voit vaihtaa attribuuttia, oikealla napsauttamalla voit vaihtaa negatiivista attribuuttia."
# renpy/common/00director.rpy:1757
old "Transforms:"
# Automatic translation.
new "Muuntuu:"
# renpy/common/00director.rpy:1768
old "Click to set transform, right click to add to transform list."
# Automatic translation.
new "Napsauta aseta muunnos, lisää muunnosluetteloon napsauttamalla hiiren kakkospainiketta."
# renpy/common/00director.rpy:1780
old "Behind:"
# Automatic translation.
new "Takana:"
# renpy/common/00director.rpy:1789
old "Click to set, right click to add to behind list."
# Automatic translation.
new "Aseta napsauttamalla, lisää takaluetteloon napsauttamalla hiiren kakkospainiketta."
# renpy/common/00director.rpy:1801
old "Transition:"
# Automatic translation.
new "Siirtyminen:"
# renpy/common/00director.rpy:1819
old "Channel:"
# Automatic translation.
new "Kanava:"
# renpy/common/00director.rpy:1837
old "Audio Filename:"
# Automatic translation.
new "Äänitiedoston nimi:"
# renpy/common/00gui.rpy:456
old "This save was created on a different device. Maliciously constructed save files can harm your computer. Do you trust this save's creator and everyone who could have changed the file?"
# Automatic translation.
new "Tämä tallennus on luotu eri laitteella. Pahantahtoisesti tehdyt tallennustiedostot voivat vahingoittaa tietokonettasi. Luotatko tämän tallennuksen tekijään ja kaikkiin, jotka ovat voineet muuttaa tiedostoa?"
# renpy/common/00gui.rpy:457
old "Do you trust the device the save was created on? You should only choose yes if you are the device's sole user."
# Automatic translation.
new "Luotatko laitteeseen, jolla tallennus luotiin? Valitse kyllä vain, jos olet laitteen ainoa käyttäjä."
# renpy/common/00keymap.rpy:322
old "Failed to save screenshot as %s."
# Automatic translation.
new "Kuvakaappauksen tallentaminen nimellä %s epäonnistui."
# renpy/common/00preferences.rpy:271
old "display"
# Automatic translation.
new "näyttö"
# renpy/common/00preferences.rpy:283
old "transitions"
# Automatic translation.
new "siirtymät"
# renpy/common/00preferences.rpy:292
old "skip transitions"
new "ohita siirtymät"
# renpy/common/00preferences.rpy:294
old "video sprites"
new "video sprites"
# renpy/common/00preferences.rpy:303
old "show empty window"
# Automatic translation.
new "näytä tyhjä ikkuna"
# renpy/common/00preferences.rpy:312
old "text speed"
# Automatic translation.
new "tekstin nopeus"
# renpy/common/00preferences.rpy:320
old "joystick"
# Automatic translation.
new "Joystick"
# renpy/common/00preferences.rpy:320
old "joystick..."
new "joystick..."
# renpy/common/00preferences.rpy:327
old "skip"
# Automatic translation.
new "ohita"
# renpy/common/00preferences.rpy:330
old "skip unseen [text]"
new "ohita näkemätön [text]"
# renpy/common/00preferences.rpy:335
old "skip unseen text"
new "ohita näkemätön teksti"
# renpy/common/00preferences.rpy:337
old "begin skipping"
new "aloita ohittaminen"
# renpy/common/00preferences.rpy:341
old "after choices"
# Automatic translation.
new "valintojen jälkeen"
# renpy/common/00preferences.rpy:348
old "skip after choices"
new "ohita valintojen jälkeen"
# renpy/common/00preferences.rpy:350
old "auto-forward time"
new "automaattisen eteenpäinsiirtymisen aika"
# renpy/common/00preferences.rpy:364
old "auto-forward"
new "automaattinen eteenpäinsiirtyminen"
# renpy/common/00preferences.rpy:371
old "Auto forward"
new "Automaattinen eteenpäinsiirtyminen"
# renpy/common/00preferences.rpy:374
old "auto-forward after click"
new "automaattinen eteenpäinsiirtyminen napsautuksen jälkeen"
# renpy/common/00preferences.rpy:383
old "automatic move"
# Automatic translation.
new "automaattinen siirto"
# renpy/common/00preferences.rpy:392
old "wait for voice"
# Automatic translation.
new "odota ääntä"
# renpy/common/00preferences.rpy:401
old "voice sustain"
# Automatic translation.
new "äänen ylläpitäminen"
# renpy/common/00preferences.rpy:410
old "self voicing"
new "tietokoneen ääninäyttely"
# renpy/common/00preferences.rpy:419
old "self voicing volume drop"
new "tietokoneen ääninäyttelyn äänenvoimakkuuden pudotus"
# renpy/common/00preferences.rpy:427
old "clipboard voicing"
new "leikepöydän ääni"
# renpy/common/00preferences.rpy:436
old "debug voicing"
new "virheenkorjausääni"
# renpy/common/00preferences.rpy:445
old "emphasize audio"
new "korosta ääntä"
# renpy/common/00preferences.rpy:454
old "rollback side"
# Automatic translation.
new "Rollback-puoli"
# renpy/common/00preferences.rpy:464
old "gl powersave"
new "gl powersave"
# renpy/common/00preferences.rpy:470
old "gl framerate"
new "gl framerate"
# renpy/common/00preferences.rpy:473
old "gl tearing"
new "gl tearing"
# renpy/common/00preferences.rpy:476
old "font transform"
# Automatic translation.
new "fontin muunnos"
# renpy/common/00preferences.rpy:479
old "font size"
# Automatic translation.
new "fonttikoko"
# renpy/common/00preferences.rpy:487
old "font line spacing"
# Automatic translation.
new "fontin riviväli"
# renpy/common/00preferences.rpy:495
old "system cursor"
# Automatic translation.
new "järjestelmän kursori"
# renpy/common/00preferences.rpy:504
old "renderer menu"
# Automatic translation.
new "renderöintivalikko"
# renpy/common/00preferences.rpy:507
old "accessibility menu"
# Automatic translation.
new "saavutettavuusvalikko"
# renpy/common/00preferences.rpy:510
old "high contrast text"
# Automatic translation.
new "korkean kontrastin teksti"
# renpy/common/00preferences.rpy:519
old "audio when minimized"
# Automatic translation.
new "ääni kun se on minimoitu"
# renpy/common/00preferences.rpy:528
old "audio when unfocused"
# Automatic translation.
new "ääni kun se ei ole keskittynyt"
# renpy/common/00preferences.rpy:537
old "web cache preload"
# Automatic translation.
new "verkkovälimuistin esilataus"
# renpy/common/00preferences.rpy:552
old "voice after game menu"
# Automatic translation.
new "ääni pelivalikon jälkeen"
# renpy/common/00preferences.rpy:571
old "main volume"
new "pää-äänenvoimakkuus"
# renpy/common/00preferences.rpy:572
old "music volume"
new "musiikin äänenvoimakkuus"
# renpy/common/00preferences.rpy:573
old "sound volume"
new "tehosteiden äänenvoimakkuus"
# renpy/common/00preferences.rpy:574
old "voice volume"
new "ääninäyttelyn äänenvoimakkuus"
# renpy/common/00preferences.rpy:575
old "mute main"
new "mykistä pää-ääni"
# renpy/common/00preferences.rpy:576
old "mute music"
new "mykistä musiikki"
# renpy/common/00preferences.rpy:577
old "mute sound"
new "mykistä äänitehosteet"
# renpy/common/00preferences.rpy:578
old "mute voice"
new "mykistä ääninäyttely"
# renpy/common/00preferences.rpy:579
old "mute all"
new "mykistä kaikki"
# renpy/common/00speechbubble.rpy:344
old "Speech Bubble Editor"
# Automatic translation.
new "Puhekuplaeditori"
# renpy/common/00speechbubble.rpy:349
old "(hide)"
# Automatic translation.
new "(piilota)"
# renpy/common/00sync.rpy:70
old "Sync downloaded."
# Automatic translation.
new "Synkronointi ladattu."
# renpy/common/00sync.rpy:190
old "Could not connect to the Ren'Py Sync server."
# Automatic translation.
new "Yhteyttä Ren'Py Sync -palvelimeen ei saatu muodostettua."
# renpy/common/00sync.rpy:192
old "The Ren'Py Sync server timed out."
# Automatic translation.
new "Ren'Py Sync -palvelimen aikakatkaisu."
# renpy/common/00sync.rpy:194
old "An unknown error occurred while connecting to the Ren'Py Sync server."
# Automatic translation.
new "Ren'Py Sync -palvelimeen muodostettaessa yhteyttä tapahtui tuntematon virhe."
# renpy/common/00sync.rpy:267
old "The Ren'Py Sync server does not have a copy of this sync. The sync ID may be invalid, or it may have timed out."
# Automatic translation.
new "Ren'Py Sync -palvelimella ei ole kopiota tästä synkronoinnista. Synkronointitunnus voi olla virheellinen tai se voi olla vanhentunut."
# renpy/common/00sync.rpy:409
old "Please enter the sync ID you generated.\nNever enter a sync ID you didn't create yourself."
# Automatic translation.
new "Kirjoita luomasi synkronointitunnus.\nÄlä koskaan anna synkronointitunnusta, jota et ole luonut itse."
# renpy/common/00sync.rpy:428
old "The sync ID is not in the correct format."
# Automatic translation.
new "Synkronointitunnus ei ole oikeassa muodossa."
# renpy/common/00sync.rpy:448
old "The sync could not be decrypted."
# Automatic translation.
new "Synkronointia ei voitu purkaa."
# renpy/common/00sync.rpy:471
old "The sync belongs to a different game."
# Automatic translation.
new "Synkronointi kuuluu eri peliin."
# renpy/common/00sync.rpy:476
old "The sync contains a file with an invalid name."
# Automatic translation.
new "Synkronointi sisältää tiedoston, jonka nimi on virheellinen."
# renpy/common/00sync.rpy:529
old "This will upload your saves to the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}.\nDo you want to continue?"
new "Tämä lataa tallennuksesi {a=https://sync.renpy.org}Ren'Py Sync Serveriin{/a}.\nHaluatko jatkaa?"
# renpy/common/00sync.rpy:558
old "Enter Sync ID"
# Automatic translation.
new "Syötä synkronointitunnus"
# renpy/common/00sync.rpy:569
old "This will contact the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}."
new "Tämä ottaa yhteyttä {a=https://sync.renpy.org}Ren'Py Sync Serveriin{/a}."
# renpy/common/00sync.rpy:596
old "Sync Success"
new "Synkronointi onnistui"
# renpy/common/00sync.rpy:599
old "The Sync ID is:"
# Automatic translation.
new "Synkronointitunnus on:"
# renpy/common/00sync.rpy:605
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 "Voit käyttää tätä tunnusta ladataksesi tallennuksesi toiseen laitteeseen.\nTämä synkronointi päättyy tunnin kuluttua.\nRen'Py Sync on {a=https://www.renpy.org/sponsors.html}Ren'Pyn sponsorien{/a} tukema."
# renpy/common/00sync.rpy:631
old "Sync Error"
# Automatic translation.
new "Synkronointivirhe"
-287
View File
@@ -1,287 +0,0 @@
translate finnish strings:
# _developer/developer.rpym:38
old "Developer Menu"
new "Kehittäjävalikko"
# _developer/developer.rpym:43
old "Reload Game (Shift+R)"
new "Käynnistä peli uudelleen (Shift+R)"
# _developer/developer.rpym:45
old "Console (Shift+O)"
new "Konsoli (Shift+O)"
# _developer/developer.rpym:47
old "Variable Viewer"
new "Muuttujat"
# _developer/developer.rpym:49
old "Theme Test"
new "Teematesti"
# _developer/developer.rpym:51
old "Image Location Picker"
new "Kuvan sijainnin selvitin"
# _developer/developer.rpym:53
old "Filename List"
new "Tiedostonimilista"
# _developer/developer.rpym:57
old "Show Image Load Log"
new "Näytä kuvanlatausloki"
# _developer/developer.rpym:60
old "Hide Image Load Log"
new "Piilota kuvanlatausloki"
# _developer/developer.rpym:95
old "Nothing to inspect."
new "Ei tutkittavaa."
# _developer/developer.rpym:217
old "Return to the developer menu"
new "Palaa kehittäjävalikkoon"
# _developer/developer.rpym:373
old "Rectangle: %r"
new "Suorakulmio: %r"
# _developer/developer.rpym:378
old "Mouse position: %r"
new "Hiiren sijainti: %r"
# _developer/developer.rpym:383
old "Right-click or escape to quit."
new "Paina Esc tai hiiren oikeaa näppäintä poistuaksesi."
# _developer/developer.rpym:412
old "Rectangle copied to clipboard."
new "Suorakulmio kopioitu leikepöydälle."
# _developer/developer.rpym:415
old "Position copied to clipboard."
new "Sijainti kopioitu leikepöydälle."
# _developer/developer.rpym:524
old "✔ "
new "✔ "
# _developer/developer.rpym:527
old "✘ "
new "✘ "
# _developer/developer.rpym:532
old "\n{color=#cfc}✔ predicted image (good){/color}\n{color=#fcc}✘ unpredicted image (bad){/color}\n{color=#fff}Drag to move.{/color}"
# Automatic translation.
new "\n{color=#cfc}✔ ennustettu kuva (hyvä){/color}\n{color=#fcc}✘ ennakoimaton kuva (huono){/color}\n{color=#fff}Siirrä vetämällä.{/color}"
# _developer/inspector.rpym:38
old "Displayable Inspector"
new "Näkyvien objektien tutkija"
# _developer/inspector.rpym:61
old "Size"
new "Koko"
# _developer/inspector.rpym:65
old "Style"
new "Tyyli"
# _developer/inspector.rpym:71
old "Location"
new "Sijainti"
# _developer/inspector.rpym:122
old "Inspecting Styles of [displayable_name!q]"
new "Tutkitaan [displayable_name!q]n tyylejä"
# _developer/inspector.rpym:139
old "displayable:"
new "näkyvä objekti:"
# _developer/inspector.rpym:145
old " (no properties affect the displayable)"
new " (mitkään ominaisuudet eivät vaikuta objektiin)"
# _developer/inspector.rpym:147
old " (default properties omitted)"
new " (perusominaisuudet sivuutettu)"
# _developer/inspector.rpym:185
old "<repr() failed>"
new "<repr() epäonnistui>"
# 00console.rpy:182
old "Press <esc> to exit console. Type help for help.\n"
new "Paina <esc> poistuaksesi konsolista. Käytä komentoa help saadaksesi apua."
# 00console.rpy:186
old "Ren'Py script enabled."
new "Ren'Py-skriptikieli käytössä."
# 00console.rpy:188
old "Ren'Py script disabled."
new "Ren'Py-skriptikieli poissa käytöstä."
# 00console.rpy:398
old "help: show this help"
new "help: näytä tämä apuviesti"
# 00console.rpy:403
old "commands:\n"
new "komennot:\n"
# 00console.rpy:413
old " <renpy script statement>: run the statement\n"
new " <renpy script-väite>: suorita väite\n"
# 00console.rpy:415
old " <python expression or statement>: run the expression or statement"
new " <python-ekspressio tai väite>: suorita ekspressio tai väite"
# 00console.rpy:423
old "clear: clear the console history"
new "clear: tyhjennä konsolin historia"
# 00console.rpy:427
old "exit: exit the console"
new "exit: poistu konsolista"
# 00console.rpy:435
old "load <slot>: loads the game from slot"
new "load <tallennuspaikka>: lataa pelin halutusta tallennuspaikasta"
# 00console.rpy:448
old "save <slot>: saves the game in slot"
new "save <tallennuspaikka>: tallentaa pelin tallennuspaikkaan"
# 00console.rpy:459
old "reload: reloads the game, refreshing the scripts"
new "reload: lataa pelin uudelleen, päivittäen skriptit"
# 00console.rpy:467
old "watch <expression>: watch a python expression"
new "watch <ekspressio>: tarkkaile python-ekspressiota"
# 00console.rpy:493
old "unwatch <expression>: stop watching an expression"
new "unwatch <ekspressio>: lakkaa tarkkailemasta ekspressiota"
# 00console.rpy:519
old "unwatchall: stop watching all expressions"
new "unwatchall: lopeta kaikkien ekspressioiden tarkkailu"
# 00console.rpy:536
old "jump <label>: jumps to label"
new "jump <tunnus>: hyppää 'script.rpy'-tiedosto(i)ssa olevaan, tunnuksella merkittyyn kohtaan"
translate finnish strings:
# renpy/common/_developer/developer.rpym:43
old "Interactive Director (D)"
# Automatic translation.
new "Interaktiivinen johtaja (D)"
# renpy/common/_developer/developer.rpym:51
old "Persistent Viewer"
# Automatic translation.
new "Pysyvä katseluohjelma"
# renpy/common/_developer/developer.rpym:59
old "Show Image Load Log (F4)"
# Automatic translation.
new "Näytä kuvan latausloki (F4)"
# renpy/common/_developer/developer.rpym:62
old "Hide Image Load Log (F4)"
# Automatic translation.
new "Piilota kuvan latausloki (F4)"
# renpy/common/_developer/developer.rpym:65
old "Image Attributes"
# Automatic translation.
new "Kuva-attribuutit"
# renpy/common/_developer/developer.rpym:70
old "Speech Bubble Editor (Shift+B)"
# Automatic translation.
new "Puhekuplaeditori (Shift+B)"
# renpy/common/_developer/developer.rpym:97
old "[name] [attributes] (hidden)"
# Automatic translation.
new "[name] [attributes] (piilotettu)"
# renpy/common/_developer/developer.rpym:101
old "[name] [attributes]"
new "[name] [attributes]"
# renpy/common/_developer/developer.rpym:162
old "Hide deleted"
# Automatic translation.
new "Piilota poistettu"
# renpy/common/_developer/developer.rpym:162
old "Show deleted"
# Automatic translation.
new "Näytä poistettu"
# renpy/common/_developer/developer.rpym:389
old "Type to filter: "
# Automatic translation.
new "Suodatettava tyyppi: "
# renpy/common/_developer/developer.rpym:507
old "Textures: [tex_count] ([tex_size_mb:.1f] MB)"
# Automatic translation.
new "Tekstuurit: [tex_count] ([tex_size_mb:.1f] MB)"
# renpy/common/_developer/developer.rpym:511
old "Image cache: [cache_pct:.1f]% ([cache_size_mb:.1f] MB)"
# Automatic translation.
new "Kuvien välimuisti: [cache_pct:.1f]% ([cache_size_mb:.1f] MB)"
# renpy/common/00console.rpy:789
old "help: show this help\n help <expr>: show signature and documentation of <expr>"
# Automatic translation.
new "help: näytä tämä apu\n help <expr>: näytä <expr>:n allekirjoitus ja dokumentaatio"
# renpy/common/00console.rpy:813
old "Help may display undocumented functions. Please check that the function or\nclass you want to use is documented.\n\n"
# Automatic translation.
new "Ohje saattaa näyttää dokumentoimattomia toimintoja. Tarkista, että toiminto tai\nluokkaa, jota haluat käyttää, on dokumentoitu.\n\n"
# renpy/common/00console.rpy:854
old "stack: print the return stack"
# Automatic translation.
new "stack: tulostaa paluupinon"
# renpy/common/00console.rpy:908
old "watch <expression>: watch a python expression\n watch short: makes the representation of traced expressions short (default)\n watch long: makes the representation of traced expressions as is"
# Automatic translation.
new "watch <expression>: katsella python-lauseketta\n watch short: tekee jäljitettyjen lausekkeiden esityksestä lyhyen (oletusarvo)\n watch long: tekee jäljitettyjen ilmaisujen esittämisen sellaiseksi kuin se on."
# renpy/common/00console.rpy:1028
old "short: Shorten the representation of objects on the console (default)."
# Automatic translation.
new "short: Lyhentää objektien esitystä konsolissa (oletus)."
# renpy/common/00console.rpy:1032
old "long: Print the full representation of objects on the console."
# Automatic translation.
new "long: Tulostaa objektien täydellisen esityksen konsoliin."
# renpy/common/00console.rpy:1036
old "escape: Enables escaping of unicode symbols in unicode strings."
# Automatic translation.
new "escape: Mahdollistaa unicode-symbolien pakenemisen unicode-merkkijonoissa."
# renpy/common/00console.rpy:1040
old "unescape: Disables escaping of unicode symbols in unicode strings and print it as is (default)."
# Automatic translation.
new "unescape: Poistaa unicode-merkkijonojen unicode-symbolien eskandoimisen ja tulostaa ne sellaisenaan (oletus)."
-309
View File
@@ -1,309 +0,0 @@
translate finnish strings:
# 00gltest.rpy:64
old "Graphics Acceleration"
new "Grafiikkakiihdytys"
# 00gltest.rpy:70
old "Automatically Choose"
new "Valitse automaattisesti"
# 00gltest.rpy:75
old "Force Angle/DirectX Renderer"
new "Pakota Angle/DirectX-renderöinti"
# 00gltest.rpy:79
old "Force OpenGL Renderer"
new "Pakota OpenGL-renderöinti"
# 00gltest.rpy:83
old "Force Software Renderer"
new "Pakota Software-renderöinti"
# 00gltest.rpy:93
old "Enable"
new "Ota käyttöön"
# 00gltest.rpy:109
old "Changes will take effect the next time this program is run."
new "Muutokset tulevat voimaan, kun käynnistät ohjelman uudelleen."
# 00gltest.rpy:141
old "Performance Warning"
new "Suorituskyvyn varoitus"
# 00gltest.rpy:146
old "This computer is using software rendering."
new "Tietokone käyttää software-renderöintiä."
# 00gltest.rpy:148
old "This computer is not using shaders."
new "Tietokone ei käytä varjostuksia."
# 00gltest.rpy:150
old "This computer is displaying graphics slowly."
new "Tietokone näyttää grafiikkaa hitaasti."
# 00gltest.rpy:152
old "This computer has a problem displaying graphics: [problem]."
new "Tietokoneella on ongelmia grafiikan näyttämisessä: [problem]."
# 00gltest.rpy:157
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem."
new "Sen grafiikka-ajurit voivat olla vanhentuneita tai ne saattavat toimia väärin. Tämä voi johtaa hitaaseen tai väärään grafiikan esittämiseen. DirectX:n päivittäminen saattaa korjata ongelman."
# 00gltest.rpy:159
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display."
new "Sen grafiikka-ajurit voivat olla vanhentuneita tai ne saattavat toimia väärin. Tämä voi johtaa hitaaseen tai väärään grafiikan esittämiseen."
# 00gltest.rpy:164
old "Update DirectX"
new "Päivitä DirectX"
# 00gltest.rpy:170
old "Continue, Show this warning again"
new "Jatka, näytä tämä varoitus uudelleen"
# 00gltest.rpy:174
old "Continue, Don't show warning again"
new "Jatka, älä näytä tätä varoitusta enää uudelleen"
# 00gltest.rpy:192
old "Updating DirectX."
new "Päivitetään DirectX:ää."
# 00gltest.rpy:196
old "DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX."
new "DirectX:n verkkoasennus on alkanut. Se voi olla aluksi minimisoituna työkalupalkilla. Seuraa ohjeita asentaaksesi DirectX:n."
# 00gltest.rpy:200
old "{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box."
new "{b}Huomaa:{/b} Microsoftin DirectX-verkkoasennusohjelma asentaa, oletusarvoisesti, Bing-työkalupalkin. Jos et halua tätä työkalupalkkia, poista valinta oikeasta laatikosta."
# 00gltest.rpy:204
old "When setup finishes, please click below to restart this program."
new "Kun asennus on valmis, klikkaa alhaalta käynnistääksesi tämän ohjelman uudelleen."
# 00gltest.rpy:206
old "Restart"
new "Käynnistä uudelleen"
# 00gamepad.rpy:32
old "Select Gamepad to Calibrate"
new "Valitse kalibroitava peliohjain"
# 00gamepad.rpy:35
old "No Gamepads Available"
new "Peliohjaimia ei havaittu"
# 00gamepad.rpy:54
old "Calibrating [name] ([i]/[total])"
new "Kalibroidaan [name] ([i]/[total])"
# 00gamepad.rpy:58
old "Press or move the [control!s] [kind]."
new "Paina tai liikuta [control!s] [kind]."
# 00gamepad.rpy:66
old "Skip (A)"
new "Ohita (A)"
# 00gamepad.rpy:69
old "Back (B)"
new "Takaisin (B)"
# _errorhandling.rpym:495
old "Open Traceback"
new "Avaa virheenjäljitystoiminto"
# _errorhandling.rpym:497
old "Opens the traceback.txt file in a text editor."
new "Avaa traceback.txt-tiedoston tekstieditorissa."
# _errorhandling.rpym:499
old "Copy to Clipboard"
new "Kopioi leikepöydälle"
# _errorhandling.rpym:501
old "Copies the traceback.txt file to the clipboard."
new "Kopioi traceback.txt-tiedoston leikepöydälle."
# _errorhandling.rpym:519
old "An exception has occurred."
new "Odottamaton virhe on tapahtunut."
# _errorhandling.rpym:538
old "Rollback"
new "Palaa edelliseen tilaan"
# _errorhandling.rpym:540
old "Attempts a roll back to a prior time, allowing you to save or choose a different choice."
new "Yrittää palata aikaisempaan tilaan, antaen sinun tallentaa tai tehdä eri valinnan."
# _errorhandling.rpym:543
old "Ignore"
new "Sivuuta"
# _errorhandling.rpym:545
old "Ignores the exception, allowing you to continue. This often leads to additional errors."
new "Sivuuttaa poikkeuksen, antaen sinun jatkaa. Tämä johtaa usein uusiin virheisiin."
# _errorhandling.rpym:548
old "Reload"
new "Lataa uudelleen"
# _errorhandling.rpym:550
old "Reloads the game from disk, saving and restoring game state if possible."
new "Lataa pelin uudelleen muistista, tallentaen ja palauttaen pelitilan jos mahdollista."
# _errorhandling.rpym:560
old "Quits the game."
new "Lopettaa pelin."
# _errorhandling.rpym:582
old "Parsing the script failed."
new "Skriptin jäsennys epäonnistui."
# _errorhandling.rpym:606
old "Open Parse Errors"
new "Avaa jäsennysvirheet"
# _errorhandling.rpym:608
old "Opens the errors.txt file in a text editor."
new "Avaa errors.txt-tiedoston tekstieditorissa."
# _errorhandling.rpym:612
old "Copies the errors.txt file to the clipboard."
new "Kopioi errors.txt-tiedoston leikepöydälle."
translate finnish strings:
# renpy/common/00gltest.rpy:89
old "Renderer"
new "Renderer"
# renpy/common/00gltest.rpy:100
old "Force GL Renderer"
new "Force GL Renderer"
# renpy/common/00gltest.rpy:105
old "Force ANGLE Renderer"
new "Force ANGLE Renderer"
# renpy/common/00gltest.rpy:110
old "Force GLES Renderer"
# Automatic translation.
new "Pakota GLES Renderer"
# renpy/common/00gltest.rpy:116
old "Force GL2 Renderer"
# Automatic translation.
new "Pakota GL2 Renderer"
# renpy/common/00gltest.rpy:121
old "Force ANGLE2 Renderer"
# Automatic translation.
new "Voima ANGLE2 Renderer"
# renpy/common/00gltest.rpy:126
old "Force GLES2 Renderer"
# Automatic translation.
new "Pakota GLES2 Renderer"
# renpy/common/00gltest.rpy:136
old "Enable (No Blocklist)"
# Automatic translation.
new "Enable (Ei estolistaa)"
# renpy/common/00gltest.rpy:159
old "Powersave"
new "Powersave"
# renpy/common/00gltest.rpy:173
old "Framerate"
new "Framerate"
# renpy/common/00gltest.rpy:177
old "Screen"
# Automatic translation.
new "Näyttö"
# renpy/common/00gltest.rpy:181
old "60"
new "60"
# renpy/common/00gltest.rpy:185
old "30"
new "30"
# renpy/common/00gltest.rpy:191
old "Tearing"
new "Tearing"
# renpy/common/00gltest.rpy:249
old "This game requires use of GL2 that can't be initialised."
# Automatic translation.
new "Tämä peli vaatii GL2:n käyttöä, jota ei voida alustaa."
# renpy/common/00gltest.rpy:259
old "The {a=edit:1:log.txt}log.txt{/a} file may contain information to help you determine what is wrong with your computer."
# Automatic translation.
new "{a=edit:1:log.txt}log.txt{/a} tiedosto voi sisältää tietoja, joiden avulla voit selvittää, mikä tietokoneessa on vikana."
# renpy/common/00gltest.rpy:264
old "More details on how to fix this can be found in the {a=[url]}documentation{/a}."
# Automatic translation.
new "Lisätietoja tämän korjaamisesta löytyy {a=[url]}-dokumentaatiosta{/a}."
# renpy/common/00gltest.rpy:281
old "Change render options"
# Automatic translation.
new "Muuta renderöintivaihtoehtoja"
# renpy/common/00gamepad.rpy:58
old "Press or move the '[control!s]' [kind]."
# Automatic translation.
new "Paina tai siirrä '[control!s]' [kind]."
# renpy/common/_errorhandling.rpym:555
old "Open"
# Automatic translation.
new "Avaa"
# renpy/common/_errorhandling.rpym:559
old "Copy BBCode"
# Automatic translation.
new "Kopioi BBCode"
# renpy/common/_errorhandling.rpym:561
old "Copies the traceback.txt file to the clipboard as BBcode for forums like https://lemmasoft.renai.us/."
# Automatic translation.
new "Kopioi traceback.txt-tiedoston leikepöydälle BBkoodina foorumeille, kuten https://lemmasoft.renai.us/."
# renpy/common/_errorhandling.rpym:563
old "Copy Markdown"
# Automatic translation.
new "Kopioi Markdown"
# renpy/common/_errorhandling.rpym:565
old "Copies the traceback.txt file to the clipboard as Markdown for Discord."
# Automatic translation.
new "Kopioi traceback.txt-tiedoston leikepöydälle Markdown-muodossa Discordia varten."
# renpy/common/_errorhandling.rpym:626
old "Ignores the exception, allowing you to continue."
# Automatic translation.
new "Jättää poikkeuksen huomiotta, jolloin voit jatkaa."
# renpy/common/_errorhandling.rpym:637
old "Console"
# Automatic translation.
new "Konsoli"
# renpy/common/_errorhandling.rpym:639
old "Opens a console to allow debugging the problem."
# Automatic translation.
new "Avaa konsolin ongelman vianmääritystä varten."
-479
View File
@@ -1,479 +0,0 @@
translate finnish strings:
# gui.rpy:2
old "## Initialization"
new "## Alustus"
# gui.rpy:5
old "## The init offset statement causes the init code in this file to run before init code in any other file."
new "## init offset-lause käskee ajamaan tämän tiedoston init-koodin ennen muiden tiedostojen init-koodia."
# gui.rpy:9
old "## Calling gui.init resets the styles to sensible default values, and sets the width and height of the game."
new "## gui.init-metodin kutsuminen nollaa tyylit järkeviin vakioasetuksiin, sekä asettaa peli-ikkunan leveyden ja korkeuden."
# gui.rpy:21
old "## Colors"
new "## Värit"
# gui.rpy:23
old "## The colors of text in the interface."
new "## Ikkunan tekstien väritys."
# gui.rpy:25
old "## An accent color used throughout the interface to label and highlight text."
new "## Korostusväri tekstin korostamista sekä merkkausta varten."
# gui.rpy:29
old "## The color used for a text button when it is neither selected nor hovered."
new "## Tekstipainikkeen käyttämä väri, kun se ei ole valittuna eikä kursori ole sen päällä."
# gui.rpy:32
old "## The small color is used for small text, which needs to be brighter/darker to achieve the same effect."
new "## Pikkuväriä käytetään pienelle tekstille, jonka tulee olla kirkkaampi tai tummempi erottuakseen."
# gui.rpy:36
old "## The color that is used for buttons and bars that are hovered."
new "## Painikkeiden käyttämä väri, kun ne ovat valittuja tai kursori on niiden päällä."
# gui.rpy:39
old "## The color used for a text button when it is selected but not focused. A button is selected if it is the current screen or preference value."
new "## Tekstipainikkeen käyttämä väri, kun se on valittuna mutta ei aktiivisessa ikkunassa."
# gui.rpy:43
old "## The color used for a text button when it cannot be selected."
new "## Tekstipainikkeen käyttämä väri, kun se ei ole valittavissa."
# gui.rpy:46
old "## Colors used for the portions of bars that are not filled in. These are not used directly, but are used when re-generating bar image files."
new "## Värit, joita käytetään täyttämättömien palkkien osiin. Näitä ei käytetä suoraan, vaan ainoastaan palkkikuvatiedostojen generoinnissa."
# gui.rpy:51
old "## The colors used for dialogue and menu choice text."
new "## Värit, joita käytetään dialogin ja valikoiden tekstissä."
# gui.rpy:56
old "## Fonts and Font Sizes"
new "## Fontit sekä fonttikoot"
# gui.rpy:58
old "## The font used for in-game text."
new "## Pelin sisäisen tekstin fontti."
# gui.rpy:61
old "## The font used for character names."
new "## Hahmojen nimien fontti."
# gui.rpy:64
old "## The font used for out-of-game text."
new "## Pelin ulkoisen tekstin fontti."
# gui.rpy:67
old "## The size of normal dialogue text."
new "## Normaalin dialogitekstin fonttikoko."
# gui.rpy:70
old "## The size of character names."
new "## Hahmojen nimien fonttikoko."
# gui.rpy:73
old "## The size of text in the game's user interface."
new "## Pelin käyttöliittymän tekstin koko."
# gui.rpy:76
old "## The size of labels in the game's user interface."
new "## Pelin käyttöliittymän otsikoiden koko."
# gui.rpy:79
old "## The size of text on the notify screen."
new "## Tekstin koko ilmoitusikkunassa."
# gui.rpy:82
old "## The size of the game's title."
new "## Pelin nimen fonttikoko."
# gui.rpy:86
old "## Main and Game Menus"
new "## Pää- ja pelivalikot"
# gui.rpy:88
old "## The images used for the main and game menus."
new "## Pää- ja pelivalikoiden käyttämät kuvat."
# gui.rpy:92
old "## Should we show the name and version of the game?"
new "## Tulisiko meidän näyttää pelin nimi ja versio?"
# gui.rpy:96
old "## Dialogue"
new "## Dialogi"
# gui.rpy:98
old "## These variables control how dialogue is displayed on the screen one line at a time."
new "## Nämä muuttujat ohjaavat dialogin tulostusta näytölle rivi kerrallaan."
# gui.rpy:101
old "## The height of the textbox containing dialogue."
new "## Dialogi-ikkunan korkeus."
# gui.rpy:104
old "## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is center, and 1.0 is the bottom."
new "## Dialogi-ikkunan sijainti pystytasossa näytöllä. 0.0 on ikkunan yläreuna, 0.5 keskikohta, ja 1.0 alareuna."
# gui.rpy:109
old "## The placement of the speaking character's name, relative to the textbox. These can be a whole number of pixels from the left or top, or 0.5 to center."
new "## Puhuvan hahmon nimen sijainti suhteeessa dialogi-ikkunan sijaintiin. Arvot voivat olla pikseleiden määrä kokonaislukuina, tai 0.5 keskikohtana."
# gui.rpy:114
old "## The horizontal alignment of the character's name. This can be 0.0 for left-aligned, 0.5 for centered, and 1.0 for right-aligned."
new "## Hahmon nimen sijainti vaakatasossa. Arvo voi olla 0.0 vasemmalle reunalle, 0.5 keskitetylle, tai 1.0 oikealle reunalle."
# gui.rpy:118
old "## The width, height, and borders of the box containing the character's name, or None to automatically size it."
new "## Hahmon nimen sisältävän laatikon leveys, korkeus, ja reunan paksuus. Arvo None päättää koon automaattisesti."
# gui.rpy:123
old "## The borders of the box containing the character's name, in left, top, right, bottom order."
new "## Hahmon nimilaatikon reunat, järjestyksessä vasen, ylä, oikea, ja alaosa."
# gui.rpy:127
old "## If True, the background of the namebox will be tiled, if False, the background of the namebox will be scaled."
new "## Arvon ollessa True, nimilaatikon tausta käyttää itseään toistavaa taustakuvaa. Arvon ollessa False, taustakuvan koko skaalautuu."
# gui.rpy:132
old "## The placement of dialogue relative to the textbox. These can be a whole number of pixels relative to the left or top side of the textbox, or 0.5 to center."
new "## Dialogin sijainti suhteessa dialogi-ikkunaan. Arvot voivat olla pikseleiden määrä kokonaislukuina, tai 0.5 keskikohtana."
# gui.rpy:138
old "## The maximum width of dialogue text, in pixels."
new "## Dialogitekstin maksimileveys pikseleinä."
# gui.rpy:141
old "## The horizontal alignment of the dialogue text. This can be 0.0 for left-aligned, 0.5 for centered, and 1.0 for right-aligned."
new "## Dialogin sijainti vaakatasossa. Arvo voi olla 0.0 vasemmalle reunalle, 0.5 keskitetylle, tai 1.0 oikealle reunalle."
# gui.rpy:146
old "## Buttons"
new "## Painikkeet"
# gui.rpy:148
old "## These variables, along with the image files in gui/button, control aspects of how buttons are displayed."
new "## Nämä muuttujat, gui/button-kansiossa olevien kuvatiedostojen ohella, ohjaavat painikkeiden ulkoasua."
# gui.rpy:151
old "## The width and height of a button, in pixels. If None, Ren'Py computes a size."
new "## Painikkeen leveys ja korkeus, pikseleinä. Arvon ollessa None, Ren'Py laskee sopivan koon."
# gui.rpy:155
old "## The borders on each side of the button, in left, top, right, bottom order."
new "## Reunat painikkeen jokaisella sivulla, järjestyksessä vasen, ylä, oikea, ja alareuna."
# gui.rpy:158
old "## If True, the background image will be tiled. If False, the background image will be linearly scaled."
new "## Arvon ollessa True, painikkeen tausta käyttää itseään toistavaa taustakuvaa. Arvon ollessa False, taustakuvan koko skaalautuu lineaarisesti."
# gui.rpy:162
old "## The font used by the button."
new "## Painikkeen käyttämä fontti."
# gui.rpy:165
old "## The size of the text used by the button."
new "## Painikkeen käyttämä fonttikoko."
# gui.rpy:179
old "## These variables override settings for different kinds of buttons. Please see the gui documentation for the kinds of buttons available, and what each is used for."
new "## Nämä muuttujat yliajavat erilaisten painikkeiden oletusasetuksia. Luethan lisätietoa erilaisista painikkeista sekä niiden käyttötarkoituksista GUI-dokumentaatiosta."
# gui.rpy:183
old "## These customizations are used by the default interface:"
new "## Nämä muokkaukset ovat käytössä oletuskäyttöliittymässä:"
# gui.rpy:198
old "## You can also add your own customizations, by adding properly-named variables. For example, you can uncomment the following line to set the width of a navigation button."
new "## Voit myös halutessasi lisätä omia muokkauksiasi lisäämällä oikein nimettyjä muuttujia. Voit esimerkiksi ottaa seuraavan rivin pois kommentista asettaaksesi valikkopainikkeen leveyden."
# gui.rpy:205
old "## Choice Buttons"
new "## Valikon Painikkeet"
# gui.rpy:207
old "## Choice buttons are used in the in-game menus."
new "## Nämä muuttujat määrittävät pelin sisäisten valikoiden painikkeiden ominaisuuksia."
# gui.rpy:220
old "## File Slot Buttons"
new "## Tallennuspaikan Painikkeet"
# gui.rpy:222
old "## A file slot button is a special kind of button. It contains a thumbnail image, and text describing the contents of the save slot. A save slot uses image files in gui/button, like the other kinds of buttons."
new "## Tallennuspaikan painike on erityispainike, joka sisältää esikatselukuvan ja tekstiselitteen tallennuspaikan sisällöstä. Tallennuspaikka käyttää kuvatiedostoja gui/button-kansiosta, kuten muutkin painikkeet."
# gui.rpy:226
old "## The save slot button."
new "## Tallennuspaikan painike."
# gui.rpy:234
old "## The width and height of thumbnails used by the save slots."
new "## Tallennuspaikan käyttämien esikatselukuvien leveys ja korkeus."
# gui.rpy:238
old "## The number of columns and rows in the grid of save slots."
new "## Tallennuspaikkojen ruudukon rivien ja sarakkeiden lukumäärä."
# gui.rpy:243
old "## Positioning and Spacing"
new "## Sijainti ja Välit"
# gui.rpy:245
old "## These variables control the positioning and spacing of various user interface elements."
new "## Nämä muuttujat säätelevät erilaisten käyttöliittymän komponenttien sijaintia ja väljäyttä."
# gui.rpy:248
old "## The position of the left side of the navigation buttons, relative to the left side of the screen."
new "## Siirtymäpainikkeiden vasemman puolen sijainti suhteessa ikkunan vasempaan reunaan."
# gui.rpy:252
old "## The vertical position of the skip indicator."
new "## Sivuutusilmaisimen sijainti pystyakselilla."
# gui.rpy:255
old "## The vertical position of the notify screen."
new "## Ilmoitusnäytön sijainti pystyakselilla."
# gui.rpy:258
old "## The spacing between menu choices."
new "## Valikon vaihtoehtojen välinen tila."
# gui.rpy:261
old "## Buttons in the navigation section of the main and game menus."
new "## Painikkeiden välinen tila pää- ja pelivalikoissa."
# gui.rpy:264
old "## Controls the amount of spacing between preferences."
new "## Hallitsee asetusten välistä etäisyyttä."
# gui.rpy:267
old "## Controls the amount of spacing between preference buttons."
new "## Hallitsee asetusten painikkeiden välisiä etäisyyksiä."
# gui.rpy:270
old "## The spacing between file page buttons."
new "## Tyhjä tila tallennussivun painikkeiden välillä."
# gui.rpy:273
old "## The spacing between file slots."
new "## Tyhjä tila tallennuspaikkojen välillä."
# gui.rpy:277
old "## Frames"
new "## Reunat"
# gui.rpy:279
old "## These variables control the look of frames that can contain user interface components when an overlay or window is not present."
new "## Nämä muuttujaat säätelevät käyttöliittymän komponentteja ympäröivien reunojen ominaisuuksia, kun varsinaista ikkunaa ei ole."
# gui.rpy:282
old "## Generic frames that are introduced by player code."
new "## Geneeriset reunat, joita koodi voi luoda."
# gui.rpy:285
old "## The frame that is used as part of the confirm screen."
new "## Varmistusikkunan käyttämä reuna."
# gui.rpy:288
old "## The frame that is used as part of the skip screen."
new "## Sivuutusikkunan käyttämä reuna."
# gui.rpy:291
old "## The frame that is used as part of the notify screen."
new "## Ilmoitusikkunan käyttämä reuna."
# gui.rpy:294
old "## Should frame backgrounds be tiled?"
new "## Tulisiko kehyksen taustakuvan toistaa itseään?"
# gui.rpy:298
old "## Bars, Scrollbars, and Sliders"
new "## Palkit, Vierityspalkit, ja Liukuvalinnat"
# gui.rpy:300
old "## These control the look and size of bars, scrollbars, and sliders."
new "## Nämä muokkaavat palkkien, vierityspalkkien, ja liukuvalintojen ulkonäköä sekä kokoa."
# gui.rpy:302
old "## The default GUI only uses sliders and vertical scrollbars. All of the other bars are only used in creator-written code."
new "## Oletusarvoinen graafinen käyttöliittymä käyttää vain liukuvalintoja sekä pystysuoria vierityspalkkeja. Kaikkia muita käytetään vain jos projektin koodi niitä erikseen käyttää."
# gui.rpy:305
old "## The height of horizontal bars, scrollbars, and sliders. The width of vertical bars, scrollbars, and sliders."
new "## Palkkien, vierityspalkkien, ja liukuvalintojen korkeus ja leveys."
# gui.rpy:311
old "## True if bar images should be tiled. False if they should be linearly scaled."
new "## Arvon ollessa True, palkit käyttävät itseään toistavia taustakuvia. Arvon ollessa False, taustakuvan koko skaalautuu lineaarisesti."
# gui.rpy:316
old "## Horizontal borders."
new "## Vaakatason reunat."
# gui.rpy:321
old "## Vertical borders."
new "## Pystysuorat reunat."
# gui.rpy:326
old "## What to do with unscrollable scrollbars in the gui. \"hide\" hides them, while None shows them."
new "## Päättää, näkyvätkö tyngät vierityspalkit. \"hide\" piilottaa ne, None pitää ne näkyvillä."
# gui.rpy:331
old "## History"
new "## Historia"
# gui.rpy:333
old "## The history screen displays dialogue that the player has already dismissed."
new "## Historia-ikkuna näyttää dialogin, jonka pelaaja on jo lukenut."
# gui.rpy:335
old "## The number of blocks of dialogue history Ren'Py will keep."
new "## Määrittää, montako dialogitekstiä Ren'Py pitää muistissaan."
# gui.rpy:338
old "## The height of a history screen entry, or None to make the height variable at the cost of performance."
new "## Historia-näytön yksittäisen dialogin korkeus, tai None jolloin korkeus vaihtelee, lisäten prosessorin rasitusta."
# gui.rpy:342
old "## The position, width, and alignment of the label giving the name of the speaking character."
new "## Puhuvan hahmon nimen sijainti, leveys, ja ryhmäytys."
# gui.rpy:349
old "## The position, width, and alignment of the dialogue text."
new "## Dialogitekstin sijainti, leveys, ja ryhmäytys."
# gui.rpy:356
old "## NVL-Mode"
new "## NVL-Tila"
# gui.rpy:358
old "## The NVL-mode screen displays the dialogue spoken by NVL-mode characters."
new "## NVL-tilan näyttö näyttää NVL-tilan hahmojen dialogin."
# gui.rpy:360
old "## The borders of the background of the NVL-mode background window."
new "## NVL-tilan ikkunan taustan reunat."
# gui.rpy:363
old "## The height of an NVL-mode entry. Set this to None to have the entries dynamically adjust height."
new "## NVL-tilan dialogin korkeus. Asetettaessa arvoon None, korkeus säätyy automaattisesti."
# gui.rpy:367
old "## The spacing between NVL-mode entries when gui.nvl_height is None, and between NVL-mode entries and an NVL-mode menu."
new "## Väli NVL-tilan dialogien sekä NVL-tilan valikon välillä, kun gui.nvl_height on None."
# gui.rpy:384
old "## The position, width, and alignment of nvl_thought text (the text said by the nvl_narrator character.)"
new "## nvl_thought-tekstin sijainti, leveys, ja ryhmäytys (nvl_narrator-hahmon puhuma teksti.)"
# gui.rpy:391
old "## The position of nvl menu_buttons."
new "## NVL-valikon painikkeiden sijainti."
# gui.rpy:403
old "## This increases the size of the quick buttons to make them easier to touch on tablets and phones."
new "## Kasvattaa pikavalikon painikkeiden kokoa mobiililaitteilla, tehden niistä helpompia käyttää."
# gui.rpy:409
old "## This changes the size and spacing of various GUI elements to ensure they are easily visible on phones."
new "## Muuttaa useiden käyttöliittymän elementtien kokoa ja välejä, tehden niistä helpommin erottuvia matkapuhelimilla."
# gui.rpy:413
old "## Font sizes."
new "## Fonttikoot."
# gui.rpy:421
old "## Adjust the location of the textbox."
new "## Säädä teksti-ikkunan sijaintia."
# gui.rpy:427
old "## Change the size and spacing of items in the game menu."
new "## Mukauta pelivalikon elementtien kokoa ja sijaintia."
# gui.rpy:436
old "## File button layout."
new "## Tallennusvalikon painikkeen asettelu."
# gui.rpy:440
old "## NVL-mode."
new "## NVL-tila."
# gui.rpy:456
old "## Quick buttons."
new "## Pikavalikko."
translate finnish strings:
# gui/game/gui.rpy:5
old "## The init offset statement causes the initialization statements in this file to run before init statements in any other file."
# Automatic translation.
new "## Init offset -lauseke saa aikaan sen, että tässä tiedostossa olevat alustamislausekkeet suoritetaan ennen minkä tahansa muun tiedoston init-lausekkeita."
# gui/game/gui.rpy:14
old "## Enable checks for invalid or unstable properties in screens or transforms"
# Automatic translation.
new "## Ota käyttöön virheellisten tai epävakaiden ominaisuuksien tarkistukset näytöissä tai muunnoksissa."
# gui/game/gui.rpy:19
old "## GUI Configuration Variables"
# Automatic translation.
new "## GUI-konfiguraatiomuuttujat"
# gui/game/gui.rpy:167
old "## The color of button text in various states."
# Automatic translation.
new "## Painikkeen tekstin väri eri tiloissa."
# gui/game/gui.rpy:173
old "## The horizontal alignment of the button text. (0.0 is left, 0.5 is center, 1.0 is right)."
# Automatic translation.
new "## Painikkeen tekstin vaakasuora kohdistus. (0.0 on vasen, 0.5 on keskellä, 1.0 on oikea)."
# gui/game/gui.rpy:278
old "## The position of the main menu text."
# Automatic translation.
new "## Päävalikon tekstin sijainti."
# gui/game/gui.rpy:287
old "## Generic frames."
# Automatic translation.
new "## Yleiset kehykset."
# gui/game/gui.rpy:307
old "## The default GUI only uses sliders and vertical scrollbars. All of the other bars are only used in creator-written screens."
# Automatic translation.
new "## Oletusarvoinen graafinen käyttöliittymä käyttää vain liukusäätimiä ja pystysuuntaisia vierityspalkkeja. Kaikkia muita palkkeja käytetään vain luojan kirjoittamissa näytöissä."
# gui/game/gui.rpy:368
old "## The maximum number of NVL-mode entries Ren'Py will display. When more entries than this are to be show, the oldest entry will be removed."
# Automatic translation.
new "## NVL-tilan merkintöjen enimmäismäärä, jonka Ren'Py näyttää. Kun näytetään tätä enemmän merkintöjä, vanhin merkintä poistetaan."
# gui/game/gui.rpy:405
old "## Localization"
# Automatic translation.
new "## Lokalisointi"
# gui/game/gui.rpy:407
old "## This controls where a line break is permitted. The default is suitable for most languages. A list of available values can be found at https://www.renpy.org/doc/html/style_properties.html#style-property-language"
# Automatic translation.
new "## Tämä säätää, missä kohtaa rivinvaihto sallitaan. Oletusarvo sopii useimmille kielille. Luettelo käytettävissä olevista arvoista löytyy osoitteesta https://www.renpy.org/doc/html/style_properties.html#style-property-language."
# gui/game/gui.rpy:415
old "## Mobile devices"
# Automatic translation.
new "## Mobiililaitteet"
# gui/game/gui.rpy:446
old "## Change the size and spacing of various things."
# Automatic translation.
new "## Muuta eri asioiden kokoa ja välejä."
File diff suppressed because it is too large Load Diff
-27
View File
@@ -1,27 +0,0 @@
translate finnish strings:
# _layout/classic_joystick_preferences.rpym:94
old "Joystick Mapping"
new "Peliohjaimen näppäinten asetus"
# _layout/classic_load_save.rpym:138
old "Empty Slot."
new "Tyhjä paikka."
# _layout/classic_load_save.rpym:170
old "a"
new "a"
# _layout/classic_load_save.rpym:179
old "q"
new "q"
# _compat/gamemenu.rpym:355
old "Previous"
new "Edellinen"
# _compat/gamemenu.rpym:362
old "Next"
new "Seuraava"
-223
View File
@@ -1,223 +0,0 @@
translate finnish strings:
# options.rpy:1
old "## This file contains options that can be changed to customize your game."
new "## Tämä tiedosto sisältää asetuksia, joita muokkaamalla voit mukauttaa peliäsi."
# options.rpy:4
old "## Lines beginning with two '#' marks are comments, and you shouldn't uncomment them. Lines beginning with a single '#' mark are commented-out code, and you may want to uncomment them when appropriate."
new "## Rivit, jotka alkavat kahdells '#'-merkillä, ovat kommentteja eikä sinun tule muuttaa niitä ohjelmakoodiksi. Rivit, jotka alkavat yhdellä '#'-merkillä, ovat kommentoitua koodia, ja voit halutessasi palauttaa ne ohjelmakoodiksi."
# options.rpy:10
old "## Basics"
new "## Perusteet"
# options.rpy:12
old "## A human-readable name of the game. This is used to set the default window title, and shows up in the interface and error reports."
new "## Ihmisille luettava pelin nimi. Tätä käytetään peli-ikkunan nimen asetuksessa, ja se näkyy pelin ikkunassa sekä virheraporteissa."
# options.rpy:15
old "## The _() surrounding the string marks it as eligible for translation."
new "## _() merkkijonon ympärillä merkitsee sen soveltuvaksi käännöksille."
# options.rpy:17
old "Ren'Py 7 Default GUI"
new "Ren'Py 7 Oletusarvoinen GUI"
# options.rpy:20
old "## Determines if the title given above is shown on the main menu screen. Set this to False to hide the title."
new "## Päättää, näytetäänkö ylläannettu nimi pelin päävalikossa. Aseta arvoksi False piilottaaksesi nimen."
# options.rpy:26
old "## The version of the game."
new "## Pelin versio."
# options.rpy:31
old "## Text that is placed on the game's about screen. To insert a blank line between paragraphs, write \\n\\n."
new "## Teksti, joka näkyy pelin tietoja-ikkunassa. Lisätäksesi tyhjän rivin lauseiden väliin, kirjoita \\n\\n."
# options.rpy:37
old "## A short name for the game used for executables and directories in the built distribution. This must be ASCII-only, and must not contain spaces, colons, or semicolons."
new "## Lyhyt nimi pelille, jota käytetään kootuille ohjelmatiedostoille sekä kansioille. Nimen on oltava pelkkiä ASCII-merkkejä, eikä se saa sisältää välilyöntejä, pisteitä, eikä puolipisteitä."
# options.rpy:44
old "## Sounds and music"
new "## Äänet ja musiikki"
# options.rpy:46
old "## These three variables control which mixers are shown to the player by default. Setting one of these to False will hide the appropriate mixer."
new "## Nämä kolme muuttujaa ohjaavat, mitkä mikserit näytetään pelaajalle oletusarvoisesti. Asettamalla arvoksi False piilottaa kyseisen mikserin."
# options.rpy:55
old "## To allow the user to play a test sound on the sound or voice channel, uncomment a line below and use it to set a sample sound to play."
new "## Mahdollistaaksesi käyttäjän soittaa testiääni äänitehoste- tai puhekanavilla, palauta seuraava kommentti takaisin ohjelmakoodiksi ja käytä sitä valitaksesi sopivan testiäänen."
# options.rpy:62
old "## Uncomment the following line to set an audio file that will be played while the player is at the main menu. This file will continue playing into the game, until it is stopped or another file is played."
new "## Palauta seuraava rivi takaisin ohjelmakoodiksi valitaksesi äänitiedoston, jota soitetaan pelaajan ollessa päävalikossa. Tämän tiedoston toisto jatkuu pelin alkaessa, kunnes se pysäytetään tai toinen tiedosto alkaa soimaan."
# options.rpy:69
old "## Transitions"
new "## Siirtymät"
# options.rpy:71
old "## These variables set transitions that are used when certain events occur. Each variable should be set to a transition, or None to indicate that no transition should be used."
new "## Nämä muuttujat asettavat erilaisia siirtymiä eri tapahhtumien kohdalla. Jokainen muuttuja tulee asettaa johonkin siirtymään, tai None mikäli siirtymää ei haluta käyttää."
# options.rpy:75
old "## Entering or exiting the game menu."
new "## Pelivalikon avaaminen ja sulkeminen."
# options.rpy:81
old "## A transition that is used after a game has been loaded."
new "## Siirtymä, jota käytetään kun peli on ladattu."
# options.rpy:86
old "## Used when entering the main menu after the game has ended."
new "## Käytetään siirryttäessä päävalikkoon pelin päätyttyä."
# options.rpy:91
old "## A variable to set the transition used when the game starts does not exist. Instead, use a with statement after showing the initial scene."
new "## Muuttujaa siirtymän valitsemiseksi pelin alkaessa ei ole olemassa. Sen sijaan, käytä with-väitettä näytettyäsi ensimmäisen kohtauksen."
# options.rpy:96
old "## Window management"
new "## Ikkunanhallinta"
# options.rpy:98
old "## This controls when the dialogue window is displayed. If \"show\", it is always displayed. If \"hide\", it is only displayed when dialogue is present. If \"auto\", the window is hidden before scene statements and shown again once dialogue is displayed."
new "## Tämä muokkaa dialogi-ikkunan näkyvyyttä. Arvon ollessa \"show\", ikkuna on aina näkyvissä. Mikäli se on \"hide\", ikkuna näkyy vain kun on dialogia mitä näyttää. Ja jos se on \"auto\", ikkuna ei ole näkyvissä ennen scene-lauseita ja näytetään kun dialogia on näytettävänä."
# options.rpy:103
old "## After the game has started, this can be changed with the \"window show\", \"window hide\", and \"window auto\" statements."
new "## Pelin alettua, tätä voidaan muuttaa \"window show\", \"window hide\", ja \"window auto\" -lauseilla."
# options.rpy:109
old "## Transitions used to show and hide the dialogue window"
new "## Siirtymät, joita käytetään dialogi-ikkunan näytössä ja piilotuksessa"
# options.rpy:115
old "## Preference defaults"
new "## Asetusten oletusarvot"
# options.rpy:117
old "## Controls the default text speed. The default, 0, is infinite, while any other number is the number of characters per second to type out."
new "## Asettaa tekstin näytön oletusnopeuden. Oletusarvo, 0, on ääretön (teksti näkyy välittömästi), kaikki muut positiiviset luvut asettavat näytettyjen merkkien lukumäärän sekunnissa."
# options.rpy:123
old "## The default auto-forward delay. Larger numbers lead to longer waits, with 0 to 30 being the valid range."
new "## Oletusarvoinen automaattisen jatkamisen viive. Suuremmat luvut johtavatt pidempiin viiveisiin, tuetut arvot ovat väliltä 0-30."
# options.rpy:129
old "## Save directory"
new "## Tallennuskansio"
# options.rpy:131
old "## Controls the platform-specific place Ren'Py will place the save files for this game. The save files will be placed in:"
new "## Asettaa alustariippuvaisen sijainnin, johon Ren'Py tallentaa pelitallennukset. Tallennustiedostot tallennetaan kansioon:"
# options.rpy:134
old "## Windows: %APPDATA\\RenPy\\<config.save_directory>"
new "## Windows: %APPDATA\\RenPy\\<config.save_directory>"
# options.rpy:136
old "## Macintosh: $HOME/Library/RenPy/<config.save_directory>"
new "## Macintosh: $HOME/Library/RenPy/<config.save_directory>"
# options.rpy:138
old "## Linux: $HOME/.renpy/<config.save_directory>"
new "## Linux: $HOME/.renpy/<config.save_directory>"
# options.rpy:140
old "## This generally should not be changed, and if it is, should always be a literal string, not an expression."
new "## Tätä ei yleensä kannata muuttaa, ja jos muutetaan, sen tulee aina olla merkkijonoliteraali eikä ekspressio."
# options.rpy:146
old "## Icon ########################################################################'"
new "## Ikoni #######################################################################'"
# options.rpy:148
old "## The icon displayed on the taskbar or dock."
new "## Tehtäväpalkissa tai työpöydällä näkyvä ikoni."
# options.rpy:153
old "## Build configuration"
new "## Jakeluasetukset"
# options.rpy:155
old "## This section controls how Ren'Py turns your project into distribution files."
new "## Tämä osio ohjaa Ren'Py:n käyttäytymistä pelin jakeluiden kokoamisvaiheessa."
# options.rpy:160
old "## The following functions take file patterns. File patterns are case- insensitive, and matched against the path relative to the base directory, with and without a leading /. If multiple patterns match, the first is used."
new "## Seuraavat funktiot vaativat tiedostonimimallin. Mallit ovat kirjasinkokoriippumattomia, ja niitä verrataan projektikansiosta riippuvaisina, joko alkavan /-merkin kanssa tai ilman. Jos useampi malli täsmää, käytetään ensimmäistä sopivaa."
# options.rpy:165
old "## In a pattern:"
new "## Mallin syntaksi:"
# options.rpy:167
old "## / is the directory separator."
new "## / on kansioiden erotin."
# options.rpy:169
old "## * matches all characters, except the directory separator."
new "## * täsmää kaikkiin merkkeihin, paitsi kansion erottimeen."
# options.rpy:171
old "## ** matches all characters, including the directory separator."
new "## ** täsmää kaikkiin merkkeihin, mukaan lukien kansion erottimeen."
# options.rpy:173
old "## For example, \"*.txt\" matches txt files in the base directory, \"game/**.ogg\" matches ogg files in the game directory or any of its subdirectories, and \"**.psd\" matches psd files anywhere in the project."
new "## Esimerkiksi, \"*.txt\" täsmää kaikkiin txt-tiedostoihin projektikansiossa, \"game/**.ogg\" täsmää kaikkiin ogg-tiedostoihin game-kansiossa tai sen alakansioissa, ja \"**.psd\" täsmää kaikkiin, missä tahansa projektissa sijaitseviin psd-tiedostoihin."
# options.rpy:177
old "## Classify files as None to exclude them from the built distributions."
new "## Luokittele tiedostot arvolla None jättääksesi ne pois kootuista jakeluista."
# options.rpy:185
old "## To archive files, classify them as 'archive'."
new "## Arkistoidaksesi tiedostoja, luokittele ne arvolla 'archive'."
# options.rpy:190
old "## Files matching documentation patterns are duplicated in a mac app build, so they appear in both the app and the zip file."
new "## Dokumentaatiotiedostot kloonautuvat mac-sovelluksissa, joten ne sisältyvät sekä sovelluksessa että zip-tiedostossa."
# options.rpy:196
old "## A Google Play license key is required to download expansion files and perform in-app purchases. It can be found on the \"Services & APIs\" page of the Google Play developer console."
new "## Google Play -lisenssiavain vaaditaan jotta lisäosatiedostoja ja sovelluksen sisäisiä ostoja voidaan tukea. Sen voi löytää \"Services & APIs\"-sivulta Google Play -kehittäjäkonsolista."
# options.rpy:203
old "## The username and project name associated with an itch.io project, separated by a slash."
new "## Kauttaviivan erottama käyttäjänimi ja itch.io-projektinimi."
translate finnish strings:
# gui/game/options.rpy:31
old "## Text that is placed on the game's about screen. Place the text between the triple-quotes, and leave a blank line between paragraphs."
# Automatic translation.
new "## Teksti, joka sijoitetaan pelin about-näyttöön. Sijoita teksti kolmoislauseiden väliin ja jätä kappaleiden väliin tyhjä rivi."
# gui/game/options.rpy:47
old "## These three variables control, among other things, which mixers are shown to the player by default. Setting one of these to False will hide the appropriate mixer."
# Automatic translation.
new "## Nämä kolme muuttujaa säätelevät muun muassa sitä, mitkä mikserit näytetään pelaajalle oletusarvoisesti. Jonkin näistä muuttujista asettaminen Falseen piilottaa kyseisen mikserin."
# gui/game/options.rpy:82
old "## Between screens of the game menu."
# Automatic translation.
new "## Pelivalikon näyttöjen välillä."
# gui/game/options.rpy:152
old "## Icon"
# Automatic translation.
new "## Kuvake"
# gui/game/options.rpy:203
old "## A Google Play license key is required to perform in-app purchases. It can be found in the Google Play developer console, under \"Monetize\" > \"Monetization Setup\" > \"Licensing\"."
# Automatic translation.
new "## Google Play -lisenssiavain tarvitaan sovelluksen sisäisten ostojen tekemiseen. Se löytyy Google Play -kehittäjäkonsolista kohdasta \"Monetize\" > \"Monetization Setup\" > \"Licensing\"."

Some files were not shown because too many files have changed in this diff Show More