Git Product home page Git Product logo

gallium's People

Contributors

alexflint avatar ernesto-jimenez avatar radarhere avatar shawnps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gallium's Issues

gcc: error: unrecognized command line option '-mmacosx-version-min=10.8'

go get github.com/alexflint/gallium

# github.com/alexflint/gallium
gcc: error: unrecognized command line option '-mmacosx-version-min=10.8'
gcc: error: unrecognized command line option '-mmacosx-version-min=10.8'
gcc: error: unrecognized command line option '-mmacosx-version-min=10.8'
gcc: error: unrecognized command line option '-mmacosx-version-min=10.8'

feature request - upgrading and proper signing

This request follows on from the PKG bundling request.

With the package properly signed using the OSX toolset, it means we can do upgrades that are secure and tamper proof that check the signing.

There are many golang updaters out there that have various features btw, but this one looks good:
https://github.com/syncthing/syncthing/tree/master/lib/upgrade

  • Checks signatures
  • Battle Tested (handles allot of corner cases)
  • Manages version checking.
  • Tests

Also check this:
https://github.com/syncthing/syncthing/blob/master/build.go
Its a nice way to do it. The golang team does the same with a root build.go.

Lastly between the bundling and the upgrading we need to upload the bundle somewhere:
https://github.com/golang/build/blob/master/cmd/release/upload.go

I think that this makes it very easy to bundle and deploy and because its all golang based easy to fix and cross platform.

Curious what you think and any things you want changed etc ?

Build a `gallium` tool to build and bundle projects

The project has a couple of important requirements:

  1. Running runtime.LockOSThread and gallium.Loop on the main function
  2. Bundling the binary for certain features to work. e.g: the menu example only works when run from a bundle.

Instead of having people create their own main files, it might be helpful to have a CLI to manage both compilation and bundling.

The UX would be something like this:

github.com/alexflint/gallium/examples/menu/menu.go

package menu

import (
    "os"

    "github.com/alexflint/gallium"
)

type app struct {}

func New() gallium.Starter {
    return &app{}
}

func (*app) Start(app *gallium.App) {
    app.SetMenu([]gallium.Menu{
        {
            Title: "menudemo",
            Entries: []gallium.MenuEntry{
                gallium.MenuItem{
                    Title:    "Quit",
                    Shortcut: "cmd+q",
                    OnClick:  func() { os.Exit(0) },
                },
            },
        }
    })
}

Building the application

$ gallium build github.com/alexflint/gallium/examples/menu

As part of the build, it will create a temporary main package with a main.go file from a template similar to this:

// AUTOGENERATED CODE
// NEVER EDIT MANUALLY
package main

import (
    "runtime"

    "github.com/alexflint/gallium"
    p "{{ .TargetPackage }}"
)

func main() {
    runtime.LockOSThread()
    app := p.New()
    gallium.Loop(os.Args, app.Start())
}

Once generated, it will build the binary and bundle it and produce a ready menu.app.

Beyond not having to deal with thread locking and initialising the loop, we can check whether the returned satisfies other gallium interfaces to build more elaborate main files.

  • DefaultMenus() []gallium.Menu returning the default menu for the app
  • Config() gallium.Config could return information used to setup your app or your bundle. Would probably have some information like the one contained in cordova's (phonegap) config.xml.

The CLI could also evolve to offer other features:

$ gallium new           # creates a default app ready to be used with `gallium build`
$ gallium generate menu # generates all the boilerplate to return a new menu
$ gallium sign Menu.app # signs Menu.app for distribution

It should also have a command to generate all the Go code needed to build and bundle the app with within the same repo. Everything that would be required to build the app without the cli, so it can be committed to the repo.

Securing http requests from gallium

There will be different security requirements for the HTTP connections from libchromiumcontent.

  1. Restricting what domains/URLs libchromiumcontent has access to.
  2. Starting an HTTP server embedded in the app that only libchromiumcontent has access to.
  3. Preventing sniffing of the traffic between libchromiumcontent and the embedded server.

@alexflint, I have some ideas about how to address this, I can create issues for each of these points and outline some proposals if you want.

Menus don't show up unless you run the application bundle

It's not very clear from the instructions in the README:

