summaryrefslogtreecommitdiffstats
path: root/projects/windows
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-04-09 19:40:42 +0200
committerGitHub <noreply@github.com>2024-04-09 19:40:42 +0200
commit4c23b4cad4744e20da7ccffb303503ea627df7c2 (patch)
treea032e6ebd494136ba35e049b06aa4af45558b540 /projects/windows
parentMerge pull request #1809 from ochen1/patch-1 (diff)
parentAdd project files (diff)
downloadgpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.tar
gpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.tar.gz
gpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.tar.bz2
gpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.tar.lz
gpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.tar.xz
gpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.tar.zst
gpt4free-4c23b4cad4744e20da7ccffb303503ea627df7c2.zip
Diffstat (limited to 'projects/windows')
-rwxr-xr-xprojects/windows/copy.sh5
-rw-r--r--projects/windows/docker-compose.yml19
-rw-r--r--projects/windows/icon.icobin0 -> 4286 bytes
-rw-r--r--projects/windows/main.py22
-rw-r--r--projects/windows/main.spec45
5 files changed, 91 insertions, 0 deletions
diff --git a/projects/windows/copy.sh b/projects/windows/copy.sh
new file mode 100755
index 00000000..58faadd5
--- /dev/null
+++ b/projects/windows/copy.sh
@@ -0,0 +1,5 @@
+cp -r * /var/win/shared/
+cp -r windows/* /var/win/shared/
+cp setup.py /var/win/shared/
+cp README.md /var/win/shared/
+#git clone https://github.com/pyinstaller/pyinstaller/ /var/win/shared/pyinstaller \ No newline at end of file
diff --git a/projects/windows/docker-compose.yml b/projects/windows/docker-compose.yml
new file mode 100644
index 00000000..1aa59caf
--- /dev/null
+++ b/projects/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/projects/windows/icon.ico b/projects/windows/icon.ico
new file mode 100644
index 00000000..56ee955e
--- /dev/null
+++ b/projects/windows/icon.ico
Binary files differ
diff --git a/projects/windows/main.py b/projects/windows/main.py
new file mode 100644
index 00000000..11a3f902
--- /dev/null
+++ b/projects/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/projects/windows/main.spec b/projects/windows/main.spec
new file mode 100644
index 00000000..35f6d3ac
--- /dev/null
+++ b/projects/windows/main.spec
@@ -0,0 +1,45 @@
+# -*- mode: python ; coding: utf-8 -*-
+
+
+a = Analysis(
+ ['main.py'],
+ pathex=[],
+ binaries=[],
+ datas=[],
+ hiddenimports=['plyer.platforms.linux.filechooser', 'plyer.platforms.win.filechooser'],
+ hookspath=[],
+ hooksconfig={},
+ runtime_hooks=[],
+ excludes=[],
+ noarchive=False,
+)
+pyz = PYZ(a.pure)
+
+exe = EXE(
+ pyz,
+ a.scripts,
+ [],
+ exclude_binaries=True,
+ name='g4f',
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=True,
+ console=True,
+ disable_windowed_traceback=False,
+ argv_emulation=False,
+ target_arch=None,
+ codesign_identity=None,
+ entitlements_file=None,
+ icon='icon.ico',
+)
+coll = COLLECT(
+ exe,
+ a.binaries,
+ Tree('//host.lan/Data/g4f/gui/client', prefix='client'),
+ a.datas,
+ strip=False,
+ upx=True,
+ upx_exclude=[],
+ name='g4f',
+) \ No newline at end of file