mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-06 00:16:45 +08:00
Use "correct" registry when enabling Windows 10 Developer Mode
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>
This commit is contained in:
committed by
Frederik Gladhorn
parent
1c7ba877cc
commit
e33ef922ba
@@ -2,4 +2,15 @@
|
||||
#
|
||||
# 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
|
||||
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /V AllowDevelopmentWithoutDevLicense /T REG_DWORD /D 1 /F
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user