Skip to content

Commit

Permalink
0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Oct 11, 2023
1 parent b5ec252 commit f9da862
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
2 changes: 2 additions & 0 deletions pygbag/support/pythonrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,8 @@ def patch_panda3d_showbase():
panda3d.core.loadPrcFileData("", "support-threads #f")
panda3d.core.loadPrcFileData("", "textures-power-2 down")
panda3d.core.loadPrcFileData("", "textures-square down")
# samples expect that
panda3d.core.loadPrcFileData("", "default-model-extension .egg")

def run(*argv, **env):
print("ShowBase.run patched to launch asyncio.run(main())")
Expand Down
9 changes: 5 additions & 4 deletions pygbag/testserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@

CACHE = None

try:
from future_fstrings import fstring_decode
except:
fstring_decode = False
# does not support {x=}
#try:
# from future_fstrings import fstring_decode
#except:
fstring_decode = False


try:
Expand Down
4 changes: 2 additions & 2 deletions static/default.tmpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<html lang="en-us"><script src="{{cookiecutter.cdn}}pythons.js" type=module id="site" data-os="vtx,fs,snd,gui" async defer>#<!--
<html lang="en-us"><script src="{{cookiecutter.cdn}}pythons.js" type=module id="site" data-python="cpython{{cookiecutter.PYBUILD}}" data-os="vtx,fs,snd,gui" async defer>#<!--

print("""
Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk
Pygbag Version : {{cookiecutter.version}}
Template Version : 0.8.2
Template Version : 0.8.3
Python : {{cookiecutter.PYBUILD}}
CDN URL : {{cookiecutter.cdn}}
Screen : {{cookiecutter.width}}x{{cookiecutter.height}}
Expand Down
4 changes: 2 additions & 2 deletions static/noctx.tmpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<html lang="en-us"><script src="{{cookiecutter.cdn}}pythons.js" type=module id="site" data-os="vtx,fs,snd,gui" async defer>#<!--
<html lang="en-us"><script src="{{cookiecutter.cdn}}pythons.js" type=module id="site" data-python="cpython{{cookiecutter.PYBUILD}}" data-os="vtx,fs,snd,gui" async defer>#<!--

print("""
Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk
Pygbag Version : {{cookiecutter.version}}
Template Version : 0.8.2
Template Version : 0.8.3
Python : {{cookiecutter.PYBUILD}}
CDN URL : {{cookiecutter.cdn}}
Screen : {{cookiecutter.width}}x{{cookiecutter.height}}
Expand Down
15 changes: 10 additions & 5 deletions static/pythons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2279,12 +2279,17 @@ console.warn("TODO: merge/replace location options over script options")
vm.script.interpreter = "cpython"
config.PYBUILD = pystr.substr(7) || "3.11"
} else {
if (pystr.search('wapy')>=0) {
vm.script.interpreter = "wapy"
config.PYBUILD = pystr.substr(4) || "3.4"
if (pystr.search('python3')>=0) {
vm.script.interpreter = "python"
config.PYBUILD = pystr.substr(6) || "3.4"
} else {
vm.script.interpreter = config.python || "cpython"
config.PYBUILD = pystr.substr(7) || "3.11"
if (pystr.search('wapy')>=0) {
vm.script.interpreter = "wapy"
config.PYBUILD = pystr.substr(4) || "3.4"
} else {
vm.script.interpreter = config.python || "cpython"
config.PYBUILD = pystr.substr(7) || "3.11"
}
}
}

Expand Down

0 comments on commit f9da862

Please sign in to comment.