To run the example as a full-fledged UI application, you need to build an app bundle:
...
Alternatively, you can run the executable directly, but the window will initially appear behind all other windows, and it will also not appear in the dock or the switcher, so you will have to find it manually:

Can you add a note in the "common pitfalls" that explains that ? It took me a while to figure out why everything was working but the menus.

Run Quickstart Error

I try the Quickstart, But Failed.
Here's the error code from terminal.

# go run example.go
2017/07/19 14:21:40

=== gallium.Loop ===
in GalliumLoop
calling content::ContentMain...
MainDelegate::BasicStartupComplete
MainDelegate::PreSandboxStartup
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
at GalliumOpenWindow
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
at GalliumOpenWindowImpl
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
V8 error: Entering the V8 API without proper locking in place (HandleScope::HandleScope).  Current memory usage: 77 MB
1   0x594a9f9 v8::HandleScope::Initialize(v8::Isolate*)
2   0x664fd4b blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
3   0x5e4fc74 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
4   0x5e4fb98 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
5   0x5f82735 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
6   0x600d8cd blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
7   0x603311d blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
8   0x603100c blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
9   0x6009b7c blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
10  0x6008d18 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
11  0x600939e blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
12  0x60004e6 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
13  0x588f692 WTF::callOnMainThread(WTF::Function<void ()> const&)
14  0x42dbd24 base::debug::TaskAnnotator::RunTask(char const*, char const*, base::PendingTask const&)
15  0x431b408 base::MessageLoop::RunTask(base::PendingTask const&)
16  0x431b5ef base::MessageLoop::DeferOrRunPendingTask(base::PendingTask const&)
17  0x431ba3c base::MessageLoop::DoWork()
18  0x42c2661 base::MessagePumpLibevent::OnWakeup(int, short, void*)
19  0x7fffc6c7b981 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
20  0x7fffc6c5ca7d __CFRunLoopDoSources0
21  0x7fffc6c5bf76 __CFRunLoopRun
22  0x7fffc6c5b974 CFRunLoopRunSpecific
23  0x42c283f base::MessagePumpCFRunLoop::DoRun(base::MessagePump::Delegate*)
24  0x42c24cc base::MessagePumpLibevent::OnWakeup(int, short, void*)
25  0x43328f3 base::RunLoop::Run()
26  0x431abdd base::MessageLoop::Run()
27  0x435767f base::Thread::ThreadMain()
28  0x4350e0b base::PlatformThread::Join(base::PlatformThreadHandle)
29  0x7fffdc3c0aab _pthread_body
30  0x7fffdc3c09f7 _pthread_body
31  0x7fffdc3c01fd thread_start
signal: segmentation fault

Roadmap

This project has 2000 stars. This is really useful and fils a need in the community I believe.

How you you feel about a roadmap ? People can contribute cross platform stuff then

I used Cordova and electron and scorer and want to support this project. Windows support is important to me and maybe others

Form and inputs

What are the plans for forms? It seems like a crucial component for any app.

MacOS Termination Reason: DYLD, [0x1] Library missing

Hi guys,

embedded Chromium with Gallium is working great so far on the development machine but as soon as I run the app bundle on a different Mac it can't find the library.
Am I missing some build or bundle parameter here?

This is how I did the build:

go build -o example main.go
gallium-bundle example

Took the example.app and tried it on a different Mac.

Error:

...
Termination Reason: DYLD, [0x1] Library missing
...
Dyld Error Message:
Library not loaded: @rpath/Gallium.framework/Gallium
Referenced from: /Applications/example.app/Contents/MacOS/example
Reason: image not found
...

Trouble installing: "could not determine kind of name for C.CBytes"

I'm new to go, so might be an obvious package missing on my end, but can't figure out what.

OSX 10.11.6
go version go1.6.2 darwin/amd64

:~/git$ brew install git-lfs
Warning: git-lfs-1.2.1 already installed
:~/git$ git lfs install
Git LFS initialized.
:~/git$ go get github.com/alexflint/gallium
# github.com/alexflint/gallium
could not determine kind of name for C.CBytes
:~/git$

Let me know if there's any other useful info I can provide

browser shortcuts and keybinding events are not working properly

