Paul Duffin | 512ba8f | 2020-05-06 12:55:46 +0000 | [diff] [blame] | 1 | apply plugin: 'c' |
| 2 | apply plugin: 'sdk-files' |
| 3 | apply plugin: 'windows-setup' |
| 4 | |
| 5 | executables { |
| 6 | sdkLauncher {} |
| 7 | } |
| 8 | |
| 9 | sources { |
| 10 | sdkLauncher { |
| 11 | c { |
| 12 | source { |
| 13 | srcDir "src/source" |
| 14 | include "**/*.c" |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | sdk { |
| 21 | windows { |
| 22 | item( { getExeName("windows32SdkLauncherExecutable") } ) { |
| 23 | into 'lib' |
| 24 | name 'SDK Manager.exe' |
| 25 | builtBy 'windows32SdkLauncherExecutable' |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | def getExeName(String name) { |
| 31 | // binaries will return a set of binaries |
| 32 | def binaries = executables.sdkLauncher.binaries.matching { it.name == name } |
| 33 | // calling .exeFile on the set returns an array with the result from each item in the set... |
| 34 | return binaries.executableFile.get(0) |
| 35 | } |
| 36 | |