Skip to content

Commit

Permalink
Merge branch 'main' into na-upgradability
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jul 18, 2024
2 parents ab4d13b + ec69b38 commit ac2a9f3
Show file tree
Hide file tree
Showing 85 changed files with 885 additions and 340 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# perform crlf normalization on batch and cmd files
*.bat eol=crlf
*.cmd eol=crlf
*.cmd eol=crlf
*.sh eol=lf
11 changes: 7 additions & 4 deletions .github/workflows/apbx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create and Validate Atlas Playbook
on:
push:
paths:
- "src/playbook/**"
- "src/**"
- "**/*.yaml"
- "**/*.yml"

Expand Down Expand Up @@ -69,6 +69,9 @@ jobs:
Write-Output "Installing dependencies..."
pip install -r requirements.txt | Out-Null
Write-Output "Making certificate..."
$thumbprint = .\make-cert.ps1
$atlasSrcPath = '..\Atlas\src\'
$packagePath = "$atlasSrcPath\playbook\Executables\AtlasModules\Packages"
mkdir $packagePath -EA 0 | Out-Null
Expand All @@ -84,18 +87,18 @@ jobs:
Write-Output "Generating package files..."
python sxsc.py
if ($LASTEXITCODE -ne 0) { exit 1 }
if ($LASTEXITCODE -ne 0) { throw "sxsc.py didn't return 0!" }
Write-Output "Building package..."
.\build.bat
.\start-build.ps1 -Thumbprint $thumbprint
Write-Output "Copying package to AtlasModules..."
Get-ChildItem -File -Recurse -Filter *.cab | ForEach-Object {
Copy-Item -Path $_.FullName -Destination $packagePath -Force
}
Write-Output "Cleaning up..."
.\clean.bat
.\clean.ps1
}
working-directory: ..\sxsc
if: env.runSxsc == 'true'
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ Although the GUI is not open source for AME Wizard, AME Wizard's entire backend
As Atlas doesn't redistribute a modified Windows ISO, it complies with [Windows's Usage Terms](https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/UseTerms_Retail_Windows_10_English.htm). In addition, Atlas does not alter activation in Windows.

