Skip to content

Commit

Permalink
Switched systray to use 2goarray
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Feb 18, 2015
1 parent b395364 commit b7fde38
Show file tree
Hide file tree
Showing 4 changed files with 867 additions and 215 deletions.
10 changes: 8 additions & 2 deletions src/github.com/getlantern/systray/embeddll.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
#
###############################################################################

go get github.com/jteeuwen/go-bindata/go-bindata
go-bindata -nomemcopy -nocompress -pkg systray -prefix dll -o systraydll_windows.go dll
function die() {
echo $*
exit 1
}
which 2goarray > /dev/null || go get github.com/cratonica/2goarray/...
which 2goarray > /dev/null || die "Please install 2goarray manually, then try again"

2goarray systraydll systray < systray.dll > systraydll_windows.go
9 changes: 2 additions & 7 deletions src/github.com/getlantern/systray/systray_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@ var (

func init() {
// Write DLL to file
b, err := Asset("systray.dll")
if err != nil {
panic(fmt.Errorf("Unable to read systray.dll: %v", err))
}

err = os.MkdirAll(dllDir, 0755)
err := os.MkdirAll(dllDir, 0755)
if err != nil {
panic(fmt.Errorf("Unable to create directory %v to hold systray.dll: %v", dllDir, err))
}

err = ioutil.WriteFile(dllFile, b, 0644)
err = ioutil.WriteFile(dllFile, systraydll, 0644)
if err != nil {
panic(fmt.Errorf("Unable to save systray.dll to %v: %v", dllFile, err))
}
Expand Down
1,063 changes: 857 additions & 206 deletions src/github.com/getlantern/systray/systraydll_windows.go

Large diffs are not rendered by default.

0 comments on commit b7fde38

Please sign in to comment.