launcher: Detect and abort distributing the tutorial.

The tutrorial expects to be part of Ren'Py - the example system
may not work if it's being run outside of Ren'Py. This detects
attempts to distribute the tutorial on its own, and aborts the
process.
This commit is contained in:
Tom Rothamel
2023-07-18 23:17:46 -04:00
parent 3dab93666d
commit 4035fc9621
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -528,6 +528,11 @@ change_renpy_executable()
self.reporter.info(_("Scanning project files..."))
project.update_dump(force=True, gui=False, compile=project.data['force_recompile'])
if project.data['tutorial']:
self.reporter.info(_("Building distributions failed:\n\nThe project is the Ren'Py Tutorial, which can't be distributed outside of Ren'Py. Consider using The Question as a test project."), pause=True)
self.log.close()
return
if project.data['force_recompile']:
import compileall
+1
View File
@@ -128,6 +128,7 @@ init python in project:
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"]
+1 -1
View File
@@ -1 +1 @@
{ "type" : "hidden", "display_name" : "Tutorial" }
{ "type" : "hidden", "display_name" : "Tutorial", "tutorial" : true }