tis-openoffice icon

Apache OpenOffice

Silent install package for Apache OpenOffice

4.1.15-20

  • package: tis-openoffice
  • name: Apache OpenOffice
  • version: 4.1.15-20
  • categories: Office
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELE,Gaetan SEGAT
  • editor: Apache Software Foundation
  • licence: Apache-2.0
  • locale: fr
  • target_os: windows
  • impacted_process: soffice,sbase,scalc,sdraw,simpress,smath,sweb,swriter
  • architecture: all
  • signature_date:
  • size: 123.87 Mo
  • installed_size: 340.60 Mo
  • homepage : https://www.openoffice.org/
  • depends:
  • conflicts :

package           : tis-openoffice
version           : 4.1.15-20
architecture      : all
section           : base
priority          : optional
name              : Apache OpenOffice
categories        : Office
maintainer        : WAPT Team,Tranquil IT,Jimmy PELE,Gaetan SEGAT
description       : OpenOffice is a stable open source office suite. If you want more modern office suite please check LibreOffice
depends           : tis-vcredist
conflicts         : tis-libreoffice-still,tis-libreoffice-fresh
maturity          : PROD
locale            : fr
target_os         : windows
min_wapt_version  : 2.0
sources           : https://www.openoffice.org/download/index.html
installed_size    : 340602880
impacted_process  : soffice,sbase,scalc,sdraw,simpress,smath,sweb,swriter
description_fr    : OpenOffice est une suite bureautique open source stable. Si vous souhaitez une suite bureautique plus moderne, consultez LibreOffice
description_pl    : OpenOffice jest stabilnym pakietem biurowym open source. Jeśli chcesz mieć bardziej nowoczesny pakiet biurowy, sprawdź LibreOffice
description_de    : OpenOffice ist ein stabiles Open-Source-Büropaket. Wenn Sie ein moderneres Office-Paket wünschen, sollten Sie sich LibreOffice ansehen
description_es    : OpenOffice es una suite ofimática estable de código abierto. Si desea una suite ofimática más moderna, consulte LibreOffice
description_pt    : O OpenOffice é uma suite estável de escritório de código aberto. Se quiser uma suite de escritório mais moderna, por favor consulte o LibreOffice
description_it    : OpenOffice è una suite per ufficio open source stabile. Se volete una suite per ufficio più moderna, consultate LibreOffice
description_nl    : OpenOffice is een stabiele open source office suite. Als u een moderner kantoorpakket wilt, kijk dan eens naar LibreOffice
description_ru    : OpenOffice - это стабильный офисный пакет с открытым исходным кодом. Если вам нужен более современный офисный пакет, ознакомьтесь с LibreOffice
audit_schedule    : 
editor            : Apache Software Foundation
keywords          : bureautique,office,suite
licence           : Apache-2.0
homepage          : https://www.openoffice.org/
package_uuid      : 25877868-40dc-41c2-9527-1f359634f7b9
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://cwiki.apache.org/confluence/display/OOOUSERS/Releases
min_os_version    : 6.1
max_os_version    : 
icon_sha256sum    : a0f87f472605372a37f6b96a6b01bda97515f02cfc30f9d577a3427ed10abd8a
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : fpQtFNDZUF311XxwYxs+8ALVvJcTcGfD4ua7SWuyyEyJqk2U/Cbm/hL2tLYGJ5mS+lB3CbMx5JqgXM7Jxjz+21gLgPEmU4p3sDCy8y/ftc97QNHDNS59q/zRp6iJ3M4zbM7qbmLcRTjL0DLCsWmAMxfz3XHM8sDrDWHe1BPZYQEQhDOD6yuNxx4squpGxC0AheE1CxxrYkgR/5fpWHtGxcbLSdwjDdrR8cFy9esVuFhJn/dwja4YjW3ltX+pGMDACxA8xG9Cd1EAGKHjz0j4727bKMZXoj7SP9KwnvXHgmqWDVhv7UDYlFUETqCPecRI0MFVvXlafbHweyM/j99SkA==
signature_date    : 2023-12-27T18:01:46.090231
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *
import json

