VertexEngine-WebEngine 1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vertexengine_webengine-1.0/PKG-INFO +58 -0
- vertexengine_webengine-1.0/README.md +47 -0
- vertexengine_webengine-1.0/pyproject.toml +24 -0
- vertexengine_webengine-1.0/setup.cfg +4 -0
- vertexengine_webengine-1.0/src/VertexEngine/WebEngine/WebEngine.py +32 -0
- vertexengine_webengine-1.0/src/VertexEngine/WebView/WebPage.py +37 -0
- vertexengine_webengine-1.0/src/VertexEngine/WebView/bridge.py +7 -0
- vertexengine_webengine-1.0/src/VertexEngine/WebView/profile.py +16 -0
- vertexengine_webengine-1.0/src/VertexEngine_WebEngine.egg-info/PKG-INFO +58 -0
- vertexengine_webengine-1.0/src/VertexEngine_WebEngine.egg-info/SOURCES.txt +11 -0
- vertexengine_webengine-1.0/src/VertexEngine_WebEngine.egg-info/dependency_links.txt +1 -0
- vertexengine_webengine-1.0/src/VertexEngine_WebEngine.egg-info/requires.txt +2 -0
- vertexengine_webengine-1.0/src/VertexEngine_WebEngine.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: VertexEngine-WebEngine
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Documentation, https://vertexenginedocs.netlify.app/
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: pygame>=2.0
|
|
10
|
+
Requires-Dist: PyQt6>=6.7
|
|
11
|
+
|
|
12
|
+
# VertexEngine/Vertex-WebEngine
|
|
13
|
+
VertexEngine-WebEngine is a WebEngine built for the VertexEngine SDK. It's a seperate package.
|
|
14
|
+
|
|
15
|
+
## How to install Pyinstaller
|
|
16
|
+
Step 1. Type in:
|
|
17
|
+
pip install pyinstaller
|
|
18
|
+
|
|
19
|
+
Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
20
|
+
|
|
21
|
+
Step 3. How to use pyinstaller
|
|
22
|
+
type:
|
|
23
|
+
python -m PyInstaller --onefile *.py
|
|
24
|
+
|
|
25
|
+
There are flags:
|
|
26
|
+
--noconsole > disables the console when you run the app
|
|
27
|
+
--onefile > compress all of the code into one file
|
|
28
|
+
--icon > the *.ico file after you type it will be set as the app icon.
|
|
29
|
+
|
|
30
|
+
## How to install VertexEngine-WebEngine/Vertex:
|
|
31
|
+
|
|
32
|
+
Step 1:
|
|
33
|
+
Type in
|
|
34
|
+
pip install VertexEngine-WebEngine
|
|
35
|
+
|
|
36
|
+
Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
37
|
+
|
|
38
|
+
## Help
|
|
39
|
+
The documentation is in the following link:
|
|
40
|
+
[Project Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
41
|
+
|
|
42
|
+
## Dependencies
|
|
43
|
+
Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
44
|
+
|
|
45
|
+
| Dependency | Version |
|
|
46
|
+
|------------------|--------------------------------------|
|
|
47
|
+
| PyQt6 | >=6.7 |
|
|
48
|
+
| Pygame | >=2.0 |
|
|
49
|
+
| Python | >=3.10 |
|
|
50
|
+
|
|
51
|
+
## About Me ❔
|
|
52
|
+
I Am a solo developer in Diliman, Quezon City that makes things for fun :)
|
|
53
|
+
77 Rd 1, 53 Rd 3 Bg-Asa QC
|
|
54
|
+
Email:
|
|
55
|
+
FinalFacility0828@gmail.com
|
|
56
|
+
|
|
57
|
+
## 📄 License
|
|
58
|
+
VertexEngine-WebEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# VertexEngine/Vertex-WebEngine
|
|
2
|
+
VertexEngine-WebEngine is a WebEngine built for the VertexEngine SDK. It's a seperate package.
|
|
3
|
+
|
|
4
|
+
## How to install Pyinstaller
|
|
5
|
+
Step 1. Type in:
|
|
6
|
+
pip install pyinstaller
|
|
7
|
+
|
|
8
|
+
Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
9
|
+
|
|
10
|
+
Step 3. How to use pyinstaller
|
|
11
|
+
type:
|
|
12
|
+
python -m PyInstaller --onefile *.py
|
|
13
|
+
|
|
14
|
+
There are flags:
|
|
15
|
+
--noconsole > disables the console when you run the app
|
|
16
|
+
--onefile > compress all of the code into one file
|
|
17
|
+
--icon > the *.ico file after you type it will be set as the app icon.
|
|
18
|
+
|
|
19
|
+
## How to install VertexEngine-WebEngine/Vertex:
|
|
20
|
+
|
|
21
|
+
Step 1:
|
|
22
|
+
Type in
|
|
23
|
+
pip install VertexEngine-WebEngine
|
|
24
|
+
|
|
25
|
+
Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
26
|
+
|
|
27
|
+
## Help
|
|
28
|
+
The documentation is in the following link:
|
|
29
|
+
[Project Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
30
|
+
|
|
31
|
+
## Dependencies
|
|
32
|
+
Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
33
|
+
|
|
34
|
+
| Dependency | Version |
|
|
35
|
+
|------------------|--------------------------------------|
|
|
36
|
+
| PyQt6 | >=6.7 |
|
|
37
|
+
| Pygame | >=2.0 |
|
|
38
|
+
| Python | >=3.10 |
|
|
39
|
+
|
|
40
|
+
## About Me ❔
|
|
41
|
+
I Am a solo developer in Diliman, Quezon City that makes things for fun :)
|
|
42
|
+
77 Rd 1, 53 Rd 3 Bg-Asa QC
|
|
43
|
+
Email:
|
|
44
|
+
FinalFacility0828@gmail.com
|
|
45
|
+
|
|
46
|
+
## 📄 License
|
|
47
|
+
VertexEngine-WebEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=64", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "VertexEngine-WebEngine"
|
|
7
|
+
version = "1.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Tyrel Miguel", email="annbasilan0828@gmail.com" }
|
|
10
|
+
]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
license = { text = "MIT" }
|
|
13
|
+
requires-python = ">=3.10"
|
|
14
|
+
|
|
15
|
+
dependencies = [
|
|
16
|
+
"pygame>=2.0",
|
|
17
|
+
"PyQt6>=6.7"
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
where = ["src"]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Documentation = "https://vertexenginedocs.netlify.app/"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from PyQt6.QtWebEngineWidgets import QWebEngineView
|
|
2
|
+
from PyQt6.QtWebChannel import QWebChannel
|
|
3
|
+
from PyQt6.QtCore import QUrl
|
|
4
|
+
|
|
5
|
+
from VertexEngine.WebView.profile import WebProfile
|
|
6
|
+
from VertexEngine.WebView.WebPage import WebPage
|
|
7
|
+
from VertexEngine.WebView.bridge import JSBridge
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WebEngine(QWebEngineView):
|
|
11
|
+
def __init__(self, parent=None):
|
|
12
|
+
super().__init__(parent)
|
|
13
|
+
|
|
14
|
+
# 1️⃣ Profile
|
|
15
|
+
self.profile = WebProfile()
|
|
16
|
+
|
|
17
|
+
# 2️⃣ Page
|
|
18
|
+
self.page = WebPage(self.profile, self)
|
|
19
|
+
self.setPage(self.page)
|
|
20
|
+
|
|
21
|
+
# 3️⃣ WebChannel
|
|
22
|
+
self.channel = QWebChannel(self.page)
|
|
23
|
+
|
|
24
|
+
# 4️⃣ JS Bridge
|
|
25
|
+
self.bridge = JSBridge()
|
|
26
|
+
self.channel.registerObject("bridge", self.bridge)
|
|
27
|
+
|
|
28
|
+
# 5️⃣ Attach channel to page
|
|
29
|
+
self.page.setWebChannel(self.channel)
|
|
30
|
+
|
|
31
|
+
def load_url(self, url: str):
|
|
32
|
+
self.load(QUrl(url))
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from PyQt6.QtWebEngineCore import QWebEnginePage
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class WebPage(QWebEnginePage):
|
|
5
|
+
def load_default_html(self):
|
|
6
|
+
html = """
|
|
7
|
+
<!DOCTYPE html>
|
|
8
|
+
<html>
|
|
9
|
+
<head>
|
|
10
|
+
<meta charset="utf-8">
|
|
11
|
+
<script src="qrc:///qtwebchannel/qwebchannel.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<h1>Vertex WebEngine</h1>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
new QWebChannel(qt.webChannelTransport, function (channel) {
|
|
18
|
+
window.bridge = channel.objects.bridge;
|
|
19
|
+
bridge.log("HELLO FROM INLINE HTML 🚀");
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
self.setHtml(html) # ✅ THIS is the correct call
|
|
27
|
+
|
|
28
|
+
def javaScriptConsoleMessage(self, level, message, line, source):
|
|
29
|
+
print(f"[JS:{level.name}] {message} ({source}:{line})")
|
|
30
|
+
|
|
31
|
+
def acceptNavigationRequest(self, url, nav_type, is_main_frame):
|
|
32
|
+
print("Navigating to:", url.toString())
|
|
33
|
+
|
|
34
|
+
if "malware" in url.toString():
|
|
35
|
+
return False
|
|
36
|
+
|
|
37
|
+
return True
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from PyQt6.QtWebEngineCore import QWebEngineProfile
|
|
2
|
+
|
|
3
|
+
class WebProfile(QWebEngineProfile):
|
|
4
|
+
def __init__(self, name="CustomProfile", parent=None):
|
|
5
|
+
super().__init__(name, parent)
|
|
6
|
+
|
|
7
|
+
self.setHttpUserAgent(
|
|
8
|
+
"VertexWebEngine/1.0 (PyQt6)"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
self.setPersistentCookiesPolicy(
|
|
12
|
+
QWebEngineProfile.PersistentCookiesPolicy.AllowPersistentCookies
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
self.setCachePath("webcache")
|
|
16
|
+
self.setPersistentStoragePath("webstorage")
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: VertexEngine-WebEngine
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Documentation, https://vertexenginedocs.netlify.app/
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: pygame>=2.0
|
|
10
|
+
Requires-Dist: PyQt6>=6.7
|
|
11
|
+
|
|
12
|
+
# VertexEngine/Vertex-WebEngine
|
|
13
|
+
VertexEngine-WebEngine is a WebEngine built for the VertexEngine SDK. It's a seperate package.
|
|
14
|
+
|
|
15
|
+
## How to install Pyinstaller
|
|
16
|
+
Step 1. Type in:
|
|
17
|
+
pip install pyinstaller
|
|
18
|
+
|
|
19
|
+
Step 2. Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
20
|
+
|
|
21
|
+
Step 3. How to use pyinstaller
|
|
22
|
+
type:
|
|
23
|
+
python -m PyInstaller --onefile *.py
|
|
24
|
+
|
|
25
|
+
There are flags:
|
|
26
|
+
--noconsole > disables the console when you run the app
|
|
27
|
+
--onefile > compress all of the code into one file
|
|
28
|
+
--icon > the *.ico file after you type it will be set as the app icon.
|
|
29
|
+
|
|
30
|
+
## How to install VertexEngine-WebEngine/Vertex:
|
|
31
|
+
|
|
32
|
+
Step 1:
|
|
33
|
+
Type in
|
|
34
|
+
pip install VertexEngine-WebEngine
|
|
35
|
+
|
|
36
|
+
Step 2: Wait a few min, don't worry if it takes 1 hr or more, it will finish
|
|
37
|
+
|
|
38
|
+
## Help
|
|
39
|
+
The documentation is in the following link:
|
|
40
|
+
[Project Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
41
|
+
|
|
42
|
+
## Dependencies
|
|
43
|
+
Vertex obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
44
|
+
|
|
45
|
+
| Dependency | Version |
|
|
46
|
+
|------------------|--------------------------------------|
|
|
47
|
+
| PyQt6 | >=6.7 |
|
|
48
|
+
| Pygame | >=2.0 |
|
|
49
|
+
| Python | >=3.10 |
|
|
50
|
+
|
|
51
|
+
## About Me ❔
|
|
52
|
+
I Am a solo developer in Diliman, Quezon City that makes things for fun :)
|
|
53
|
+
77 Rd 1, 53 Rd 3 Bg-Asa QC
|
|
54
|
+
Email:
|
|
55
|
+
FinalFacility0828@gmail.com
|
|
56
|
+
|
|
57
|
+
## 📄 License
|
|
58
|
+
VertexEngine-WebEngine/Vertex is Managed by the MIT License. This license allows others to tweak the code. However, I would like my name be in the credits if you choose this as your starting ground for your next library.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/VertexEngine/WebEngine/WebEngine.py
|
|
4
|
+
src/VertexEngine/WebView/WebPage.py
|
|
5
|
+
src/VertexEngine/WebView/bridge.py
|
|
6
|
+
src/VertexEngine/WebView/profile.py
|
|
7
|
+
src/VertexEngine_WebEngine.egg-info/PKG-INFO
|
|
8
|
+
src/VertexEngine_WebEngine.egg-info/SOURCES.txt
|
|
9
|
+
src/VertexEngine_WebEngine.egg-info/dependency_links.txt
|
|
10
|
+
src/VertexEngine_WebEngine.egg-info/requires.txt
|
|
11
|
+
src/VertexEngine_WebEngine.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VertexEngine
|