celogeek / go-comic-converter

Convert CBZ/CBR/Dir into Epub for e-reader devices (Kindle Devices, ...)
MIT License
69 stars 10 forks source link

How to run as a binary #20

Closed yoanhg421 closed 1 year ago

yoanhg421 commented 1 year ago

Hi Celogeek. I hope you are doing well, It's been a while.

I have a question for you. I have an CLI app that runs your comic-converter and then runs kindlegen and makes the mobis I need. I trying to package the app and give it a simple GUI so I can pass it to my friend.

In order to do that I'll need to package a build or binary of your comic-converter that can run without GO installed on the destination machine. Is that possible?

I tried using this https://github.com/tj/gobinaries I'm getting a 500 error. It's probably outdated.

Any help would be greatly appreciated.

manueldidonna commented 1 year ago

go build command produces a static binary that will run on the target architecture without go being installed.

yoanhg421 commented 1 year ago

Thank you so much. I not too familiar with GO.

yoanhg421 commented 1 year ago

One more question. I need to get a version of the binary for Windows too. Since built this one, on a Mac I'm not sure if the same binary will work on Windows. Is there a way to target multiple platforms or will the same binary work on all platforms?

manueldidonna commented 1 year ago

One more question. I need to get a version of the binary for Windows too. Since built this one, on a Mac I'm not sure if the same binary will work on Windows. Is there a way to target multiple platforms or will the same binary work on all platforms?

You can target any os by using GOARCH and GOOS envs. For windows use GOOS=windows GOARCH=386 go build Go there to find all the valid combinations of $GOOS and $GOARCH

yoanhg421 commented 1 year ago

Ok Thank you. That helps.
I'm having a bug with the converter, I'll open a new issue.