mirror of
				https://github.com/ScoopInstaller/Main.git
				synced 2025-11-03 15:21:18 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			70 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
{
 | 
						|
    "version": "6.2",
 | 
						|
    "description": "A general-purpose programming language built using a modern approach to safety, performance, and software design patterns.",
 | 
						|
    "homepage": "https://www.swift.org/",
 | 
						|
    "license": "Apache-2.0",
 | 
						|
    "notes": [
 | 
						|
        "* Known issue:",
 | 
						|
        "  - 'swift.exe' may not working with Junction, check workaround: https://github.com/ScoopInstaller/Main/issues/6159",
 | 
						|
        "------",
 | 
						|
        "To make Swift toolchain work, you must have Visual Studio and Windows SDK components installed.",
 | 
						|
        "Read https://www.swift.org/getting-started/#support-files for Supporting Files installation guide."
 | 
						|
    ],
 | 
						|
    "suggest": {
 | 
						|
        "python": "versions/python39",
 | 
						|
        "vcredist": "extras/vcredist2022"
 | 
						|
    },
 | 
						|
    "architecture": {
 | 
						|
        "64bit": {
 | 
						|
            "url": "https://download.swift.org/swift-6.2-release/windows10/swift-6.2-RELEASE/swift-6.2-RELEASE-windows10.exe",
 | 
						|
            "hash": "80fbbc17d4f9edec74a83abbefeb9ff418ffc2158cd347111583c45e47f9789b"
 | 
						|
        },
 | 
						|
        "arm64": {
 | 
						|
            "url": "https://download.swift.org/swift-6.2-release/windows10-arm64/swift-6.2-RELEASE/swift-6.2-RELEASE-windows10-arm64.exe",
 | 
						|
            "hash": "31ecdfa7acb213bf331ba99ed38304a0ea006bb5caae756a0f8778d0b88fbef3"
 | 
						|
        }
 | 
						|
    },
 | 
						|
    "pre_install": [
 | 
						|
        "Expand-DarkArchive \"$dir\\$fname\" \"$dir\\extract_folder\" -Removal",
 | 
						|
        "$xml = [xml](Get-Content -Raw \"$dir\\extract_folder\\UX\\manifest.xml\" -Encoding utf8)",
 | 
						|
        "$xml.BurnManifest.Payload | Where-Object { $_.FilePath.EndsWith(\".msi\") } | ForEach-Object {",
 | 
						|
        "    if ($($_.FilePath) -eq \"rtl.msi\") {",
 | 
						|
        "        Expand-MsiArchive \"$dir\\extract_folder\\AttachedContainer\\$($_.FilePath)\" \"$dir\\extract_folder\\LocalApp\\Programs\\Swift\\Runtimes\\usr\\bin\"",
 | 
						|
        "    } else {",
 | 
						|
        "        Expand-MsiArchive \"$dir\\extract_folder\\AttachedContainer\\$($_.FilePath)\" \"$dir\\extract_folder\"",
 | 
						|
        "    }",
 | 
						|
        "}",
 | 
						|
        "$ver = $xml.BurnManifest.Registration.Version",
 | 
						|
        "Move-Item -Path \"$dir\\extract_folder\\LocalApp\\Programs\\Swift\" -Destination \"$dir\"",
 | 
						|
        "Move-Item -Path \"$dir\\Swift\\Platforms\\$ver\\Windows.platform\" -Destination \"$dir\\Swift\\Platforms\"",
 | 
						|
        "Move-Item -Path \"$dir\\Swift\\Toolchains\\$($ver)+Asserts\\usr\" -Destination \"$dir\\Swift\\Toolchains\"",
 | 
						|
        "# Move-Item -Path \"$dir\\Swift\\Tools\\$ver\\*\" -Destination \"$dir\\Swift\\Tools\"",
 | 
						|
        "Remove-Item \"$dir\\Swift\\Platforms\\$ver\" | Out-Null",
 | 
						|
        "Remove-Item \"$dir\\Swift\\Toolchains\\$ver+Asserts\" | Out-Null",
 | 
						|
        "# Remove-Item \"$dir\\Swift\\Tools\\$ver\" | Out-Null",
 | 
						|
        "Move-Item -Path \"$dir\\Swift\\*\" -Destination \"$dir\"",
 | 
						|
        "Remove-Item \"$dir\\Swift\", \"$dir\\extract_folder\" -Recurse | Out-Null"
 | 
						|
    ],
 | 
						|
    "env_add_path": [
 | 
						|
        "Runtimes\\usr\\bin",
 | 
						|
        "Toolchains\\usr\\bin"
 | 
						|
    ],
 | 
						|
    "env_set": {
 | 
						|
        "SDKROOT": "$dir\\Platforms\\Windows.platform\\Developer\\SDKs\\Windows.sdk"
 | 
						|
    },
 | 
						|
    "checkver": {
 | 
						|
        "url": "https://github.com/apple/swift",
 | 
						|
        "regex": "/swift-([\\d.]+)-RELEASE"
 | 
						|
    },
 | 
						|
    "autoupdate": {
 | 
						|
        "architecture": {
 | 
						|
            "64bit": {
 | 
						|
                "url": "https://download.swift.org/swift-$version-release/windows10/swift-$version-RELEASE/swift-$version-RELEASE-windows10.exe"
 | 
						|
            },
 | 
						|
            "arm64": {
 | 
						|
                "url": "https://download.swift.org/swift-$version-release/windows10-arm64/swift-$version-RELEASE/swift-$version-RELEASE-windows10-arm64.exe"
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |