mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-24 16:05:36 +08:00
As coin is running a 32 bit application the registry key ended up in the Wow6432Node compatibility area of the registry when run on a 64 bit Windows. Windows does not use this place to check for the developer mode setting, so we use the "proper" registry instead. If adding the registry key fails the script now reflects that and exits with a proper exit code. Change-Id: Ifd6bc7e7b0ed6595a2a967597ab45053cb51e7aa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
17 lines
572 B
PowerShell
17 lines
572 B
PowerShell
# Turning on developer mode.
|
|
#
|
|
# In order to run auto tests for UWP, we have to enable developer mode on Windows 10 machines.
|
|
# https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development
|
|
|
|
if ([environment]::Is64BitOperatingSystem) {
|
|
$bitness = "/reg:64"
|
|
} else {
|
|
$bitness = "/reg:32"
|
|
}
|
|
|
|
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /V AllowDevelopmentWithoutDevLicense /T REG_DWORD /D 1 /F $bitness
|
|
if ($LastExitCode -ne 0) {
|
|
Write-Host "Could not enable Developer Mode."
|
|
exit 1
|
|
}
|