diff options
| -rw-r--r-- | dummy_windows.cpp | 2 | ||||
| -rw-r--r-- | libui_windows_386.res.o (renamed from libui_windows_386.res) | bin | 1952 -> 1952 bytes | |||
| -rw-r--r-- | link_windows_386.go | 12 | ||||
| -rw-r--r-- | link_windows_amd64.go | 4 | ||||
| -rw-r--r-- | static.manifest | 32 | ||||
| -rw-r--r-- | static.rc | 3 | ||||
| -rw-r--r-- | static_windows_386.o | bin | 0 -> 1308 bytes | |||
| -rw-r--r-- | static_windows_amd64.o | bin | 0 -> 1308 bytes |
8 files changed, 51 insertions, 2 deletions
diff --git a/dummy_windows.cpp b/dummy_windows.cpp new file mode 100644 index 0000000..a338f7f --- /dev/null +++ b/dummy_windows.cpp @@ -0,0 +1,2 @@ +// 5 june 2016 +// This file is only present to force cgo to use the C++ linker instead of the C linker on Windows. diff --git a/libui_windows_386.res b/libui_windows_386.res.o Binary files differindex 4b03f64..4b03f64 100644 --- a/libui_windows_386.res +++ b/libui_windows_386.res.o diff --git a/link_windows_386.go b/link_windows_386.go new file mode 100644 index 0000000..3ea6183 --- /dev/null +++ b/link_windows_386.go @@ -0,0 +1,12 @@ +// 13 december 2015 + +package ui + +// #cgo LDFLAGS: ${SRCDIR}/static_windows_386.o ${SRCDIR}/libui_windows_386.a ${SRCDIR}/libui_windows_386.res.o +// /* note the order; also note the lack of uuid */ +// #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++ +import "C" + +func ensureMainThread() { + // do nothing; Windows doesn't care which thread we're on so long as we don't change it after starting +} diff --git a/link_windows_amd64.go b/link_windows_amd64.go index 7a9c08d..1992ae7 100644 --- a/link_windows_amd64.go +++ b/link_windows_amd64.go @@ -2,9 +2,9 @@ package ui -// #cgo LDFLAGS: ${SRCDIR}/libui_windows_amd64.lib ${SRCDIR}/libui_windows_amd64.res.o +// #cgo LDFLAGS: ${SRCDIR}/static_windows_amd64.o ${SRCDIR}/libui_windows_amd64.a ${SRCDIR}/libui_windows_amd64.res.o // /* note the order; also note the lack of uuid */ -// #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -lmsvcrt +// #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++ import "C" func ensureMainThread() { diff --git a/static.manifest b/static.manifest new file mode 100644 index 0000000..d8e83a8 --- /dev/null +++ b/static.manifest @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<assemblyIdentity + version="1.0.0.0" + processorArchitecture="*" + name="CompanyName.ProductName.YourApplication" + type="win32" +/> +<description>Your application description here.</description> +<!-- we DO need comctl6 in the static case --> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!--The ID below indicates application support for Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!--The ID below indicates application support for Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + </application> +</compatibility> +</assembly> + diff --git a/static.rc b/static.rc new file mode 100644 index 0000000..ca23375 --- /dev/null +++ b/static.rc @@ -0,0 +1,3 @@ +/* 5 june 2016 */ +#pragma code_page(65001) +1 24 "static.manifest" diff --git a/static_windows_386.o b/static_windows_386.o Binary files differnew file mode 100644 index 0000000..46c6ccc --- /dev/null +++ b/static_windows_386.o diff --git a/static_windows_amd64.o b/static_windows_amd64.o Binary files differnew file mode 100644 index 0000000..eb56b3b --- /dev/null +++ b/static_windows_amd64.o |
