Can anyone point me to some resources on how to ad...
# kotlin-native
p
Can anyone point me to some resources on how to add an icon to your windows executable?
j
Would like to do the same sooner or later.. Any success? @Patrick?
p
Where exactly do the windows-resources have to be added?
d
Try src/main/resources/resources.rc
p
Thanks, but where do the gradle properties have to be added?
Copy code
model {
    components {
        main(NativeLibrarySpec) {
            sources {
                rc {
                    source {
                        srcDirs "src/main/rc"
                        include "**/*.rc"
                    }
                    exportedHeaders {
                        srcDirs "src/main/include"
                    }
                }
            }
        }
    }
}
I'm not sure where in the structure to add this
d
What gradle properties?
You mean the version number?
Use the process resources task, supplying a token
p
Do I not have to add the location of the .rc file to gradle? I thought that's what the link is about.
d
Then use
@token-name@
in the rc file
p
What's the process resources task?
Sorry, I'm new to gradle
d
You already have a file glob matching the rc file in the build config
p
Copy code
kotlin {
mingwX64("windows") {

    binaries {

        executable {
            entryPoint("main")
        }
}
d
Google it, documentation can explain it better than I
p
This is the gradle configuration. I couldn't figure out what to do reading the documentation.
I have to tell gradle where my resource files are, right?
But I'm not sure how
d
Interop with kotlin binaries may not be supported. You may be able to do it with linker arguments for the linking task
p
Does that mean I should use command line options to link it after the compile step?
d
it's something I'd suggest looking into.