mirror of
https://github.com/webui-dev/webui
synced 2025-03-28 21:13:17 +00:00
Readme (Organizing Commands)
This commit is contained in:
parent
61444bfaa7
commit
02328acc6d
224
README.md
224
README.md
@ -90,22 +90,20 @@ Think of WebUI like a WebView controller, but instead of embedding the WebView c
|
||||
|
||||
## Build WebUI Library
|
||||
|
||||
- **Windows**
|
||||
### Windows
|
||||
|
||||
```powershell
|
||||
# GCC
|
||||
mingw32-make
|
||||
|
||||
# MSVC
|
||||
nmake
|
||||
```
|
||||
|
||||
**Windows SSL/TLS (_Optional_)**
|
||||
| Compiler | Command |
|
||||
|----------|---------|
|
||||
| GCC | `mingw32-make` |
|
||||
| MSVC | `nmake` |
|
||||
|
||||
<details>
|
||||
<summary><strong>Windows SSL/TLS (Optional)</strong></summary>
|
||||
|
||||
Download and install the OpenSSL pre-compiled binaries for Windows:
|
||||
|
||||
- MSVC: [x64 OpenSSL v3.3.1](https://slproweb.com/download/Win64OpenSSL-3_3_1.msi) or [_32Bit_](https://slproweb.com/download/Win32OpenSSL-3_3_1.msi). Please check this [Wiki list](https://wiki.openssl.org/index.php/Binaries) for more info.
|
||||
- MinGW: [Curl for Windows win OpenSSL](https://curl.se/windows/)
|
||||
- **MSVC**: [x64 OpenSSL v3.3.1](https://slproweb.com/download/Win64OpenSSL-3_3_1.msi) or [_32Bit_](https://slproweb.com/download/Win32OpenSSL-3_3_1.msi). See the [Wiki list](https://wiki.openssl.org/index.php/Binaries) for more info.
|
||||
- **MinGW**: [Curl for Windows with OpenSSL](https://curl.se/windows/)
|
||||
|
||||
```powershell
|
||||
# GCC
|
||||
@ -114,19 +112,18 @@ Think of WebUI like a WebView controller, but instead of embedding the WebView c
|
||||
# MSVC
|
||||
nmake WEBUI_USE_TLS=1 WEBUI_TLS_INCLUDE="C:\Program Files\OpenSSL-xxx\include" WEBUI_TLS_LIB="C:\Program Files\OpenSSL-xxx\lib"
|
||||
```
|
||||
</details>
|
||||
|
||||
- **Linux**
|
||||
### Linux
|
||||
|
||||
```sh
|
||||
# GCC
|
||||
make
|
||||
|
||||
# Clang
|
||||
make CC=clang
|
||||
```
|
||||
|
||||
**Linux SSL/TLS (_Optional_)**
|
||||
| Compiler | Command |
|
||||
|----------|---------|
|
||||
| GCC | `make` |
|
||||
| Clang | `make CC=clang` |
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux SSL/TLS (Optional)</strong></summary>
|
||||
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install libssl-dev
|
||||
@ -137,19 +134,22 @@ Think of WebUI like a WebView controller, but instead of embedding the WebView c
|
||||
# Clang
|
||||
make WEBUI_USE_TLS=1 CC=clang
|
||||
```
|
||||
</details>
|
||||
|
||||
- **macOS**
|
||||
### macOS
|
||||
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
**macOS SSL/TLS (_Optional_)**
|
||||
| Compiler | Command |
|
||||
|----------|---------|
|
||||
| Default | `make` |
|
||||
|
||||
<details>
|
||||
<summary><strong>macOS SSL/TLS (Optional)</strong></summary>
|
||||
|
||||
```sh
|
||||
brew install openssl
|
||||
make WEBUI_USE_TLS=1
|
||||
```
|
||||
</details>
|
||||
|
||||
## Minimal WebUI Application
|
||||
|
||||
@ -191,137 +191,61 @@ Think of WebUI like a WebView controller, but instead of embedding the WebView c
|
||||
|
||||
## Build WebUI Application
|
||||
|
||||
- **Windows**
|
||||
### Windows
|
||||
|
||||
- GCC - Static WebUI
|
||||
| Compiler | Type | Command |
|
||||
|----------|--------|---------|
|
||||
| GCC | Static | `gcc -Os -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lws2_32 -Wall -luser32 -static -lole32 -o my_application.exe` |
|
||||
| GCC | Dynamic | `gcc -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "webui-2.dll" -lws2_32 -Wall -luser32 -lole32 -o my_application.exe` |
|
||||
| MSVC | Static | `cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-static.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe` |
|
||||
| MSVC | Dynamic | `cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe` |
|
||||
|
||||
```powershell
|
||||
gcc -Os -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lws2_32 -Wall -luser32 -static -lole32 -o my_application.exe
|
||||
```
|
||||
|
||||
- GCC - Dynamic WebUI
|
||||
|
||||
```powershell
|
||||
gcc -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "webui-2.dll" -lws2_32 -Wall -luser32 -lole32 -o my_application.exe
|
||||
```
|
||||
|
||||
- MSVC - Static WebUI
|
||||
|
||||
```powershell
|
||||
cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-static.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe
|
||||
```
|
||||
|
||||
- MSVC - Dynamic WebUI
|
||||
|
||||
```powershell
|
||||
cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe
|
||||
```
|
||||
|
||||
**Windows With SSL/TLS (_Optional_)**
|
||||
|
||||
- GCC - Static TLS WebUI
|
||||
|
||||
```powershell
|
||||
gcc -Os -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lws2_32 -Wall -luser32 -static -lole32 -o my_application.exe
|
||||
```
|
||||
|
||||
- GCC - Dynamic TLS WebUI
|
||||
|
||||
```powershell
|
||||
gcc -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "webui-2-secure.dll" -lws2_32 -Wall -luser32 -lole32 -o my_application.exe
|
||||
```
|
||||
|
||||
- MSVC - Static TLS WebUI
|
||||
|
||||
```powershell
|
||||
cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-secure-static.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe
|
||||
```
|
||||
|
||||
- MSVC - Dynamic TLS WebUI
|
||||
|
||||
```powershell
|
||||
cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-secure.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe
|
||||
```
|
||||
|
||||
- **Linux**
|
||||
|
||||
- GCC - Static WebUI
|
||||
|
||||
```sh
|
||||
gcc -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
|
||||
- GCC - Dynamic WebUI
|
||||
|
||||
```sh
|
||||
gcc my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2.so" -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
<details>
|
||||
<summary><strong>Windows With SSL/TLS (Optional)</strong></summary>
|
||||
|
||||
- Clang - Static WebUI
|
||||
| Compiler | Type | Command |
|
||||
|----------|--------|---------|
|
||||
| GCC | Static | `gcc -Os -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lws2_32 -Wall -luser32 -static -lole32 -o my_application.exe` |
|
||||
| GCC | Dynamic | `gcc -Wl,-subsystem=windows my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "webui-2-secure.dll" -lws2_32 -Wall -luser32 -lole32 -o my_application.exe` |
|
||||
| MSVC | Static | `cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-secure-static.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe` |
|
||||
| MSVC | Dynamic | `cl my_application.c /I"_PATH_TO_WEBUI_INCLUDE_" /link /LIBPATH:"_PATH_TO_WEBUI_LIB_" /SUBSYSTEM:WINDOWS webui-2-secure.lib user32.lib Advapi32.lib Shell32.lib Ole32.lib /OUT:my_application.exe` |
|
||||
</details>
|
||||
|
||||
```sh
|
||||
clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
### Linux
|
||||
|
||||
| Compiler | Type | Command |
|
||||
|----------|--------|---------|
|
||||
| GCC | Static | `gcc -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lpthread -lm -ldl -o my_application` |
|
||||
| GCC | Dynamic | `gcc my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2.so" -lpthread -lm -ldl -o my_application` |
|
||||
| Clang | Static | `clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lpthread -lm -ldl -o my_application` |
|
||||
| Clang | Dynamic | `clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2.so" -lpthread -lm -ldl -o my_application` |
|
||||
|
||||
<details>
|
||||
<summary><strong>Linux With SSL/TLS (Optional)</strong></summary>
|
||||
|
||||
- Clang - Dynamic WebUI
|
||||
| Compiler | Type | Command |
|
||||
|----------|--------|---------|
|
||||
| GCC | Static | `gcc -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lpthread -lm -ldl -o my_application` |
|
||||
| GCC | Dynamic | `gcc my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2-secure.so" -lpthread -lm -ldl -o my_application` |
|
||||
| Clang | Static | `clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lpthread -lm -ldl -o my_application` |
|
||||
| Clang | Dynamic | `clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2-secure.so" -lpthread -lm -ldl -o my_application` |
|
||||
</details>
|
||||
|
||||
```sh
|
||||
clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2.so" -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
### macOS
|
||||
|
||||
**Linux With SSL/TLS (_Optional_)**
|
||||
| Compiler | Type | Command |
|
||||
|----------|--------|---------|
|
||||
| Clang | Static | `clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lpthread -lm -framework Cocoa -framework WebKit -o my_application` |
|
||||
| Clang | Dynamic | `clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2.dylib" -lpthread -lm -framework Cocoa -framework WebKit -o my_application` |
|
||||
|
||||
- GCC - Static TLS WebUI
|
||||
|
||||
```sh
|
||||
gcc -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
<details>
|
||||
<summary><strong>macOS With SSL/TLS (Optional)</strong></summary>
|
||||
|
||||
- GCC - Dynamic TLS WebUI
|
||||
|
||||
```sh
|
||||
gcc my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2-secure.so" -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
|
||||
- Clang - Static TLS WebUI
|
||||
|
||||
```sh
|
||||
clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
|
||||
- Clang - Dynamic TLS WebUI
|
||||
|
||||
```sh
|
||||
clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2-secure.so" -lpthread -lm -ldl -o my_application
|
||||
```
|
||||
|
||||
- **macOS**
|
||||
|
||||
- Clang - Static WebUI
|
||||
|
||||
```sh
|
||||
clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-static -lpthread -lm -framework Cocoa -framework WebKit -o my_application
|
||||
```
|
||||
|
||||
- Clang - Dynamic WebUI
|
||||
|
||||
```sh
|
||||
clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2.dylib" -lpthread -lm -framework Cocoa -framework WebKit -o my_application
|
||||
```
|
||||
|
||||
**macOS With SSL/TLS (_Optional_)**
|
||||
|
||||
- Clang - Static TLS WebUI
|
||||
|
||||
```sh
|
||||
clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lpthread -lm -framework Cocoa -framework WebKit -o my_application
|
||||
```
|
||||
|
||||
- Clang - Dynamic TLS WebUI
|
||||
|
||||
```sh
|
||||
clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2-secure.dylib" -lpthread -lm -framework Cocoa -framework WebKit -o my_application
|
||||
```
|
||||
| Compiler | Type | Command |
|
||||
|----------|--------|---------|
|
||||
| Clang | Static | `clang -Os my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" -lwebui-2-secure-static -lpthread -lm -framework Cocoa -framework WebKit -o my_application` |
|
||||
| Clang | Dynamic | `clang my_application.c -I"_PATH_TO_WEBUI_INCLUDE_" -L"_PATH_TO_WEBUI_LIB_" "./webui-2-secure.dylib" -lpthread -lm -framework Cocoa -framework WebKit -o my_application` |
|
||||
</details>
|
||||
|
||||
## Wrappers
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user