Esempio n. 1
0
 def __init__(self, filename):
     self.filename = filename
     self.imscp = ims.contentpackage.ContentPackage()
     if os.path.exists(self.filename):
         self.imscp.loadFromXML(self.filename)
         
     generator = ims.contentpackage.Contributor()
     generator.role.source["x-none"] = "LOMv1.0"
     generator.role.value["x-none"] = "Creator"
     generator.centity.vcard="BEGIN:vCard FN:EClass Builder v%s END:vCard" % version.asString()
     
     self.imscp.metadata.lom.metametadata.contributors.append(generator)
Esempio n. 2
0
 def OnSubmitReport(self, event):
     server = xmlrpc.getEClassXMLRPCServer()
     result = server.sendError(
         self.nameText.GetValue(),
         self.emailText.GetValue(),
         self.descriptionText.GetValue(),
         self.detailsText.GetValue(),
         version.asString(),
     )
     if result == "success":
         wx.MessageBox(_("Error report sent successfully! Thanks!"))
     else:
         wx.MessageBox(_("Unable to send error report. Error details can also be emailed to [email protected]."))
     self.EndModal(wx.ID_OK)
Esempio n. 3
0
	def __init__(self, parent):
		point = parent.GetPositionTuple()
		size = parent.GetSizeTuple()
		wx.Dialog.__init__ (self, parent, -1, _("Welcome to EClass.Builder"),wx.DefaultPosition, wx.Size(460,160), wx.DEFAULT_DIALOG_STYLE)
		height = 20
		buttonstart = 90
		fontsize = 22
		if wx.Platform == "__WXMAC__":
			buttonstart = 50
			height = 25
			fontsize = 28
		self.parent = parent
		myfont = wx.Font(fontsize, wx.MODERN, wx.NORMAL, wx.BOLD, False, "Arial")
		self.lblWelcome = wx.StaticText(self, -1, _("Welcome to EClass.Builder"))
		self.lblWelcome.SetFont(myfont)
		self.lblWelcome.SetForegroundColour(wx.NamedColour("blue"))

		self.lblVersion = wx.StaticText(self, -1, "Version " + version.asString())

		self.chkShowThisDialog = wx.CheckBox(self, -1, _("Don't show this dialog on startup."))
		self.btnNew = wx.Button(self, -1, _("New Project"))
		self.btnOpen = wx.Button(self, -1, _("Open Project"))
		self.btnOpen.SetDefault()
		self.btnTutorial = wx.Button(self, -1, _("View Tutorial"))

		self.dialogsizer = wx.BoxSizer(wx.VERTICAL)
		self.dialogsizer.Add(self.lblWelcome, 0, wx.ALL|wx.ALIGN_CENTER, 4)	
		self.dialogsizer.Add(self.lblVersion, 0, wx.ALL|wx.ALIGN_CENTER, 4)	
		self.dialogsizer.Add(self.chkShowThisDialog, 0, wx.ALL|wx.ALIGN_CENTER, 10)
		self.boxsizer = wx.BoxSizer(wx.HORIZONTAL)
		self.boxsizer.Add(self.btnNew, 0, wx.ALL | wx.ALIGN_CENTER, 10)
		self.boxsizer.Add(self.btnOpen, 0, wx.ALL | wx.ALIGN_CENTER, 10)
		self.boxsizer.Add(self.btnTutorial, 0, wx.ALL | wx.ALIGN_CENTER, 10)
		self.dialogsizer.Add(self.boxsizer, 1, wx.ALIGN_CENTER)
		self.SetAutoLayout(True)
		self.SetSizerAndFit(self.dialogsizer)
		self.Layout()
		self.CentreOnParent(wx.BOTH)

		wx.EVT_BUTTON(self, self.btnNew.GetId(), self.OnNew)
		wx.EVT_BUTTON(self, self.btnOpen.GetId(), self.OnOpen)
		wx.EVT_BUTTON(self, self.btnTutorial.GetId(), self.OnTutorial)
		wx.EVT_CHECKBOX(self, self.chkShowThisDialog.GetId(), self.OnCheck)
