Compare commits

..

No commits in common. "ec03321d7be6dacf06fd7eebf71dc56746e7181e" and "365700783bc73e32611ff18ecdf7000bcae1c728" have entirely different histories.

4 changed files with 34 additions and 23 deletions

2
build.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
dotnet build -o out/debug/

View file

@ -1,7 +1,9 @@
buypeeb
===
a simple dotnet core program that allows you to track auctions on yahoo auctions japan, written in c#. designed for and with linux, but works on windows.
i figured, may as well try and learn c#
0uo
## quick start (arch linux)
```bash
@ -13,16 +15,31 @@ dotnet run
---
## installing prerequisites
you'll need the [dotnet core sdk](https://dotnet.microsoft.com/)
you will need either:
- [dotnet core sdk](https://dotnet.microsoft.com/) (recommended, it's the easiest to use)
- [mono](https://www.mono-project.com/download/stable/) and [gtk sharp 3](https://github.com/GtkSharp/GtkSharp/)
### debian
#### dotnet
follow [these instructions](https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian) to add the dotnet repo and install dotnet-sdk.
#### mono
the packages you'll need are `mono-devel` and `gtk-sharp3`, so:
```
sudo apt install mono-devel gtk-sharp3
```
### arch linux
#### dotnet
```
sudo pacman -S dotnet-sdk
```
#### mono
```
sudo pacman -S mono gtk-sharp-3
```
### windows
- download and install ".NET Core SDK" from [this page](https://dotnet.microsoft.com/download)
- run `dotnet build` - this *should* pull in gtk3 automatically - if not, you'll need to [install it yourself](https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/latest)
@ -32,27 +49,26 @@ i have no idea how to install mono with gtksharp properly on windows, and believ
---
## compiling
### dotnet
```
dotnet build
```
### mono
it doesn't actually build with mono anymore because mono's C# version is too old, and these instructions are wrong anyway, but it's something like
```
mcs -pkg:gtk-sharp-3.0 -resource:ui/main.glade -resource:ui/add.glade -resource:ui/settings.glade *.cs
```
---
## running
### dotnet
```
dotnet run
```
---
## compiling a standalone version
the standalone versions are rather big, so it's a good idea to compress them for distribution.
### linux
run `./release.sh`.
### mono
```
mono ./BuypeebApp.exe
```
the binary will be located at `./out/release/linux/buypeeb`, with a [zstandard](https://facebook.github.io/zstd/) compressed version at `buypeeb.tar.zst` in the same directory.
### windows
run `.\release.ps1`.
the binary will be located at `.\out\release\windows\buybeep.exe`, with a zip compressed version at `buypeep.zip` in the same directory.
unfortunately, however, this program won't work on machines that don't have GTK3 installed, and installing GTK3 is [quite an undertaking](https://www.gtk.org/docs/installations/windows/). a solution for this is [in the works](https://github.com/GtkSharp/GtkSharp/issues/119), but there's not really anything to be done about it right now.

View file

@ -1,6 +0,0 @@
dotnet publish -c Release -r win-x64 --output ./out/release/windows/ -p:PublishSingleFile=true -p:PublishTrimmed=true
$compress = @{
Path = "out\release\windows\buypeeb.exe"
DestinationPath = "out\release\windows\buypeeb.zip"
}
Compress-Archive @compress

View file

@ -1,3 +1,2 @@
#!/bin/sh
dotnet publish -c Release -r linux-x64 --output ./out/release/linux/ -p:PublishSingleFile=true -p:PublishTrimmed=true
tar caf ./out/release/linux/buypeeb.tar.zst ./out/release/linux/buypeeb
dotnet publish -c Release -r linux-x64 --output ./out/release/linux/ -p:PublishSingleFile=true -p:PublishTrimmed=true