|
|
|
@ -8,11 +8,6 @@ variables = { |
|
|
|
|
'web_home_page': 'https://google.fr' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# Declaring specific app values (TO CHANGE) |
|
|
|
|
chrome_app_path=makepath(programfiles32,'Google','Chrome','Application') |
|
|
|
|
chrome_bin_path=makepath(chrome_app_path,'chrome.exe') |
|
|
|
|
bin_name = 'googlechromestandaloneenterprise64.msi' if iswin64() else 'googlechromestandaloneenterprise.msi' |
|
|
|
|
|
|
|
|
|
def install(): |
|
|
|
|
|
|
|
|
|
# Read local variables file if available |
|
|
|
@ -23,6 +18,12 @@ def install(): |
|
|
|
|
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read()) |
|
|
|
|
variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Declaring specific app values |
|
|
|
|
chrome_app_path=makepath(programfiles32,'Google','Chrome','Application') |
|
|
|
|
chrome_bin_path=makepath(chrome_app_path,'chrome.exe') |
|
|
|
|
bin_name = 'googlechromestandaloneenterprise64.msi' if iswin64() else 'googlechromestandaloneenterprise.msi' |
|
|
|
|
|
|
|
|
|
print('Installing %s' % control.asrequirement()) |
|
|
|
|
|
|
|
|
|
# Specific app values |
|
|
|
@ -44,11 +45,18 @@ def install(): |
|
|
|
|
if (not skip) or (force == True) : |
|
|
|
|
def get_version_chrome(key): |
|
|
|
|
if isfile(makepath(programfiles,'Google','Chrome','Application','chrome.exe')): |
|
|
|
|
chrome_bin_path = makepath(programfiles,'Google','Chrome','Application','chrome.exe') |
|
|
|
|
return get_file_properties(makepath(programfiles,'Google','Chrome','Application','chrome.exe'))['ProductVersion'] |
|
|
|
|
return get_file_properties(chrome_bin_path)['ProductVersion'] |
|
|
|
|
|
|
|
|
|
install_msi_if_needed(bin_name |
|
|
|
|
,min_version=package_version |
|
|
|
|
,get_version=get_version_chrome) |
|
|
|
|
|
|
|
|
|
# Update var after install, as CHrome can be installed either in programfiles or programfiles32 |
|
|
|
|
if isfile(makepath(programfiles,'Google','Chrome','Application','chrome.exe')): |
|
|
|
|
chrome_app_path=makepath(programfiles,'Google','Chrome','Application') |
|
|
|
|
chrome_bin_path=makepath(chrome_app_path,'chrome.exe') |
|
|
|
|
|
|
|
|
|
# Disabling Google Chrome auto updates |
|
|
|
|
for task in ['GoogleUpdateTaskMachineCore', 'GoogleUpdateTaskMachineUA']: |
|
|
|
|
if task_exists(task): |
|
|
|
|