Esempio n. 4
0
    def __init__(self, parent):
        sc.SizedDialog.__init__ (self, parent, -1, _("About EClass.Builder"), wx.Point(100,100))
        self.parent = parent
        
        panel = self.GetContentsPane()
        
        icon = wx.StaticBitmap(panel, -1, wx.Bitmap(os.path.join(rootdir, "icons", "eclass_builder.png")))
        icon.SetSizerProps(halign="center")
        
        app_name = wx.StaticText(panel, -1, wx.GetApp().GetAppName())
        app_name.SetSizerProps(halign="center")
        name_font = app_name.GetFont()
        name_font.SetWeight(wx.FONTWEIGHT_BOLD)
        app_name.SetFont(name_font)

        app_version = wx.StaticText(panel, -1, version.asString())
        app_version.SetSizerProps(halign="center")
        
        app_copyright = wx.StaticText(panel, -1, "Copyright 2002-2010 Tulane University")
        app_copyright.SetSizerProps(halign="center")
        
        app_license = wx.StaticText(panel, -1, "This program is BSD licensed")
        app_license.SetSizerProps(halign="center")
        
        acknowledgements = wx.StaticText(panel, -1, "Thanks and Acknowledgements")
        acknowledgements.SetSizerProps(halign="center")
        ack_font = acknowledgements.GetFont()
        ack_font.SetWeight(wx.FONTWEIGHT_BOLD)
        acknowledgements.SetFont(ack_font)
        
        wxpy_link = hl.HyperLinkCtrl(panel, -1, "Built with wxPython", URL="http://www.wxpython.org")
        wxpy_link.SetSizerProps(halign="center")
        
        fatcow_link = hl.HyperLinkCtrl(panel, -1, "EClass.Builder uses FatCow free icons", URL="http://www.fatcow.com/free-icons/")
        fatcow_link.SetSizerProps(halign="center")

        program_icon = hl.HyperLinkCtrl(panel, -1, "EClass.Builder icon created from iconaholic.com icons", URL="http://www.iconaholic.com/")

        self.Fit()
Esempio n. 5
0
platform = None
if sys.platform.startswith("win"):
    import py2exe
    sys.argv.append("py2exe")
    platform = "win32"
elif sys.platform.startswith("darwin"):
    import py2app
    sys.argv.append("py2app")
    platform = "mac"
import glob
import version

myplist = dict(
    CFBundleIdentifier='net.eclass.eclass_builder',
    CFBundleDisplayName="EClass.Builder",
    CFBundleVersion=version.asString()
    )
 
rootdir = "../"

py2app_options = dict(
    iconfile=rootdir + "icons/eclass_builder.icns", 
    argv_emulation=True,
    plist=myplist,
    optimize=2,
    strip=False,
    packages=["wx"],
)

def allFilesRecursive(dir):
    fileList = []
Esempio n. 6
0
#updateVersion.py
#this should be run whenever the software is rebuilt

import sys
import re
import os
import glob
import version
version_str = version.asString()

if len(sys.argv) == 2:
    version_str = sys.argv[1]

mydir = os.getcwd()
os.chdir("..")
#Write the new build to version.py
#myfile = open("version.py", "r")
#data = myfile.read()
#myfile.close()

#myterm = re.compile("(build = )([0-9]*)", re.IGNORECASE|re.DOTALL)
#mymatch = myterm.match(data)

#data = mymatch.sub("\\1" + `build`, data)

#myfile = open("version.py", "w")
#myfile.write(data)
#myfile.close()

#reload(version)
Esempio n. 7
0
    filetext += '/PACKAGE\n'
    
    output = open("uploads", "w")
    output.write(filetext)
    output.close()

class Job(Job):
    LOGBASE = "./build_logs"

# ensure the staging area exists
if not os.path.exists(config.STAGING_DIR):
    os.makedirs(config.STAGING_DIR)

abs_staging_dir = os.path.abspath(config.STAGING_DIR)

config.BUILD_VERSION = version.asString().replace(" ", "-")

# Figure out the wxPython version number, possibly adjusted for being a daily build
if config.KIND == "daily":
    t = time.localtime()
    config.DAILY = time.strftime("%Y%m%d")   # should it include the hour too?  2-digit year?
    file("DAILY_BUILD", "w").write(config.DAILY)
    # stamp the date on daily builds
    config.BUILD_VERSION=config.BUILD_VERSION + "-" + config.DAILY
else:
    config.RELEASE_SFNAME=config.VERSION

# Let the user override build machine names, etc., etc. with their own
# config file settings
myconfig = None
myconfig_file = os.path.expanduser("~/eclass-release-environ.cfg")