The navigation keyboard shortcuts found in Chome (i.e. cmd + arrow left/right to navigate back or forward) are not working.
Listening to keyboard events (using javascript) is not working either(i.e. I've registered a listener on a specific key press to launch the video element in fullscreen but it doesn't work either).

go get error

Throws an exception when I execute go get github.com/alexflint/gallium

Go build github.com/alexflint/gallium: invalid flag in #cgo LDFLAGS: -Wl,-rpath,@executable_path/../Frameworks

I can't find the specific reason now, I don't know where to start.
go version: go version go1.10.3 darwin/amd64

Breach and Thrust??

This is more of a polite enquiry than anything else!!!

Are you aware of the Breach browser project and in particular its second iteration of its core Thrust. It is an abandoned polyglot version of electron like application framework based on chromium content module which I had some hopes for!

The reason I am asking you about this is because it may help hasten a windows and linux version of gallium ...

Mac only?

The Mac only requirement is not made clear in the README.
What do you think about adding something to say this will only work on Mac?

Form text inputs not responding in go run

Not sure if this is mentioned somewhere or not but I am unable to enter text into a form input box. Whatever I type is redirected to the console where I ran go run. I ran build and the form was then usable. Is there something I missed?

04a00685-e111-41ac-9e3f-fd2f6996790d

package main

import (
	"fmt"
	"log"
	"net/http"
	"os"
	"runtime"

	"github.com/alexflint/gallium"
)

var html = `
<!doctype html>
<html><head></head><body>
<form method="post" action="/testform">
<input name="testinput" type="text"  value="" />
<button type="submit">Submit</button>
</form>
</body></html>
`

type app struct {
	ui     *gallium.App
	window *gallium.Window
}

func (a *app) handleIndex(w http.ResponseWriter, r *http.Request) {
	fmt.Fprint(w, html)
}

func onReady(ui *gallium.App) {
	opts := gallium.FramedWindow
	opts.Shape.Width = 500
	opts.Shape.Height = 500
	window, err := ui.OpenWindow("http://127.0.0.1:9478/", opts)
	if err != nil {
		log.Fatal(err)
	}

	app := app{
		ui:     ui,
		window: window,
	}
	http.HandleFunc("/", app.handleIndex)
	go http.ListenAndServe(":9478", nil)
}

func (a *app) handleTest(w http.ResponseWriter, r *http.Request) {
	a.window.OpenDevTools()
	r.ParseForm()
	fmt.Println("Name", r.Form["testinput"])
	fmt.Fprint(w, fmt.Sprintf("Hello %s", r.Form["testinput"]))
}
func main() {
	runtime.LockOSThread()
	gallium.RedirectStdoutStderr(os.ExpandEnv("$HOME/Library/Logs/Gallium.log"))
	gallium.Loop(os.Args, onReady)
}

installation problem

src/github.com/alexflint/gallium/dist/Gallium.framework/Gallium, file was built for unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F ) which is not the architecture being linked (x86_64): src/github.com/alexflint/gallium/dist/Gallium.framework/Gallium
My go version go1.9.1 darwin/amd64. running on high sierra

when i run the "go get" ,it print the error

go get github.com/alexflint/gallium
# github.com/alexflint/gallium
gallium/app.go:14:10: fatal error: 'gallium/gallium.h' file not found
#include "gallium/gallium.h"
         ^
1 error generated.

"Entering the V8 API without proper locking in place (HandleScope::HandleScope). Current memory usage: 65 MB" on macOS Sierra

Run Example Error Info:

2016/10/13 17:48:32

