brokenbydefault / Nanollet

The unique ultra-light wallet for Nano/Raiblocks with amazing features, written in Golang.
https://nanollet.org
MIT License
53 stars 7 forks source link

Front.Sciter is undefined #1

Closed SparK-Cruz closed 5 years ago

SparK-Cruz commented 6 years ago

https://github.com/BrokenByDefault/Nanollet/blob/350c21b128fba3b52ea5cff9883c12d3251548d8/GUI/window.go#L47

Right after go getting it:

# github.com/brokenbydefault/Nanollet/GUI
go/src/github.com/brokenbydefault/Nanollet/GUI/window.go:47:55: undefined: Front.Sciter

Any quick fix or solution to read Front info and pass that to sciter.link file?

Edit: I think it might have something to do with https://github.com/BrokenByDefault/Nanollet/commit/350c21b128fba3b52ea5cff9883c12d3251548d8

Any way I can generate those files in my local copy?

Edit2: I was reading their readme and aparently I have to install scite-sdk first, and then try to build anything... Do you have building steps somewhere? To put on the readme file...

inkeliz commented 6 years ago

Theres files are created by the generator, at gen.go. The gen.go creates the css.go, html.go, sciter_darwin.go, sciter_linux.go and also sciter_windows.go at GUI/Front.

  1. Run go -x github.com/BrokenByDefault/Nanollet, that will clone all files.
  2. Download the Sciter SDK from https://sciter.com/download/.
  3. Copy the sciter.dll, libsciter-gtk-64.so and sciter-osx-64.dylib from sciter-sdk.zip to the Nanollet folder (where the main.go are).

It can be little confusing. If you are on Windows, open the sciter-sdk.zip, and copy the /bin/64/sciter.dll to %GOPATH%\src\github.com\brokenbydefault\Nanollet. Repeat the same process to /bin.osx/sciter-osx-64.dylib and bin.gtk/x64/libsciter-gtk-64.so. You need to copy all files, even if are not using this plataform (e.g sciter.dll are needed even if you are running Linux), maybe change it in future?!

The names of the files can change, if that is the case, just rename accordingly. In the end will be something like:

... | - .gitattributes | - .gitignore | - libsciter-gtk-64.so | - LICENSE | - main.go | - Nanollet.exe.manifest | - README.md | - README-Image1.png | - sciter.dll | - sciter-osx-64.dylib

  1. Run go generate.

Now, you can go build and use that. :)

If not, I think you need to setup the GCC for CGO, in this case you need to download mingw64-gcc, or another compiler, and set the envioment variable. If you are on Windows, go to Control Panel > System > Advanced Settings (on left sidebar) > Envioment Variables, then select PATH and click on Edit. You should add the mingw-64, which by default is living on C:/mingw64/bin.


EDIT: It brigns me the idea... I think the gen.go could download the Sciter and setup automatically, maybe prompt the user and then download it, enforcing check the SSL cert. The golang already have a lib for zip, it should be easy to do and will help this situation. But I don't know if it break some license of Sciter.

SparK-Cruz commented 6 years ago

I use Arch, will attempt to build it again when I get home.

wagslane commented 6 years ago

I think those dependencies should be included in the repo for safe keeping and first-time builds.