From 71aba62178195195754bc36e5e84cc7176b0dbcd Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Sep 2018 13:52:55 -0400 Subject: [PATCH] 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 + winmanifest/doc.go | 13 +++++++++++++ winmanifest/resources.rc | 9 +++++++++ static.manifest => winmanifest/ui.manifest | 9 +++++++++ winmanifest/winmanifest_windows_386.syso | Bin 0 -> 1956 bytes winmanifest/winmanifest_windows_amd64.syso | Bin 0 -> 1956 bytes 9 files changed, 35 insertions(+) create mode 100644 winmanifest/doc.go create mode 100644 winmanifest/resources.rc rename static.manifest => winmanifest/ui.manifest (63%) 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/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/static.manifest b/winmanifest/ui.manifest similarity index 63% rename from static.manifest rename to winmanifest/ui.manifest index d8e83a8..2dc9305 100644 --- a/static.manifest +++ b/winmanifest/ui.manifest @@ -26,6 +26,15 @@ + + + + + + + + + diff --git a/winmanifest/winmanifest_windows_386.syso b/winmanifest/winmanifest_windows_386.syso new file mode 100755 index 0000000000000000000000000000000000000000..93d1dc8f39cf62e00a63bb302a9b6411362444dc GIT binary patch literal 1956 zcmb_d&5qkP5Vp~vLHz_hGCCHaELlI6xArEB1Z@`mNr7(D_DGQ@uL!nq|5|G=*o zZ})r@{pH6;8IL~4AAEj4>ilTj+eiPQ|LoCd^a?G0!RPN!z3m{&XTLQyxd&sVR;wTm zqkw?oT1d5C1wY+=MT>w~$CO~TR@MH&@Iy;e8yChACNrb#G1=JBf5FKso7l6M}M@Q5a!Xy|y))gSFb+7`~AXxa$n& z^u;i%Sc5+=bkj1m`yPM7AB+|qcm4QR-I<%VttDp;_d2+^U5hSTsghYRnPM^mEH|?C z7T4Z`u%in(nIs!95H6=DD)fFrDcJ&f`I;yIL2&on)j5%hxD9w1o#ccw3xv{su@)5W zn(war?cwT!!rkoA9rPZM2f)u@@-tq}_A#i2_khWF2SUQ1r4o8;Lqw_3ioVdw8C}}} zjf3L@__>Gv0RCb2|4DeT>Pm$A8`$0Hw}6$EXN#=N(>P5zuVPW1uUIp+?%4Xsr4NIA z_>TwqU$7jN9=s(Y-6FW9tg(PDm*knbFV6i+CuE->|Af*zr0@16DWTR|q*M4J0(({* zwrg8$9I3P+dz8r=iJbRb`;B;6?#)2F{*l~@RqzgGQ5>h)oW@z2(=_23WmyF@iV6V$ ziAbvGeXz%(5Aoso%rE4UWN}iI3q~`sz+9?Q&;n+HvRRr&vsqRx64vL^6LUz0cy#b^ zuzP%%0iv|)djPw@1JW}77U?COd`imB5pRNZbT0)OI8E5SmV(&Mv_@JCwB3M0oE;e5 zfc E0OFT0f&c&j literal 0 HcmV?d00001 diff --git a/winmanifest/winmanifest_windows_amd64.syso b/winmanifest/winmanifest_windows_amd64.syso new file mode 100755 index 0000000000000000000000000000000000000000..64cfedd1a4cb4cfe17246d6c2985f1ce7b348f61 GIT binary patch literal 1956 zcmb_d&5qkP5Y{3=i~0$AWOOV-TmP1~-c1$>(kzNL1-eb!BSnsEA`&T()Vf9ypogNz zK2zVQuh5}nuWhubfgl4&qJ}fW;rGpu;*X2K%b%YH!8m#xOpP^s(2lRyIJd;%@A&oN z?VbnGUw(X$i{Nwo!RNPw&W|nz`{+OPpFIwO*J$w*K7W7WZAV!?`=xEjJs2ysx(efI z6cSKe3#nFD;SYDOXc-dgm=dhf3a-K}*zno)WXY_BwraKn{gu56d!sHbUqj0*Z6!C_ z>e^AR+e>EK>3tlMmMK|-b#IRsJBoBGKso8Q6M}M_(KN!W25o0F2Wz#tF?=l@aMv5m z>5Fkzu@-+`=(b~O`z`)VzcX6&+zsQOb#HFEu92KM-0SG#wjH``q)L-;GQ(s9SZ-wJ zEv~%>VFwp-G)dNAV7i*~h3F-y_D_oY9RP z(bzjafM0m%_u%hm|DS{htG+_0zlQCdeg{}tMZU52_gtDdb6T>3D` zhyQqx{{_oI>A_nf(j9_Z$p#DPd`X^|`{LZKbVT+M@=qweL;7xCk_sBVK{|ymBCsdL zVf(Jr#*tbZvO}4?mB{(Pwcm)B<<1PmoA1f3xC(!TB#PrKpVK(c3Yw)nr!235Mo}pM zAQfpHy$^R-3?V)|pZS?w(mYPfYQbnO7MM$230guTC`+;|N|L-@q-@A#AZDKo@#x^; zV0ZX114L;z^Z<5&2c%>C9nwpB`IJ<>Bi;n-=w1pmaGJ1tEd{Z?>5Q}(XtM@|I6E-9 z1B1+}71>C)CK?;*A)I|mF!rGL{q>b5rpF_s1tOh=rv8#x0Kyup$=bQjUe0DK4ANIq zEP&Zc`>MmwOj_H6oyGGq%?E@|w)cVDmuIlfSW+h?q%=>f16*xQT+U4w|x$$h6?XRlq$z-?#{mu92 literal 0 HcmV?d00001