Changeset 4058

Show
Ignore:
Timestamp:
02/15/09 19:10:46 (4 years ago)
Author:
gpolo
Message:

Code relayout

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/install_scripts/windows/setup.py

    r4042 r4058  
    2121# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 
    2222 
    23 import sys 
    2423import os.path 
    2524import os 
     
    3130from umitCore.Version import VERSION 
    3231 
    33 ################################################################################ 
     32############################################################################## 
    3433# Main Variables 
    3534 
     
    5857 
    5958 
    60 ################################################################################ 
     59############################################################################## 
    6160# Installation variables 
    6261 
    6362# What to copy to the destiny 
    64 # Here, we define what should be put inside the directories set in the beginning 
    65 # of this file. This list contain tuples where the first element contains 
    66 # a path to where the other elements of the tuple should be installed. 
    67 # The first element is a path in the INSTALLATION PREFIX, and the other elements 
    68 # are the path in the source base. 
     63# Here, we define what should be put inside the directories set in the 
     64# beginning of this file. This list contain tuples where the first element 
     65# contains a path to where the other elements of the tuple should be installed. 
     66# The first element is a path in the INSTALLATION PREFIX, and the other 
     67# elements are the path in the source base. 
    6968# Ex: [("share/pixmaps", "/umit/trunk/share/pixmaps/test.png")] 
    7069# This will install the test.png file in the installation dir share/pixmaps. 
    7170svg = glob(os.path.join('share', 'pixmaps', '*.svg')) 
    72 data_files = [ (pixmaps_dir, glob(os.path.join(pixmaps_dir, '*.svg')) + 
    73                              glob(os.path.join(pixmaps_dir, '*.png')) + 
    74                              glob(os.path.join(pixmaps_dir, '*.xpm')) + 
     71data_files = [ 
     72        (pixmaps_dir, glob(os.path.join(pixmaps_dir, '*.svg')) + 
     73            glob(os.path.join(pixmaps_dir, '*.png')) + 
     74            glob(os.path.join(pixmaps_dir, '*.xpm')) + 
     75            glob(os.path.join(pixmaps_dir, 'umit.o*')) + 
     76            glob(os.path.join(pixmaps_dir, 'radialnet', 'application', 
     77                '*.png')) + 
     78            glob(os.path.join(pixmaps_dir, 'radialnet', 'icons', 
     79                '*.png'))), 
    7580 
    76                              glob(os.path.join(pixmaps_dir, 'umit.o*'))), 
     81        (config_dir, [os.path.join(config_dir, 'umit.conf')] + 
     82            [os.path.join(config_dir, 'scan_profile.usp')] + 
     83            [os.path.join(config_dir, 'umit_version')] + 
     84            [os.path.join(config_dir, 'umitng.db')] + 
     85            [os.path.join(config_dir, 'timeline-settings.conf')] + 
     86            [os.path.join(config_dir, 'tl_colors_evt_std.conf')] + 
     87            [os.path.join(config_dir, 'scheduler-schemas.conf')] + 
     88            [os.path.join(config_dir, 'scheduler-profiles.conf')] + 
     89            [os.path.join(config_dir, 'scheduler.log')] + 
     90            [os.path.join(config_dir, 'smtp-schemas.conf')] + 
     91            glob(os.path.join(config_dir, '*.xml'))+ 
     92            glob(os.path.join(config_dir, '*.txt'))), 
    7793 
    78                (config_dir, [os.path.join(config_dir, 'umit.conf')] + 
    79                             [os.path.join(config_dir, 'scan_profile.usp')] + 
    80                             [os.path.join(config_dir, 'umit_version')] + 
    81                             [os.path.join(config_dir, 'umitng.db')] + 
    82                             [os.path.join(config_dir, 
    83                                           'timeline-settings.conf')] + 
    84                             [os.path.join(config_dir, 
    85                                           'tl_colors_evt_std.conf')] + 
    86                             [os.path.join(config_dir, 
    87                                           'scheduler-schemas.conf')] + 
    88                             [os.path.join(config_dir, 
    89                                           'scheduler-profiles.conf')] + 
    90                             [os.path.join(config_dir, 'scheduler.log')] + 
    91                             [os.path.join(config_dir, 'smtp-schemas.conf')] + 
    92                             glob(os.path.join(config_dir, '*.xml'))+ 
    93                             glob(os.path.join(config_dir, '*.txt'))), 
    94                # Radialnet 
    95                 (os.path.join(pixmaps_dir, 'radialnet', 'application'),                            glob(os.path.join(pixmaps_dir, 'radialnet','application', '*.png')) ), 
    96                 (os.path.join(pixmaps_dir, 'radialnet', 'icons'),                            glob(os.path.join(pixmaps_dir, 'radialnet','icons', '*.png')) ), 
    97                  
    98                 # Network Inventory  
    99                 (os.path.join(pixmaps_dir, 'networkinventory'),                            glob(os.path.join(pixmaps_dir, 'networkinventory', '*.png')) ), 
    100                  
    101                 # InterfaceEditor 
    102                 (os.path.join(pixmaps_dir, 'uie'),                            glob(os.path.join(pixmaps_dir, 'uie', '*.png')) ), 
    103                  
    104                # umitDB SQL 
    105                (sql_dir, glob(os.path.join("umitDB/sql", "*.sql"))), 
     94        # Network Inventory 
     95        (os.path.join(pixmaps_dir, 'networkinventory'), 
     96            glob(os.path.join(pixmaps_dir, 'networkinventory', '*.png'))), 
    10697 
    107                (misc_dir, glob(os.path.join(misc_dir, '*.dmp'))), 
     98        # InterfaceEditor 
     99        (os.path.join(pixmaps_dir, 'uie'), 
     100            glob(os.path.join(pixmaps_dir, 'uie', '*.png'))), 
    108101 
    109                (icons_dir, glob(os.path.join('share', 'icons', 'umit', 
    110                                              '*.ico'))+ 
    111                            glob(os.path.join('share', 'icons', 'umit', 
    112                                              '*.png'))), 
     102        # umitDB SQL 
     103        (sql_dir, glob(os.path.join("umitDB/sql", "*.sql"))), 
    113104 
    114                (docs_dir, glob(os.path.join(docs_dir, '*.html'))+ 
    115                           glob(os.path.join(docs_dir, 
    116                                             'comparing_results', '*.xml'))+ 
    117                           glob(os.path.join(docs_dir, 
    118                                             'profile_editor', '*.xml'))+ 
    119                           glob(os.path.join(docs_dir, 
    120                                             'scanning', '*.xml'))+ 
    121                           glob(os.path.join(docs_dir, 
    122                                             'searching', '*.xml'))+ 
    123                           glob(os.path.join(docs_dir, 
    124                                             'wizard', '*.xml'))+ 
    125                           glob(os.path.join(docs_dir, 'scheduler', '*.xml')) + 
    126                           glob(os.path.join(docs_dir, 'smtpsetup', '*.xml')) + 
    127                           glob(os.path.join(docs_dir, 
    128                                             'screenshots', '*.png')))] 
     105        (misc_dir, glob(os.path.join(misc_dir, '*.dmp'))), 
     106 
     107        (icons_dir, glob(os.path.join('share', 'icons', 'umit', '*.ico')) + 
     108            glob(os.path.join('share', 'icons', 'umit', '*.png'))), 
     109 
     110        (docs_dir, glob(os.path.join(docs_dir, '*.html')) + 
     111            glob(os.path.join(docs_dir, 'comparing_results', '*.xml')) + 
     112            glob(os.path.join(docs_dir, 'profile_editor', '*.xml')) + 
     113            glob(os.path.join(docs_dir, 'scanning', '*.xml')) + 
     114            glob(os.path.join(docs_dir, 'searching', '*.xml')) + 
     115            glob(os.path.join(docs_dir, 'wizard', '*.xml')) + 
     116            glob(os.path.join(docs_dir, 'scheduler', '*.xml')) + 
     117            glob(os.path.join(docs_dir, 'smtpsetup', '*.xml')) + 
     118            glob(os.path.join(docs_dir, 'screenshots', '*.png')))] 
    129119 
    130120# Add i18n files to data_files list 
     
    138128 
    139129    def finish_banner(self): 
    140         print  
     130        print 
    141131        print "%s The compiled version of Umit %s is in ./dist %s" % \ 
    142132              ("#"*10, VERSION, "#"*10) 
     
    169159      version = VERSION, 
    170160      scripts = ['umit'], 
    171       packages = ['', 'umitCore','umitCore.radialnet', 'umitDB', 'umitGUI', 'umitInventory', 
    172                   'umitPlugin', 'umitGUI.radialnet', 'umitInterfaceEditor', 'umitInterfaceEditor.selectborder', 
    173                   'higwidgets'], 
     161      packages = ['', 'umitCore','umitCore.radialnet', 'umitDB', 'umitGUI', 
     162          'umitInventory', 'umitPlugin', 'umitGUI.radialnet', 
     163          'umitInterfaceEditor', 'umitInterfaceEditor.selectborder', 
     164          'higwidgets'], 
    174165      data_files = data_files, 
    175       zipfile=None, 
    176       cmdclass = {"py2exe":umit_py2exe}, 
    177       windows = [{"script" : "umit", 
    178                   "icon_resources" : [(1, os.path.join(icons_dir, 
    179                                                        "umit_48.ico"))]}], 
    180       options = {"py2exe":{"compressed":1, 
    181                            "optimize":2, 
    182                            "packages":"encodings", 
    183                            "includes" : "pango,\ 
    184 atk,\ 
    185 gobject,\ 
    186 pickle,\ 
    187 bz2,\ 
    188 encodings,\ 
    189 encodings.*,\ 
    190 cairo,\ 
    191 pangocairo,\ 
    192 atk,\ 
    193 psyco"}}) 
     166      zipfile = None, 
     167      cmdclass = {"py2exe": umit_py2exe}, 
     168      windows = [{ 
     169          "script": "umit", 
     170          "icon_resources": [(1, os.path.join(icons_dir, "umit_48.ico"))] 
     171          }], 
     172      options = {"py2exe": { 
     173          "compressed": 1, 
     174          "optimize": 2, 
     175          "packages": "encodings", 
     176          "includes": ("pango, gobject, pickle, bz2, encodings, " 
     177              "encodings.*, cairo, pangocairo, psyco") 
     178          }} 
     179      )