Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Build system updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniruKun committed Oct 23, 2022
1 parent 4678f39 commit 143a83a
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 36 deletions.
10 changes: 5 additions & 5 deletions FyneApp.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Website = "https://danpetrov.xyz/tasukeru"

[Details]
Icon = "Icon.png"
Name = "Tasukeru"
ID = "com.tasukeru.app"
Version = "1.1.0"
Build = 1
Icon = "Tasukeru.png"
Name = "Tasukeru"
ID = "com.tasukeru.app"
Version = "1.1.0"
Build = 17
32 changes: 20 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
BINARY_NAME=tasukeru
BINARY_NAME := tasukeru

all: build
.PHONY: all build compile-cli compile-windows compile-mac clean run format

build:
go build -o bin/${BINARY_NAME} .
@echo "Building tasukeru build for the current platform"
go build -o bin/${BINARY_NAME} -ldflags '-s -w' .

compile:
@echo "Compiling for every OS and Platform"
compile-cli:
@echo "Compiling simple CLI for every OS and Platform"
GOOS=darwin GOARCH=amd64 go build -o bin/${BINARY_NAME}-darwin-amd64 .
GOOS=darwin GOARCH=arm64 go build -o bin/${BINARY_NAME}-darwin-arm64 .
GOOS=windows GOARCH=amd64 go build -o bin/${BINARY_NAME}-windows-amd64.exe .
GOOS=windows GOARCH=arm64 go build -o bin/${BINARY_NAME}-windows-arm64.exe .
GOOS=linux GOARCH=amd64 go build -o bin/${BINARY_NAME}-linux-amd64 .
GOOS=linux GOARCH=arm64 go build -o bin/${BINARY_NAME}-linux-arm64 .
fyne-cross windows -ldflags '-s -w' -arch amd64 -console -name tasukeru-cli.exe

compile-windows: FyneApp.toml
@echo "Building native Windows cross compiled build"
fyne-cross windows -ldflags '-s -w'

compile-mac: FyneApp.toml
@echo "Building native Mac app"
fyne-cross darwin -ldflags '-s -w'

all: compile-cli compile-windows compile-mac

clean:
go clean
rm ./bin/*

run:
go run main.go
run: build
@echo "Running dev build of Tasukeru"
./bin/${BINARY_NAME}

format:
@echo "Formatting the entire project"
Expand Down
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# HoloCure Save File Transfer Tool

![Tasukeru GUI demo](https://i.imgur.com/HDohzzB.png)

This is a small tool to import [HoloCure](https://kay-yu.itch.io/holocure) save files from one PC to another.

## Download
Expand All @@ -9,13 +11,34 @@ Pick the executable matching your architecture (note: HoloCure currently only ru

## Usage

1. Build a release by running `make` or download a release for your platform from [Releases](https://github.com/DaniruKun/tasukeru/releases)
2. Get the save file from the source PC at `Users\[your username]\AppData\Local\HoloCure\save.dat` and move it to the target PC
3. Play HoloCure **at least once** one the target PC
4. On the target PC, drag and drop the `save.dat` onto `tasukeru-*.exe`
5. When prompted, press `Enter`
1. Get the save file from the source PC at `Users\[your username]\AppData\Local\HoloCure\save.dat` and move it to the target PC
2. Play HoloCure **at least once** one the target PC
3. Launch `Tasukeru.exe`
4. Open the save file you want to import
5. Press `Import`
6. The save should now be imported

## Build

There are 2 build options: as a GUI app, and as a CLI:

### GUI

Install [fyne-cross](https://github.com/fyne-io/fyne-cross).
Then run

```shell
make compile-windows
```

### CLI

```shell
make compile-cli
```

This will produce binaries for each platform in the `bin` directory.

## Advanced

You can manually call the executable and pass arguments directly.
Expand Down
Binary file added Tasukeru.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ require (
)

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/fyne-io/fyne-cross v1.3.0 // indirect
github.com/fyne-io/mobile v0.1.2 // indirect
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200625191551-73d3c3675aa3 // indirect
Expand All @@ -28,5 +25,5 @@ require (
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/text v0.3.2 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
fyne.io/fyne v1.4.3 h1:356CnXCiYrrfaLGsB7qLK3c6ktzyh8WR05v/2RBu51I=
fyne.io/fyne v1.4.3/go.mod h1:8kiPBNSDmuplxs9WnKCkaWYqbcXFy0DeAzwa6PBO9Z8=
github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=
github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9 h1:1ltqoej5GtaWF8jaiA49HwsZD459jqm9YFz9ZtMFpQA=
github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9/go.mod h1:7uhhqiBaR4CpN0k9rMjOtjpcfGd6DG2m04zQxKnWQ0I=
github.com/Songmu/prompter v0.5.1 h1:IAsttKsOZWSDw7bV1mtGn9TAmLFAjXbp9I/eYmUUogo=
github.com/Songmu/prompter v0.5.1/go.mod h1:CS3jEPD6h9IaLaG6afrl1orTgII9+uDWuw95dr6xHSw=
Expand All @@ -12,8 +9,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fyne-io/fyne-cross v1.3.0 h1:pU8+B0J1+xYQJ27TNRjXiV9qsGHuHFXTDlqp0zfEyWo=
github.com/fyne-io/fyne-cross v1.3.0/go.mod h1:Kp7K91rS+2lmoa9g2kYolExO2I3BB/80no1wplc6mIw=
github.com/fyne-io/mobile v0.1.2 h1:0HaXDtOOwyOTn3Umi0uKVCOgJtfX73c6unC4U8i5VZU=
github.com/fyne-io/mobile v0.1.2/go.mod h1:/kOrWrZB6sasLbEy2JIvr4arEzQTXBTZGb3Y96yWbHY=
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw=
Expand Down Expand Up @@ -46,8 +41,8 @@ github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564/go.mod h1:afMbS0qvv1
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 h1:m59mIOBO4kfcNCEzJNy71UkeF4XIx2EVmL9KLwDQdmM=
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand All @@ -69,7 +64,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b h1:2n253B2r0pYSmEV+UNCQoPfU/FiaizQEK5Gu4Bq4JE8=
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
Expand All @@ -88,6 +82,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 3 additions & 2 deletions gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"io"
"log"
"net/url"

"fyne.io/fyne"
Expand Down Expand Up @@ -45,7 +44,6 @@ func RunGUI() {
return
}
if reader == nil {
log.Println("Cancelled")
return
}

Expand All @@ -67,12 +65,15 @@ func RunGUI() {
aboutUrl, err := url.Parse(HomePage)
check(err)
aboutHyperLink := widget.NewHyperlink("About", aboutUrl)
aboutHyperLink.Alignment = fyne.TextAlignTrailing
versionLabel := widget.NewLabelWithStyle("Version "+Version, fyne.TextAlignTrailing, fyne.TextStyle{Monospace: true})

box := container.NewVBox(
openFileButtonLabel,
openFileButton,
confirmButton,
aboutHyperLink,
versionLabel,
)

w.SetContent(box)
Expand Down

0 comments on commit 143a83a

Please sign in to comment.