=== gallium.Loop ===
in GalliumLoop
calling content::ContentMain...
MainDelegate::BasicStartupComplete
MainDelegate::PreSandboxStartup
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
2016/10/13 17:48:32 cgo_onReady called with 0
at GalliumCreateWindow
at GalliumCreateWindow
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
at GalliumOpenWindowImpl
2016-10-13 17:48:32.459 example[55885:4188187] in Window::Create, main thread? 1
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
at GalliumOpenWindowImpl
2016-10-13 17:48:32.642 example[55885:4188187] in Window::Create, main thread? 1
V8 error: Entering the V8 API without proper locking in place (HandleScope::HandleScope).  Current memory usage: 65 MB
1   0x96c09f9 v8::HandleScope::Initialize(v8::Isolate*)
2   0xa3c5d4b blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
3   0x9fc52a3 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
4   0x9fc465e blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
5   0x9fc62d8 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
6   0xa0c5b52 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
7   0xa0cfe96 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
8   0xa0cf896 blink::WebSubstringUtil::attributedSubstringInRange(blink::WebLocalFrame*, unsigned long, unsigned long)
9   0x9b0174b blink::WebLocalFrame::fromFrameOwnerElement(blink::WebElement const&)
10  0xaa8e6af content::RenderFrameImpl::OnNavigate(FrameMsg_Navigate_Params const&)
11  0xaa8ca14 content::RenderFrameImpl::OnMessageReceived(IPC::Message const&)
12  0x85547d8 content::StreamDeviceInfo::IsEqual(content::StreamDeviceInfo const&, content::StreamDeviceInfo const&)
13  0x855473c content::StreamDeviceInfo::IsEqual(content::StreamDeviceInfo const&, content::StreamDeviceInfo const&)
14  0xa99d4a1 content::ChildThread::OnMessageReceived(IPC::Message const&)
15  0x8573d78 IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&)
16  0x8051d24 base::debug::TaskAnnotator::RunTask(char const*, char const*, base::PendingTask const&)
17  0x8091408 base::MessageLoop::RunTask(base::PendingTask const&)
18  0x80915ef base::MessageLoop::DeferOrRunPendingTask(base::PendingTask const&)
19  0x8091a3c base::MessageLoop::DoWork()
20  0x8038661 base::MessagePumpLibevent::OnWakeup(int, short, void*)
21  0x7fff7d40b551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
22  0x7fff7d3ec6bd __CFRunLoopDoSources0
23  0x7fff7d3ebbb6 __CFRunLoopRun
24  0x7fff7d3eb5b4 CFRunLoopRunSpecific
25  0x803883f base::MessagePumpCFRunLoop::DoRun(base::MessagePump::Delegate*)
26  0x80384cc base::MessagePumpLibevent::OnWakeup(int, short, void*)
27  0x80a88f3 base::RunLoop::Run()
28  0x8090bdd base::MessageLoop::Run()
29  0x80cd67f base::Thread::ThreadMain()
30  0x80c6e0b base::PlatformThread::Join(base::PlatformThreadHandle)
31  0x7fff92641abb _pthread_body
[1]    55885 segmentation fault  ./example

my go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonydeng/workspace/demo/gallium-demo"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.1/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.1/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/s0/rp5bg3tj4cqb_6t8l2vsn83c0000gp/T/go-build211248048=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

Name collision with "Gallium"

Gallium is a low-level set of platform graphics driver libraries, and is used on multiple operating systems to allow implementing interfaces for graphics APIs (DirectX, OpenGL, Vulkan) on top of different drivers.

https://en.wikipedia.org/wiki/Gallium3D

This causes also the issue that the "gallium" package name in most linux distros is already used, so this project would have to be called something different there.

Is gallium not being actively worked on - as of 2017

Hey @alexflint

First off, I think this is an awesome project!!

I'd really love to see this one continue, checked out the Activity graph for this project and the dev seems to be slowing down. Could you please let me know what are your plans for gallium's future?

Gallium, file was built for unsupported file format

go version: go1.7.4 darwin/amd64

go run example/... commands are also resulting with the same error:

