forked from Ash258/Shovel-Ash258
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFRD.json
65 lines (65 loc) · 2.77 KB
/
FRD.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
{
"version": "1.0beta",
"description": "FreeRapid Downloader. Easy to use downloader that supports downloading from Youtube, Facebook, Picasa and other file-sharing services, include the new ones like mega.co.nz.",
"homepage": "https://wordrider.net/freerapid/",
"license": "GPL-2.0-or-later",
"suggest": {
"java": "oraclejdk-lts"
},
"url": "https://wordrider.net/download/FreeRapid-1.0beta.zip",
"hash": "c493b4fb4223c7a75fa748b309dc9342ca8bd68d4415b686d28d68c6a8b7b520",
"extract_dir": "FreeRapid-1.0beta",
"post_install": [
"$delimeter = \"`r`n\"",
"$start = @(",
" '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>',",
" '<!DOCTYPE preferences SYSTEM \"http://java.sun.com/dtd/preferences.dtd\">',",
" '<preferences EXTERNAL_XML_VERSION=\"1.0\">',",
" ' <root type=\"user\">',",
" ' <map>'",
")",
"$ents = @()",
"$end = @(' </map>', ' </root>', '</preferences>')",
"$entryTemplate = \" <entry key=\"\"%%key%%\"\" value=\"\"%%value%%\"\"/>\"",
"$entries = @{",
" 'enableDirectDownloads' = 'true'",
" 'enableNewLinkCheckDownloadHistory' = 'true'",
" 'errorAttemptsCount' = '-1'",
" 'openIncompleteFiles' = 'true'",
" 'pluginUpdateCheckInterval' = '1'",
" 'pluginUpdateMethod' = '3'",
" 'preCreateFile' = 'true'",
" 'showInfoInFrameTitle' = 'true'",
" 'showPercentProgress' = 'true'",
" 'skipDuplicateFiles' = 'true'",
" 'zoomCaptchaImage' = 'true'",
"}",
"foreach ($entry in $entries.Keys) {",
" $ent = ($entryTemplate -replace '%%key%%', $entry) -replace '%%value%%', $entries.Item($entry)",
" $ents += $ent",
"}",
" # Create file string",
"$finalFile = $start -join $delimeter",
"$finalFile += $ents -join $delimeter",
"$finalFile += $end -join $delimeter",
" # Set File",
"$FILE = \"$env:AppData\\VitySoft\\FRD\\frd.xml\"",
"if (-not (Test-Path $FILE)) {",
" Write-Host 'File' $FILE 'does not exists. Creating.' -f Yellow",
" New-Item $FILE -Type File -Force | Out-Null",
" Set-Content $FILE $finalFile -Encoding Ascii -Force",
"}"
],
"shortcuts": [
[
"frd.bat",
"Freerapid Downloader",
"",
"frd.ico"
]
],
"autoupdate": {
"url": "https://www.wordrider.net/download/FreeRapid-$version.zip",
"extract_dir": "FreeRapid-$version"
}
}