mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
maybe fixed a windows(slop) version
This commit is contained in:
parent
35695f97d0
commit
aebbe856c0
3 changed files with 79 additions and 17 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -13,6 +13,7 @@ error.txt
|
||||||
error.log
|
error.log
|
||||||
CLAUDE.md
|
CLAUDE.md
|
||||||
progress/
|
progress/
|
||||||
|
dist/
|
||||||
|
|
||||||
# Object files
|
# Object files
|
||||||
*.o
|
*.o
|
||||||
|
|
|
||||||
18
Makefile
18
Makefile
|
|
@ -38,4 +38,20 @@ clean:
|
||||||
run: $(TARGET)
|
run: $(TARGET)
|
||||||
./$(TARGET)
|
./$(TARGET)
|
||||||
|
|
||||||
.PHONY: all clean run
|
# Windows only: copy the executable and every non-system (MinGW/GTK) DLL it
|
||||||
|
# needs into dist/ so the app can be started by double-clicking, without an
|
||||||
|
# MSYS2 shell on PATH.
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
bundle: $(TARGET)
|
||||||
|
@rm -rf dist
|
||||||
|
@mkdir -p dist
|
||||||
|
@cp $(TARGET) dist/
|
||||||
|
@ldd $(TARGET) | grep -Ei '/(ucrt64|mingw64)/bin/' | awk '{print $$3}' \
|
||||||
|
| xargs -r -I{} cp -f {} dist/
|
||||||
|
@echo "Bundled into dist/ - run dist/$(TARGET)"
|
||||||
|
else
|
||||||
|
bundle:
|
||||||
|
@echo "make bundle is only needed on Windows (MSYS2/MinGW)."
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: all clean run bundle
|
||||||
|
|
|
||||||
77
README.md
77
README.md
|
|
@ -104,16 +104,14 @@ Linux (Arch):
|
||||||
sudo pacman -S gtk4
|
sudo pacman -S gtk4
|
||||||
```
|
```
|
||||||
|
|
||||||
Windows (MSYS2) – install [MSYS2](https://www.msys2.org/), then open the
|
Windows – GTK 4 has **no native Windows installer**. On Windows it is
|
||||||
**UCRT64** shell (not the plain “MSYS” one) and run:
|
distributed through [MSYS2](https://www.msys2.org/), a Unix-like build
|
||||||
|
environment that comes with its own package manager called **`pacman`**.
|
||||||
|
|
||||||
```bash
|
`pacman` is **not** a Windows command. It only exists inside an MSYS2
|
||||||
pacman -S mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-toolchain \
|
terminal, so it will not work in `cmd.exe` or PowerShell. Install MSYS2
|
||||||
mingw-w64-ucrt-x86_64-pkgconf make
|
first, then follow the [Windows step-by-step](#windows-step-by-step)
|
||||||
```
|
instructions below.
|
||||||
|
|
||||||
If you prefer the older MINGW64 environment instead of UCRT64, use the
|
|
||||||
`mingw-w64-x86_64-…` package names and open the **MINGW64** shell.
|
|
||||||
|
|
||||||
#### 2. Build tools (compiler, Make, pkg-config)
|
#### 2. Build tools (compiler, Make, pkg-config)
|
||||||
|
|
||||||
|
|
@ -145,9 +143,10 @@ sudo dnf install pkgconf-pkg-config
|
||||||
sudo pacman -S base-devel pkgconf
|
sudo pacman -S base-devel pkgconf
|
||||||
```
|
```
|
||||||
|
|
||||||
Windows – the `pacman` command above already installs GCC, Make and
|
Windows – the MSYS2 packages installed in the step above already include
|
||||||
pkgconf inside the UCRT64/MINGW64 environment. Always build and run from
|
GCC, Make and pkgconf; there is nothing extra to install. Always build and
|
||||||
that shell so the MinGW `PATH` (and GTK DLLs) are available.
|
run from the **MSYS2 UCRT64** terminal so the MinGW `PATH` (and the GTK
|
||||||
|
DLLs) are available.
|
||||||
|
|
||||||
### Building the Application
|
### Building the Application
|
||||||
|
|
||||||
|
|
@ -185,10 +184,56 @@ or
|
||||||
./maturita.exe
|
./maturita.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, run the binary from the UCRT64/MINGW64 shell (or copy the
|
### Windows step-by-step
|
||||||
required GTK DLLs next to `maturita.exe`). Double-clicking the `.exe`
|
|
||||||
from Explorer usually fails with a missing-DLL error unless those
|
There is no native Windows build of GTK, so the whole toolchain lives
|
||||||
libraries are on `PATH`.
|
inside MSYS2. From start to finish:
|
||||||
|
|
||||||
|
1. **Install MSYS2** from <https://www.msys2.org/> and complete the
|
||||||
|
installer (accept the default install location).
|
||||||
|
|
||||||
|
2. Open the **“MSYS2 UCRT64”** entry from the Start menu. This is a
|
||||||
|
special terminal, **not** Command Prompt or PowerShell – `pacman` only
|
||||||
|
exists here. (If you run `pacman` in `cmd.exe`/PowerShell you will see
|
||||||
|
“`'pacman' is not recognized`”, which is expected.)
|
||||||
|
|
||||||
|
3. In that MSYS2 UCRT64 terminal, install the compiler and GTK 4:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacman -S --needed mingw-w64-ucrt-x86_64-gtk4 \
|
||||||
|
mingw-w64-ucrt-x86_64-toolchain \
|
||||||
|
mingw-w64-ucrt-x86_64-pkgconf make
|
||||||
|
```
|
||||||
|
|
||||||
|
4. `cd` into this repository (MSYS2 uses `/c/...` for `C:\...`) and build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /c/path/to/maturita.c
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
The Makefile detects Windows automatically and produces `maturita.exe`.
|
||||||
|
|
||||||
|
5. Run it from the same terminal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make run # or: ./maturita.exe
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Running the `.exe` without the MSYS2 shell
|
||||||
|
|
||||||
|
`maturita.exe` needs the GTK/MinGW DLLs next to it (or on `PATH`) to
|
||||||
|
start, so double-clicking it from Explorer normally fails with a
|
||||||
|
missing-DLL error. The Makefile can collect the required DLLs into a
|
||||||
|
`dist/` folder:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make bundle
|
||||||
|
```
|
||||||
|
|
||||||
|
Then launch `dist/maturita.exe` by double-clicking it or from Explorer.
|
||||||
|
Running the app from the MSYS2 UCRT64 terminal (step 5) always works and
|
||||||
|
needs no bundling.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue