akavel / rsrc

Tool for embedding .ico & manifest resources in Go programs for Windows.
MIT License
1.22k stars 122 forks source link

Example? #1

Open shivakumargn opened 10 years ago

shivakumargn commented 10 years ago

Having a "hello world" application using a manifest would be helpful.

akavel commented 10 years ago

Thanks for the suggestion! Could you help me with that a bit? Being the creator of the project, I don't have good external perspective, so I don't see well how to best structure such an example, so I'd really love if you could possibly tell me a bit more how you would see it?

For example, if I copied the files from github.com/lxn/walk/examples/actions and stripped the *.go file to some GUI helloworld, as you mention, would it be what you meant? I'm thinking of a following directory structure added then:

example/helloworld.go
example/rsrc.manifest
example/rsrc.syso

What do you think?

treeform commented 10 years ago

Can you add an example of embedding a single icon file into a single go file? Does that require a manifest file or not?

tgulacsi commented 10 years ago

Hi, I'd like to see an example for a simple .zip inclusion - how do I use the included .zip in my program?

Tanz0rz commented 8 years ago

Super late here, but I would love an example too. Just one with the most basic of everything + the commands

elibroftw commented 11 months ago

Manifest Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity type="win32" name="updater" processorArchitecture="x86" version="1.0.0.0"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" language="*" processorArchitecture="*" version="6.0.0.0" publicKeyToken="6595b64144ccf1df"/>
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"/>
    </dependentAssembly>
  </dependency>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
      <!-- Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <!-- Windows 8 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
      <!-- Windows 8.1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      <!-- Windows 10 -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
    </application>
  </compatibility>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <!--
                  UAC settings:
                  - app should run at same integrity level as calling process
                  - app does not need to manipulate windows belonging to higher-integrity-level processes
                  -->
                <requestedExecutionLevel level="asInvoker" uiAccess="false"
                />
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>