Skip to content

Commit

Permalink
Merge pull request #143 from meetrevision/dev
Browse files Browse the repository at this point in the history
24.12
  • Loading branch information
melo936 authored Dec 1, 2024
2 parents d1d4bbc + 886da95 commit c6c6e75
Show file tree
Hide file tree
Showing 93 changed files with 2,724 additions and 3,578 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: meetrevision
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
buy_me_a_coffee: # meetrevision
custom: https://revi.cc/donate
44 changes: 24 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Archive and Release

on:
push:
tags:
- '*'
# Allow manual triggering
workflow_dispatch:

env:
SXSC_REPO: 'https://github.com/Atlas-OS/sxsc'
FILENAME: 'Revi-PB-${{ github.ref_name }}.apbx'
FILENAME: 'Revi-PB-${{ github.event.workflow_run.started_at }}.apbx'

jobs:
build:
Expand All @@ -16,46 +14,52 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'main'

- name: Set version
id: set_version
run: |
# Get current date in "YY.MM" format
CURRENT_DATE=$(date +%y.%m)
echo "VERSION=${CURRENT_DATE}" >> $GITHUB_ENV
shell: bash

- name: Update version
run: |
$version = "${{ github.ref_name }}"
$version = "${{ env.VERSION }}"
$playbookConfPath = "src\playbook.conf"
$finalizeCMDPath = "src\Executables\FINALIZE.cmd"
(Get-Content -Path $playbookConfPath) -replace '<Version>.*</Version>', "<Version>$version</Version>" | Set-Content -Path $playbookConfPath
(Get-Content -Path $finalizeCMDPath) -replace 'set version=.+', "set version=$version" | Set-Content -Path $finalizeCMDPath
shell: pwsh

