diff --git a/src/local-build.ps1 b/src/local-build.ps1 index ecae38cbfa..a0a275c56b 100644 --- a/src/local-build.ps1 +++ b/src/local-build.ps1 @@ -10,7 +10,7 @@ param ( $removals | % { Set-Variable -Name "remove$_" -Value $true } -# Function to convert paths for convienience, needed for Linux/macOS +# Convert paths for convienience, needed for Linux/macOS function Seperator { return $args -replace '\\', "$([IO.Path]::DirectorySeparatorChar)" } @@ -101,7 +101,7 @@ while ($true) { Get-Content -Wait -LiteralPath $a -EA 0 | Write-Output; Start-Sl Set-Content -Path $tempCustomYmlPath -Value $newCustomYml } else { - Write-Error "Can't find "$customYmlPath", not adding live log." + Write-Error "Can't find '$customYmlPath', not adding live log." } } @@ -120,10 +120,37 @@ while ($true) { Get-Content -Wait -LiteralPath $a -EA 0 | Write-Output; Start-Sl Set-Content -Path $tempStartYmlPath -Value $newStartYml } else { - Write-Error "Can't find "$startYmlPath", not removing dependencies." + Write-Error "Can't find '$startYmlPath', not removing dependencies." } } + $oemYmlPath = Seperator "Configuration\tweaks\misc\config-oem-information.yml" + $tempOemYmlPath = Seperator "$playbookTemp\$oemYmlPath" + if (Test-Path $oemYmlPath -PathType Leaf) { + $confXml = ([xml](Get-Content "playbook.conf" -Raw -EA 0)).Playbook + $version = "v$($confXml.Version)" + if ($version -like '*.*.*') { + if ($confXml.Title | Select-String '(dev)' -Quiet) { + $version = $version + ' (dev)' + } + + $oemToReplace = 'AtlasVersionUndefined' + $oemYml = Get-Content -Path $oemYmlPath -Raw + $tempOemYml = $oemYml -replace $oemToReplace, $version + + if ($tempOemYml -eq $oemYml) { + Write-Error "Couldn't find OEM string '$oemToReplace'." + } else { + New-Item (Split-Path $tempOemYmlPath) -ItemType Directory -Force | Out-Null + Set-Content -Path $tempOemYmlPath -Value $tempOemYml + } + } else { + Write-Error "Can't XML in 'playbook.conf', not setting OEM version." + } + } else { + Write-Error "Can't find '$oemYmlPath', not setting OEM version." + } + # exclude files $excludeFiles = @( "local-build.*", diff --git a/src/playbook/Configuration/tweaks/misc/config-oem-information.yml b/src/playbook/Configuration/tweaks/misc/config-oem-information.yml index 33f4f03322..3652620cd9 100644 --- a/src/playbook/Configuration/tweaks/misc/config-oem-information.yml +++ b/src/playbook/Configuration/tweaks/misc/config-oem-information.yml @@ -2,11 +2,20 @@ title: Configure OEM Information description: Configures OEM information to contain the Atlas version and the Atlas Discord server actions: - - !registryValue: - path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation' - value: 'Model' - data: 'AtlasOS v0.5.0 (dev)' - type: REG_SZ + - !powerShell: + command: | + $version = 'AtlasVersionUndefined' + + Write-Output 'Setting boot entry name...' + bcdedit /set description """AtlasOS $(('10', '11')[[int]([System.Environment]::OSVersion.Version.Build -ge 22000)]) $version""" + + Write-Output 'Setting other versioned OEM information...' + $reportedVer = """Atlas Playbook $version""" + # Shows in Settings + Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation' -Name 'Model' -Value $reportedVer -Force + # Shows in winver + Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name 'RegisteredOrganization' -Value $reportedVer -Force + wait: true - !registryValue: path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation' value: 'Manufacturer' diff --git a/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml b/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml index 0d2763f851..9c5244768a 100644 --- a/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml +++ b/src/playbook/Configuration/tweaks/performance/system/config-boot-config.yml @@ -11,13 +11,3 @@ actions: # Use legacy boot menu - !run: {exe: 'bcdedit', args: '/set {bootloadersettings} bootmenupolicy legacy'} - - # Set boot manager descriptions - - !run: - exe: 'bcdedit' - args: '/set description "AtlasOS 10"' - builds: [ '<22000' ] - - !run: - exe: 'bcdedit' - args: '/set description "AtlasOS 11"' - builds: [ '>=22000' ] diff --git a/src/release-zip/Read the Install Guide First!.url b/src/release-zip/Read the Install Guide First!.url new file mode 100644 index 0000000000..b2f0cd545e --- /dev/null +++ b/src/release-zip/Read the Install Guide First!.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://docs.atlasos.net/getting-started/installation/