Pagina 1 di 1

[RISOLTO] problema tis-add-fonts

Pubblicato: 19 ottobre 2023 - 08:45
di skoizer
Buongiorno,
Sono su Wapt 2.4 Enterprise

Vorrei usare tis-add-fonts per installare i font sui miei PC Windows
https://wapt.tranquil.it/store/fr/tis-add-fonts

Codice: Seleziona tutto

def install():
    # Declaring local variables
    if iswin64():
        bin_name = "FontReg64.exe"
    else:
        bin_name = "FontReg32.exe"
    fonts_path = os.path.abspath("fonts")
    bin_path = makepath(fonts_path, bin_name)

    # Installing the fonts
    for zip in glob.glob("*.zip"):
        unzip(zip, "fonts", "*.ttf", extract_with_full_paths=False)
    for font in glob.glob(f"{fonts_path}/*.ttf"):
        print("Installing Font: %s" % font.split("\\")[-1])
    run(f'"{bin_path}" /copy')
    print("INFO: The PC must be rebooted for the fonts to appear")
Questa riga di codice non sembra funzionare
esegui(f'"{bin_path}" /copia')
Il file FontReg64.exe, situato in fonts/, contiene i file *.ttf estratti in quella directory
Se utilizzo la riga di comando per eseguire "FontReg64.exe /copy", funziona, ma non nello script
un'idea

Re: problema tis-add-fonts

Pubblicato: 19 ottobre 2023 - 12:15
di jpele
Ciao,
l'ho appena testato e non ho riscontrato alcun problema. Potresti per favore copiarci il messaggio di errore?

Cordiali saluti,
Jimmy

Re: problema tis-add-fonts

Pubblicato: 19 ottobre 2023 - 17:08
di skoizer
Non ho errori

Codice: Seleziona tutto

Ligne de Commande : install "c:\waptdev\tis-add-fonts_2.1.3.0-5_windows_PROD\WAPT\.."
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Installing WAPT files c:\waptdev\tis-add-fonts_2.1.3.0-5_windows_PROD
Installing Font: Lato-Regular.ttf
INFO: The PC must be rebooted for the fonts to appear

Results :

 === install packages ===
  c:\waptdev\tis-add-fonts_2.1.3.0-5_windows_PROD | cd12-add-fonts (2.1.3.0-5)
>>> 
riavviare
niente in c:\windows\fonts
Ho il file ttf in \fonts\

se aggiungo questo

Codice: Seleziona tutto

    run(f'"{bin_path}" /copy')
    print( "%s /copy" % bin_path)
Ho un c:\waptdev\tisadd-fonts_2.1.3.0-6_windows_PROD\fonts\FontReg64.exe /copy

Ho provato anche con PowerShell

Codice: Seleziona tutto

run_powershell("%s /copy" % bin_path)

Re: problema tis-add-fonts

Pubblicato: 25 ottobre 2023 - 14:28
di jpele
In effetti, non funziona.
Correzione estesa in 2.1.3.0-8
Grazie ancora per il tuo feedback, nel frattempo ecco il codice:

Codice: Seleziona tutto

    # Installing the fonts
    os.chdir(fonts_path)
    run(f'"{bin_name}" /copy')
    print("INFO: The PC must be rebooted for the fonts to appear")