diff --git a/README.md b/README.md index 4595739..834e0fa 100644 --- a/README.md +++ b/README.md @@ -64,21 +64,21 @@ Command help: Example : ``` -user@pp /data/git/pygbag $ python3 -m pygbag --help your.app.folder - *pygbag 0.7.3* +user@pp /data/git/pygbag $ py -m pygbag --help test/main.py + *pygbag 0.8.2* +115: cache 0.7.2 mismatch, want 0.8.2, cleaning ... -Serving python files from [/data/git/pygbag/your.app.folder/build/web] +Serving python files from [/data/git/pygbag/test/build/web] with no security/performance in mind, i'm just a test tool : don't rely on me -usage: __main__.py [-h] [--bind ADDRESS] [--PYBUILD PYBUILD] [--app_name APP_NAME] [--ume_block UME_BLOCK] [--can_close CAN_CLOSE] - [--cache CACHE] [--package PACKAGE] [--title TITLE] [--version VERSION] [--build] [--html] [--no_opt] - [--archive] [--icon ICON] [--cdn CDN] [--template TEMPLATE] [--ssl SSL] [--port [PORT]] +usage: __main__.py [-h] [--bind ADDRESS] [--PYBUILD PYBUILD] [--app_name APP_NAME] [--ume_block UME_BLOCK] [--can_close CAN_CLOSE] [--cache CACHE] [--package PACKAGE] [--title TITLE] [--version VERSION] [--build] [--html] [--no_opt] [--archive] [--icon ICON] [--cdn CDN] [--template TEMPLATE] [--ssl SSL] + [--port [PORT]] options: -h, --help show this help message and exit --bind ADDRESS Specify alternate bind address [default: localhost] --PYBUILD PYBUILD Specify python version [default:3.11] - --app_name APP_NAME Specify user facing name of application [default:your.app.folder] + --app_name APP_NAME Specify user facing name of application [default:test] --ume_block UME_BLOCK Specify wait for user media engagement before running [default:1] --can_close CAN_CLOSE @@ -86,17 +86,16 @@ options: --cache CACHE md5 based url cache directory --package PACKAGE package name, better make it unique --title TITLE App nice looking name - --version VERSION override prebuilt version path [default:0.7.3] + --version VERSION override prebuilt version path [default:0.8.2] --build build only, do not run test server --html build as html with embedded assets (pygame-script) --no_opt turn off assets optimizer --archive make build/web.zip archive for itch.io --icon ICON icon png file 32x32 min should be favicon.png - --cdn CDN web site to cache locally [default:https://pygame-web.github.io/pygbag/0.0/] + --cdn CDN web site to cache locally [default:https://pygame-web.github.io/archives/0.8/] --template TEMPLATE index.html template [default:default.tmpl] --ssl SSL enable ssl with server.pem and key.pem --port [PORT] Specify alternate port [default: 8000] - ``` unlisted developper options: diff --git a/pygbag/__init__.py b/pygbag/__init__.py index c8cfc1c..4c21161 100644 --- a/pygbag/__init__.py +++ b/pygbag/__init__.py @@ -7,7 +7,7 @@ from pathlib import Path -__version__ = "0.8.1" +__version__ = "0.8.2" # hack to test git cdn build without upgrading pygbag # beware can have side effects when file packager behaviour must change ! diff --git a/pygbag/__main__.py b/pygbag/__main__.py index c5564bb..c516613 100644 --- a/pygbag/__main__.py +++ b/pygbag/__main__.py @@ -153,6 +153,8 @@ def no_op(cls, *argv, **kw): set_ps1 = no_op + set_ps2 = no_op + prompt = no_op is_browser = False diff --git a/pygbag/testserver.py b/pygbag/testserver.py index afa2613..1e7e3e0 100644 --- a/pygbag/testserver.py +++ b/pygbag/testserver.py @@ -209,7 +209,7 @@ def send_head(self): file_size = fs[6] - if self.path.endswith(".py"): + if path.endswith(".py"): if VERB: print(" --> do_GET(%s)" % path) if fstring_decode: @@ -221,13 +221,13 @@ def send_head(self): file_size = len(content) f = io.BytesIO(content) - elif self.path.endswith(".json"): + elif path.endswith(".json"): if VERB: print() print(self.path) print() - elif self.path.endswith(".html"): + elif path.endswith(".html"): if VERB: print("REPLACING", path, CDN, PROXY) content = f.read() diff --git a/static/default.tmpl b/static/default.tmpl index efd66c5..dd205af 100644 --- a/static/default.tmpl +++ b/static/default.tmpl @@ -3,7 +3,7 @@ print(""" Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk Pygbag Version : {{cookiecutter.version}} - Template Version : 0.7.3 + Template Version : 0.8.2 Python : {{cookiecutter.PYBUILD}} CDN URL : {{cookiecutter.cdn}} Screen : {{cookiecutter.width}}x{{cookiecutter.height}} diff --git a/static/noctx.tmpl b/static/noctx.tmpl index e58cf2a..e8d604e 100644 --- a/static/noctx.tmpl +++ b/static/noctx.tmpl @@ -3,7 +3,7 @@ print(""" Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk Pygbag Version : {{cookiecutter.version}} - Template Version : 0.7.2 + Template Version : 0.8.2 Python : {{cookiecutter.PYBUILD}} CDN URL : {{cookiecutter.cdn}} Screen : {{cookiecutter.width}}x{{cookiecutter.height}}