Moved tools to be a Python package in wxPython.tools, added scripts to

import and launch each tool.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-08-08 18:28:21 +00:00
parent f341e39bdf
commit f6f98ecccd
25 changed files with 89 additions and 23 deletions

View File

@ -155,6 +155,8 @@ respond to mouse events and etc.
Changed the wxDateTime.Parse* methods to return an int that will be -1
on failure, and the index where parsing stopped otherwise.
Moved tools to be a Python package in wxPython.tools, added scripts to
import and launch each tool.

View File

@ -100,14 +100,16 @@ include src/mac/*.cpp
include src/mac/*.h
include src/mac/*.py
include tools/*.py
include tools/XRCed/CHANGES
include tools/XRCed/TODO
include tools/XRCed/README
include tools/XRCed/*.py
include tools/XRCed/*.xrc
include tools/XRCed/*.ico
include tools/XRCed/*.sh
include wxPython/tools/*.py
include wxPython/tools/XRCed/CHANGES
include wxPython/tools/XRCed/TODO
include wxPython/tools/XRCed/README
include wxPython/tools/XRCed/*.py
include wxPython/tools/XRCed/*.xrc
include wxPython/tools/XRCed/*.ico
include wxPython/tools/XRCed/*.sh
include scripts/*
include contrib/glcanvas/*.i
include contrib/glcanvas/*.py

View File

@ -136,14 +136,16 @@ Source: "licence\*.txt"; DestDir: "{app}\wxPython\docs\licenc
Source: "%(WXDIR)s\docs\htmlhelp\wx.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
Source: "%(WXDIR)s\docs\htmlhelp\ogl.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
Source: "tools\*.py"; DestDir: "{app}\wxPython\tools"; Components: tools
Source: "tools\XRCed\CHANGES"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "tools\XRCed\TODO"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "tools\XRCed\README"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\*.py"; DestDir: "{app}\wxPython\tools"; Components: tools
Source: "wxPython\tools\XRCed\CHANGES"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\XRCed\TODO"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\XRCed\README"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
Source: "wxPython\tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
;; Where to put the scripts on Win32???
Source: "samples\doodle\*.py"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
Source: "samples\doodle\*.txt"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples

5
wxPython/scripts/img2png Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env python
from wxPython.tools.img2png import main
main()

6
wxPython/scripts/img2py Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env python
import sys
from wxPython.tools.img2py import main
main(sys.argv[1:])

5
wxPython/scripts/img2xpm Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env python
from wxPython.tools.img2xpm import main
main()

4
wxPython/scripts/xrced Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env python
from wxPython.tools.XRCed.xrced import main
main()

View File

@ -904,14 +904,22 @@ if __name__ == "__main__":
PKGDIR+'.lib.editor',
PKGDIR+'.lib.mixins',
PKGDIR+'.lib.PyCrust',
PKGDIR+'.tools',
PKGDIR+'.tools.XRCed',
],
ext_package = PKGDIR,
ext_modules = wxpExtensions,
options = { 'build' : { 'build_base' : BUILD_BASE }}
options = { 'build' : { 'build_base' : BUILD_BASE }},
##data_files = TOOLS,
scripts = ['scripts/img2png',
'scripts/img2xpm',
'scripts/img2py',
'scripts/xrced',
],
)
else:

View File

@ -1,3 +1,4 @@
#

View File

@ -0,0 +1,4 @@
#

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -72,7 +72,10 @@ def SetMenu(m, list):
class Panel(wxNotebook):
def __init__(self, parent, id = -1):
wxNotebook.__init__(self, parent, id, style=wxNB_BOTTOM)
sys.modules['params'].panel = self
##sys.modules['params'].panel = self
import params
params.panel = self
# List of child windows
self.pages = []
# Create scrolled windows for pages
@ -997,7 +1000,8 @@ class Frame(wxFrame):
frame = self
wxFrame.__init__(self, None, -1, '', pos, size)
self.CreateStatusBar()
icon = wxIcon(os.path.join(sys.path[0], 'xrced.ico'), wxBITMAP_TYPE_ICO)
progpath = os.path.split(__file__)[0]
icon = wxIcon(os.path.join(progpath, 'xrced.ico'), wxBITMAP_TYPE_ICO)
self.SetIcon(icon)
# Idle flag
@ -1114,10 +1118,14 @@ class Frame(wxFrame):
splitter = wxSplitterWindow(self, -1, style=wxSP_3DSASH)
self.splitter = splitter
splitter.SetMinimumPaneSize(100)
# Create tree
global tree
tree = XML_Tree(splitter, -1)
sys.modules['xxx'].tree = tree
##sys.modules['xxx'].tree = tree
import xxx
xxx.tree = tree
# !!! frame styles are broken
# Miniframe for not embedded mode
miniFrame = wxFrame(self, -1, 'Properties Panel',
@ -1880,7 +1888,9 @@ class App(wxApp):
frame = Frame(pos, size)
frame.Show(true)
# Load resources from XRC file (!!! should be transformed to .py later?)
sys.modules['params'].frame = frame
##sys.modules['params'].frame = frame
import params
params.frame = frame
frame.res = wxXmlResource('')
frame.res.Load(os.path.join(sys.path[0], 'xrced.xrc'))
@ -1893,6 +1903,7 @@ class App(wxApp):
def OnExit(self):
# Write config
global conf
wc = wxConfigBase_Get()
wc.WriteInt('autorefresh', conf.autoRefresh)
wc.WriteInt('x', conf.x)
@ -1908,6 +1919,7 @@ class App(wxApp):
wc.WriteInt('panelHeight', conf.panelHeight)
wc.WriteInt('nopanic', 1)
wc.Flush()
del conf
def main():
app = App()

View File

@ -0,0 +1,4 @@
#

View File

@ -26,6 +26,11 @@ import sys
import img2img
from wxPython import wx
img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_PNG, ".png", __doc__)
def main():
img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_PNG, ".png", __doc__)
if __name__ == '__main__':
main()

View File

@ -26,6 +26,12 @@ import sys
import img2img
from wxPython import wx
img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_XPM, ".xpm", __doc__)
def main():
img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_XPM, ".xpm", __doc__)
if __name__ == '__main__':
main()