Changeset 76 for pykoticon

Show
Ignore:
Timestamp:
01/19/05 11:42:11 (20 years ago)
Author:
jerome
Message:

More "portable" paths to icons

Location:
pykoticon/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r75 r76  
    3636    except ImportError :     
    3737        raise ImportError, "Mark Hammond's Win32 Extensions are missing. Please install them." 
     38    else :     
     39        iconsdir = "." 
    3840else :         
    3941    isWindows = 0 
     42    iconsdir = "/usr/share/pykoticon"   # TODO : change this 
    4043    import pwd 
    4144     
     
    285288        self.tbicon = wxPython.wx.wxTaskBarIcon() 
    286289         
    287         self.greenicon = wxPython.wx.wxIcon(os.path.join("..", "icons", "pykoticon-green.ico"), \ 
     290        self.greenicon = wxPython.wx.wxIcon(os.path.join(iconsdir, "pykoticon-green.ico"), \ 
    288291                                  wxPython.wx.wxBITMAP_TYPE_ICO) 
    289         self.redicon = wxPython.wx.wxIcon(os.path.join("..", "icons", "pykoticon-red.ico"), \ 
     292        self.redicon = wxPython.wx.wxIcon(os.path.join(iconsdir, "pykoticon-red.ico"), \ 
    290293                                  wxPython.wx.wxBITMAP_TYPE_ICO) 
    291294         
  • pykoticon/trunk/setup.py

    r73 r76  
    3434        sys.exit(-1) 
    3535    else :     
     36        directory = os.sep.join(["share", "pykoticon"]) 
    3637        withPy2EXE = 0 
    3738else :         
     39    directory = "." 
    3840    withPy2EXE = 1 
    3941 
     
    4850      windows=[os.path.join("bin", "pykoticon")], 
    4951      scripts=[os.path.join("bin", "pykoticon")], 
    50       data_files=[("icons", glob.glob(os.path.join("icons", "*.ico")))]) 
     52      data_files=[(directory, glob.glob(os.path.join("icons", "*.ico")))])