Skip to content

Commit 17ac451

Browse files
committed
select logo with branch tag, so testers know what they are running.
1 parent 006652e commit 17ac451

File tree

7 files changed

+32
-2
lines changed

7 files changed

+32
-2
lines changed

Diff for: Code/immersive_launcher/TargetConfig.h

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ struct TargetConfig
1818

1919
// clang-format off
2020

21+
#include <BranchInfo.h>
22+
23+
2124
#if (1)
2225
#define IS_SKYRIM_TYPE
2326
static const TargetConfig CurrentTarget{

Diff for: Code/immersive_launcher/loader/PathRerouting.cpp

Whitespace-only changes.

Diff for: Code/immersive_launcher/loader/PathRerouting.h

Whitespace-only changes.

Diff for: Code/immersive_launcher/resources/launcher.rc

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "winuser.h"
22
#include "BuildInfo.h"
3+
#include "BranchInfo.h"
34

45
VS_VERSION_INFO VERSIONINFO
56
FILEFLAGSMASK 0x17L
@@ -30,4 +31,13 @@ BEGIN
3031
END
3132

3233
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "launcher.manifest"
33-
102 ICON "launcher.ico"
34+
35+
#if (IS_MASTER)
36+
102 ICON "st_logo.ico"
37+
#elif (IS_BRANCH_BETA)
38+
102 ICON "st_logo_beta.ico"
39+
#elif (IS_BRANCH_PREREL)
40+
102 ICON "st_logo_pre.ico"
41+
#else
42+
102 ICON "st_logo_dev.ico"
43+
#endif

Diff for: Code/immersive_launcher/xmake.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ target("ImmersiveLauncher")
2222
"**.cpp",
2323
"resources/launcher.rc")
2424
add_defines(
25-
"TARGET_Fallout",
25+
"TARGET_Fallout"
2626
)
2727
add_deps(
2828
"TiltedReverse",
File renamed without changes.

Diff for: xmake.lua

+17
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ add_rules("plugin.vsxmake.autoupdate")
1515

1616
add_requires("entt", "recastnavigation")
1717

18+
-- fuck the xmake ecosystem.
19+
before_build(function (target)
20+
import("modules.version")
21+
local branch, commitHash = version()
22+
bool_to_number={ [true]=1, [false]=0 }
23+
local contents = string.format([[
24+
#pragma once
25+
#define IS_MASTER %d
26+
#define IS_BRANCH_BETA %d
27+
#define IS_BRANCH_PREREL %d
28+
]],
29+
bool_to_number[branch == "master"],
30+
bool_to_number[branch == "bluedove"],
31+
bool_to_number[branch == "prerel"])
32+
io.writefile("build/BranchInfo.h", contents)
33+
end)
34+
1835
if is_mode("debug") then
1936
add_defines("DEBUG")
2037
end

0 commit comments

Comments
 (0)