Changeset 8164
- Timestamp:
- 08/13/08 13:17:36 (5 years ago)
- Location:
- ossiedev/trunk/tools
- Files:
-
- 3 modified
-
WaveDev/wavedev/ComponentFrame.py (modified) (2 diffs)
-
WaveDev/wavedev/MainFrame.py (modified) (1 diff)
-
alf/ALFutils.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/trunk/tools/WaveDev/wavedev/ComponentFrame.py
r8162 r8164 328 328 def __init__(self, parent): 329 329 # Constructor for ComponentFrame 330 self.wavedevPath = os.getcwd() + os.sep 331 # NOTE: This is another poor use of the full path 332 # a better way is to construct the string to be executed 333 availableTemplates = commands.getoutput("ls -I __init__.py* /usr/lib/python2.5/site-packages/WaveDev/wavedev/generate/templates/") 330 self.wavedevPath = os.getcwd() + os.sep 331 332 self.wavedevPath = __file__ 333 if os.path.islink (self.wavedevPath): 334 self.wavedevPath = os.path.realpath (self.wavedevPath) 335 self.wavedevPath = os.path.dirname (os.path.abspath (self.wavedevPath)) 336 337 #NOTE: There still may be a better way to do this, 338 # assuming generate/templates always exists below this file, this will work 339 path = self.wavedevPath + '/generate/templates' 340 availableTemplates = commands.getoutput("ls -I __init__.py* " + path) 334 341 availableTemplates = availableTemplates.split() 335 self._init_ctrls(parent,availableTemplates)342 self._init_ctrls(parent,availableTemplates) 336 343 337 344 self.templateChoice.SetSelection(0) … … 342 349 self.saveComponentPath = None 343 350 self.calledByParent = False 344 345 self.wavedevPath = '/usr/lib/python2.5/site-packages/WaveDev/wavedev/' # NOTE Should really be computed from the install path346 351 347 352 if parent == None: #OSSIE Component Editor being run in stand-alone mode -
ossiedev/trunk/tools/WaveDev/wavedev/MainFrame.py
r8162 r8164 477 477 # self.wavedevPath = os.getcwd() + "/" 478 478 # NOTE The wavedevPath string should be constructed, not hard-coded 479 self.wavedevPath = "/usr/lib/python2.5/site-packages/WaveDev/wavedev/" 479 # self.wavedevPath = "/usr/lib/python2.5/site-packages/WaveDev/wavedev/" 480 self.wavedevPath = __file__ 481 if os.path.islink (self.wavedevPath): 482 self.wavedevPath = os.path.realpath (self.wavedevPath) 483 self.wavedevPath = os.path.dirname (os.path.abspath (self.wavedevPath)) + '/' 480 484 481 485 ################################################################################ -
ossiedev/trunk/tools/alf/ALFutils.py
r8159 r8164 156 156 # NOTE: Tools directory is now now the alf_plugins module in site_packages 157 157 #tooldir = frame_obj.installpath+"/tools" 158 # To do: we should find a way to not load this statically 159 tooldir = '/usr/lib/python2.5/site-packages/alf_plugins' 158 # NOTE: There may be a better way of finding the alf_plugins directory, but this works 159 tooldir = __import__('alf_plugins').__file__ 160 if os.path.islink (tooldir): 161 root = os.path.realpath (tooldir) 162 tooldir = os.path.dirname (os.path.abspath (tooldir)) 160 163 frame_obj.tools = ToolList(tooldir) 161 164