## 🎨 Brand kit
Want to create your own Atlas wallpaper with some original creative designs? Download our brand kit [here](https://github.com/Atlas-OS/branding/archive/refs/heads/main.zip) and share your creations on our [forum](https://forum.atlasos.net/t/art-showcase).
Want to create your own Atlas wallpaper with some original creative designs? Visit our [Branding Kit on Docs](https://docs.atlasos.net/branding/) and share your creations on our [forum](https://forum.atlasos.net/t/art-showcase)!

## 💙 Contributors
<a href="https://github.com/Atlas-OS/Atlas/graphs/contributors" target="_blank"><img src="https://contrib.rocks/image?repo=Atlas-OS/Atlas&columns=18" alt="Avatars of all contributors"></a>
40 changes: 27 additions & 13 deletions src/local-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ param (

$removals | % { Set-Variable -Name "remove$_" -Value $true }

# Function to convert paths for convienience, needed for Linux/macOS
function Seperator {
return $args -replace '\\', "$([IO.Path]::DirectorySeparatorChar)"
}

# check 7z
if (Get-Command '7z' -EA 0) {
$7zPath = '7z'
Expand Down Expand Up @@ -42,7 +47,7 @@ function GetNewName {
}
if ($replaceOldPlaybook -and (Test-Path -Path $apbxFileName)) {
try {
$stream = [System.IO.File]::Open("$PWD\$apbxFileName", 'Open', 'Read', 'Write')
$stream = [System.IO.File]::Open($(Seperator "$PWD\$apbxFileName"), 'Open', 'Read', 'Write')
$stream.Close()
Remove-Item -Path $apbxFileName -Force -EA 0
} catch {
Expand All @@ -52,12 +57,12 @@ if ($replaceOldPlaybook -and (Test-Path -Path $apbxFileName)) {
} elseif (Test-Path -Path $apbxFileName) {
GetNewName
}
$apbxPath = "$PWD\$apbxFileName"
$apbxPath = Seperator "$PWD\$apbxFileName"

# make temp directories
$rootTemp = New-Item (Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $([System.Guid]::NewGuid())) -ItemType Directory -Force
if (!(Test-Path -Path "$rootTemp")) { throw "Failed to create temporary directory!" }
$playbookTemp = New-Item "$rootTemp\playbook" -Type Directory
$playbookTemp = New-Item $(Seperator "$rootTemp\playbook") -Type Directory

try {
# remove entries in playbook config that make it awkward for testing
Expand All @@ -68,13 +73,13 @@ try {
if ($removeWinverRequirement) {$patterns += "<string>", "</SupportedBuilds>", "<SupportedBuilds>"}
if ($removeVerification) {$patterns += "<ProductCode>"}

$tempPbConfPath = "$playbookTemp\playbook.conf"
$tempPbConfPath = Seperator "$playbookTemp\playbook.conf"
if ($patterns.Count -gt 0) {
Get-Content "playbook.conf" | Where-Object { $_ -notmatch ($patterns -join '|') } | Set-Content $tempPbConfPath
}

$customYmlPath = "Configuration\custom.yml"
$tempCustomYmlPath = "$playbookTemp\$customYmlPath"
$customYmlPath = Seperator "Configuration\custom.yml"
$tempCustomYmlPath = Seperator "$playbookTemp\$customYmlPath"
if ($AddLiveLog) {
if (Test-Path $customYmlPath -PathType Leaf) {
New-Item (Split-Path $tempCustomYmlPath -Parent) -ItemType Directory -Force | Out-Null
Expand All @@ -100,8 +105,8 @@ while ($true) { Get-Content -Wait -LiteralPath $a -EA 0 | Write-Output; Start-Sl
}
}

$startYmlPath = "Configuration\atlas\start.yml"
$tempStartYmlPath = "$playbookTemp\$startYmlPath"
$startYmlPath = Seperator "Configuration\atlas\start.yml"
$tempStartYmlPath = Seperator "$playbookTemp\$startYmlPath"
if ($removeDependencies) {
if (Test-Path $startYmlPath -PathType Leaf) {
New-Item (Split-Path $tempStartYmlPath -Parent) -ItemType Directory -Force | Out-Null
Expand All @@ -121,27 +126,36 @@ while ($true) { Get-Content -Wait -LiteralPath $a -EA 0 | Write-Output; Start-Sl

# exclude files
$excludeFiles = @(
"local-build.cmd",
"local-build.*",
"*.apbx"
)
if (Test-Path $tempCustomYmlPath) { $excludeFiles += "custom.yml" }
if (Test-Path $tempStartYmlPath) { $excludeFiles += "start.yml" }
if (Test-Path $tempPbConfPath) { $excludeFiles += "playbook.conf" }
$files = "$rootTemp\7zFiles.txt"
$files = Seperator "$rootTemp\7zFiles.txt"
(Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName | Resolve-Path -Relative | ForEach-Object {$_.Substring(2)} | Out-File $files -Encoding utf8

if (!$NoPassword) { $pass = '-pmalte' }
& $7zPath a -spf -y -mx1 $pass -tzip "$apbxPath" `@"$files" | Out-Null
# add edited files
if (Test-Path "$playbookTemp\*.*") {
if (Test-Path $(Seperator "$playbookTemp\*.*")) {
Push-Location "$playbookTemp"
& $7zPath u $pass "$apbxPath" * | Out-Null
Pop-Location
}

Write-Host "Built successfully! Path: `"$apbxPath`"" -ForegroundColor Green
if (!$IsLinux -and !$IsMacOS -and !$DontOpenPbLocation) {
explorer /select,"$apbxPath"
if (!$DontOpenPbLocation) {
if ($IsLinux -or $IsMacOS) {
Write-Warning "Can't open to APBX directory as the system isn't Windows."
} else {
# Kill old instances
# Would use SetForegroundWindow but it doesn't always work, so opening a new window is most reliable :/
$openWindows = ((New-Object -Com Shell.Application).Windows() | Where-Object { $_.Document.Folder.Self.Path -eq "$(Split-Path -Path $apbxPath)" })
if ($openWindows.Count -ne 0) { $openWindows.Quit() }

explorer /select,"$apbxPath"
}
}
} finally {
Remove-Item $rootTemp -Force -EA 0 -Recurse | Out-Null
Expand Down
15 changes: 12 additions & 3 deletions src/playbook/Configuration/atlas/appx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,33 @@ actions:
wait: true

# AppX Microsoft Teams
# Seems legacy - not in 23H2?
# Seems legacy - not in 23H2
- !taskKill: {name: 'msteams*', ignoreErrors: true}
- !appx: {name: 'MicrosoftTeams*', type: family}
- !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications', value: 'ConfigureChatAutoInstall', data: '0', type: REG_DWORD}

# New AppX Teams in 24H2
- !taskKill: {name: 'ms-teams*', ignoreErrors: true}
- !appx: {name: 'MSTeams*', type: family}
# 24H2 Copilot app
- !appx: {name: 'Microsoft.Copilot*', type: family}

# Other apps
- !appx: {name: 'Clipchamp.Clipchamp*', type: family}
- !appx: {name: 'Disney.37853FC22B2CE*', type: family}
- !appx: {name: 'SpotifyAB.SpotifyMusic*', type: family}
- !appx: {name: 'Microsoft.549981C3F5F10*', type: family} # Cortana
- !appx: {name: 'Microsoft.XboxApp*', type: family} # Legacy Xbox Console Companion
- !appx: {name: 'Microsoft.XboxApp*', type: family} # Xbox Console Companion (deprecated)
- !appx: {name: 'microsoft.windowscommunicationsapps*', type: family} # Mail and Calendar
- !appx: {name: 'Microsoft.MSPaint*', type: family} # Paint 3D
- !appx: {name: 'Microsoft.Getstarted*', type: family} # Tips
- !appx: {name: 'Microsoft.Getstarted*', type: family} # Tips (deprecated)
- !appx: {name: 'Microsoft.ZuneVideo*', type: family} # Films & TV
- !appx: {name: 'MicrosoftCorporationII.MicrosoftFamily*', type: family}
- !appx: {name: 'Microsoft.MixedReality.Portal*', type: family}
- !appx: {name: 'Microsoft.Windows.DevHome*', type: family}
- !appx: {name: 'Microsoft.BingWeather*', type: family}
- !appx: {name: 'Microsoft.BingNews*', type: family}
- !appx: {name: 'Microsoft.BingSearch*', type: family}
- !appx: {name: 'Microsoft.OutlookForWindows*', type: family}
- !appx: {name: 'Microsoft.GetHelp*', type: family}
- !appx: {name: 'Microsoft.Microsoft3DViewer*', type: family}
Expand Down Expand Up @@ -79,6 +87,7 @@ actions:
wait: true

# Clear caches of Client.CBS and more
# Start menu cache is cleared later
- !writeStatus: {status: 'Clearing AppX caches'}
- !appx: {operation: clearCache, name: '*MicrosoftWindows.Client.CBS*'}
- !appx: {operation: clearCache, name: '*Microsoft.Windows.Search*'}
Expand Down
2 changes: 0 additions & 2 deletions src/playbook/Configuration/atlas/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ actions:
)
-NoInteraction
option: 'defender-disable'
runas: currentUserElevated
wait: true
exeDir: true
- !powerShell:
Expand All @@ -52,6 +51,5 @@ actions:
-UninstallPackages @('*Z-Atlas-NoDefender-Package*')
-NoInteraction
option: 'defender-enable'
runas: currentUserElevated
wait: true
exeDir: true
15 changes: 12 additions & 3 deletions src/playbook/Configuration/atlas/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,29 @@ actions:
exeDir: true
wait: true

- !writeStatus: {status: 'Disabling Location'}
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Location\Disable Location (default).cmd" /silent'
exeDir: true
wait: true

- !writeStatus: {status: 'Configuring Indexing'}
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Search Indexing\Minimal Search Indexing (default).cmd" /silent'
exeDir: true
wait: true

##############################################################################################
## SERVICES ##
##############################################################################################

- !writeStatus: {status: 'Configuring services'}

# ------ Microsoft recommendation - 'OK to disable' ------
- !service: {name: 'lfsvc', operation: change, startup: 4}
- !service: {name: 'MapsBroker', operation: change, startup: 4}
- !service: {name: 'OneSyncSvc', operation: change, startup: 4}
- !service: {name: 'TrkWks', operation: change, startup: 4}
- !service: {name: 'PcaSvc', operation: change, startup: 4}
- !service: {name: 'DiagTrack', operation: change, startup: 4}
- !service: {name: 'WSearch', operation: change, startup: 4}

# ------ Microsoft recommendation - 'Do not disable' -----
- !service: {name: 'diagnosticshub.standardcollector.service', operation: change, startup: 4}
Expand Down
3 changes: 3 additions & 0 deletions src/playbook/Configuration/atlas/start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ actions:
- !writeStatus: {status: 'Disabling Steps Recorder'}
- !run: {exe: 'DISM.exe', args: '/Online /Remove-Capability /CapabilityName:"App.StepsRecorder~~~~0.0.1.0" /NoRestart', weight: 30}

- !writeStatus: {status: 'Cleaning the component store'}
- !run: {exe: 'DISM.exe', args: '/Online /Cleanup-Image /StartComponentCleanup', weight: 50}

# Initial software
# 7-Zip, Visual C++ Runtimes, DirectX
- !writeStatus: {status: 'Installing utilities'}
Expand Down
14 changes: 11 additions & 3 deletions src/playbook/Configuration/tweaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ actions:
- !task: {path: 'tweaks\performance\disable-background-apps.yml'}
- !task: {path: 'tweaks\performance\disable-fth.yml'}
- !task: {path: 'tweaks\performance\disable-sleep-study.yml'}
- !task: {path: 'tweaks\performance\respect-power-modes-search.yml'}


# -------------------------------------------------------------------------- #
Expand Down Expand Up @@ -83,12 +84,12 @@ actions:
- !task: {path: 'tweaks\privacy\disable-activity-feed.yml'}
- !task: {path: 'tweaks\privacy\disable-app-launch-tracking.yml'}
- !task: {path: 'tweaks\privacy\disable-experimentation.yml'}
- !task: {path: 'tweaks\privacy\disable-location-tracking.yml'}
- !task: {path: 'tweaks\privacy\disable-lockscreen-camera.yml'}
- !task: {path: 'tweaks\privacy\disable-online-speech-recognition.yml'}
- !task: {path: 'tweaks\privacy\disable-pca.yml'}
- !task: {path: 'tweaks\privacy\disable-perf-track.yml'}
- !task: {path: 'tweaks\privacy\disable-privacy-experience.yml'}
- !task: {path: 'tweaks\privacy\disable-recall-snap.yml'}
- !task: {path: 'tweaks\privacy\disable-device-monitoring.yml'}
- !task: {path: 'tweaks\privacy\disable-rsop-logging.yml'}
- !task: {path: 'tweaks\privacy\disable-speech-auto-updates.yml'}
Expand All @@ -100,6 +101,12 @@ actions:
- !task: {path: 'tweaks\privacy\disallow-user-activity-upload.yml'}
- !task: {path: 'tweaks\privacy\search-settings.yml'}

# -------------------------------------------------------------------------- #
# privacy\apps #
# -------------------------------------------------------------------------- #
- !task: {path: 'tweaks\privacy\apps\disable-nvidia-telemetry.yml'}
- !task: {path: 'tweaks\privacy\apps\disable-office-telemetry.yml'}

# -------------------------------------------------------------------------- #
# privacy\advertising #
# -------------------------------------------------------------------------- #
Expand Down Expand Up @@ -142,7 +149,6 @@ actions:
- !task: {path: 'tweaks\qol\best-wallpaper-quality.yml'}
- !task: {path: 'tweaks\qol\config-start-menu.yml'}
- !task: {path: 'tweaks\qol\config-windows-ink-workspace.yml'}
- !task: {path: 'tweaks\qol\disable-background-auto-login.yml'}
- !task: {path: 'tweaks\qol\disable-mouse-accel.yml'}
- !task: {path: 'tweaks\qol\disable-settings-tips.yml'}
- !task: {path: 'tweaks\qol\disable-spell-checking.yml'}
Expand All @@ -158,6 +164,9 @@ actions:
- !task: {path: 'tweaks\qol\visual-effects.yml'}
- !task: {path: 'tweaks\qol\disable-tips.yml'}
- !task: {path: 'tweaks\qol\disable-win11-settings-banner.yml'}
- !task: {path: 'tweaks\qol\disable-screen-capture-hotkey.yml', option: 'remove-snipping-tool'}
- !task: {path: 'tweaks\qol\disable-dynamic-lighting.yml'}
- !task: {path: 'tweaks\qol\disable-auto-app-archival.yml'}

# -------------------------------------------------------------------------- #
# qol\appearance #
Expand Down Expand Up @@ -224,7 +233,6 @@ actions:
# -------------------------------------------------------------------------- #
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\cast-to-device.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\extract-all.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\give-access-to.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\include-in-library.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\new-bitmap.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\new-rtf.yml'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ actions:
value: 'SubscribedContentEnabled'
data: '0'
type: REG_DWORD
# Ensure no settings get changed
- !registryValue:
path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager'
value: 'RemediationRequired'
data: '0'
type: REG_DWORD

# Prevent suggested app installs
# https://www.tenforums.com/tutorials/68217-turn-off-automatic-installation-suggested-apps-windows-10-a.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
title: Disable Scheduled Tasks
description: Disables scheduled tasks to prevent automatic tasks from running at startup, consuming resources and collecting user data
actions:
# "The Windows Scheduled Maintenance Task performs periodic maintenance of the
# computer system by fixing problems automatically or reporting them through Security and Maintenance."
- !scheduledTask: {path: '\Microsoft\Windows\Diagnosis\Scheduled', operation: disable}

# Updates compatibility database
- !scheduledTask: {path: '\Microsoft\Windows\Application Experience\PcaPatchDbTask', operation: disable}

# UCPD - might not exist on all installs, so ignore errors
- !scheduledTask: {path: '\Microsoft\Windows\AppxDeploymentClient\UCPD velocity', operation: disable, ignoreErrors: true}

# A/B testing usage reports
- !scheduledTask: {path: '\Microsoft\Windows\Flighting\FeatureConfig\UsageDataReporting', operation: disable, ignoreErrors: true}
- !registryValue:
path: 'HKLM\System\CurrentControlSet\Control\Ubpm'
value: 'CriticalMaintenance_UsageDataReporting' # Remove from automatic maintenance
operation: delete

# -------------------------------------------------------------------------------------
# Here are the scheduled tasks that are currently commented as they're under review.
# This list should be somewhat minimal in the tasks it deletes, as a lot of the tasks
Expand All @@ -28,6 +31,10 @@ actions:
# - !scheduledTask: {path: '\Microsoft\Windows\InstallService\ScanForUpdatesAsUser'}
# - !scheduledTask: {path: '\Microsoft\Windows\WindowsUpdate\Scheduled Start'}

# "The Windows Scheduled Maintenance Task performs periodic maintenance of the
# computer system by fixing problems automatically or reporting them through Security and Maintenance."
# - !scheduledTask: {path: '\Microsoft\Windows\Diagnosis\Scheduled', operation: disable}

# Wouldn't be randomly executed
# - !scheduledTask: {path: '\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector'}
# - !scheduledTask: {path: '\Microsoft\Windows\DiskFootprint\Diagnostics'}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Respect Power Modes Windows Search Indexing
description: Enables the option to respect power modes for Windows Search Indexing, to prevent performance loss during gaming or other high-performance tasks
actions:
- !registryValue:
path: 'HKLM\Software\Microsoft\Windows Search\Gather\Windows\SystemIndex'
value: 'RespectPowerModes'
data: '1'
type: REG_DWORD
Loading

0 comments on commit ac2a9f3

Please sign in to comment.