# 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 os
import sys
    import py2exe.mf as modulefinder
    import modulefinder
import win32com
from py2exe.build_exe import py2exe as build_exe
from umit.core.Version import VERSION
from install_scripts import common


# win32com changes its __path__ to be able to do imports from
# win32comext (which is not a python package), but the modulefinder
# does not handle such situtation and thus win32com.shell (which is
# really win32comext.shell) cannot be found. Let's fix this here so
# umit.core.BasePaths still works after we run py2exe over it.
try:
except ImportError:
    # This py2exe is too old, will use the standard modulefinder
for path in win32com.__path__[1:]:
    modulefinder.AddPackagePath("win32com", path)

class umit_py2exe(build_exe):
    def run(self):
        build_exe.run(self)
        self.finish_banner()

    def finish_banner(self):
        print
        print "%s The compiled version of Umit %s is in ./dist %s" % \
              ("#"*10, VERSION, "#"*10)
        print


py2exe_cmdclass = {"py2exe": umit_py2exe}

py2exe_options = dict(
        zipfile = None,
        service = [{'modules': ['umit_scheduler'], 'cmdline_style': 'custom'}],
        windows = [{

# 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/py2exe_setup.py
import os
import sys
    import py2exe.mf as modulefinder
    import modulefinder
import win32com
from py2exe.build_exe import py2exe as build_exe
from umit.core.Version import VERSION
from install_scripts import common


# win32com changes its __path__ to be able to do imports from
# win32comext (which is not a python package), but the modulefinder
# does not handle such situtation and thus win32com.shell (which is
# really win32comext.shell) cannot be found. Let's fix this here so
# umit.core.BasePaths still works after we run py2exe over it.
try:
except ImportError:
    # This py2exe is too old, will use the standard modulefinder
for path in win32com.__path__[1:]:
    modulefinder.AddPackagePath("win32com", path)

class umit_py2exe(build_exe):
    def run(self):
        build_exe.run(self)
        self.finish_banner()

    def finish_banner(self):
        print
        print "%s The compiled version of Umit %s is in ./dist %s" % \
              ("#"*10, VERSION, "#"*10)
        print


py2exe_cmdclass = {"py2exe": umit_py2exe}

py2exe_options = dict(
        zipfile = None,
        service = [{'modules': ['umit_scheduler'], 'cmdline_style': 'custom'}],
        windows = [{

            "script": common.UMIT_MAIN,
