Skip to content

Commit dda98a2

Browse files
authored
Merge pull request #543 from arduino/manifest
Create manifest for windows and add instructions
2 parents 98bc4c8 + 5b34d40 commit dda98a2

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
bufferflow_tinyg_old.md
33

4-
arduino-create-agent
4+
arduino-create-agent*
5+
rsrc.syso
56

67
snapshot/*
78
public/

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,36 @@ Other prerequisites are:
414414
* libappindicator (Linux only on Ubuntu `sudo apt-get install libappindicator1 libappindicator3-0.1-cil libappindicator3-0.1-cil-dev libappindicator3-1 libappindicator3-dev libgtk-3-0 libgtk-3-dev`)
415415
* [go-selfupdate] (https://github.com/sanbornm/go-selfupdate) if you want to test automatic updates
416416

417+
### Windows
418+
Since we are using the https://github.com/lxn/walk library, we need to ship a manifest.xml file, otherwise the error would be:
419+
420+
```
421+
panic: Unable to create main window: TTM_ADDTOOL failed
422+
```
423+
424+
To do it make sure to install the required tool:
425+
426+
```
427+
$ go get github.com/akavel/rsrc
428+
```
429+
430+
and build it with
431+
432+
```
433+
$ rsrc -arch=386 -manifest=manifest.xml
434+
$ go build
435+
```
436+
437+
Keep in mind that the presence of rsrc.syso file will break other builds, for example
438+
439+
```
440+
$ GOOS=linux go build
441+
# github.com/arduino/arduino-create-agent
442+
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
443+
/usr/sbin/ld: i386 architecture of input file `/tmp/go-link-084341451/000000.o' is incompatible with i386:x86-64 output
444+
collect2: error: ld returned 1 exit status
445+
```
446+
417447
## Submitting an issue
418448

419449
Please attach the output of the commands running at the debug console if useful.

manifest.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="Arduino Create Agent" type="win32"/>
4+
<dependency>
5+
<dependentAssembly>
6+
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
7+
</dependentAssembly>
8+
</dependency>
9+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
10+
<windowsSettings>
11+
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
12+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True</dpiAware>
13+
</windowsSettings>
14+
</application>
15+
</assembly>

0 commit comments

Comments
 (0)