I need my built app to support dark mode on Mac, but not on Windows. I have an IDE script that builds for OSX64, Win32, and Win64. I am trying to insert steps to turn App.SupportsDarkMode on and off, but the scripting documentation has no examples of how to set a boolean property.
Here’s my script, it fails at PropertyValue(App.SupportsDarkMode)=“True”. What is the correct syntax for this?
// Build all target platforms
// for a desktop app
Const kOSX32 = 7
Const kOSX64 = 16
Const kWin32 = 3
Const kWin64 = 19
Const kLin32 = 4
Const kLin64 = 17
Const kLinARM = 18
Dim path As String
path = BuildApp(kOSX64)
path = BuildApp(kWin32)
path = BuildApp(kWin64)
Dim result As String
result = ShowDialog(“Build All”, _
“Finished building.”, _
“OK”, “”, “”, -1)
I’m not certain on the build scripting, but currently Supports Dark Mode only affects Mac.
You’re right (of course!), but I’m still curious as to what the correct syntax should be for setting boolean properties.
I did a quick test just for you and had success with this:
PropertyValue("App.SupportsDarkMode") = "False"
Of course, that was the one combination of quotes, etc. that I didn’t try. It would sure be helpful if the documentation actually documented this…
Interestingly, the script now works - except…
If the IDE is set to build Win64 bit before running the script, then the script doesn’t make the Win32 version (though it makes the folder for it). It does build the Win64.
OTOH, If the IDE is set to 32 bit in the IDE, then the script correctly builds both Win32 and Win64 bit.
So although I’m working in 64 bit while debugging, I have to remember to go back to 32 bit before doing a scripted build…