Last active
January 23, 2022 15:40
-
-
Save urwrstkn8mare/e1ed1818a094b796f9d199175c875006 to your computer and use it in GitHub Desktop.
just a temporary scoop manifest using fork while official bethesda plugin updated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"homepage": "https://github.com/MrJuicyBacon/Galaxy_Plugin_Bethesda", | |
"version": "custom", | |
"depends": "sudo", | |
"url": "https://github.com/MrJuicyBacon/Galaxy_Plugin_Bethesda/archive/refs/heads/master.zip", | |
"hash": "797106189879466B19095301150E3360F916209628D63538E1D6992C6FDEE639", | |
"extract_dir": "Galaxy_Plugin_Bethesda-master/betty", | |
"extract_to": "integration", | |
"uninstaller": { | |
"script": "(Get-Item \"$env:LOCALAPPDATA\\GOG.com\\Galaxy\\plugins\\installed\\bethesda\").Delete()" | |
}, | |
"post_install": [ | |
"$integration = \"bethesda\"", | |
"$wildcard = \"*bethesda*\"", | |
"$gi_path = \"$env:LOCALAPPDATA\\GOG.com\\Galaxy\\plugins\\installed\"", | |
"$path = \"$gi_path\\$integration\"", | |
"$source = \"$scoopdir\\apps\\$app\\current\\integration\"", | |
"$link = $true", | |
"if (Test-Path $path) {", | |
" $backup_path = \"$persist_dir\\backup\"", | |
" if ($(Get-Item $path | Select-Object -ExpandProperty Target) -eq $source) {", | |
" $link = $false", | |
" } else {", | |
" if (!(Test-Path $persist_dir)) {", | |
" New-Item \"$persist_dir\" -Type Directory | Out-Null", | |
" }", | |
" Move-Item $path $backup_path", | |
" Write-Host \"WARNING:\" -f Yellow", | |
" Write-Host \"Integration directory already exists, I've moved the existing files here:\" -f Yellow", | |
" Write-Host $backup_path -f Red", | |
" }", | |
"}", | |
"$userRole = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())", | |
"if (!($userRole.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) {", | |
" Write-Host \"NOTE:\" -f Yellow", | |
" Write-Host \"This installer can also attach the newly installed integration folder to GOG Galaxy.\" -f Yellow", | |
" Write-Host \"If you choose to do so, you will need to Administrator permission (you'll be asked to approve.)\" -f Yellow", | |
"} else {", | |
" $response=\"Y\"", | |
"}", | |
"$msg = 'Would you like to attach this integration folder to GOG Galaxy programmatically? [Y/N]'", | |
"while(\"Y\",\"N\" -notcontains $response) {", | |
" $response = (Read-Host -Prompt $msg).ToUpper()", | |
"}", | |
"if ($response -eq \"N\") {", | |
" Write-Host \"No worries! Just make sure you follow these steps:\" -f Yellow", | |
" Write-Host \"1) Open a Command Prompt via (Run as Administrator)\" -f Yellow", | |
" Write-Host \"2) Run:\" -f Yellow", | |
" Write-Host \"mklink /D $([char]0x22)%localappdata%\\GOG.com\\Galaxy\\plugins\\installed\\$integration$([char]0x22) $([char]0x22)$scoopdir\\apps\\$app\\current\\integration$([char]0x22)\" -f Yellow", | |
"} elseif ($link) {", | |
" sudo New-Item -ItemType SymbolicLink -Path $path -Target $source 2`>`&1 `> symlink.log", | |
" $installed = Get-ChildItem -Path $gi_path -Depth 0 -Filter $wildcard | % { $_.FullName }", | |
" If ($installed.count -gt 1) {", | |
" Write-Host \"WARNING:\" -f Yellow", | |
" Write-Host \"Installer found multiple integrations installed for $integration, this will likely cause issues with GOG Galaxy...\" -f Yellow", | |
" Write-Host \"Please review the entries below and make sure they are currect:\" -f Yellow", | |
" $installed", | |
" Write-Host \"Here's what you can do:\" -f Yellow", | |
" Write-Host \"1) Keep the '$path'\" -f Yellow", | |
" Write-Host \"2) Backup and remove the additional folders (renaming will not work!)\" -f Yellow", | |
" Write-Host \"3) Restart GOG Galaxy\" -f Yellow", | |
" }", | |
" if ($(Get-Item $path | Select-Object -ExpandProperty Target) -eq $source) {", | |
" Write-Host \"The integration was successfully attached! Make sure to restart GOG Galaxy to make it effective.\" -f Green", | |
" } else {", | |
" Write-Host \"Oops! Something's not right. The $app integration was installed, but the symlink was not possible.\" -f Red", | |
" }", | |
"}" | |
], | |
"checkver": { | |
"github": "https://github.com/FriendsOfGalaxy/galaxy-integration-bethesda" | |
}, | |
"autoupdate": { | |
"url": "https://github.com/FriendsOfGalaxy/galaxy-integration-bethesda/releases/download/$version/windows.zip" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment