# Path: umit/icm/agent/Version.py
# VERSION = g_db_helper.get_information(key='version',default="Dev")
# 
# Path: install_scripts/common.py
# ICM_AGENT_ROOT = ''
# BIN_DIRNAME = os.path.join(ICM_AGENT_ROOT,'bin')
# ICM_AGENT_MAIN = os.path.join(BIN_DIRNAME, 'icm-agent')
# CONFIG_DIR = os.path.join(ICM_AGENT_ROOT,'conf')
# DOCS_DIR = os.path.join(ICM_AGENT_ROOT,'docs')
# LOG_DIR = os.path.join(ICM_AGENT_ROOT,'log')
# LOCALES_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'locales')
# IMAGES_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'images')
# ICONS_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'icons')
# DB_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'db')
# TMP_DIR = os.path.join(ICM_AGENT_ROOT,'tmp')
# TOOLS_DIR = os.path.join(ICM_AGENT_ROOT,'tools')
# UMITLIB_DIR = os.path.join(ICM_AGENT_ROOT,'umit')


import re
import sys
import os
import os.path
import shutil
        import py2exe
        import py2exe.mf as modulefinder
        import modulefinder
    import win32com
from stat import *
from glob import glob
        from py2exe.build_exe import py2exe as BuildExe
from distutils.core import setup, Extension, Command
from distutils.command.install import install
from distutils.command.build import build
from distutils.command.sdist import sdist
from distutils import log, dir_util
from umit.icm.agent.Version import VERSION
from install_scripts.common import *
from install_scripts import common
            #print root,name
            current_path = os.path.relpath(root, ROOT_DIR)
            file_path.append((current_path,[os.path.join(current_path, name)]))

walk_dir(os.path.join(ROOT_DIR,ICM_AGENT_ROOT))

data_files = file_path
         
##################### Umit banner #######################################
print
print "%s OpenMonitor Desktop Agent for Windows %s %s" % ("#" * 10, VERSION, "#" * 10)
print
#########################################################################

options = { 'py2exe': {
                        'compressed' : 1,  
                        'optimize': 2,
                        #'bundle_files':2, 
                        'packages' : [ 'encodings', 'email','glib','twisted','google','xml.etree'],
                        'includes' : ['gobject', 'pickle', 'bz2','xml.etree'
                                    ,'twisted.internet','sqlite3','Crypto',
                                    "cairo","gtk","gio","pango","pangocairo","atk",
                                    'OpenSSL','glib', 'google', 'google.protobuf', 'zope', 'zope.interface'],                          
                        'excludes': ['Tkinter', 'pdb',"pywin", "pywin.debugger"]
                     }
         } 


setup(
		name         = 'icm-agent',

# Path: umit/icm/agent/Version.py
# VERSION = g_db_helper.get_information(key='version',default="Dev")
# 
# Path: install_scripts/common.py
# ICM_AGENT_ROOT = ''
# BIN_DIRNAME = os.path.join(ICM_AGENT_ROOT,'bin')
# ICM_AGENT_MAIN = os.path.join(BIN_DIRNAME, 'icm-agent')
# CONFIG_DIR = os.path.join(ICM_AGENT_ROOT,'conf')
# DOCS_DIR = os.path.join(ICM_AGENT_ROOT,'docs')
# LOG_DIR = os.path.join(ICM_AGENT_ROOT,'log')
# LOCALES_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'locales')
# IMAGES_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'images')
# ICONS_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'icons')
# DB_DIR = os.path.join(ICM_AGENT_ROOT,'share', 'db')
# TMP_DIR = os.path.join(ICM_AGENT_ROOT,'tmp')
# TOOLS_DIR = os.path.join(ICM_AGENT_ROOT,'tools')
# UMITLIB_DIR = os.path.join(ICM_AGENT_ROOT,'umit')


# Path: install_scripts/windows/setup.py
import re
import sys
import os
import os.path
import shutil
        import py2exe
        import py2exe.mf as modulefinder
        import modulefinder
    import win32com
from stat import *
from glob import glob
        from py2exe.build_exe import py2exe as BuildExe
from distutils.core import setup, Extension, Command
from distutils.command.install import install
from distutils.command.build import build
from distutils.command.sdist import sdist
from distutils import log, dir_util
from umit.icm.agent.Version import VERSION
from install_scripts.common import *
from install_scripts import common

            #print root,name
            current_path = os.path.relpath(root, ROOT_DIR)
            file_path.append((current_path,[os.path.join(current_path, name)]))

walk_dir(os.path.join(ROOT_DIR,ICM_AGENT_ROOT))

data_files = file_path
         
##################### Umit banner #######################################
print
print "%s OpenMonitor Desktop Agent for Windows %s %s" % ("#" * 10, VERSION, "#" * 10)
print
#########################################################################

options = { 'py2exe': {
                        'compressed' : 1,  
                        'optimize': 2,
                        #'bundle_files':2, 
                        'packages' : [ 'encodings', 'email','glib','twisted','google','xml.etree'],
                        'includes' : ['gobject', 'pickle', 'bz2','xml.etree'
                                    ,'twisted.internet','sqlite3','Crypto',
                                    "cairo","gtk","gio","pango","pangocairo","atk",
                                    'OpenSSL','glib', 'google', 'google.protobuf', 'zope', 'zope.interface'],                          
                        'excludes': ['Tkinter', 'pdb',"pywin", "pywin.debugger"]
                     }
         } 


setup(
		name         = 'icm-agent',

		version      =  VERSION,