Skip to content

Commit

Permalink
README: suggest rsrc tool for manifest embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
akavel committed Dec 9, 2013
1 parent f2100e7 commit 0e7cd5a
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,7 @@ func main() {
}
```

##### Build app

In the directory containing `test.go` run

go build

To get rid of the cmd window, instead run

go build -ldflags="-H windowsgui"

##### Create Manifest `test.exe.manifest`
##### Create Manifest `test.manifest`

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Expand All @@ -83,6 +73,23 @@ To get rid of the cmd window, instead run
</assembly>
```

Then either compile the manifest using the [rsrc tool](https://github.com/akavel/rsrc), like this:

go get github.com/akavel/rsrc
rsrc -manifest test.manifest -o rsrc.syso

or rename the `test.manifest` file to `test.exe.manifest` and distribute it with the application instead.

##### Build app

In the directory containing `test.go` run

go build

To get rid of the cmd window, instead run

go build -ldflags="-H windowsgui"

##### Run app

test.exe
Expand All @@ -102,7 +109,10 @@ resource.

You can copy one of the application manifest files that come with the examples.

IMPORTANT: Do not launch your executable before the manifest file is in place.
To embed a manifest file as a resource, you can use the [rsrc tool](https://github.com/akavel/rsrc).

IMPORTANT: If you don't embed a manifest as a resource, then you should not launch
your executable before the manifest file is in place.
If you do anyway, the program will not run properly. And worse, Windows will not
recognize a manifest file, you later drop next to the executable. To fix this,
rebuild your executable and only launch it with a manifest file in place.

0 comments on commit 0e7cd5a

Please sign in to comment.