summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-06 10:47:43 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-06 10:47:43 +0200
commit0de9ca20044ced84c12fbcf3b6de90ac193025e4 (patch)
tree68b4041d0f7f1ce93e5d4e06f3cf89a5651911fd /windows
parentUpdate client.md (diff)
downloadgpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.gz
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.bz2
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.lz
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.xz
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.zst
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.zip
Diffstat (limited to '')
-rw-r--r--windows/docker-compose.yml19
-rw-r--r--windows/icon.icobin0 -> 4286 bytes
-rw-r--r--windows/main.py22
-rw-r--r--windows/main.spec (renamed from g4f/gui/webview.spec)9
4 files changed, 46 insertions, 4 deletions
diff --git a/windows/docker-compose.yml b/windows/docker-compose.yml
new file mode 100644
index 00000000..1aa59caf
--- /dev/null
+++ b/windows/docker-compose.yml
@@ -0,0 +1,19 @@
+version: "3"
+services:
+ windows:
+ image: dockurr/windows
+ container_name: windows
+ environment:
+ VERSION: "win11"
+ devices:
+ - /dev/kvm
+ cap_add:
+ - NET_ADMIN
+ ports:
+ - 8006:8006
+ - 3389:3389/tcp
+ - 3389:3389/udp
+ stop_grace_period: 2m
+ restart: on-failure
+ volumes:
+ - /var/win:/storage \ No newline at end of file
diff --git a/windows/icon.ico b/windows/icon.ico
new file mode 100644
index 00000000..56ee955e
--- /dev/null
+++ b/windows/icon.ico
Binary files differ
diff --git a/windows/main.py b/windows/main.py
new file mode 100644
index 00000000..11a3f902
--- /dev/null
+++ b/windows/main.py
@@ -0,0 +1,22 @@
+import ssl
+import certifi
+from functools import partial
+
+ssl.default_ca_certs = certifi.where()
+ssl.create_default_context = partial(
+ ssl.create_default_context,
+ cafile=certifi.where()
+)
+
+from g4f.gui.webview import run_webview
+from g4f.gui.run import gui_parser
+import g4f.debug
+g4f.debug.version_check = False
+g4f.debug.version = "0.2.8.0"
+
+if __name__ == "__main__":
+ parser = gui_parser()
+ args = parser.parse_args()
+ if args.debug:
+ g4f.debug.logging = True
+ run_webview(args.debug) \ No newline at end of file
diff --git a/g4f/gui/webview.spec b/windows/main.spec
index 360e264e..9dd1d098 100644
--- a/g4f/gui/webview.spec
+++ b/windows/main.spec
@@ -5,11 +5,11 @@ block_cipher = None
a = Analysis(
- ['webview.py'],
+ ['main.py'],
pathex=[],
binaries=[],
datas=[],
- hiddenimports=[],
+ hiddenimports=['plyer.platforms.linux.filechooser', 'plyer.platforms.win.filechooser'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
@@ -25,11 +25,11 @@ exe = EXE(
pyz,
a.scripts,
a.binaries,
- Tree('client', prefix='client'),
+ Tree('C:/Users/Docker/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/g4f/gui/client', prefix='client'),
a.zipfiles,
a.datas,
[],
- name='webview',
+ name='g4f',
debug=False,
bootloader_ignore_signals=False,
strip=False,
@@ -42,4 +42,5 @@ exe = EXE(
target_arch=None,
codesign_identity=None,
entitlements_file=None,
+ icon='icon.ico',
)