mirror of
https://github.com/Metabolix/HackBGRT.git
synced 2025-12-06 17:15:42 -08:00
Add git version to setup.exe
This commit is contained in:
7
Makefile
7
Makefile
@@ -17,8 +17,11 @@ CFLAGS += '-DGIT_DESCRIBE=L"$(GIT_DESCRIBE)"'
|
||||
default: bootx64.efi
|
||||
all: bootx64.efi bootia32.efi setup.exe
|
||||
|
||||
setup.exe: src/Setup.cs
|
||||
mcs -out:$@ $^
|
||||
src/GIT_DESCRIBE.cs: src/Setup.cs $(FILES_C) $(FILES_H)
|
||||
echo 'public class GIT_DESCRIBE { public static string data = "$(GIT_DESCRIBE)"; }' > $@
|
||||
|
||||
setup.exe: src/Setup.cs src/GIT_DESCRIBE.cs
|
||||
mcs -define:GIT_DESCRIBE -out:$@ $^
|
||||
|
||||
bootx64.efi: CC_PREFIX = x86_64-w64-mingw32
|
||||
bootx64.efi: GNUEFI_ARCH = x86_64
|
||||
|
||||
@@ -364,6 +364,11 @@ public class Setup {
|
||||
* @param args The arguments.
|
||||
*/
|
||||
public static void Main(string[] args) {
|
||||
#if GIT_DESCRIBE
|
||||
Console.WriteLine("HackBGRT installer version: {0}", GIT_DESCRIBE.data);
|
||||
#else
|
||||
Console.WriteLine("HackBGRT installer version: unknown; not an official release?");
|
||||
#endif
|
||||
var self = Assembly.GetExecutingAssembly().Location;
|
||||
try {
|
||||
// Relaunch as admin, if needed.
|
||||
|
||||
Reference in New Issue
Block a user