➜  ~ git-lfs install
Git LFS initialized.
➜  ~ go get github.com/alexflint/gallium
# github.com/alexflint/gallium
ld: warning: ignoring file Go/src/github.com/alexflint/gallium/dist/Gallium.framework/Gallium, file was built for unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F ) which is not the architecture being linked (x86_64): Go/src/github.com/alexflint/gallium/dist/Gallium.framework/Gallium
Undefined symbols for architecture x86_64:
  "_GalliumAddGlobalShortcut", referenced from:
      __cgo_c166c2779055_Cfunc_helper_AddGlobalShortcut in globalshortcut.cgo2.o
  "_GalliumFocusedScreen", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumFocusedScreen in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumFocusedScreen)
  "_GalliumLoop", referenced from:
      __cgo_c166c2779055_Cfunc_helper_GalliumLoop in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_helper_GalliumLoop)
  "_GalliumOpenWindow", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumOpenWindow in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumOpenWindow)
  "_GalliumScreen", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumScreen in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumScreenUsable, __cgo_c166c2779055_Cfunc_GalliumScreenShape , __cgo_c166c2779055_Cfunc_GalliumScreenBitsPerPixel , __cgo_c166c2779055_Cfunc_GalliumScreen , __cgo_c166c2779055_Cfunc_GalliumScreenCount , __cgo_c166c2779055_Cfunc_GalliumScreenID )
  "_GalliumScreenBitsPerPixel", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumScreenBitsPerPixel in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumScreenBitsPerPixel)
  "_GalliumScreenCount", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumScreenCount in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumScreenCount)
  "_GalliumScreenID", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumScreenID in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumScreenID)
  "_GalliumScreenShape", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumScreenShape in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumScreenShape)
  "_GalliumScreenUsable", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumScreenUsable in screen.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumScreenUsable)
  "_GalliumWindowClose", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowClose in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowCloseDevTools, __cgo_c166c2779055_Cfunc_GalliumWindowClose )
  "_GalliumWindowCloseDevTools", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowCloseDevTools in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowCloseDevTools)
  "_GalliumWindowCopy", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowCopy in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowCopy)
  "_GalliumWindowCut", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowCut in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowCut)
  "_GalliumWindowDelete", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowDelete in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowDelete)
  "_GalliumWindowDevToolsAreOpen", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowDevToolsAreOpen in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowDevToolsAreOpen)
  "_GalliumWindowGetShape", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowGetShape in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowGetShape)
  "_GalliumWindowGetURL", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowGetURL in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowGetURL)
  "_GalliumWindowLoadURL", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowLoadURL in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowLoadURL)
  "_GalliumWindowMiniaturize", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowMiniaturize in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowMiniaturize)
  "_GalliumWindowNativeController", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowNativeController in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowNativeController)
  "_GalliumWindowNativeWindow", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowNativeWindow in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowNativeWindow)
  "_GalliumWindowOpen", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowOpen in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowOpen, __cgo_c166c2779055_Cfunc_GalliumWindowOpenDevTools )
  "_GalliumWindowOpenDevTools", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowOpenDevTools in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowOpenDevTools)
  "_GalliumWindowPaste", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowPaste in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowPaste, __cgo_c166c2779055_Cfunc_GalliumWindowPasteAndMatchStyle )
  "_GalliumWindowPasteAndMatchStyle", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowPasteAndMatchStyle in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowPasteAndMatchStyle)
  "_GalliumWindowRedo", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowRedo in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowRedo)
  "_GalliumWindowReload", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowReload in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowReloadNoCache, __cgo_c166c2779055_Cfunc_GalliumWindowReload )
  "_GalliumWindowReloadNoCache", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowReloadNoCache in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowReloadNoCache)
  "_GalliumWindowSelectAll", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowSelectAll in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowSelectAll)
  "_GalliumWindowSetShape", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowSetShape in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowSetShape)
  "_GalliumWindowUndo", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowUndo in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowUndo)
  "_GalliumWindowUnselect", referenced from:
      __cgo_c166c2779055_Cfunc_GalliumWindowUnselect in app.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_GalliumWindowUnselect)
  "_MainBundle_ObjectForKey", referenced from:
      __cgo_c166c2779055_Cfunc_MainBundle_ObjectForKey in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_MainBundle_ObjectForKey)
  "_NSApplication_Run", referenced from:
      __cgo_c166c2779055_Cfunc_NSApplication_Run in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSApplication_Run)
  "_NSApplication_SetMainMenu", referenced from:
      __cgo_c166c2779055_Cfunc_NSApplication_SetMainMenu in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSApplication_SetMainMenu)
  "_NSImage_NewFromPNG", referenced from:
      __cgo_c166c2779055_Cfunc_NSImage_NewFromPNG in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSImage_NewFromPNG)
  "_NSMenuItem_SetSubmenu", referenced from:
      __cgo_c166c2779055_Cfunc_NSMenuItem_SetSubmenu in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSMenuItem_SetSubmenu)
  "_NSMenu_AddMenuItem", referenced from:
      __cgo_c166c2779055_Cfunc_NSMenu_AddMenuItem in cocoa.cgo2.o
      __cgo_c166c2779055_Cfunc_helper_NSMenu_AddMenuItem in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_helper_NSMenu_AddMenuItem, __cgo_c166c2779055_Cfunc_NSMenu_AddMenuItem )
  "_NSMenu_AddSeparator", referenced from:
      __cgo_c166c2779055_Cfunc_NSMenu_AddSeparator in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSMenu_AddSeparator)
  "_NSMenu_New", referenced from:
      __cgo_c166c2779055_Cfunc_NSMenu_New in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSMenu_New)
  "_NSStatusBar_AddItem", referenced from:
      __cgo_c166c2779055_Cfunc_NSStatusBar_AddItem in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSStatusBar_AddItem)
  "_NSUserNotificationCenter_DeliverNotification", referenced from:
      __cgo_c166c2779055_Cfunc_NSUserNotificationCenter_DeliverNotification in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSUserNotificationCenter_DeliverNotification)
  "_NSUserNotification_New", referenced from:
      __cgo_c166c2779055_Cfunc_NSUserNotification_New in cocoa.cgo2.o
     (maybe you meant: __cgo_c166c2779055_Cfunc_NSUserNotification_New)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
