From 053ada005feffaa1c979b8011d3f76a48bb10f8d Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Tue, 2 Dec 2025 18:04:44 +0300 Subject: [PATCH] Improved WinGet config --- .github/workflows/Sophia.yml | 5 +++ Scripts/SFX.ps1 | 31 +++++++++++++++++++ .../TeamSophia.SophiaScript.installer.yaml | 14 ++------- .../TeamSophia.SophiaScript.locale.en-US.yaml | 7 ++--- .../TeamSophia.SophiaScript.yaml | 2 +- 5 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 Scripts/SFX.ps1 diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index 9352d4c8..606803e3 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -63,6 +63,10 @@ jobs: run: | . "Scripts\Wrapper.ps1" + - name: SFX + run: | + . "Scripts\SFX.ps1" + - name: ReleaseNotesTemplate env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -99,4 +103,5 @@ jobs: # Use "/" in path to files files: | Sophia*.zip + SophiaScriptWinGet_*.exe body_path: ${{ steps.read_release.outputs.ReleaseBody }} diff --git a/Scripts/SFX.ps1 b/Scripts/SFX.ps1 new file mode 100644 index 00000000..796ee08f --- /dev/null +++ b/Scripts/SFX.ps1 @@ -0,0 +1,31 @@ +# Download WinRAR +# https://www.rarlab.com +$Parameters = @{ + Uri = "https://www.rarlab.com/rar/winrar-x64-713.exe" + OutFile = "winrar-x64-713.exe" + UseBasicParsing = $true +} +Invoke-WebRequest @Parameters + +# Install WinRAR +& winrar-x64-713.exe -s + +# Get latest version tag for Windows 11 +$Parameters = @{ + Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/refs/heads/master/sophia_script_versions.json" + UseBasicParsing = $true +} +$Latest_Release_Windows_11_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1 + +# Create config +@" +; Expand SFX archive +Path=$env:TEMP\Sophia_Script_for_Windows_11_v$($Latest_Release_Windows_11_PowerShell_5_1) +; Copy folder recursively to user's Desktop folder +Setup=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -Command & {Copy-Item -Path "$env:TEMP\Sophia_Script_for_Windows_11_v$($Latest_Release_Windows_11_PowerShell_5_1)" -Destination "$(Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}")\1" -Recurse -Force} +; No GUI while expanding SFX archive +Silent=1 +"@ | Set-Content -Path config.txt -Encoding Default -Force + +# Create SFX archive +& "C:\Program Files\WinRAR\Rar.exe" a -sfx -z"config.txt" -ep1 -r "SophiaScriptWinGet_SophiaScriptVersion.exe" "Sophia_Script_for_Windows_11_v$($Latest_Release_Windows_11_PowerShell_5_1)\*" diff --git a/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.installer.yaml b/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.installer.yaml index 47b7b93f..d4d8058d 100644 --- a/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.installer.yaml +++ b/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.installer.yaml @@ -1,21 +1,13 @@ -# Created with YamlCreate.ps1 v2.4.6 $debug=NVS1.CRLF.5-1-26100-3624.Win32NT +# Created using wingetcreate 1.10.3.0 # yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.10.0.schema.json -# https://github.com/microsoft/winget-pkgs/blob/master/Tools/YamlCreate.ps1 PackageIdentifier: TeamSophia.SophiaScript PackageVersion: SophiaScriptVersion -InstallerLocale: en-US -InstallerType: zip -Commands: -- sophiascript ReleaseDate: SophiaScriptDate +InstallerType: portable Installers: - Architecture: x64 - NestedInstallerType: portable - NestedInstallerFiles: - - RelativeFilePath: Sophia_Script_for_Windows_11_vSophiaScriptVersion\Sophia.ps1 - PortableCommandAlias: sophiascript - InstallerUrl: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/SophiaScriptVersion/Sophia.Script.for.Windows.11.vSophiaScriptVersion.zip + InstallerUrl: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/SophiaScriptVersion/SophiaScriptWinGet_SophiaScriptVersion.exe InstallerSha256: SophiaScriptHash ManifestType: installer ManifestVersion: 1.10.0 diff --git a/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.locale.en-US.yaml b/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.locale.en-US.yaml index b9429f2b..633f7f45 100644 --- a/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.locale.en-US.yaml +++ b/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.locale.en-US.yaml @@ -1,4 +1,4 @@ -# Created with YamlCreate.ps1 v2.4.6 $debug=NVS1.CRLF.5-1-26100-3624.Win32NT +# Created using wingetcreate 1.10.3.0 # yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.10.0.schema.json PackageIdentifier: TeamSophia.SophiaScript @@ -7,12 +7,12 @@ PackageLocale: en-US Publisher: Team Sophia PublisherUrl: https://github.com/farag2/Sophia-Script-for-Windows PublisherSupportUrl: https://t.me/sophia_chat -Author: farag2 +Author: Team Sophia PackageName: Sophia Script for Windows PackageUrl: https://github.com/farag2/Sophia-Script-for-Windows License: MIT LicenseUrl: https://github.com/farag2/Sophia-Script-for-Windows/blob/master/LICENSE -Copyright: Copyright (c) 2014—2025 Team Sophia +Copyright: Copyright (c) 2014—2026 Team Sophia ShortDescription: The most powerful PowerShell module on GitHub for Windows 10 and Windows 11 fine-tuning and tweaking Description: Sophia Script for Windows is the largest PowerShell module on GitHub for Windows 10 and Windows 11 fine-tuning and automating the routine tasks Moniker: sophiascript @@ -32,7 +32,6 @@ Tags: - debloater - windows-debloat - sophia-script -- 24h2 ReleaseNotesUrl: https://github.com/farag2/Sophia-Script-for-Windows/blob/master/CHANGELOG.md ManifestType: defaultLocale ManifestVersion: 1.10.0 diff --git a/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.yaml b/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.yaml index d878554e..f942aa69 100644 --- a/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.yaml +++ b/Scripts/WinGet_Manifests/TeamSophia.SophiaScript.yaml @@ -1,4 +1,4 @@ -# Created with YamlCreate.ps1 v2.4.6 $debug=NVS1.CRLF.5-1-26100-3624.Win32NT +# Created using wingetcreate 1.10.3.0 # yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.10.0.schema.json PackageIdentifier: TeamSophia.SophiaScript