witten
/
luminotes
Archived
1
0
Fork 0

Added initialization of luminotes.db database file. Also reorganized setup.py so it can run without py2exe.

This commit is contained in:
Dan Helfman 2008-08-21 22:01:59 -07:00
parent 22c3bbdbb3
commit ad6de74604
1 changed files with 36 additions and 28 deletions

View File

@ -3,12 +3,6 @@ import sys
from glob import glob from glob import glob
from distutils.core import setup, Distribution from distutils.core import setup, Distribution
try:
import py2exe
from py2exe.build_exe import py2exe
except ImportError:
pass
VERSION = "1.5.0" VERSION = "1.5.0"
@ -137,30 +131,44 @@ class InnoScript:
class Build_installer(py2exe): try:
# This class first builds the exe file(s), then creates a Windows installer. import py2exe
# You need InnoSetup for it. from py2exe.build_exe import py2exe
def run(self):
# TODO: run initdb.py -l to generate a luminotes.db
# First, let py2exe do it's work. class Build_installer(py2exe):
py2exe.run(self) # This class first builds the exe file(s), then creates a Windows installer.
# You need InnoSetup for it.
def run(self):
# generate an initial database file
try:
os.remove( "luminotes.db" )
except OSError:
pass
lib_dir = self.lib_dir from tools import initdb
dist_dir = self.dist_dir initdb.main( ( "-l", ) )
# create the Installer, using the files py2exe has created. # First, let py2exe do it's work.
script = InnoScript("Luminotes", py2exe.run(self)
lib_dir,
dist_dir, lib_dir = self.lib_dir
self.console_exe_files, dist_dir = self.dist_dir
self.lib_files,
version = VERSION) # create the Installer, using the files py2exe has created.
print "*** creating the inno setup script***" script = InnoScript("Luminotes",
script.create() lib_dir,
print "*** compiling the inno setup script***" dist_dir,
script.compile() self.console_exe_files,
# Note: By default the final setup.exe will be in an Output subdirectory. self.lib_files,
version = VERSION)
print "*** creating the inno setup script***"
script.create()
print "*** compiling the inno setup script***"
script.compile()
# Note: By default the final setup.exe will be in an Output subdirectory.
except ImportError:
class Build_installer:
pass
setup( setup(