tis-spotify icon

Spotify

Silent install package for Spotify

1.2.55.235-40

  • package: tis-spotify
  • name: Spotify
  • version: 1.2.55.235-40
  • categories: Media
  • maintainer: WAPT Team,Tranquil IT
  • editor: Spotify AB
  • licence: proprietary_free,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: Spotify
  • architecture: x64
  • signature_date:
  • size: 112.17 Mo
  • installed_size: 251.58 Mo
  • homepage : https://www.spotify.com/download
  • conflicts :

package           : tis-spotify
version           : 1.2.55.235-40
architecture      : x64
section           : base
priority          : optional
name              : Spotify
categories        : Media
maintainer        : WAPT Team,Tranquil IT
description       : Spotify Desktop Client
depends           : 
conflicts         : tis-spotify-uwp
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
sources           : https://www.spotify.com
installed_size    : 251578703
impacted_process  : Spotify
description_fr    : Client Spotify pour Bureau
description_pl    : Spotify Desktop Client
description_de    : Spotify Client für den Desktop
description_es    : Spotify Desktop Client
description_pt    : Spotify Desktop Client
description_it    : Spotify Desktop Client
description_nl    : Spotify Desktop Client
description_ru    : Spotify Desktop Client
audit_schedule    : 
editor            : Spotify AB
keywords          : spotify,music,online,listen,streaming,play,digital,album,artist,playlist
licence           : proprietary_free,wapt_public
homepage          : https://www.spotify.com/download
package_uuid      : 73a787c8-94e7-4d6a-a1a0-d4c5b50ce776
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 10.0
max_os_version    : 
icon_sha256sum    : ae600e0d4b046ee3db8d5e373a749f75516a4e39f2e7295753ace7c30682e8a6
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-01-22T11:15:30.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         : s2/otrQmWoFjYZsT4qV3VP2/8H5kbXY1tTE7mUaO6FY9HfyHxWkZSZ90SUI41Nk62zos38YxioZflIBjVTdDj5A+3pTIxyBHBVBQzAFdgftyrVS7b+Gq2cceKJtLJQJ6NkaQo0UAOEJOhPbr9UOpz6TvM9MEa7cBFnhxcuFTMfjI3jqIxtvgJOzw5Lpfn6wT0wyNui5/Km/Dz50ppigm1W1pGLAgCnoItlI41Yb4LCwUb1GP8qkJMjFcV72a/r5LNg02zwPXCXmZfLCDxqw2+I5jR4d9jD16uAb9MOF5B3L922B3QKB1WinipgoMSQPSuANlcb0oqATId7r0ONIzow==

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

target_dir= makepath(programfiles32,"Spotify")
target_bin = makepath(target_dir,'Spotify.exe')

def install():
    # Installing the software
    
    if force or (not isfile(target_bin)) or Version(get_version_from_binary(target_bin,property_name="FileVersion")) < Version(control.get_software_version()):
        killalltasks('Spotify')
        if isdir(target_dir):
            remove_tree(target_dir)
        print('Run : SpotifyFullSetup.exe /extract "%s"' % target_dir)
        run('SpotifyFullSetup.exe /extract "%s"' % target_dir)

        if not isfile(target_bin):
            error('%s not found' % target_bin)

        if Version(get_version_from_binary(target_bin,property_name="FileVersion")) < Version(control.get_software_version()) :
            error("Spotify installation did not work well")
    else:
        print('Skip Spotify already install')

    create_programs_menu_shortcut('Spotify',target_bin)

def uninstall():
    killalltasks('Spotify')
    remove_tree(target_dir)
    remove_programs_menu_shortcut('Spotify')

def audit():
    if not isfile(target_bin):
        print('%s not found' % target_bin)    
        return "ERROR"
    spotversion = get_version_from_binary(target_bin,property_name="FileVersion")
    if (not isfile(target_bin)) or Version(spotversion) < Version(control.get_software_version()):
        print('Spotify is not in the correct version (%s , %s)' % (spotversion,control.get_software_version()))
        return "ERROR"
    else:
        return "OK"

def session_setup():

    spotify_uappdata = makepath(user_appdata(),'Spotify')
    
    if reg_key_exists(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Spotify"):
        killalltasks('Spotify')
        tmpspotify = makepath(tempfile.gettempdir(),'spotify-mig')
        mkdirs(tmpspotify)

        if isdir(makepath(spotify_uappdata,"Users")) :
            copytree2(makepath(spotify_uappdata,"Users"),makepath(tmpspotify,"Users"))

        if isfile(makepath(spotify_uappdata,'prefs')):
            filecopyto(makepath(spotify_uappdata,'prefs'),makepath(tmpspotify,'prefs'))

        if isdir(spotify_uappdata) :
            remove_tree(spotify_uappdata)
            copytree2(tmpspotify,spotify_uappdata)
            
        remove_tree(tmpspotify)

        if isfile(os.path.join(desktop(0), 'Spotify.lnk')):
            
            remove_user_desktop_shortcut('Spotify')
            create_user_desktop_shortcut('Spotify',target_bin)

        registry_deletekey(HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall","Spotify")
        remove_user_programs_menu_shortcut('Spotify')
    

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    download_dict = {
        "windows": "https://download.scdn.co/SpotifyFullSetup.exe",
    }
    download_url = download_dict[ensure_list(control.target_os)[0]]
    latest_bin = download_url.split("/")[-1]


    # Downloading latest binaries
    print("Download URL is: %s" % download_url)
    print("Downloading: %s" % latest_bin)
    wget(download_url, latest_bin, proxies=proxies)


    # Checking version from file
    if get_os_name() == "Windows" and "windows" in control.target_os.lower():
        version = get_version_from_binary(latest_bin,property_name="FileVersion")
    else:
        version = control.get_software_version()

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

    # Validating update-package-sources
    return package_updated

    # # Changing version of the package and validating update-package-sources
    # return complete_control_version(control, version)

196dea2af9e86c156071c3d3fc25e071a4b0c441e92027c4ec4947376f5540a3 : SpotifyFullSetup.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
43920418d21b5b0a214bbb432ad233eea5f65bb7d822d4934225d7195fd98898 : WAPT/control
ae600e0d4b046ee3db8d5e373a749f75516a4e39f2e7295753ace7c30682e8a6 : WAPT/icon.png
cbf0de26548b17c434d571f088ca86b105f8b265e1c0ee5028800332712d7e11 : luti.json
64ca349e3ecb7a8b6c60a31be5048a75d84c34c985e27250ec762d4041a6e1e1 : setup.py
345755b2b9a65a443910470e3be38619068cd6ebd1cd6aff5b5abe24f9f28c1b : update_package.py