➜  ~ 

feature request - bundle as a .pkg

i noticed the recent work on the bundling at https://github.com/alexflint/gallium/blob/master/cmd/gallium-bundle/bundle.go

looking awesome !

At the moment the bundling produces a ".app", however its possible with golang to produce a ".pkg" so that the end user gets a decent install experience, and we are developers get control about where things are places and file ACLS assigned etc.
It will also help with getting projects into a CI and CB pipeline, and prepare for continuous updates if we want to integrate that later.

This is the way the golang team does it and its quite simple.
https://github.com/golang/build/blob/master/cmd/release/releaselet.go#L149

It will only build on OSX.
it calls out to pkgbuild & then productbuild for final signing for users.
Its described well here:
http://thegreyblog.blogspot.de/2014/06/os-x-creating-packages-from-command_2.html
I think its very complete.

Please let me know what you think....

Frameless windows cannot accept keyboard input

If you construct a window using gallium.FramelessWindow then you will not be able to type into form elements on the page, or provide any other kind of keyboard input. This is because Cocoa defaults canBecomeKeyWindow to false for borderless windows. The suggested fix is to override canBecomeKeyWindow and return true. This will require subclassing OpenGLUnderlayWindow.

LSOpenURLsWithRole() failed with error -10810

Hi, I'm just trying to run the Quickstart example but I'm facing some issues.

I have installed Gallium following the step-by-step from the Installation section in the README file.

Now, I'm trying to create a new Go project following these steps:

On the Go workspace:

$ mkdir example
$ cd example
$ touch example.go
$ open example.go

I copied the following code to the example.go file:

package main

import (
  "os"
  "runtime"

  "github.com/alexflint/gallium"
)

func main() {
  runtime.LockOSThread()         // must be the first statement in main - see below
  gallium.Loop(os.Args, onReady) // must be called from main function
}

func onReady(app *gallium.App) {
  app.OpenWindow("http://example.com/", gallium.FramedWindow)
}

Then I ran the following commands:

$ go build
$ go install github.com/alexflint/gallium/cmd/gallium-bundle
$ gallium-bundle example
$ open example.app

And I got the following error message:

LSOpenURLsWithRole() failed with error -10810 for the file /Users/username/Developer/GoWorkspace/src/github.com/username/example/example.app.

Also when I try to run the go run example.go command I get it signal: killed.

I don't know if it is a Gallium issue or if I'm doing something wrong, but I couldn't figure out what is happening. If someone can help me I will appreciate.

I'm running it on MacOS Sierra Version 10.12.5 using Go version 1.8.

By the way, congratulations for the great project.

Please add a license to the repo

Hi @alexflint,

Could you please add an explicit LICENSE file to the repo so that it's clear under what terms the content is provided, and under what terms user contributions are licensed?

Per GitHub docs on licensing:

Generally speaking, the absence of a license means that the default copyright laws apply. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work. This might not be what you intend.

In case it's helpful, choosealicense.com provides a nice overview of several popular open source licenses from which to choose.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.