diff --git a/.hgignore b/.hgignore index 062eb36..5cce300 100644 --- a/.hgignore +++ b/.hgignore @@ -5,6 +5,8 @@ syntax: glob luminotes.log luminotes_error.log luminotes.db +README.txt +COPYING.txt session/* files/* build/* diff --git a/README b/README index e57caed..fa26a8c 100644 --- a/README +++ b/README @@ -8,8 +8,6 @@ and even includes some tips on creating your wiki. You can check it out at: http://luminotes.com/guide -If you'd like to actually install the Luminotes server, see the INSTALL file. - Enjoy! Luminotes Copyright (C) 2007-2008 Dan Helfman diff --git a/setup.py b/setup.py index 8e9cc0d..c68096f 100644 --- a/setup.py +++ b/setup.py @@ -94,11 +94,15 @@ class InnoScript: print >> ofi, r"DefaultDirName={pf}\%s" % self.name print >> ofi, r"DefaultGroupName=%s" % self.name print >> ofi, r"SetupIconFile=static\images\luminotes.ico" + print >> ofi, r"UninstallIconFile=static\images\luminotes.ico" print >> ofi print >> ofi, r"[Files]" for path in self.windows_exe_files + self.lib_files: - print >> ofi, r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' % (path, os.path.dirname(path)) + if "readme" in path.lower(): + print >> ofi, r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion isreadme' % (path, os.path.dirname(path)) + else: + print >> ofi, r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' % (path, os.path.dirname(path)) print >> ofi print >> ofi, r"[Icons]" @@ -148,10 +152,10 @@ try: import py2exe from py2exe.build_exe import py2exe - class Build_installer(py2exe): + class Build_installer( py2exe ): # This class first builds the exe file(s), then creates a Windows installer. # You need InnoSetup for it. - def run(self): + def run( self ): # generate an initial database file try: os.remove( "luminotes.db" ) @@ -161,6 +165,10 @@ try: from tools import initdb initdb.main( ( "-l", ) ) + # copy the README and COPYING files to have ".txt" extensions and Windows newlines + self.copy_doc( "README" ) + self.copy_doc( "COPYING" ) + # First, let py2exe do it's work. py2exe.run(self) @@ -179,6 +187,17 @@ try: print "*** compiling the inno setup script***" script.compile() # Note: By default the final setup.exe will be in an Output subdirectory. + + @staticmethod + def copy_doc( path ): + out = file( "%s.txt" % path, "w" ) + + for line in file( path ).readlines(): + line = line.rstrip( "\r\n" ) + out.write( "%s\r\n" % line ) + + out.close() + except ImportError: class Build_installer: pass @@ -194,6 +213,8 @@ setup( distclass = Luminotes, cmdclass = { "py2exe": Build_installer }, # override default py2exe class data_files = [ + ( "", [ "README.txt", ] ), + ( "", [ "COPYING.txt", ] ), ( "", [ "luminotes.db", ] ), ( "static/css", files( "static/css/*.*" ) ), ( "static/html", files( "static/html/*.*" ) ), @@ -201,6 +222,7 @@ setup( ( "static/images/toolbar", files( "static/images/toolbar/*.*" ) ), ( "static/images/toolbar/small", files( "static/images/toolbar/small/*.*" ) ), ( "static/js", files( "static/js/*.*" ) ), + ( "static/js", files( "static/js/*_LICENSE" ) ), ( "files", files( "files/.empty" ) ), ], options = dict(