Exemplo n.º 1
0
 def onHelp(self, event):
     help = HtmlHelp(self, 'ccPublisher',
                     MORE_INFO % (version(),
                                  os.path.join(
         p6.api.getResourceDir(),'publishguy_small.gif')
                                  )
                     )
     help.Show()
Exemplo n.º 2
0
    def onHelp(self, event):

        # determine the path name for the locale-specific html file
        html_file_name = os.path.join(p6.api.getResourceDir(), 'locale',
                                      p6.i18n.getLocale(), 'welcome.html')

        # see if it exists
        if not(os.path.exists(html_file_name)):

            # fall back to the English version
            html_file_name = os.path.join(p6.api.getResourceDir(),
                                          'locale', 'welcome.html')

        if os.path.exists(html_file_name):
            # if the file exists, load it and display 
            html_file = file(html_file_name, 'r')

            help = HtmlHelp(self, 'ccPublisher',
                            html_file.read() % (version(),
                                         os.path.join(
                p6.api.getResourceDir(),'publishguy_small.gif')
                                         )
                            )
            help.Show()
Exemplo n.º 3
0
def main(argv=[]):

    # determine the resource path
    try:
        root_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "resources")
        if platform.system().lower() == "linux" and not (os.path.exists(os.path.join(root_dir, "app.zcml"))):
            root_dir = "/usr/local/%s/resources" % const.APPNAME

    except NameError, e:
        root_dir = os.path.join(os.path.dirname(sys.executable), "resources")

    # create the application and execute it
    app = CcPublisher(
        appname="ccPublisher",
        rsc_dir=root_dir,
        filename="err.log",
        xrcfile="wizard.xrc",
        frameclass=CcMain,
        confFile="app.zcml",
    )

    # Connect the crash-reporting handler
    libfeedback.wxAddExceptHook(const.REPORTING_URL, const.REPORTING_APP, const.version())

    app.MainLoop()


if __name__ == "__main__":
    main(sys.argv)
Exemplo n.º 4
0
              'resources/version.txt',
              'resources/publishguy.gif',
              'resources/publishguy_small.gif'])
             ]

if PLATFORM != 'linux':
    # we need to include the ZCML as side-by-side resources on
    # "compiled" platforms
    dataFiles = dataFiles + \
                findZcml(os.path.dirname(__file__) or os.getcwd()) + \
                locale_files(os.path.dirname(__file__) or os.getcwd())
    
if __name__ == '__main__':

    setup(name='ccPublisher',
          version=version(),
          description = desc,
          long_description= long_desc,
          url='http://creativecommons.org',
          author='Nathan R. Yergler',
          author_email='*****@*****.**',
          classifiers= classifiers,
          py_modules=[],
          scripts=['ccp.py'],
          windows=[
                   {'script':'ccp.py',
                    "icon_resources": [(1, os.path.join('resources', 'ccp8.ico'))],
                    } ],
          app=['ccp.py'],
          data_files=dataFiles,
          packages=packages,
Exemplo n.º 5
0
   try:
       root_dir = os.path.join( os.path.abspath(os.path.dirname(__file__)), 
				'resources' )
       if platform.system().lower() == 'linux' and \
              not(os.path.exists(os.path.join(root_dir, 'app.zcml'))):
           root_dir = '/usr/local/%s/resources' % const.APPNAME
           
   except NameError, e:
       root_dir = os.path.join( os.path.dirname(sys.executable), 'resources' )

   # create the application and execute it
   app = CcPublisher(appname = 'ccPublisher',
                     rsc_dir = root_dir,
                     filename= 'err.log',
                     xrcfile = 'wizard.xrc',
                     frameclass = CcMain,
                     confFile = 'app.zcml',
                     )

   
   # Connect the crash-reporting handler
   libfeedback.wxAddExceptHook(const.REPORTING_URL,
                               const.REPORTING_APP,
                               const.version())

   app.MainLoop()
   
if __name__ == '__main__':           
    main(sys.argv)