tis-spotify icon

Spotify

Silent install package for Spotify

1.2.53.440-40

  • package: tis-spotify
  • name: Spotify
  • version: 1.2.53.440-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: all
  • signature_date:
  • size: 104.46 Mo
  • installed_size: 251.58 Mo
  • homepage : https://www.spotify.com/download
  • conflicts :

package           : tis-spotify
version           : 1.2.53.440-40
architecture      : all
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      : 178aa383-0b25-425c-bff8-58cbe7570292
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-13T14:04:13.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         : C7Hk9Ntb0AArmK/0fKTqwtELytJdPI0lll1AZoXdjQsEeNuXCd7RPWzxKjHTTaJsGVqxpoWphErRWvkrC7fSsVsTw1wEReSNa+5oxdVup/SLZfcBrCXB9Lk6vWbNW+IzZqRTOopDOkBsjLYblHBui1fCMUl/HbsRDVbBWDdRKWT1RvIdLiwhDRGtvNHfhig0zCviwzz2VxFEoZFE3c/+tNLrGl0MzQlbeXUVQpuyRzBMy0u8xkMr9Qzbs4DzSrSSZvmNaiyxCrg+xl1oBypaf1VLzPLIWtUTShw4YtUcPV9pPSJduV4ucqK8ZRGO2lPIYeoFLYWK/CNjJ2rl1GVjBA==

# -*- 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)

c8f01ea8a1c8fce3bdb2664c2c5047f619ca75fa99e999f1ae81999f4ee01710 : SpotifyFullSetup.exe
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
773500b20ff5846d72c7da4c4eb9fbdbefdf398b26d9641bf82e57b1554d9f82 : WAPT/control
ae600e0d4b046ee3db8d5e373a749f75516a4e39f2e7295753ace7c30682e8a6 : WAPT/icon.png
1a5f1d5cab43277cca1bc4fd53cb14a02e230b03d924a807603881c62e6103b5 : luti.json
64ca349e3ecb7a8b6c60a31be5048a75d84c34c985e27250ec762d4041a6e1e1 : setup.py
345755b2b9a65a443910470e3be38619068cd6ebd1cd6aff5b5abe24f9f28c1b : update_package.py