/
galaxy-steam.json
76 lines (76 loc) · 4.38 KB
/
galaxy-steam.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"homepage": "https://github.com/FriendsOfGalaxy/galaxy-integration-steam",
"version": "1.0.2",
"depends": "sudo",
"url": "https://github.com/FriendsOfGalaxy/galaxy-integration-steam/releases/download/v1.0.2/windows.zip",
"hash": "5b564e986551ea2d260b645e33ae97e9628e13224ac19cff0684d25fe91a6324",
"extract_to": "integration",
"uninstaller": {
"script": "(Get-Item \"$env:LOCALAPPDATA\\GOG.com\\Galaxy\\plugins\\installed\\steam\").Delete()"
},
"post_install": [
"$integration = \"steam\"",
"$wildcard = \"*steam*\"",
"$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-steam",
"re": "Version v(?<version>[\\d\\w.]+)"
},
"autoupdate": {
"url": "https://github.com/FriendsOfGalaxy/galaxy-integration-steam/releases/download/v$version/windows.zip"
}
}