Skip to content

Commit

Permalink
feat: new options & librewolf
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Dec 29, 2023
1 parent 50b2e55 commit d4a393d
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 36 deletions.
7 changes: 4 additions & 3 deletions src/playbook/Configuration/atlas/appx.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: APPX
description: Removes APPX packages and prevents them from being reinstalled
title: AppX
description: Removes AppX packages and prevents them from being reinstalled
privilege: TrustedInstaller
actions:
- !writeStatus: {status: 'Removing APPX packages'}
- !writeStatus: {status: 'Removing AppX packages'}

# The reason of removing those applications is that there is a potential of them sending user data,
# showing unwanted content (advertisements) and using hardware resources. They can also simply be
Expand Down Expand Up @@ -105,6 +105,7 @@ actions:
runas: currentUserElevated

# Clear caches of Client.CBS and more
- !writeStatus: {status: 'Clearing AppX caches'}
- !appx: {operation: clearCache, name: '*Client.CBS*'}
- !appx: {operation: clearCache, name: '*Windows.Search*'}
- !appx: {operation: clearCache, name: '*Microsoft.Windows.SecHealthUI'}
2 changes: 2 additions & 0 deletions src/playbook/Configuration/atlas/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ actions:
wait: true
- !cmd:
command: '"AtlasDesktop\3. Configuration\Printing\Disable Printing (default).cmd" /silent'
option: 'disable-printing'
exeDir: true
wait: true
- !cmd:
command: '"AtlasDesktop\3. Configuration\Notifications\Disable Notifications (default).cmd" /silent'
option: 'disable-notifications'
exeDir: true
wait: true

Expand Down
38 changes: 24 additions & 14 deletions src/playbook/Configuration/atlas/start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ actions:
# Do not change the line position of this, otherwise things will break when using local-build
# - !run: {exe: 'cmd.exe', args: '/c start "AME Wizard Live Log" PowerShell -NoP -C "gc -Wait Logs\TIOutput.txt -EA SilentlyContinue | Write-Output; pause"', baseDir: true, wait: false}

- !writeStatus: {status: 'Setting up'}
# Prevent annoying notifications during deployment
- !registryValue: {path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance', value: 'Enabled', type: REG_DWORD, data: '0'}

# Prevent computer from going to sleep during deployment
- !run: {exe: 'powercfg.exe', args: '/setacvalueindex scheme_current sub_sleep standbyidle 0'}
- !run: {exe: 'powercfg.exe', args: '/setdcvalueindex scheme_current sub_sleep standbyidle 0'}
Expand All @@ -35,13 +35,15 @@ actions:
# - !writeStatus: {status: 'Refreshing variables'}
# - !run: {exeDir: true, exe: 'REFRESHENV.cmd'}

- !writeStatus: {status: 'Configuring Optional Features'}
- !writeStatus: {status: 'Enabling DirectPlay'}
- !run: {exe: 'DISM.exe', args: '/Online /Enable-Feature /FeatureName:"DirectPlay" /NoRestart /All', weight: 30}
- !writeStatus: {status: 'Disabling Internet Explorer', builds: [ '!>=22000' ]}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart', weight: 30, builds: [ '!>=22000' ]}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart', weight: 30}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart', weight: 30}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart', weight: 30}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart', weight: 30}
- !writeStatus: {status: 'Disabling Printing', option: 'disable-printing'}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-Foundation-Features" /NoRestart', weight: 30, option: 'disable-printing'}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-Foundation-InternetPrinting-Client" /NoRestart', weight: 30, option: 'disable-printing'}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-XPSServices-Features" /NoRestart', weight: 30, option: 'disable-printing'}
- !run: {exe: 'DISM.exe', args: '/Online /Disable-Feature /FeatureName:"Printing-PrintToPDFServices-Features" /NoRestart', weight: 30, option: 'disable-printing'}

################ NO LOCAL BUILD ################

Expand All @@ -56,14 +58,6 @@ actions:
runas: currentUserElevated

