From 71aba62178195195754bc36e5e84cc7176b0dbcd Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Sep 2018 13:52:55 -0400 Subject: Added a winmanifest package for including a generic Windows manifest. Now to just rewrite the README. --- examples/controlgallery.go | 1 + examples/drawtext.go | 1 + examples/histogram.go | 1 + examples/table.go | 1 + static.manifest | 32 ---------------------- winmanifest/doc.go | 13 +++++++++ winmanifest/resources.rc | 9 +++++++ winmanifest/ui.manifest | 41 +++++++++++++++++++++++++++++ winmanifest/winmanifest_windows_386.syso | Bin 0 -> 1956 bytes winmanifest/winmanifest_windows_amd64.syso | Bin 0 -> 1956 bytes 10 files changed, 67 insertions(+), 32 deletions(-) delete mode 100644 static.manifest create mode 100644 winmanifest/doc.go create mode 100644 winmanifest/resources.rc create mode 100644 winmanifest/ui.manifest create mode 100755 winmanifest/winmanifest_windows_386.syso create mode 100755 winmanifest/winmanifest_windows_amd64.syso diff --git a/examples/controlgallery.go b/examples/controlgallery.go index d77bebe..e2d2dc2 100644 --- a/examples/controlgallery.go +++ b/examples/controlgallery.go @@ -6,6 +6,7 @@ package main import ( "github.com/andlabs/ui" + _ "github.com/andlabs/ui/winmanifest" ) var mainwin *ui.Window diff --git a/examples/drawtext.go b/examples/drawtext.go index a32b14b..0aaeb7d 100644 --- a/examples/drawtext.go +++ b/examples/drawtext.go @@ -8,6 +8,7 @@ package main import ( "github.com/andlabs/ui" + _ "github.com/andlabs/ui/winmanifest" ) var ( diff --git a/examples/histogram.go b/examples/histogram.go index 610d65a..55a9f59 100644 --- a/examples/histogram.go +++ b/examples/histogram.go @@ -9,6 +9,7 @@ import ( "time" "github.com/andlabs/ui" + _ "github.com/andlabs/ui/winmanifest" ) var ( diff --git a/examples/table.go b/examples/table.go index 41cde9f..1d11f8d 100644 --- a/examples/table.go +++ b/examples/table.go @@ -16,6 +16,7 @@ import ( "bytes" "github.com/andlabs/ui" + _ "github.com/andlabs/ui/winmanifest" ) type modelHandler struct { diff --git a/static.manifest b/static.manifest deleted file mode 100644 index d8e83a8..0000000 --- a/static.manifest +++ /dev/null @@ -1,32 +0,0 @@ - - - -Your application description here. - - - - - - - - - - - - - - - - diff --git a/winmanifest/doc.go b/winmanifest/doc.go new file mode 100644 index 0000000..71d6673 --- /dev/null +++ b/winmanifest/doc.go @@ -0,0 +1,13 @@ +// 2 september 2018 + +// Package winmanifest provides a basic manifest for use with +// package ui. You import it for its side effects only, as +// +// import _ "github.com/andlabs/ui/winmanifest" +// +// On non-Windows platforms this package does nothing. +// +// If you intend on using a custom manifest instead of the generic +// one in this package, be sure to read package ui's README so your +// manifest can have the directives necessary for package ui to work. +package winmanifest diff --git a/winmanifest/resources.rc b/winmanifest/resources.rc new file mode 100644 index 0000000..26f2b42 --- /dev/null +++ b/winmanifest/resources.rc @@ -0,0 +1,9 @@ +// 30 may 2015 + +// this is a UTF-8 file +#pragma code_page(65001) + +// this is the Common Controls 6 manifest +// TODO set up the string values here +// 1 is the value of CREATEPROCESS_MANIFEST_RESOURCE_ID and 24 is the value of RT_MANIFEST; we use it directly to avoid needing to share winapi.h with the tests and examples +1 24 "ui.manifest" diff --git a/winmanifest/ui.manifest b/winmanifest/ui.manifest new file mode 100644 index 0000000..2dc9305 --- /dev/null +++ b/winmanifest/ui.manifest @@ -0,0 +1,41 @@ + + + +Your application description here. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/winmanifest/winmanifest_windows_386.syso b/winmanifest/winmanifest_windows_386.syso new file mode 100755 index 0000000..93d1dc8 Binary files /dev/null and b/winmanifest/winmanifest_windows_386.syso differ diff --git a/winmanifest/winmanifest_windows_amd64.syso b/winmanifest/winmanifest_windows_amd64.syso new file mode 100755 index 0000000..64cfedd Binary files /dev/null and b/winmanifest/winmanifest_windows_amd64.syso differ -- cgit v1.2.3