{
    "##": [
        "The author of FileZilla explicitly prohibits the use of package managers to download files, as this places undue load on their servers.",
        "Consequently, Scoop must not use any FileZilla-related URLs for downloading or automatic updates.",
        "For further information, please refer to the following resources:",
        "- https://github.com/ScoopInstaller/Extras/issues/9179",
        "- https://forum.filezilla-project.org/viewtopic.php?f=1&t=55635&p=192010&hilit=winget#p192010"
    ],
    "version": "3.70.4",
    "description": "Fast and reliable cross-platform FTP, FTPS and SFTP client with lots of useful features and an intuitive graphical user interface.",
    "homepage": "https://filezilla-project.org",
    "license": "GPL-2.0-or-later",
    "url": "https://packages.chocolatey.org/filezilla.3.70.4.nupkg",
    "hash": "95db8c2744f3e4f89ee9e574b0d1ecc5e1d1c9a45ba9f71dfb995c51572c3a36",
    "extract_dir": "tools",
    "architecture": {
        "64bit": {
            "pre_install": [
                "Get-ChildItem -Path $dir -Exclude '*64*' -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue",
                "Get-ChildItem -Path $dir -include '*.exe' -Recurse | Rename-Item -NewName 'setup.exe'"
            ]
        },
        "32bit": {
            "pre_install": [
                "Get-ChildItem -Path $dir -Exclude '*32*' -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue",
                "Get-ChildItem -Path $dir -include '*.exe' -Recurse | Rename-Item -NewName 'setup.exe'"
            ]
        }
    },
    "installer": {
        "script": [
            "Expand-7zipArchive -Path \"$dir\\setup.exe\" -DestinationPath $dir -Switches '-xr!$* -xr!unins*' -Removal",
            "[xml]$xml = Get-Content -Path \"$dir\\docs\\fzdefaults.xml.example\" -Encoding ascii",
            "$comments = $xml.ChildNodes | Where-Object { $_.NodeType.ToString() -eq 'Comment' }",
            "$comments | ForEach-Object { $_.ParentNode.RemoveChild($_) | Out-Null }",
            "$xml.SelectSingleNode('//Setting[@name=''Disable update check'']').InnerText = '1'",
            "$xml.SelectSingleNode('//Setting[@name=''Cache directory'']').InnerText = 'data\\cache'",
            "$xml.SelectSingleNode('//Setting[@name=''Config Location'']').InnerText = 'data\\config'",
            "$xml.Save(\"$dir\\fzdefaults.xml\")"
        ]
    },
    "post_install": [
        "# Data Migration (Removed on 1 December 2026)",
        "if (-not (Test-Path \"$persist_dir\\config\")) { return }",
        "ensure \"$persist_dir\\data\\config\" | Out-Null",
        "Copy-Item -Path \"$persist_dir\\config\\*\" -Destination \"$persist_dir\\data\\config\" -Force -Recurse",
        "Remove-Item -Path \"$persist_dir\\config\" -Recurse -Force -ErrorAction SilentlyContinue"
    ],
    "bin": "filezilla.exe",
    "shortcuts": [
        [
            "filezilla.exe",
            "FileZilla"
        ]
    ],
    "persist": "data",
    "checkver": {
        "url": "https://community.chocolatey.org/packages/filezilla",
        "regex": "FileZilla <span>([\\d.]+)<"
    },
    "autoupdate": {
        "url": "https://packages.chocolatey.org/filezilla.$version.nupkg",
        "hash": {
            "url": "https://community.chocolatey.org/packages/filezilla/$version",
            "regex": "$sha256.*?$basename"
        }
    }
}
