-
Notifications
You must be signed in to change notification settings - Fork 568
Windows resources #2421
Comments
@ilmat192 Is it correct, and if yes - can it be simplified?
|
Hi! It looks ok, I have only a couple of remarks:
|
Ok, a little bit cleaner, but still ugly:
Well, questions, step by step:
|
1. We have no final task naming convention so I think the naming you use is more or less OK. But it also may make sense to include a name of the executable in the task name somehow. The binaries DSL allows creating several executables with different name prefixes: binaries {
// The default name prefix is empty,
// so we have just debugExecutable and releaseExecutable here.
// Link tasks have corresponding names, e.g. linkDebugExecutableWindows.
executable() {
windowsResources(...)
}
// An executable with a custom name prefix.
// Executable names: fooDebugExecutable, fooReleaseExecutable.
// Link tasks names: linkFooDebugExecutableWindows, linkFooReleaseExecutableWindows.
executable("foo") {
windowsResources(...)
}
} Here is a naming conflict for the windres tasks. There is no special API to get the name prefix from a binary but such a prefix may be extracted from the binary name. Also you can use the whole binary name as a part of the task name. Binaries of the same target have unique names so it provides you with unique names for windres tasks. E.g. Alternatively each compilation of any target (except If you choose this approach, note that binaries created using the binaries DSL don't use the 2. There is no final layout for output files in the build dir too. The resource copying task I mentioned above uses the following pattern: |
Resources can be different for each executable, so running windres per compilation is wrong.
Remaining problems:
|
OK, multiplatform libui artifact works.
But now yet another weird issue - when I try build windows helloword with it on clean computer (Appveyor CI) - it fails.
https://github.com/msink/hello-libui
https://ci.appveyor.com/project/msink/hello-libui/builds/20552868
So here it runs
windres
before downloading LLVM bundle, and fails.On my work computer it succeed.
Any way to fix this?
PS: I solved this for Appveyor by using
windres
from preinstalled msys2, but in general problem remains.The text was updated successfully, but these errors were encountered: