# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
"""
{
"key":"{A4EA9EE5-7CFF-4C5F-B159-B9B4E5D2BDE2}",
"name":"Microsoft .NET Framework 4.8 Targeting Pack (ENU)",
"version":"4.8.03761",
"install_date":"2024-03-21 00:00:00",
"install_location":"",
"uninstall_string":"MsiExec.exe /X{A4EA9EE5-7CFF-4C5F-B159-B9B4E5D2BDE2}",
"publisher":"Microsoft Corporation",
"system_component":0,
"win64":false
},
{
"key":"{BAAF5851-0759-422D-A1E9-90061B597188}",
"name":"Microsoft .NET Framework 4.8 Targeting Pack",
"version":"4.8.03761",
"install_date":"2024-03-21 00:00:00",
"install_location":"",
"uninstall_string":"MsiExec.exe /X{BAAF5851-0759-422D-A1E9-90061B597188}",
"publisher":"Microsoft Corporation",
"system_component":0,
"win64":false
}
{
"key":"{5FBEC2B8-93D7-4764-BFF7-DD982007512E}",
"name":"Intel(R) C++ Redistributables on Intel(R) 64",
"version":"20.0.166",
"install_date":"2024-03-21 00:00:00",
"install_location":"",
"uninstall_string":"MsiExec.exe /X{5FBEC2B8-93D7-4764-BFF7-DD982007512E}",
"publisher":"Intel Corporation",
"system_component":0,
"win64":false
},
{
"key":"{89A44259-A49E-41E5-9EDF-D9F2FD6B4407}",
"name":"Intel(R) C++ Redistributables on IA-32",
"version":"20.0.166",
"install_date":"2024-03-21 00:00:00",
"install_location":"",
"uninstall_string":"MsiExec.exe /X{89A44259-A49E-41E5-9EDF-D9F2FD6B4407}",
"publisher":"Intel Corporation",
"system_component":0,
"win64":false
}
{
"key":"{00C10082-2AE2-4A55-9C3D-5A04D4DF35D0}",
"name":"Demo3D Shell Extensions",
"version":"2.0.5",
"install_date":"2024-03-21 00:00:00",
"install_location":"C:\\Program Files (x86)\\Emulate3D Ltd\\Demo3D Shell Extensions\\",
"uninstall_string":"MsiExec.exe /I{00C10082-2AE2-4A55-9C3D-5A04D4DF35D0}",
"publisher":"Emulate3D Ltd",
"system_component":0,
"win64":true
},
{
"key":"{3B6F4187-6F49-4BD1-B5BE-851E000BCC31}",
"name":"Emulate3D 2022",
"version":"15.0.11383",
"install_date":"2024-03-21 00:00:00",
"install_location":"C:\\Program Files (x86)\\Emulate3D 2022\\",
"uninstall_string":"MsiExec.exe /X{3B6F4187-6F49-4BD1-B5BE-851E000BCC31}",
"publisher":"Emulate3D Ltd",
"system_component":0,
"win64":true
}
"""
def install():
if iswin64():
install_msi_if_needed("SlimDX Runtime .NET 4.0 x64 January 2012.msi") # , silentflags="/quiet /norestart"
install_msi_if_needed("SlimDX Runtime .NET 4.0 x86 January 2012.msi") # , silentflags="/quiet /norestart"
install_msi_if_needed("ww_icl_redist_ia32_2020.0.166.msi")
if iswin64():
install_msi_if_needed("ww_icl_redist_intel64_2020.0.166.msi")
install_exe_if_needed(
"Emulate3D2022_15_0_0_11383.exe",
silentflags="/passive",
key="{3B6F4187-6F49-4BD1-B5BE-851E000BCC31}",
min_version=control.get_software_version(),
timeout=900,
)
# run('"Emulate3D2022_15_0_0_11313.exe" /passive E3D_SERIALNO="serial_key"')
# run('"Emulate3D2022_15_0_0_11383.exe" /passive')
# shutil.copy2("SetULSKey.bat", "c:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp")
def uninstall():
# remove_desktop_shortcut("Emulate3D 2022 (64-bit).lnk")
# remove_file(r"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\SetULSKey.bat")
# run(r"MsiExec.exe /X{3B6F4187-6F49-4BD1-B5BE-851E000BCC31} -quiet")
if uninstall_key_exists("{00C10082-2AE2-4A55-9C3D-5A04D4DF35D0}"):
run(r"MsiExec.exe /x{00C10082-2AE2-4A55-9C3D-5A04D4DF35D0} /qb")
# run(r"MsiExec.exe /X{89A44259-A49E-41E5-9EDF-D9F2FD6B4407} -quiet")
# run(r"MsiExec.exe /X{A2199A06-89C4-4187-AA4A-3A9676FB799D} -quiet")
# run(r"MsiExec.exe /X{7EBD0E43-6AC0-4CA8-9990-00E50069AD29} -quiet")
app_dir = makepath(programfiles32, "Emulate3D 2022")
if isdir(app_dir):
remove_tree(app_dir)