#!/usr/bin/python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
# This file is part of WAPT
# Copyright (C) 2013 Tranquil IT Systems http://www.tranquil.it
# WAPT aims to help Windows systems administrators to deploy
# setup and update applications on users PC.
#
# WAPT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# WAPT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WAPT. If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------
import platform
from setuphelpers import *
import win32api
uninstallkey = ['Exodus']
uninstallstring= []
exefile = os.path.join(programfiles32,'Exodus','Exodus.exe')
def install():
global uninstallkey
print("installing Exodus")
run(r'exodus_0.10.0.0.exe /S')
create_programs_menu_shortcut('Exodus',exefile)
filecopyto('exodus.xml',makepath(programfiles32,'Exodus','exodus.xml'))
def session_setup():
try:
data = {
'username':get_current_user(),
'servername':get_domain_fromregistry(),
'hostname':get_computername(),
'nickname':win32api.GetUserNameEx(3)
}
except:
data = {
'username':get_current_user(),
'servername':get_domain_fromregistry(),
'hostname':get_computername(),
'nickname':get_current_user()
}
exodus_xml = open(makepath(programfiles32,'Exodus','exodus.xml'),'rb').read() % data
user_xml_path = makepath(user_appdata(),'exodus','Exodus.xml')
if not os.path.isfile(user_xml_path):
ensure_dir(user_xml_path)
open(user_xml_path,'wb').write(exodus_xml)
#import win32ui,win32con
#if win32ui.MessageBox(u"Voulez-vous lancer le client de messagerie instantanée Exodus ?", "Exodus Jabber Client", win32con.MB_YESNOCANCEL) == win32con.IDYES:
# os.startfile(exefile)