diff --git a/build.sh b/build.sh deleted file mode 100755 index 4e49142..0000000 --- a/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -dotnet build -o out/debug/ \ No newline at end of file diff --git a/readme.md b/readme.md index 3f7d210..f08201d 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ buypeeb === -a simple dotnet core program that allows you to track auctions on yahoo auctions japan, written in 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. ## quick start (arch linux) ```bash @@ -13,31 +13,16 @@ dotnet run --- ## installing prerequisites -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/) +you'll need the [dotnet core sdk](https://dotnet.microsoft.com/) ### 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) @@ -47,26 +32,27 @@ 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 ``` -### mono -``` -mono ./BuypeebApp.exe -``` +--- +## 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`. +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. diff --git a/release.ps1 b/release.ps1 new file mode 100755 index 0000000..ad450d3 --- /dev/null +++ b/release.ps1 @@ -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 diff --git a/release.sh b/release.sh index d0ec386..1f9fad1 100755 --- a/release.sh +++ b/release.sh @@ -1,2 +1,3 @@ #!/bin/sh -dotnet publish -c Release -r linux-x64 --output ./out/release/linux/ -p:PublishSingleFile=true -p:PublishTrimmed=true \ No newline at end of file +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