r"""

https://wiki.documentfoundation.org/Deployment_and_Migration

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
app_name = "OpenOffice"
# silent_args_dict = {"SETUP_USED": 1, "ADDLOCAL": "ALL", "CREATEDESKTOPLINK": 0, "RebootYesNo": "No", "REMOVE": "gm_o_Onlineupdate"}
silent_args_dict = {
    "SETUP_USED": 1,
    "ALLUSERS": 1,
    "CREATEDESKTOPLINK": 0,
    "REBOOTYESNO": "No",
    "ISCHECKFORPRODUCTUPDATES": 0,
    "VC_REDIST": 0,
    "QUICKSTART": 0,
    "ADDLOCAL": "ALL",
    "REMOVE": "gm_o_Onlineupdate",
}
force_register_as_default_mso_app = False  # Make sure that AOO will BE the default application for any Office applications
force_no_register_as_default_mso_app = False  # Make sure that AOO will NOT BE the default application for any Office applications


def install():
    # Initializing variables
    package_version = control.get_software_version()
    bin_name = glob.glob("*.msi")[0]

    # Uninstalling LibreOffice if detected
    for uninstall in installed_softwares(name="LibreOffice"):
        if uninstall_key_exists(uninstall["key"]):
            print("Removing: %s" % (uninstall["name"]))
            run(uninstall_cmd(uninstall["key"]))

    # Uninstalling OpenOffice if too old and previously exe install
    for uninstall in installed_softwares(name=app_name):
        # if Version(uninstall["version"]) < Version(package_version):
        if Version(uninstall["version"]) < Version(get_version_from_binary(bin_name)) or Version(uninstall["version"]) == Version("4.111.9808"):
            if uninstall_key_exists(uninstall["key"]):
                print("Removing: %s" % (uninstall["name"]))
                run(uninstall_cmd(uninstall["key"]))

    # Defining Office default applications
    """
    REGISTER_ALL_MSO_TYPES (default=0) - use OpenOffice as the default application for Microsoft Office file formats 
    REGISTER_NO_MSO_TYPES  (default=0) - don't use OpenOffice as default application for any Microsoft Office file formats 
    REGISTER_DOC           (default=0) - use OpenOffice as the default application for Microsoft Word file format .doc (You can use similar for .xls, .ppt etc.)
    """
    if not force_register_as_default_mso_app or not force_no_register_as_default_mso_app:
        # Checking if MSO file extensions refer to MSO apps and affect AOO if not
        if get_file_assocation(".doc") is not None and get_file_assocation(".docx") is not None:
            if not get_file_assocation(".doc").startswith("Word") and not get_file_assocation(".docx").startswith("Word"):
                silent_args_dict["REGISTER_DOC"] = 1
                silent_args_dict["REGISTER_DOCX"] = 1
        else:
            silent_args_dict["REGISTER_DOC"] = 1
            silent_args_dict["REGISTER_DOCX"] = 1
        if not get_file_assocation(".xls") is not None and get_file_assocation(".xlsx") is not None:
            if not get_file_assocation(".xls").startswith("Excel") and not get_file_assocation(".xlsx").startswith("Excel"):
                silent_args_dict["REGISTER_XLS"] = 1
                silent_args_dict["REGISTER_XLSX"] = 1
        else:
            silent_args_dict["REGISTER_XLS"] = 1
            silent_args_dict["REGISTER_XLSX"] = 1
        if get_file_assocation(".ppt") is not None and get_file_assocation(".pptx") is not None:
            if not get_file_assocation(".ppt").startswith("PowerPoint") and not get_file_assocation(".pptx").startswith("PowerPoint"):
                silent_args_dict["REGISTER_PPT"] = 1
                silent_args_dict["REGISTER_PPTX"] = 1
        else:
            silent_args_dict["REGISTER_PPT"] = 1
            silent_args_dict["REGISTER_PPTX"] = 1
        if get_file_assocation(".pub") is not None:
            if get_file_assocation(".pub").startswith("Publisher"):
                silent_args_dict["REGISTER_PUB"] = 1
        else:
            silent_args_dict["REGISTER_PUB"] = 1

    if not force_register_as_default_mso_app or not force_no_register_as_default_mso_app:
        # Checking if a version of MSO is installed
        count_mso_apps = 0
        if installed_softwares(name="Microsoft Office "):
            count_mso_apps += 1
        if installed_softwares(name="Office 365"):
            count_mso_apps += 1
        if installed_softwares(name="Microsoft 365"):
            count_mso_apps += 1

    if force_register_as_default_mso_app:
        # Register AOO as default MSO apps
        silent_args_dict["REGISTER_ALL_MSO_TYPES"] = 1
    elif force_no_register_as_default_mso_app:
        # Do not register AOO as default MSO apps
        silent_args_dict["REGISTER_NO_MSO_TYPES"] = 1
    else:
        if count_mso_apps == 0:
            # Register AOO as default MSO apps if no MSO version was detected
            silent_args_dict["REGISTER_ALL_MSO_TYPES"] = 1

    # Installing the package
    print("Installing: %s" % app_name)
    # run(r'msiexec /a "%s" /lp! "c:\temp\%s.log" TARGETDIR="c:\temp\%s" /q' % (bin_name, app_name, app_name))
    install_msi_if_needed(bin_name, properties=silent_args_dict, timeout=600)

# -*- coding: utf-8 -*-
from setuphelpers import *
import json


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    api_url = "https://sourceforge.net/projects/openofficeorg.mirror/best_release.json"
    bin_contains = "Apache_OpenOffice_"

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    json_load = json.loads(wgets(api_url, proxies=proxies))
    for download in json_load["platform_releases"]:
        latest_bin = json_load["platform_releases"][download]["filename"].split("/")[-1]
        if bin_contains in latest_bin and "_Win_x86_install_" in latest_bin:
            download_url = json_load["platform_releases"][download]["url"]
            version = json_load["platform_releases"][download]["filename"].split("/")[1]
            break

    if not "en" in control.locale:
        download_url = download_url.replace("en-US", control.locale)
        latest_bin = latest_bin.replace("en-US", control.locale)

    print("Latest %s version is: %s" % (app_name, version))
    print("Download url is: %s" % download_url)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        result = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
    # control.set_software_version(version)
    control.save_control_to_wapt()

    # Unzipping .msi contained in the .exe file
    print("Unzipping .msi contained in the .exe file")
    unzip_with_7zip(latest_bin, target=".", filenames=["openoffice*"])

    # Deleting useless binaries
    remove_file(latest_bin)

    # Validating update-package-sources
    return result

6c36b5bc4bbc7ee0e13e0ad8c02ed307d0272e3f2441bf82f308d196067b1a7b : setup.py
ac6b2b95b1828efb24f02de007cdbc4ccd27fcb5007b15c2bb7cf0dbc89a50cc : update_package.py
bf4682a470ae88f57c4a0afeaab82af076bbff65b6c3d55a2c5a2bed63f67ff2 : openoffice1.cab
a0f87f472605372a37f6b96a6b01bda97515f02cfc30f9d577a3427ed10abd8a : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
0696b68e9980fca269d911d716861f53db9a78dca98a5b6845fd4848467a4364 : luti.json
9f9cbbfc38b142fa2e4092742eece8182ef09d346b380ea91bd97bfba99ba6ef : openoffice4115.msi
1610dd0577f76c9c76678e0ee02c717927c041edd768701a5b7eb1a6e4d0c3f3 : WAPT/control