# Browsers
- !writeStatus: {status: 'Installing Google Chrome', option: 'browser-chrome'}
- !powerShell:
command: '.\SOFTWARE.ps1 -Chrome'
exeDir: true
wait: true
weight: 120
option: 'browser-chrome'
runas: currentUserElevated
- !writeStatus: {status: 'Installing Brave', option: 'browser-brave'}
- !powerShell:
command: '.\SOFTWARE.ps1 -Brave'
Expand All @@ -80,5 +74,21 @@ actions:
weight: 120
option: 'browser-firefox'
runas: currentUserElevated
- !writeStatus: {status: 'Installing LibreWolf', option: 'browser-librewolf'}
- !powerShell:
command: '.\LIBREWOLF.ps1'
exeDir: true
wait: true
weight: 120
option: 'browser-firefox'
runas: currentUserElevated
- !writeStatus: {status: 'Installing Google Chrome', option: 'browser-chrome'}
- !powerShell:
command: '.\SOFTWARE.ps1 -Chrome'
exeDir: true
wait: true
weight: 120
option: 'browser-chrome'
runas: currentUserElevated

################ END NO LOCAL BUILD ################
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ if ($safeModeWithList) { SafeMode }
# PACKAGE LIST #
# ======================================================================================================================= #
if (!$safeModeWithList) {
$packageList = (Get-ChildItem "$env:windir\AtlasModules\Packages\*.cab").FullName | Where-Object {$_ -like "*$(if ($arm) {'arm64'} else {'amd64'})*"}
$packageList = Get-ChildItem "$env:windir\AtlasModules\Packages\*.cab" | Where-Object {
$_.FullName -like "*$(if ($arm) {'arm64'} else {'amd64'})*" -or
($_.FullName -notlike "*amd64*" -and $_.FullName -notlike "*arm64*")
}

if ($DefenderOnly) {
$packageList = $packageList | Where-Object { $_ -like '*NoDefender*' }
Expand Down
70 changes: 70 additions & 0 deletions src/playbook/Executables/LIBREWOLF.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
$ProgressPreference = "SilentlyContinue"
$ErrorActionPreference = "Stop"

# Define variables
$updaterPath = "$env:programfiles\LibreWolf\librewolf-winupdater"
$librewolfPath = "$env:programfiles\LibreWolf"
$desktop = [Environment]::GetFolderPath("Desktop")
$startMenu = [Environment]::GetFolderPath("CommonPrograms")

# Get latest LibreWolf download link
Write-Output "Getting the latest LibreWolf download link"
$librewolfVersion = Invoke-RestMethod -Uri "https://gitlab.com/api/v4/projects/44042130/releases" | ForEach-Object { $_.name } | Select-Object -First 1
$librewolfFileName = "librewolf-$librewolfVersion-windows-x86_64-setup.exe"
$librewolfDownload = "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/$librewolfVersion/$librewolfFileName"

# Get latest LibreWolf-WinUpdater download link
Write-Output "Getting the latest LibreWolf-WinUpdater download link"
$librewolfUpdaterURI = "https://codeberg.org/api/v1/repos/ltguillaume/librewolf-winupdater/releases?draft=false&pre-release=false&page=1&limit=1"
$librewolfUpdaterDownload = (Invoke-RestMethod -Uri "$librewolfUpdaterURI" -Headers @{ "accept" = "application/json" }).Assets |
Where-Object { $_.name -like "*.zip" } |
Select-Object -ExpandProperty browser_download_url

# Output paths
$outputLibrewolf = "$env:systemdrive\$librewolfFileName"
$outputLibrewolfUpdater = "$env:systemdrive\librewolf-winupdater.zip"

# Download files
Write-Output "Downloading the latest LibreWolf setup"
Invoke-WebRequest -Uri $librewolfDownload -OutFile $outputLibrewolf
Write-Output "Downloading the latest LibreWolf WinUpdater ZIP"
Invoke-WebRequest -Uri $librewolfUpdaterDownload -OutFile $outputLibrewolfUpdater

# Install LibreWolf & LibreWolf-WinUpdater
Write-Output "Installing LibreWolf silently"
Start-Process -Wait -FilePath $outputLibrewolf -ArgumentList "/S"
if (!(Test-Path $librewolfPath)) {
Write-Host "Installing LibreWolf silently failed."
exit 1
}
Write-Output "Installing/extracting Librewolf-WinUpdater"
Expand-Archive -Path $outputLibrewolfUpdater -DestinationPath "$env:programfiles\LibreWolf\librewolf-winupdater" -Force

# Automatic updater
Write-Output "Adding automatic updater task"
$Title = "LibreWolf WinUpdater"
$Action = New-ScheduledTaskAction -Execute "$updaterPath\LibreWolf-WinUpdater.exe" -Argument "/Scheduled"
$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -RunOnlyIfNetworkAvailable
$7Hours = New-ScheduledTaskTrigger -Once -At (Get-Date -Minute 0 -Second 0).AddHours(1) -RepetitionInterval (New-TimeSpan -Hours 7)
$AtLogon = New-ScheduledTaskTrigger -AtLogOn
$AtLogon.Delay = 'PT1M'
$User = (Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object -ExpandProperty UserName) -replace ".*\\"
Register-ScheduledTask -TaskName "$Title ($User)" -Action $Action -Settings $Settings -Trigger $7Hours,$AtLogon -User $User -RunLevel Highest -Force | Out-Null

# Shortcuts
Write-Output "Creating shortcuts"
function Add-Shortcut {
param ( [string]$Source, [string]$Destination, [string]$WorkingDir )
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($Destination)
$Shortcut.TargetPath = $Source
$Shortcut.WorkingDirectory = $WorkingDir
$Shortcut.Save()
}
Add-Shortcut -Source "$librewolfPath\librewolf.exe" -Destination "$desktop\LibreWolf.lnk" -WorkingDir $librewolfPath
Add-Shortcut -Source "$updaterPath\Librewolf-WinUpdater.exe" -Destination "$startMenu\LibreWolf\LibreWolf WinUpdater.lnk" -WorkingDir $librewolfPath

# Temp files
Write-Output "Removing temporary installer files"
Remove-Item "$outputLibrewolf" -Force
Remove-Item "$outputLibrewolfUpdater" -Force
Binary file added src/playbook/Images/librewolf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 42 additions & 18 deletions src/playbook/playbook.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Atlas makes your computer snappier and more private with lots of usability impro
<Website>https://atlasos.net</Website>
<DonateLink>https://ko-fi.com/atlasos</DonateLink>
<FeaturePages>
<RadioPage IsRequired="true" DefaultOption="defender-enable" Description="Disabling Defender has risks, but it can also improve performance.">
<TopLine Text="It can be changed in the Atlas folder later."/>
<RadioPage IsRequired="true" DefaultOption="defender-enable" Description="Disabling Defender reduces security, and is an option for advanced users only.">
<TopLine Text="Defender can be toggled in Atlas folder."/>
<Options>
<RadioOption>
<Text>Enable Defender (recommended)</Text>
Expand All @@ -45,8 +45,8 @@ Atlas makes your computer snappier and more private with lots of usability impro
</Options>
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/#defender"/>
</RadioPage>
<RadioPage IsRequired="true" DefaultOption="mitigations-default" Description="Disabling mitigations reduces security, but improves performance on older CPUs.">
<TopLine Text="It can be changed in the Atlas folder later."/>
<RadioPage IsRequired="true" DefaultOption="mitigations-default" Description="Disabling mitigations reduces security, and only improves performance on older CPUs.">
<TopLine Text="Disabling could hurt performance on modern CPUs."/>
<Options>
<RadioOption>
<Text>Default Windows Mitigations (recommended)</Text>
Expand All @@ -60,7 +60,7 @@ Atlas makes your computer snappier and more private with lots of usability impro
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/#mitigations"/>
</RadioPage>
<RadioPage IsRequired="true" DefaultOption="vbs-disable" Description="Enabling core isolation protects important parts of Windows, but at the cost of performance.">
<TopLine Text="It can be changed in the Atlas folder later."/>
<TopLine Text="This can be changed in the Atlas folder later."/>
<Options>
<RadioOption>
<Text>Disable Core Isolation (recommended)</Text>
Expand All @@ -73,12 +73,29 @@ Atlas makes your computer snappier and more private with lots of usability impro
</Options>
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/atlas-folder/security/#core-isolation"/>
</RadioPage>
<CheckboxPage IsRequired="true" Description="Select the miscellaneous options you would like to use, they can be changed in the Atlas folder.">
<CheckboxPage IsRequired="true" Description="Select the options you would like to use, they can be changed in the Atlas folder later.">
<Options>
<CheckboxOption>
<Text>Remove Microsoft Edge</Text>
<Name>uninstall-edge</Name>
</CheckboxOption>
<CheckboxOption>
<Text>Install a Browser</Text>
<Name>install-another-browser</Name>
</CheckboxOption>
<CheckboxOption>
<Text>Disable Notifications</Text>
<Name>disable-notifications</Name>
</CheckboxOption>
</Options>
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/atlas-folder/configuration"/>
</CheckboxPage>
<CheckboxPage IsRequired="true" Description="Select the options you would like to use, they can be changed in the Atlas folder later.">
<Options>
<CheckboxOption>
<Text>Disable Printing</Text>
<Name>disable-printing</Name>
</CheckboxOption>
<CheckboxOption>
<Text>Disable Bluetooth</Text>
<Name>disable-bluetooth</Name>
Expand All @@ -90,32 +107,39 @@ Atlas makes your computer snappier and more private with lots of usability impro
</Options>
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/atlas-folder/configuration"/>
</CheckboxPage>
<RadioImagePage CheckDefaultBrowser="true" DependsOn="uninstall-edge" DefaultOption="browser-brave" Description="Select your preferred browser to install, as Microsoft Edge will be uninstalled.">
<RadioImagePage CheckDefaultBrowser="true" DependsOn="install-another-browser" DefaultOption="browser-brave" Description="Select your preferred browser to install. Browser settings are not modified.">
<TopLine Text="We do not recommend Chrome for privacy reasons."/>
<Options>
<RadioImageOption None="true"/>
<RadioImageOption>
<Text>Firefox</Text>
<Name>browser-firefox</Name>
<FileName>firefox</FileName>
<GradientTopColor>#4676ed</GradientTopColor>
<GradientBottomColor>#acf5fe</GradientBottomColor>
</RadioImageOption>
<RadioImageOption>
<Text>Brave</Text>
<Name>browser-brave</Name>
<FileName>brave</FileName>
<GradientTopColor>#131524</GradientTopColor>
<GradientBottomColor>#3b3e4f</GradientBottomColor>
</RadioImageOption>
<RadioImageOption>
<Text>LibreWolf</Text>
<Name>browser-librewolf</Name>
<FileName>librewolf</FileName>
<GradientTopColor>#057DB6</GradientTopColor>
<GradientBottomColor>#86D8FF</GradientBottomColor>
</RadioImageOption>
<RadioImageOption>
<Text>Firefox</Text>
<Name>browser-firefox</Name>
<FileName>firefox</FileName>
<GradientTopColor>#FF3647</GradientTopColor>
<GradientBottomColor>#FFC742</GradientBottomColor>
</RadioImageOption>
<RadioImageOption>
<Text>Chrome</Text>
<Name>browser-chrome</Name>
<FileName>chrome</FileName>
<GradientTopColor>#e33b2e</GradientTopColor>
<GradientBottomColor>#E38A84</GradientBottomColor>
<GradientTopColor>#686868</GradientTopColor>
<GradientBottomColor>#FFFFFF</GradientBottomColor>
</RadioImageOption>
</Options>
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/software/web-browsers"/>
<BottomLine Text="Which should I pick?" Link="https://docs.atlasos.net/getting-started/post-installation/software/web-browsers"/>
</RadioImagePage>
</FeaturePages>
</Playbook>

0 comments on commit d4a393d

Please sign in to comment.