tis-flow-launcher-portable icon

flow-launcher

Silent install package for flow-launcher

1.18.0-1

  • package: tis-flow-launcher-portable
  • name: flow-launcher
  • version: 1.18.0-1
  • maintainer: Amel FRADJ
  • licence: MIT license
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 210.08 Mo
  • homepage : flowlauncher.com

package           : tis-flow-launcher-portable
version           : 1.18.0-1
architecture      : all
section           : base
priority          : optional
name              : flow-launcher
categories        : 
maintainer        : Amel FRADJ
description       : Flow Launcher - Quick file search and app launcher for Windows with community-made plugins (Flow-Launcher Team)
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Flow Launcher - Recherche rapide de fichiers et lanceur d'applications pour Windows avec des plugins créés par la communauté (Flow-Launcher Team)
description_pl    : Flow Launcher - Szybkie wyszukiwanie plików i uruchamianie aplikacji dla Windows z wtyczkami stworzonymi przez społeczność (Flow-Launcher Team)
description_de    : Flow Launcher - Schnelle Dateisuche und App-Startprogramm für Windows mit von der Community entwickelten Plugins (Flow-Launcher Team)
description_es    : Flow Launcher - Buscador rápido de archivos y lanzador de aplicaciones para Windows con plugins creados por la comunidad (Flow-Launcher Team)
description_pt    : Flow Launcher - Pesquisa rápida de ficheiros e lançador de aplicações para Windows com plugins criados pela comunidade (Flow-Launcher Team)
description_it    : Flow Launcher - Ricerca rapida di file e avvio di applicazioni per Windows con plugin creati dalla comunità (Flow-Launcher Team)
description_nl    : Flow Launcher - Snel bestanden zoeken en programma's starten voor Windows met door de gemeenschap gemaakte plugins (Flow-Launcher Team)
description_ru    : Flow Launcher - Быстрый поиск файлов и запуск приложений для Windows с плагинами, создаваемыми сообществом (Flow-Launcher Team)
audit_schedule    : 
editor            : 
keywords          : 
licence           : MIT license
homepage          : flowlauncher.com
package_uuid      : 563e2901-d87c-43b4-a239-ca2cd0ff46f2
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 8c552ff5ec2a52fc31e31cd84c38da82e07d8e3f2463a4f904f05c9e1a49741e
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : qCMEcgSaiYa6CcGW6zZ0ZO4Eni0qZA/ezXgzL82uJmMH9CYuS3ubIZP1FOcBFL2X0tQj9BYTCsvDv5Gs7aZNiaHnBtMzDLlrElb+K6ae4+Gx/208JvgkNNSapE2d0I4RnV5LIb6max5ACvIHVq3EVwsUBAAEqjNoNUKQFzpdnu7lh1mIXiih5nkMKv/kOts5MMw1ulqgMX7L31Dn48J4FXLrc4+B2bVJYT1XDh9WCVV/ESfGVCPaUl0wo006nFDH/JOiJyLy/Cf/d5iZs/QxVDZkEi1ZUrBXrdxtJgMUCYdGTGfrLLWaZRXi40F9Q7h4ZIkdC6hiHlDdNOGeqkA60A==
signature_date    : 2024-06-24T10:00:11.073068
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 glob
import os

app_name = "Flow-Launcher-Portable"
app_dir = makepath(programfiles, app_name)
app_path = makepath(app_dir,"flow.launcher.exe")
audit_version = False

def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")

def install():
    # Find the zip file
    zip_name = glob.glob(f"{app_name}*.zip")[0]
    unzip_dest = makepath(".", "temp_dezip")
    
    # Remove the temporary directory if it already exists
    if isdir(unzip_dest):
        remove_tree(unzip_dest)
    
    # Extract the zip file
    print(f"Extracting: {zip_name} to: {unzip_dest}")
    unzip(zip_name, unzip_dest)
    
    # List the contents of the temporary directory
    extracted_files = os.listdir(unzip_dest)
    print(f"Contents of the temporary directory after extraction: {extracted_files}")
    
    # Find the name of the extracted directory or the extracted files
    if not extracted_files:
        raise Exception("No extracted files or directories found")
    
    # If the first extracted item is a directory, use that directory, otherwise use unzip_dest
    first_extracted_item = makepath(unzip_dest, extracted_files[0])
    if isdir(first_extracted_item):
        unzipped_dir = first_extracted_item
    else:
        unzipped_dir = unzip_dest
    
    # Verify that the extracted directory exists
    if not isdir(unzipped_dir):
        raise Exception(f"Invalid source directory for copytree2: {unzipped_dir}")
    
    # Remove the old application directory if it exists
    if isdir(app_dir):
        remove_tree(app_dir)
    
    # Move the new extracted directory or files to the final installation directory
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    
    # Remove the temporary directory
    remove_tree(unzip_dest)
    
    # Create custom shortcuts
    create_programs_menu_shortcut(app_name, target=app_path)
    
    # Get the desktop path
    desktop_path = os.path.expanduser("~\\Desktop")
    desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
    
    # Create the desktop shortcut
    print(f"Creating desktop shortcut: {desktop_shortcut_path}")
    create_shortcut(desktop_shortcut_path, target=app_path)
    
    print(f"Desktop shortcut created successfully: {desktop_shortcut_path}")

def create_shortcut(shortcut_path, target):
    try:
        create_desktop_shortcut(shortcut_path, target=target)
        return True
    except Exception as e:
        print(f"Error creating shortcut: {e}")
        return False

def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_installed_version(app_path)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status

def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)
        if isdir(app_dir):
            print(f"Failed to remove installation directory: {app_dir}")
        else:
            print(f"Installation directory removed successfully: {app_dir}")

    # Removing shortcuts
    desktop_path = os.path.expanduser("~\\Desktop")
    desktop_shortcut_path = makepath(desktop_path, f"{app_name}.lnk")
    
    if os.path.exists(desktop_shortcut_path):
        print(f"Removing desktop shortcut: {desktop_shortcut_path}")
        os.remove(desktop_shortcut_path)
    
    remove_programs_menu_shortcut(app_name)

    # Additional check
    if os.path.exists(desktop_shortcut_path):
        print(f"Failed to remove desktop shortcut: {desktop_shortcut_path}")
    else:
        print(f"Desktop shortcut removed successfully: {desktop_shortcut_path}")

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

    
    git_repo = "Flow-Launcher/Flow.Launcher"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith(".zip") :
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v", "")
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.zip'):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()

91fe9cedcf378bd4156075fcdcd6bb1befc50115ac94897e9a3f77c13685c7f3 : Flow-Launcher-Portable.zip
c23411bb01c3d24098240ce5a77b34c9df5aacb4cf325ff841f9bead45097464 : setup.py
66c5e47c7f73f4dd2bbf7df575fe59d990f82777e11c40aac9a9c7913a4af654 : update_package.py
8c552ff5ec2a52fc31e31cd84c38da82e07d8e3f2463a4f904f05c9e1a49741e : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
7ac0dc4aa7ec5fdcde2f4c8d028b38f684a0549310aa9e32e09ff7771c71f867 : luti.json
32766a3ab7a9bee6b1377a6dfc5b60a6949c4aaa7562347037ffccf2ed8c025b : WAPT/control