buypeeb-cs/readme.md

66 lines
2.3 KiB
Markdown

Buypeeb
===
i figured, may as well try and learn c#
0uo
## installing
you need [mono](https://www.mono-project.com/download/stable/) and [gtk sharp 3](https://github.com/GtkSharp/GtkSharp/)
### installing on debian
the packages you'll need are `mono-devel` and `gtk-sharp3`, so:
```
sudo apt install mono-devel gtk-sharp3
```
### installing on arch
```
sudo pacman -S mono gtk-sharp-3
```
### installing on windows 10
- first you need mono and msys2.
- **chocolatey:** `choco install mono msys2`
- **otherwise:** download and install mono from [here](https://www.mono-project.com/download/stable/#download-win), and *don't* install gtk#. then, install msys2 from [here](https://www.msys2.org/).
- then, open msys2 and run `pacman -Syu mingw-w64-x86_64-gtk3`.
- now you need gtk sharp 3, but you need the dotnet sdk to install it. download and install ".NET Core SDK" from [this page](https://dotnet.microsoft.com/download).
- add msys2's mingw `bin` folder (and mono's `bin` folder if required) to your $PATH:
- open control panel
- click "system and security"
- click "system"
- click "advanced system settings"
- choose the "advanced" tab
- click "environment variables..."
- in the "system variables" box (the bottom one), find the variable named "Path", click it, then click the edit button
- click "new"
- type in the full path to your msys2 mingw `bin` folder. for me, this path was `C:\tools\msys64\mingw64\bin`, but it may be different for you.
- if mono is not currently on your $PATH, you'll also need to add its bin folder here - for me, this path was `C:\Program Files\Mono\bin`.
- click "ok"
- open a new command prompt/powershell window to ensure environment variables get updated.
- `cd` to the folder you downloaded buypeeb into.
- run `dotnet restore`
- mono's `pkg-config` is broken because they forgot to link against a few DLLs, which is just great, so you'll need to download [this zip file](https://cloud.lynnesbian.space/s/qDB2cM7rgWoSXtK), extract it, and copy the four dll files inside it to your mono bin path, which is probably `C:\Program Files\Mono\bin`.
- fixing `pkg-config` will allow you to compile the project
## compiling
### linux
```
mcs -pkg:gtk-sharp-3.0 -resource:ui.glade *.cs
```
### windows
```
dotnet build
```
## running
### linux
```
mono ./BuypeebApp.exe
```
### windows
```
dotnet run
```