tis-portfolio-portable icon

PortfolioPerformance

Silent install package for PortfolioPerformance

0.76.3-1

  • package: tis-portfolio-portable
  • name: PortfolioPerformance
  • version: 0.76.3-1
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: opensource_free,wapt_public
  • target_os: windows
  • architecture: x64
  • signature_date:
  • size: 69.66 Mo
  • homepage : http://www.portfolio-performance.info/portfolio/

package           : tis-portfolio-portable
version           : 0.76.3-1
architecture      : x64
section           : base
priority          : optional
name              : PortfolioPerformance
categories        : 
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : A simple tool for calculating the overall performance of an investment portfolio
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Un outil simple pour calculer la performance globale d'un portefeuille d'investissement
description_pl    : Proste narzędzie do obliczania ogólnej wydajności portfela inwestycyjnego
description_de    : Ein einfaches Instrument zur Berechnung der Gesamtleistung eines Investitionsportfolios
description_es    : Una herramienta sencilla para calcular el rendimiento global de una cartera de inversión
description_pt    : Uma ferramenta simples para calcular o desempenho global de uma carteira de investimentos
description_it    : Uno strumento semplice per calcolare la performance complessiva di un portafoglio d'investimento
description_nl    : Een eenvoudig hulpmiddel om de totale prestatie van een beleggingsportefeuille te berekenen
description_ru    : Простой инструмент для расчета общей эффективности инвестиционного портфеля
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,wapt_public
homepage          : http://www.portfolio-performance.info/portfolio/
package_uuid      : c0dbf2dc-138e-40aa-ae16-11626aceeaa1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 1d5beafb81f362727e6dec18dea0aa939ff76728d6f8fa986dc23848b8c5503e
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-05-23T21:00:21.000000
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
signature         : BbsNh4ynQhlDSNX0K670V09OL9EO0ibuZCKtaIcHYV/4wpy2PN+XwNZla2/ZuRMi24Cpi4hNigQU+gcaW02iJyfYS7UtshBpouzUDBpmOlKxfWFldvBk7SgYxuTfwmEP6w3NrUw7TP3KW578jET4SqZ+WJS4598AHH+xeqBxlkFmbESUzPxqgojYo7VnI3zwWtU2etzz/zYOrjb3aPGCqGwjispUAZS3q85E72L98mGvPpnKOMkPpbctIutE3ArRsp+j46NxjMLXdkXHeVPw/4YoSrpS/jCvPO6He4+mI71Ul4C5xArHKjHU920YBMe7u6gOEtgP+USYwsqv1P4gsA==

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

"""


"""


app_name = "Portfolio"
editor_dir = makepath(programfiles, "Portfolio")
app_dir = makepath(editor_dir, "Portfolio")
app_path = makepath(app_dir,"Portfolio", "PortfolioPerformance.exe")
#icon_path = makepath(app_dir, "resources", "app", "build", "crushee.ico")   #tis-crushee\windows\crushee\resources\resources\build
audit_version = False


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


def install():
    # Declaring local variables
    zip_name = glob.glob(f"Portfolio*.zip")[0]

    unzipped_dir = "Portfolio"


    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    print("Extracting: %s to: %s" % (zip_name, unzipped_dir))
    unzip(zip_name, unzipped_dir)
    print('Copy Portfolio to %s' % app_dir)
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    
    # Creating custom shortcuts
    create_desktop_shortcut(app_name, target=app_path)
    create_programs_menu_shortcut(app_name, target=app_path)
   

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 dir_is_empty(editor_dir):
        remove_tree(editor_dir)

    
    # Removing shortcuts
    remove_desktop_shortcut(app_name)
    remove_programs_menu_shortcut(app_name)

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

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()
    
    git_repo = "portfolio-performance/portfolio"
    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()

7e8d2557362d7fd957ded0080b54b38373f1fbf94c3fd795e44c218ddaeb19e2 : PortfolioPerformance-0.76.3-win32.win32.aarch64.zip
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
d4bd2879b57401dd6947b7bc9f904695dc163370b9ff4635fa35cb8697737569 : WAPT/control
1d5beafb81f362727e6dec18dea0aa939ff76728d6f8fa986dc23848b8c5503e : WAPT/icon.png
33d487ca33fa5cb801975789cb9a40156b7bb6df5d7adb70442f6d8778d1e548 : luti.json
27077a94700893d8317f78174dcd8c17a592b02c3c609794bdac886e04aa888e : setup.py
187f76b158fb269a005fdb852d92e132c762965496f56ac240cd795d9b43a2c3 : update_package.py