Archived
1
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

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,11 +131,22 @@ class InnoScript:
class Build_installer(py2exe): try:
import py2exe
from py2exe.build_exe import py2exe
class Build_installer(py2exe):
# This class first builds the exe file(s), then creates a Windows installer. # This class first builds the exe file(s), then creates a Windows installer.
# You need InnoSetup for it. # You need InnoSetup for it.
def run(self): def run(self):
# TODO: run initdb.py -l to generate a luminotes.db # generate an initial database file
try:
os.remove( "luminotes.db" )
except OSError:
pass
from tools import initdb
initdb.main( ( "-l", ) )
# First, let py2exe do it's work. # First, let py2exe do it's work.
py2exe.run(self) py2exe.run(self)
@ -161,6 +166,9 @@ class Build_installer(py2exe):
print "*** compiling the inno setup script***" print "*** compiling the inno setup script***"
script.compile() script.compile()
# Note: By default the final setup.exe will be in an Output subdirectory. # Note: By default the final setup.exe will be in an Output subdirectory.
except ImportError:
class Build_installer:
pass
setup( setup(