桌面嵌入html,sciter - Sciter的Go绑定,Sciter现代桌面UI开发的可嵌入HTML / CSS /脚本引擎...

Go bindings for Sciter

625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png

Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust).

Attention

The ownership of project is transferred to this new organization. Thus the import path for golang should now be github.com/sciter-sdk/go-sciter, but the package name is still sciter.

Introduction

This package provides a Golang bindings of Sciter using cgo. Using go sciter you must have the platform specified sciter dynamic library downloaded from sciter-sdk, the library itself is rather small (under 5MB, less than 2MB when upxed) .

Most Sciter API are supported, including:

Html string/file loading

DOM manipulation/callback/event handling

DOM state/attribute handling

Custom resource loading

Sciter Behavior

Sciter Options

Sciter Value support

NativeFunctor (used in sciter scripting)

And the API are organized in more or less a gopher friendly way.

Things that are not supported:

Sciter Node API

TIScript Engine API

Getting Started

At the moment only Go 1.10 or higher is supported (issue #136).

Download the sciter-sdk

Extract the sciter runtime library from sciter-sdk to system PATH

The runtime libraries lives in bin bin.gtk bin.osx with suffix like dll so or dylib

Windows: simply copying bin\64\sciter.dll to c:\windows\system32 is just enough

Linux:

cd sciter-sdk/bin.gtk/x64

export LIBRARY_PATH=$PWD

echo $PWD >> libsciter.conf

sudo cp libsciter.conf /etc/ld.so.conf.d/

sudo ldconfig

ldconfig -p | grep sciter should print libsciter-gtk.so location

OSX:

cd sciter-sdk/bin.osx/

export DYLD_LIBRARY_PATH=$PWD

Set up GCC envrionmnet for CGO

mingw64-gcc (5.2.0 and 7.2.0 are tested) is recommended for Windows users.

Under Linux gcc(4.8 or above) and gtk+-3.0 are needed.

go get -x github.com/sciter-sdk/go-sciter

Run the example and enjoy :)

Sciter Desktop UI Examples

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

625332134c6f4d4600884b99daebf603.png

Sciter Version Support

Currently supports Sciter version 4.0.0.0 and higher.

About Sciter

Sciter is an Embeddable HTML/CSS/script engine for modern UI development, Web designers, and developers, can reuse their experience and expertise in creating modern looking desktop applications.

In my opinion, Sciter , though not open sourced, is an great desktop UI development envrionment using the full stack of web technologies, which is rather small (under 5MB) especially compared to CEF,Node Webkit and Atom Electron. :)

Finally, according to Andrew Fedoniouk the author and the Sciter END USER LICENSE AGREEMENT , the binary form of the Sciter dynamic libraries are totally free to use for commercial or non-commercial applications.

The Tailored Sciter C Headers

This binding ueses a tailored version of the sciter C Headers, which lives in directory: include. The included c headers are a modified version of the sciter-sdk standard headers.

It seems Sciter is developed using C++, and the included headers in the Sciter SDK are a mixture of C and C++, which is not quite suitable for an easy golang binding.

I'm not much fond of C++ since I started to use Golang, so I made this modification and hope Andrew Fedoniouk the author would provide pure C header files for Sciter. :)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值