- name: Archive content
run: |
7z a -pmalte -mhe=on ${{ env.FILENAME }} ./src/*
7z a -pmalte -mhe=on "Revi-PB-${{ env.VERSION }}.apbx" ./src/*
- name: Generate SHA256
run: |
$hash = (Get-FileHash -Algorithm SHA256 -Path ${{ env.FILENAME }}).Hash
$hash = (Get-FileHash -Algorithm SHA256 -Path "Revi-PB-${{ env.VERSION }}.apbx").Hash
echo ("HASH=" + $hash) >> $env:GITHUB_ENV
# - name: DevUploads
# run: |
# url=$(bash <(curl -s https://devuploads.com/upload.sh) -f "${{ env.FILENAME }}" -k "${{ secrets.DEVUPLOADS_API_KEY }}" | grep -o 'https://devuploads.com[^"]*')
# echo "DEVUPLOADS=$url" >> $GITHUB_ENV
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.TOKEN }}
file: ${{ env.FILENAME }}
asset_name: ${{ env.FILENAME }}
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Uses GitHub token for authentication
file: "Revi-PB-${{ env.VERSION }}.apbx"
asset_name: "Revi-PB-${{ env.VERSION }}.apbx"
tag: ${{ env.VERSION }}
overwrite: true
release_name: ${{ env.VERSION }}
prerelease: false # Always set to false
body: |
# Download Link ✨
If you would like to support Revision, kindly download the Playbook from the provided link below.
📌Link:
SHA256: `${{ env.HASH }}`
63 changes: 63 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Archive and Pre-Release

on:
# Allow manual triggering
workflow_dispatch:

env:
FILENAME: 'Revi-PB-${{ github.event.workflow_run.started_at }}.apbx'

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'dev'

- name: Set version
id: set_version
run: |
# Get current date in "YY.MM.DD" format
CURRENT_DATE=$(date +%y.%m.%d)
echo "VERSION=${CURRENT_DATE}" >> $GITHUB_ENV
shell: bash

- name: Update version
run: |
$version = "${{ env.VERSION }}"
$playbookConfPath = "src\playbook.conf"
$finalizeCMDPath = "src\Executables\FINALIZE.cmd"
(Get-Content -Path $playbookConfPath) -replace '<Version>.*</Version>', "<Version>$version</Version>" | Set-Content -Path $playbookConfPath
(Get-Content -Path $finalizeCMDPath) -replace 'set version=.+', "set version=$version" | Set-Content -Path $finalizeCMDPath
shell: pwsh

- name: Archive content
run: |
7z a -pmalte -mhe=on "Revi-PB-${{ env.VERSION }}.apbx" ./src/*
- name: Generate SHA256
run: |
$hash = (Get-FileHash -Algorithm SHA256 -Path "Revi-PB-${{ env.VERSION }}.apbx").Hash
echo ("HASH=" + $hash) >> $env:GITHUB_ENV
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }} # Uses GitHub token for authentication
file: "Revi-PB-${{ env.VERSION }}.apbx"
asset_name: "Revi-PB-${{ env.VERSION }}.apbx"
tag: ${{ env.VERSION }}
overwrite: true
release_name: ${{ env.VERSION }}
prerelease: true # Set to true for pre-release
body: |
# Pre-release Download ✨
## ⚠️ This is a pre-release version for testing purposes. Installing this can cause issues and may require you to reinstall Windows, use at your own risk. ⚠️
SHA256: `${{ env.HASH }}`
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.apbx
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"recommendations": [
"redhat.vscode-yaml"
"redhat.vscode-yaml",
"ms-vscode.powershell",
"ms-vscode.powershell"
]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"!systemPackage: mapping",
"!cmd: mapping",
"!powerShell: mapping",
"!writeStatus: mapping"
"!writeStatus: mapping",
"!task: mapping",
],
"redhat.telemetry.enabled": false,
"yaml.schemas": {
"https://json.schemastore.org/github-issue-config.json": "file:///workspaces/playbook/.github/ISSUE_TEMPLATE/config.yml"
}
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ReviOS Playbook currently supports ARM64 and AMD64 builds of the following Windo

- Windows 10 21H2 `19044` (LTSC)
- Windows 10 22H2 `19045`
- Windows 11 22H2 `22621`
- Windows 11 23H2 `22631`
- Windows 11 24H2 `26100`

Expand All @@ -58,7 +57,7 @@ Explore our documentation for more information:
- [Playbook](https://www.revi.cc/docs/playbook/general)
- [Installing Windows](https://www.revi.cc/docs/playbook/installwindows)
- [Installing & Updating ReviOS](https://www.revi.cc/docs/playbook/install)
- [Frequently Asked Questions](https://www.revi.cc/docs/faq)
- [Frequently Asked Questions](https://www.revi.cc/docs/category/faq)

## 📝 License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,32 @@ description: Applies some Revision configurations
privilege: TrustedInstaller
actions:

# Disable transparency and animations for low end devices
- !powerShell:
runas: currentUserElevated
command: |
$mem = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum
if ($mem -lt 9000000000) {
[microsoft.win32.registry]::SetValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize', 'EnableTransparency', 0, [Microsoft.Win32.RegistryValueKind]::DWord)
[microsoft.win32.registry]::SetValue('HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics', 'MinAnimate', 0, [Microsoft.Win32.RegistryValueKind]::DWord)
}
# Disable Memory Compression
- !powerShell:
command: 'Disable-MMAgent -mc'

- !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Services\Pending\7971f918-a847-4430-9279-4a52d1efe18d', value: 'RegisterWithAU', type: REG_DWORD, data: '0'}

# [!] Breaks 'defrag c: -b'
# Disable Superfetch for SSDs
# Might not work on VMs
- !powerShell:
command: |
$mediaType = (Get-PhysicalDisk -SerialNumber (Get-Disk -Number (Get-Partition -DriveLetter $env:SystemDrive.Substring(0, 1)).DiskNumber).SerialNumber.TrimStart()).MediaType
if ($mediaType -eq 'SSD') {
$path = ${env:ProgramFiles(x86)} + '\Revision Tool\data\flutter_assets\additionals\DisableSF.bat'
Start-Process -FilePath $path -Wait -NoNewWindow
}
# Detection of mediaType might not work on VMs
# - !powerShell:
# command: |
# $mediaType = (Get-PhysicalDisk -SerialNumber (Get-Disk -Number (Get-Partition -DriveLetter $env:SystemDrive.Substring(0, 1)).DiskNumber).SerialNumber.TrimStart()).MediaType
# if ($mediaType -eq 'SSD') {
# $path = ${env:ProgramFiles(x86)} + '\Revision Tool\data\flutter_assets\additionals\DisableSF.bat'
# Start-Process -FilePath $path -Wait -NoNewWindow
# }

- !cmd:
command: 'setx DOTNET_CLI_TELEMETRY_OPTOUT 1'
Expand All @@ -35,13 +48,9 @@ actions:

- !writeStatus: {status: "Finalizing process"}
- !registryValue: {path: 'HKCU\System\GameConfigStore', value: 'GameDVR_FSEBehaviorMode', type: REG_DWORD, data: '0', weight: 70}
- !registryValue: {path: 'HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications', value: 'GlobalUserDisabled', type: REG_DWORD, data: '1', weight: 60}

- !powerShell: {command: 'Get-ScheduledTask -TaskPath "\Microsoft\Office\*" | Disable-ScheduledTask'}

# OneDrive workaround
- !registryValue: {path: 'HKLM\Software\Policies\Microsoft\Windows\OneDrive', value: 'DisableFileSyncNGSC', operation: delete}

- !run:
exeDir: true
exe: "PowerShell"
Expand All @@ -59,7 +68,7 @@ actions:
- !run:
exeDir: true
exe: "FILEASSOC.cmd"
option: "configure-lpv"
option: "remove-appx-photos"
weight: 150

- !cmd:
Expand All @@ -79,26 +88,31 @@ actions:
exeDir: true
runas: currentUserElevated
option: "configure-wallpaper"
weight: 45
weight: 45

- !writeStatus: {status: "Configuring features"}
- !run:
exeDir: true
exe: "PowerShell"
args: '-NoP -ExecutionPolicy Bypass -File DISM-FEATURES.ps1'
weight: 270

# Necessary to refresh start menu entries etc.
# Necessary to refresh start menu entries etc.
- !appx: {operation: clearCache, name: '*Client.CBS*'}
- !appx: {operation: clearCache, name: '*StartMenuExperienceHost*', option: "remove-pinned-items-startmenu"}
- !appx: {operation: clearCache, name: '*Windows.Search*'}
- !appx: {operation: clearCache, name: '*TCUI*'}
# Workaround for KGL versions to match
- !appx: {operation: clearCache, name: '*XboxGameCallableUI*'}
- !appx: {operation: clearCache, name: '*XboxGameOverlay*'}
- !appx: {operation: clearCache, name: '*XboxGamingOverlay*'}
- !appx: {operation: clearCache, name: '*XboxIdentityProvider*'}
- !appx: {operation: clearCache, name: '*XboxSpeechToTextOverlay*'}

# Start as user process to prevent weird look due to running as TrustedInstaller
# - !run: {baseDir: true, exe: "NSudoLC.exe", args: '-U:C -UseCurrentConsole explorer.exe'}

# Force update group policy
- !run:
exe: "gpupdate.exe"

# Apply micro patches via Revision Tool in order to avoid new playbook releases for minor changes
- !run:
path: "%ProgramFiles(x86)%\\Revision Tool"
exe: "revitool.exe"
args: "playbook-patches apply"
wait: true
runas: currentUserElevated

- !powerShell:
command: |
$explorerProcess = Get-Process -Name explorer -ErrorAction SilentlyContinue
if ($explorerProcess) {
Stop-Process -Name explorer -Force
}
Start-Process explorer
runas: currentUserElevated
66 changes: 66 additions & 0 deletions src/Configuration/Tasks/packages/app-win32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Remove Win32 apps
description: Removal of Win32 apps
privilege: TrustedInstaller
actions:

# Microsoft Edge
- !writeStatus: {status: "Removing MS Edge", option: "remove-edge"}
- !taskKill: {name: "MicrosoftEdgeUpdate", errorAction: Ignore, option: "remove-edge"}
- !taskKill: {name: "msedge", errorAction: Ignore, option: "remove-edge"}
- !taskKill: {name: "MicrosoftEdge*", errorAction: Ignore, option: "remove-edge"}
- !taskKill: {name: "setup", errorAction: Ignore, pathContains: "\\Edge", option: "remove-edge"}

# Remove the new Copilot UWP app before removing Edge to avoid leftovers
- !powerShell:
option: "remove-edge"
exeDir: true
errorAction: Ignore
weight: 30
command: >-
.\APPX-REMOVER.ps1 -Packages 'Microsoft.Copilot'
- !powerShell:
command: '.\EDGE.ps1 -Mode EdgeBrowser'
exeDir: true
runas: currentUserElevated
option: "remove-edge"
weight: 40

- !powerShell:
option: "remove-edge"
exeDir: true
errorAction: Ignore
weight: 30
command: >-
.\APPX-REMOVER.ps1 -Packages @(
'Microsoft.Copilot',
'Microsoft.MicrosoftEdge',
'Microsoft.MicrosoftEdgeDevToolsClient'
)
- !file: {path: "%ProgramFiles(x86)%\\Microsoft\\Edge", option: "remove-edge", weight: 50}


# OneDrive
- !writeStatus: {status: "Removing OneDrive", option: "remove-onedrive"}
- !taskKill: {name: "OneDriveStandaloneUpdater", errorAction: Ignore, option: "remove-onedrive"}
- !taskKill: {name: "OneDriveSetup", errorAction: Ignore, option: "remove-onedrive"}
- !taskKill: {name: "OneDrive*", errorAction: Ignore, option: "remove-onedrive"}

- !run: {exeDir: true, exe: "ONED.cmd", option: "remove-onedrive", weight: 40}
- !file: {path: "%SystemDrive%\\OneDriveTemp", option: "remove-onedrive"}
- !file: {path: "%ProgramData%\\Microsoft OneDrive", option: "remove-onedrive"}

- !powerShell:
option: "remove-onedrive"
# runas: currentUserElevated
wait: true
exeDir: true
errorAction: Ignore
weight: 10
command: >-
.\APPX-REMOVER.ps1 -Packages @(
'OneDrive',
'microsoft.microsoftskydrive'
)
Loading

0 comments on commit c6c6e75

Please sign in to comment.