Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon is not assigned #39

Open
hasanAjsf opened this issue Jul 30, 2021 · 2 comments
Open

Icon is not assigned #39

hasanAjsf opened this issue Jul 30, 2021 · 2 comments

Comments

@hasanAjsf
Copy link

I'm at Windows 11, and have the below:

  1. app.ico
  2. app.exe.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <assemblyIdentity
        type="win32"
        name="myApp"
        version="1.0.0.0"
        processorArchitecture="*"
    />
    <description>Contoso Example Application</description>
    <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings>
	        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True</dpiAware>
        </windowsSettings>
    </application>
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
            <!-- Windows 10 -->
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>s
        </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>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity type="win64" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
        </dependentAssembly>
    </dependency>
</assembly>
  1. release.bat
rsrc -manifest app.exe.manifest -ico=app.ico -o rsrc.syso
go build -ldflags="-H windowsgui" readpdf.go

Upon running the release.bat file, the output file had been generated as readpdf.exe not as mentioned in the manifest file, and does not have the required icon?

@akavel
Copy link
Owner

akavel commented Aug 13, 2021

Thanks for reporting!

  1. By chance, do you know if there's some way I can test stuff on Windows 11 without upgrading my only machine that has Windows 10 installed? I only learnt about Win 11 even existing from this issue you reported, I'm apparently quite out of the loop 😅
  2. Not sure what do you mean by "not as mentioned in the manifest file"? Could I kindly ask you to try and explain it to me more simply, assuming I don't really know anything about manifest files (...which is true...)?

@lostsource
Copy link

  1. release.bat
rsrc -manifest app.exe.manifest -ico=app.ico -o rsrc.syso
go build -ldflags="-H windowsgui" readpdf.go

I had a similar issue and fixed it by running go build -ldflags="-H windowsgui" without the readpdf.go entry point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants