Seite 1 von 1

[GELÖST] tis-add-fonts-Problem

Veröffentlicht: 19. Oktober 2023 - 8:45 Uhr
von skoizer
Guten Morgen,
Ich nutze Wapt 2.4 Enterprise

Ich möchte tis-add-fonts verwenden, um Schriftarten auf meinen Windows-PCs zu installieren
https://wapt.tranquil.it/store/fr/tis-add-fonts

Code: Alle auswählen

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")
Diese Codezeile scheint nicht zu funktionieren
run(f'"{bin_path}" /copy')
Die Datei FontReg64.exe, die sich im Verzeichnis fonts/ befindet, enthält die extrahierten *.ttf-Dateien aus diesem Verzeichnis
Wenn ich "FontReg64.exe /copy" über die Kommandozeile ausführe, funktioniert es, aber nicht im Skript
eine Idee

Betreff: tis-add-fonts-Problem

Veröffentlicht: 19. Oktober 2023 - 12:15 Uhr
von jpele
Hallo,
ich habe es gerade getestet und habe keine Probleme. Könnten Sie uns bitte die Fehlermeldung zukommen lassen?

Viele Grüße,
Jimmy

Betreff: tis-add-fonts-Problem

Veröffentlicht: 19. Oktober 2023 – 17:08 Uhr
von skoizer
Ich habe keine Fehler

Code: Alle auswählen

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)
>>> 
Neustart
Nichts im Verzeichnis c:\windows\fonts
Ich habe die TTF-Datei in \fonts\

Wenn ich dies hinzufüge

Code: Alle auswählen

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

Ich habe es auch mit PowerShell versucht

Code: Alle auswählen

run_powershell("%s /copy" % bin_path)

Betreff: tis-add-fonts-Problem

Veröffentlicht: 25. Oktober 2023 – 14:28 Uhr
von jpele
Tatsächlich funktioniert es nicht.
Umfangreiche Fehlerbehebung in Version 2.1.3.0-8
Vielen Dank nochmals für Ihr Feedback, hier ist in der Zwischenzeit der Code:

Code: Alle auswählen

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