B.version = '0.4'
B.launchAtStartUp = 0
B.mainScript = ''
B.html = True
B.requiresVersionMajor = '1'
B.requiresVersionMinor = '5'
B.addToMenu = [
    {
        'path'         : 'glyphConstructionUI.py',
        'preferredName': 'Glyph Builder',
        'shortKey'     : '',
    },
]

with codecs.open(licensePath, mode="r", encoding="utf-8") as f:
    B.license = f.read()
B.repositoryURL = 'http://github.com/typemytype/GlyphConstruction/'
B.summary = 'A simple, human-readable, powerful language for describing how shapes are constructed.'

# ---------------
# build extension
# ---------------

print('building extension...', end=" ")
B.save(extensionPath, libPath=libPath, htmlPath=htmlPath)

print('copy module...', end=" ")
destModulePath = os.path.join(B.libPath(), "glyphConstruction.py")
if os.path.exists(destModulePath):
    os.path.remove(destModulePath)
shutil.copy(modulePath, destModulePath)
예제 #2
0
B.requiresVersionMinor = '0'

# scripts which should appear in Extensions menu
B.addToMenu = [{
    'path': 'doSomething.py',
    'preferredName': 'do something',
    'shortKey': (NSCommandKeyMask | NSShiftKeyMask, 'b'),
}, {
    'path': 'doSomethingElse.py',
    'preferredName': 'do something else',
    'shortKey': (NSAlternateKeyMask, 'o'),
}]

# license for the extension
with open(licensePath) as license:
    B.license = license.read()

# required extensions
with open(requirementsPath) as requirements:
    B.requirements = requirements.read()

# expiration date for trial extensions
B.expireDate = '2020-12-31'

# compile and save the extension bundle
print('building extension...', end=' ')
B.save(extensionPath,
       libPath=libPath,
       htmlPath=htmlPath,
       resourcesPath=resourcesPath)
print('done!')
예제 #3
0
B.version = '0.5'
B.launchAtStartUp = 0
B.mainScript = ''
B.html = True
B.requiresVersionMajor = '1'
B.requiresVersionMinor = '5'
B.addToMenu = [
    {
        'path'         : 'glyphConstructionUI.py',
        'preferredName': 'Glyph Builder',
        'shortKey'     : '',
    },
]

with open(licensePath, mode="r", encoding="utf-8") as f:
    B.license = f.read()
B.repositoryURL = 'http://github.com/typemytype/GlyphConstruction/'
B.summary = 'A simple, human-readable, powerful language for describing how shapes are constructed.'

# ---------------
# build extension
# ---------------

# copy README file into 'html' folder as 'index.md'
shutil.copyfile(readmePath, os.path.join(htmlPath, 'index.md'))

print('building extension...')
B.save(extensionPath, libPath=libPath, htmlPath=htmlPath)

print('copying module...')
destModulePath = os.path.join(B.libPath(), "glyphConstruction.py")