Skip to content

Commit

Permalink
Merge pull request #1981 from hlohaus/leech
Browse files Browse the repository at this point in the history
Create windows release, improve styling
  • Loading branch information
hlohaus committed May 19, 2024
2 parents 23b27ce + c8d61a0 commit 738e532
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ docker run -p 8080:8080 -p 1337:1337 -p 7900:7900 --shm-size="2g" -v ${PWD}/har_

#### Installation Guide for Windows (.exe)
To ensure the seamless operation of our application, please follow the instructions below. These steps are designed to guide you through the installation process on Windows operating systems.
##### Prerequisites
1. **WebView2 Runtime**: Our application requires the *WebView2 Runtime* to be installed on your system. If you do not have it installed, please download and install it from the [Microsoft Developer Website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). If you already have *WebView2 Runtime* installed but are encountering issues, navigate to *Installed Windows Apps*, select *WebView2*, and opt for the repair option.
##### Installation Steps
2. **Download the Application**: Visit our [latest releases page](https://github.com/xtekky/gpt4free/releases/latest) and download the most recent version of the application, named `g4f.webview.*.exe`.
3. **File Placement**: Once downloaded, transfer the `.exe` file from your downloads folder to a directory of your choice on your system, and then execute it to run the app.
##### Post-Installation Adjustment
### Installation Steps
1. **Download the Application**: Visit our [latest releases page](https://github.com/xtekky/gpt4free/releases/latest) and download the most recent version of the application, named `g4f.exe.zip`.
2. **File Placement**: After downloading, locate the `.zip` file in your Downloads folder. Unpack it to a directory of your choice on your system, then execute the `g4f.exe` file to run the app.
3. **Open GUI**: The app starts a web server with the GUI. Open your favorite browser and navigate to `http:https://localhost:8080/chat/` to access the application interface.
4. **Firewall Configuration (Hotfix)**: Upon installation, it may be necessary to adjust your Windows Firewall settings to allow the application to operate correctly. To do this, access your Windows Firewall settings and allow the application.

By following these steps, you should be able to successfully install and run the application on your Windows system. If you encounter any issues during the installation process, please refer to our Issue Tracker or try to get contact over Discord for assistance.
Expand Down
35 changes: 20 additions & 15 deletions g4f/gui/client/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
--user-input: #ac87bb;
--conversations: #c7a2ff;
--conversations-hover: #c7a2ff4d;
--scrollbar: var(--colour-3);
--scrollbar-thumb: var(--blur-bg);
}

:root {
Expand Down Expand Up @@ -379,7 +381,10 @@ body {
z-index: 1000;
display: none;
cursor: pointer;
filter: grayscale(1) invert(1);
}

.message .user .fa-xmark {
color: var(--colour-1);
}

.message .count .fa-clipboard,
Expand All @@ -389,10 +394,6 @@ body {
cursor: pointer;
}

.message .user .fa-xmark {
color: var(--colour-1);
}

.message .count .fa-clipboard {
color: var(--colour-3);
}
Expand Down Expand Up @@ -697,6 +698,7 @@ select {
background: transparent;
cursor: pointer;
height: 49px;
color: var(--colour-3);
}

@media only screen and (min-width: 40em) {
Expand Down Expand Up @@ -1003,6 +1005,16 @@ a:-webkit-any-link {
--conversations: #0062cc;
--colour-1: #ffffff;
--colour-3: #212529;
--scrollbar: var(--colour-1);
--scrollbar-thumb: var(--gradient);
}

.white .message .assistant .fa-xmark {
color: var(--colour-1);
}

.white .message .user .fa-xmark {
color: var(--colour-3);
}

#send-button {
Expand Down Expand Up @@ -1072,15 +1084,12 @@ a:-webkit-any-link {
white-space:nowrap;
}

::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--colour-3);
background: var(--scrollbar);
}
::-webkit-scrollbar-thumb {
background: var(--blur-bg);
border-radius: 5px;
background: var(--scrollbar-thumb);
border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--accent);
Expand All @@ -1100,10 +1109,6 @@ a:-webkit-any-link {
max-height: 200px;
}

#message-input::-webkit-scrollbar {
width: 5px;
}

.hidden {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion projects/windows/copy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cp -r * /var/win/shared/
cp -r windows/* /var/win/shared/
cp -r projects/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
9 changes: 3 additions & 6 deletions projects/windows/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
cafile=certifi.where()
)

from g4f.gui.webview import run_webview
from g4f.gui.run import gui_parser
from g4f.gui.run import run_gui_args, gui_parser
import g4f.debug
g4f.debug.version_check = False
g4f.debug.version = "0.2.8.0"
g4f.debug.version = "0.3.1.7"

if __name__ == "__main__":
parser = gui_parser()
args = parser.parse_args()
if args.debug:
g4f.debug.logging = True
run_webview(args.debug)
run_gui_args(args)
4 changes: 2 additions & 2 deletions projects/windows/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=[],
hiddenimports=['plyer.platforms.linux.filechooser', 'plyer.platforms.win.filechooser'],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down Expand Up @@ -42,4 +42,4 @@ coll = COLLECT(
upx=True,
upx_exclude=[],
name='g4f',
)
)

0 comments on commit 738e532

Please sign in to comment.