Compare commits

...

2 commits

Author SHA1 Message Date
ec03321d7b
much better readme, build/release instructions, etc 2020-09-06 16:23:37 +10:00
e4f96de94d
less not good readme 2020-09-06 15:48:32 +10:00
4 changed files with 23 additions and 34 deletions

View file

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

View file

@ -1,9 +1,7 @@
buypeeb buypeeb
=== ===
i figured, may as well try and learn c# 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.
0uo
## quick start (arch linux) ## quick start (arch linux)
```bash ```bash
@ -15,31 +13,16 @@ dotnet run
--- ---
## installing prerequisites ## installing prerequisites
you will need either: you'll need the [dotnet core sdk](https://dotnet.microsoft.com/)
- [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 ### 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. 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 ### arch linux
#### dotnet
``` ```
sudo pacman -S dotnet-sdk sudo pacman -S dotnet-sdk
``` ```
#### mono
```
sudo pacman -S mono gtk-sharp-3
```
### windows ### windows
- download and install ".NET Core SDK" from [this page](https://dotnet.microsoft.com/download) - 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) - 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)
@ -49,26 +32,27 @@ i have no idea how to install mono with gtksharp properly on windows, and believ
--- ---
## compiling ## compiling
### dotnet
``` ```
dotnet build 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 ## running
### dotnet
``` ```
dotnet run dotnet run
``` ```
### mono ---
``` ## compiling a standalone version
mono ./BuypeebApp.exe the standalone versions are rather big, so it's a good idea to compress them for distribution.
``` ### linux
run `./release.sh`.
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.

6
release.ps1 Executable file
View file

@ -0,0 +1,6 @@
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,2 +1,3 @@
#!/bin/sh #!/bin/sh
dotnet publish -c Release -r linux-x64 --output ./out/release/linux/ -p:PublishSingleFile=true -p:PublishTrimmed=true 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