Remove trailing whitespaces
This commit is contained in:
parent
ca9e13ed7f
commit
4a6a39d07e
@ -142,7 +142,7 @@ class buildbase(GObject.GObject):
|
|||||||
outfile = file
|
outfile = file
|
||||||
if file == 'NEWS':
|
if file == 'NEWS':
|
||||||
#Jump through hoops tomake sure the end of line charactors are windows format (wont work on linux!!)
|
#Jump through hoops tomake sure the end of line charactors are windows format (wont work on linux!!)
|
||||||
outfile = 'NEWS.TXT' #Lets add .TXT suffix to filename so installer knows to call notepad
|
outfile = 'NEWS.TXT' #Lets add .TXT suffix to filename so installer knows to call notepad
|
||||||
fnews = open(os.path.join(source_path,file), 'r')
|
fnews = open(os.path.join(source_path,file), 'r')
|
||||||
newslines = fnews.readlines()
|
newslines = fnews.readlines()
|
||||||
newsout = open(os.path.join(self.build_src,outfile), 'w')
|
newsout = open(os.path.join(self.build_src,outfile), 'w')
|
||||||
@ -162,7 +162,7 @@ class buildbase(GObject.GObject):
|
|||||||
# need to ensure __file__ has full path, under linux it does not.
|
# need to ensure __file__ has full path, under linux it does not.
|
||||||
thisfilepath = os.path.abspath(__file__)
|
thisfilepath = os.path.abspath(__file__)
|
||||||
pth = os.path.relpath(os.path.dirname( thisfilepath ), os.getcwd())
|
pth = os.path.relpath(os.path.dirname( thisfilepath ), os.getcwd())
|
||||||
pth2nsis_script = os.path.join(pth, 'gramps2.nsi')
|
pth2nsis_script = os.path.join(pth, 'gramps2.nsi')
|
||||||
|
|
||||||
#should tests be more along lines of os.name which returns 'posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos'
|
#should tests be more along lines of os.name which returns 'posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos'
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
@ -241,9 +241,9 @@ class buildbase(GObject.GObject):
|
|||||||
# log.error( "msgfmt not found - unable to generate mo files")
|
# log.error( "msgfmt not found - unable to generate mo files")
|
||||||
# return
|
# return
|
||||||
log.info( "Generating mo files" )
|
log.info( "Generating mo files" )
|
||||||
global po_errs, po_oks
|
global po_errs, po_oks
|
||||||
po_total = len(po_files)
|
po_total = len(po_files)
|
||||||
po_count = 0
|
po_count = 0
|
||||||
for po_file in po_files:
|
for po_file in po_files:
|
||||||
po_count = po_count + 1
|
po_count = po_count + 1
|
||||||
#This will be interesting
|
#This will be interesting
|
||||||
@ -317,7 +317,7 @@ class buildbase(GObject.GObject):
|
|||||||
log.error( e )
|
log.error( e )
|
||||||
|
|
||||||
def getNSISVersionNumber(self):
|
def getNSISVersionNumber(self):
|
||||||
#Check version of NSIS, to ensure NSIS is compatible with script features
|
#Check version of NSIS, to ensure NSIS is compatible with script features
|
||||||
# >"c:\Program Files\NSIS\makensis.exe" /version
|
# >"c:\Program Files\NSIS\makensis.exe" /version
|
||||||
# v2.42
|
# v2.42
|
||||||
cmd = '"%s" -VERSION' % (MAKENSIS_exe)
|
cmd = '"%s" -VERSION' % (MAKENSIS_exe)
|
||||||
@ -338,7 +338,7 @@ class buildbase(GObject.GObject):
|
|||||||
ver = output[1:].split('.')
|
ver = output[1:].split('.')
|
||||||
major = int(ver[0])
|
major = int(ver[0])
|
||||||
try:
|
try:
|
||||||
minor = int(ver[1])
|
minor = int(ver[1])
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
m = ver[1]
|
m = ver[1]
|
||||||
minor = int(m[:2])
|
minor = int(m[:2])
|
||||||
@ -511,7 +511,7 @@ def buildGRAMPS( base, out_dir, bTarball):
|
|||||||
bo.exportSVN(os.path.join(base, 'src'), os.path.join(bo.build_root, 'src') )
|
bo.exportSVN(os.path.join(base, 'src'), os.path.join(bo.build_root, 'src') )
|
||||||
bo.exportSVN(os.path.join(base, 'po'), os.path.join(bo.build_root, 'po') )
|
bo.exportSVN(os.path.join(base, 'po'), os.path.join(bo.build_root, 'po') )
|
||||||
bo.exportSVN(os.path.join(base, 'example'), os.path.join(bo.build_root, 'examples') )
|
bo.exportSVN(os.path.join(base, 'example'), os.path.join(bo.build_root, 'examples') )
|
||||||
bo.generateConstPy( )
|
bo.generateConstPy( )
|
||||||
bo.copyExtraFilesToBuildDir(base)
|
bo.copyExtraFilesToBuildDir(base)
|
||||||
|
|
||||||
if bPatchBuild:
|
if bPatchBuild:
|
||||||
@ -545,9 +545,9 @@ Options:
|
|||||||
-mDIR, --msgdir=DIR Directory to msgfmt.exe
|
-mDIR, --msgdir=DIR Directory to msgfmt.exe
|
||||||
-pDIR, --patch=DIR Specify a directory to patch files into the build.
|
-pDIR, --patch=DIR Specify a directory to patch files into the build.
|
||||||
only valid for a tarball build.
|
only valid for a tarball build.
|
||||||
This directory will allow you to patch the release after expanding
|
This directory will allow you to patch the release after expanding
|
||||||
from tarball and before creating installer.
|
from tarball and before creating installer.
|
||||||
(n.b. each file to be replaced needs to be specified with full path
|
(n.b. each file to be replaced needs to be specified with full path
|
||||||
to exactly mimic the paths in the expanded tarball)
|
to exactly mimic the paths in the expanded tarball)
|
||||||
'''
|
'''
|
||||||
# TODO: nsis_dir option - a path to nsismake (for occasions script cannot work it out)
|
# TODO: nsis_dir option - a path to nsismake (for occasions script cannot work it out)
|
||||||
@ -636,4 +636,4 @@ Options:
|
|||||||
#==========================
|
#==========================
|
||||||
sys.exit(buildGRAMPS(repository_path,out_dir, bTarball))
|
sys.exit(buildGRAMPS(repository_path,out_dir, bTarball))
|
||||||
|
|
||||||
GObject.type_register(buildbase)
|
GObject.type_register(buildbase)
|
||||||
|
@ -37,14 +37,14 @@ testdlls = ['libgdk-win32-2.0-0.dll', 'libglib-2.0-0.dll', 'libgobject-2.0-0.dll
|
|||||||
explain_exposed = ''' ***********************************************************
|
explain_exposed = ''' ***********************************************************
|
||||||
* It seems that other installations are exposing GTK DLL's
|
* It seems that other installations are exposing GTK DLL's
|
||||||
* to the operating system as they are in the environment
|
* to the operating system as they are in the environment
|
||||||
* path variable BEFORE the runtime directory.
|
* path variable BEFORE the runtime directory.
|
||||||
* You should reorder the path variable to put your GTK
|
* You should reorder the path variable to put your GTK
|
||||||
* runtime path before these other installations on the path'''
|
* runtime path before these other installations on the path'''
|
||||||
|
|
||||||
explain_safe = ''' ***************************************************************
|
explain_safe = ''' ***************************************************************
|
||||||
* While there are other installations of GTK DLL's on the path,
|
* While there are other installations of GTK DLL's on the path,
|
||||||
* it should be safe as they are on the path AFTER the runtime
|
* it should be safe as they are on the path AFTER the runtime
|
||||||
* directory. '''
|
* directory. '''
|
||||||
|
|
||||||
def RunExeCommand( app, args ):
|
def RunExeCommand( app, args ):
|
||||||
cmd = app + ' ' + args
|
cmd = app + ' ' + args
|
||||||
@ -72,8 +72,8 @@ def CheckGtkInReg():
|
|||||||
except WindowsError as e:
|
except WindowsError as e:
|
||||||
log.info( '\n GTK registry key not found in registry' )
|
log.info( '\n GTK registry key not found in registry' )
|
||||||
log.info( ''' ********************************************************************
|
log.info( ''' ********************************************************************
|
||||||
* This might not be an error, but means I don't know the directory to
|
* This might not be an error, but means I don't know the directory to
|
||||||
* your preferred GTK installation.
|
* your preferred GTK installation.
|
||||||
* - try passing in your GTK installation path.\n''' )
|
* - try passing in your GTK installation path.\n''' )
|
||||||
log.info( '-' * 60 )
|
log.info( '-' * 60 )
|
||||||
log.info( usage )
|
log.info( usage )
|
||||||
@ -92,7 +92,7 @@ def WorkOutShortDosPath():
|
|||||||
log.info( ' if you want this function to work' )
|
log.info( ' if you want this function to work' )
|
||||||
|
|
||||||
def FindLibsWithCtypes():
|
def FindLibsWithCtypes():
|
||||||
# use ctypes to check where windows finds it's DLL's
|
# use ctypes to check where windows finds it's DLL's
|
||||||
log.info( '\n==== Use ctypes to find dlls ====' )
|
log.info( '\n==== Use ctypes to find dlls ====' )
|
||||||
other_paths = []
|
other_paths = []
|
||||||
for dll in testdlls:
|
for dll in testdlls:
|
||||||
@ -193,7 +193,7 @@ def CheckWithDependencyWalker():
|
|||||||
log.info( ' get dependency walker from http://www.dependencywalker.com/' )
|
log.info( ' get dependency walker from http://www.dependencywalker.com/' )
|
||||||
log.info( ' and unzip into this directory for it to work.' )
|
log.info( ' and unzip into this directory for it to work.' )
|
||||||
|
|
||||||
def CheckPathForOtherGtkInstalls():
|
def CheckPathForOtherGtkInstalls():
|
||||||
log.info( '\n====Checking environment path for other gtk installations====' )
|
log.info( '\n====Checking environment path for other gtk installations====' )
|
||||||
ePath = os.environ['path']
|
ePath = os.environ['path']
|
||||||
dirs = ePath.split(';')
|
dirs = ePath.split(';')
|
||||||
@ -281,7 +281,7 @@ def Import_pyGtkIntoPython():
|
|||||||
#test the gobject version
|
#test the gobject version
|
||||||
try:
|
try:
|
||||||
import gobject
|
import gobject
|
||||||
PrintVersionResult(' gobject', MIN_GOBJECT_VER, GObject.pygobject_version, UNTESTED_GOBJECT_VER)
|
PrintVersionResult(' gobject', MIN_GOBJECT_VER, GObject.pygobject_version, UNTESTED_GOBJECT_VER)
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
PrintFailedImport(' gobject', MIN_GOBJECT_VER, NOT_FOUND_STR)
|
PrintFailedImport(' gobject', MIN_GOBJECT_VER, NOT_FOUND_STR)
|
||||||
@ -290,7 +290,7 @@ def Import_pyGtkIntoPython():
|
|||||||
#test the cairo version
|
#test the cairo version
|
||||||
try:
|
try:
|
||||||
import cairo
|
import cairo
|
||||||
PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER )
|
PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER )
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
PrintFailedImport(' cairo ', MIN_CAIRO_VER, NOT_FOUND_STR)
|
PrintFailedImport(' cairo ', MIN_CAIRO_VER, NOT_FOUND_STR)
|
||||||
|
@ -52,12 +52,12 @@ langLookup = {
|
|||||||
'eo' : 'Esperanto',
|
'eo' : 'Esperanto',
|
||||||
'es' : 'Spanish',
|
'es' : 'Spanish',
|
||||||
'fi' : 'Finnish',
|
'fi' : 'Finnish',
|
||||||
'fr' : 'French',
|
'fr' : 'French',
|
||||||
'ga' : 'Irish',
|
'ga' : 'Irish',
|
||||||
'he' : 'Hebrew',
|
'he' : 'Hebrew',
|
||||||
'hr' : 'Croatian',
|
'hr' : 'Croatian',
|
||||||
'hu' : 'Hungarian',
|
'hu' : 'Hungarian',
|
||||||
'it' : 'Italian',
|
'it' : 'Italian',
|
||||||
'ja' : 'Japanese',
|
'ja' : 'Japanese',
|
||||||
'lt' : 'Lithuanian',
|
'lt' : 'Lithuanian',
|
||||||
'mk' : 'Macedonian',
|
'mk' : 'Macedonian',
|
||||||
@ -73,8 +73,8 @@ langLookup = {
|
|||||||
'sq' : 'Albanian',
|
'sq' : 'Albanian',
|
||||||
'sr' : 'Serbian',
|
'sr' : 'Serbian',
|
||||||
'sv' : 'Swedish',
|
'sv' : 'Swedish',
|
||||||
'tr' : 'Turkish',
|
'tr' : 'Turkish',
|
||||||
'uk' : 'Ukrainian',
|
'uk' : 'Ukrainian',
|
||||||
'vi' : 'Vietnamese',
|
'vi' : 'Vietnamese',
|
||||||
'zh_CN' : 'Chinese (PRC)',
|
'zh_CN' : 'Chinese (PRC)',
|
||||||
}
|
}
|
||||||
@ -118,17 +118,17 @@ def GetLanguageFromLocale():
|
|||||||
lang = locale.getlocale()[0]
|
lang = locale.getlocale()[0]
|
||||||
if not lang:
|
if not lang:
|
||||||
# if lang is empty/None
|
# if lang is empty/None
|
||||||
lang = locale.getdefaultlocale()[0]
|
lang = locale.getdefaultlocale()[0]
|
||||||
return lang
|
return lang
|
||||||
|
|
||||||
def writeLauncher(language, langcode, runtimepath, grampspath):
|
def writeLauncher(language, langcode, runtimepath, grampspath):
|
||||||
lines = []
|
lines = []
|
||||||
lines.append('''@rem Setting the working language
|
lines.append('''@rem Setting the working language
|
||||||
@rem ============================
|
@rem ============================
|
||||||
@rem GRAMPS looks during the start-up-phase for an environment variable (called LANG)
|
@rem GRAMPS looks during the start-up-phase for an environment variable (called LANG)
|
||||||
@rem to switch to a special language. It's better to use a ".CMD" or ".BAT" file to
|
@rem to switch to a special language. It's better to use a ".CMD" or ".BAT" file to
|
||||||
@rem control this environment variable instead a permanent setting in the windows registry,
|
@rem control this environment variable instead a permanent setting in the windows registry,
|
||||||
@rem to have the possibility to go back to the GRAMPS standard language (English) in the
|
@rem to have the possibility to go back to the GRAMPS standard language (English) in the
|
||||||
@rem case you want to report about a problem or a bug.
|
@rem case you want to report about a problem or a bug.
|
||||||
''')
|
''')
|
||||||
lines.append('\n@rem Set GRAMPS environment settings to %s \n' % language)
|
lines.append('\n@rem Set GRAMPS environment settings to %s \n' % language)
|
||||||
@ -137,9 +137,9 @@ def writeLauncher(language, langcode, runtimepath, grampspath):
|
|||||||
lines.append('''\n\n@rem Setting the configuration path
|
lines.append('''\n\n@rem Setting the configuration path
|
||||||
@rem ==============================
|
@rem ==============================
|
||||||
@rem During the boot process of GRAMPS there is a check for an environment variable
|
@rem During the boot process of GRAMPS there is a check for an environment variable
|
||||||
@rem called GRAMPSHOME. Without this environment variable GRAMPS uses the default
|
@rem called GRAMPSHOME. Without this environment variable GRAMPS uses the default
|
||||||
@rem windows path as the location to save all configuration files:
|
@rem windows path as the location to save all configuration files:
|
||||||
@rem <system drive>\<userpath>\<application data>\gramps
|
@rem <system drive>\<userpath>\<application data>\gramps
|
||||||
@rem If required, uncomment GRAMPSHOME line and edit to suit your use.
|
@rem If required, uncomment GRAMPSHOME line and edit to suit your use.
|
||||||
''')
|
''')
|
||||||
lines.append('\n@rem set the path for GRAMPS configuration files')
|
lines.append('\n@rem set the path for GRAMPS configuration files')
|
||||||
@ -154,7 +154,7 @@ def writeLauncher(language, langcode, runtimepath, grampspath):
|
|||||||
path = '\npath="%s";%%PATH%%' % runtimepath
|
path = '\npath="%s";%%PATH%%' % runtimepath
|
||||||
else:
|
else:
|
||||||
lines.append('\n@rem Uncommnet following line, and edit path to your GTK runtime')
|
lines.append('\n@rem Uncommnet following line, and edit path to your GTK runtime')
|
||||||
path = "\n@rem path=PATH_TO_YOUR_GTK_RUNTIME;%%PATH%%\n"
|
path = "\n@rem path=PATH_TO_YOUR_GTK_RUNTIME;%%PATH%%\n"
|
||||||
lines.append(path)
|
lines.append(path)
|
||||||
lines.append('''\n\n@rem Start GRAMPS application
|
lines.append('''\n\n@rem Start GRAMPS application
|
||||||
@rem =========================
|
@rem =========================
|
||||||
|
@ -26,7 +26,7 @@ py_str = 'found %d.%d.%d' % sys.version_info[:3]
|
|||||||
try:
|
try:
|
||||||
import gtk
|
import gtk
|
||||||
try:
|
try:
|
||||||
gtkver_str = 'found %d.%d.%d' % Gtk.gtk_version
|
gtkver_str = 'found %d.%d.%d' % Gtk.gtk_version
|
||||||
except : # any failure to 'get' the version
|
except : # any failure to 'get' the version
|
||||||
gtkver_str = 'unknown version'
|
gtkver_str = 'unknown version'
|
||||||
try:
|
try:
|
||||||
@ -52,7 +52,7 @@ except ImportError:
|
|||||||
try:
|
try:
|
||||||
import cairo
|
import cairo
|
||||||
try:
|
try:
|
||||||
cairover_str = 'found %d.%d.%d' % cairo.version_info
|
cairover_str = 'found %d.%d.%d' % cairo.version_info
|
||||||
except :# any failure to 'get' the version
|
except :# any failure to 'get' the version
|
||||||
cairover_str = 'unknown version'
|
cairover_str = 'unknown version'
|
||||||
|
|
||||||
@ -63,4 +63,4 @@ print('python:%s;'%py_str)
|
|||||||
print('gtk++:%s;'%gtkver_str)
|
print('gtk++:%s;'%gtkver_str)
|
||||||
print('pygtk:%s;'%pygtkver_str)
|
print('pygtk:%s;'%pygtkver_str)
|
||||||
print('gobject:%s;'%gobjectver_str)
|
print('gobject:%s;'%gobjectver_str)
|
||||||
print('cairo:%s;'%cairover_str)
|
print('cairo:%s;'%cairover_str)
|
||||||
|
@ -32,7 +32,7 @@ testdlls = ['libgdk-win32-2.0-0.dll', 'libglib-2.0-0.dll', 'libgobject-2.0-0.dll
|
|||||||
explain_exposed = ''' ***********************************************************
|
explain_exposed = ''' ***********************************************************
|
||||||
* It seems that other installations are exposing GTK DLL's
|
* It seems that other installations are exposing GTK DLL's
|
||||||
* to the operating system as they are in the environment
|
* to the operating system as they are in the environment
|
||||||
* path variable BEFORE the runtime directory.
|
* path variable BEFORE the runtime directory.
|
||||||
* You should reorder the path variable to put your GTK
|
* You should reorder the path variable to put your GTK
|
||||||
* runtime path before these other installations on the path'''
|
* runtime path before these other installations on the path'''
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ def CheckGtkInReg():
|
|||||||
except WindowsError as e:
|
except WindowsError as e:
|
||||||
print('\n GTK registry key not found in registry')
|
print('\n GTK registry key not found in registry')
|
||||||
print(''' ********************************************************************
|
print(''' ********************************************************************
|
||||||
* This might not be an error, but means I don't know the directory to
|
* This might not be an error, but means I don't know the directory to
|
||||||
* your preferred GTK installation.
|
* your preferred GTK installation.
|
||||||
* - try passing in your GTK installation path.\n''')
|
* - try passing in your GTK installation path.\n''')
|
||||||
print('-' * 60)
|
print('-' * 60)
|
||||||
@ -121,7 +121,7 @@ def ScanDependencyFileForErrors(fname):
|
|||||||
for line in lines:
|
for line in lines:
|
||||||
if line.startswith(" Module"): # work out were paths end
|
if line.startswith(" Module"): # work out were paths end
|
||||||
pthend_idx = line.find("File Time Stamp")
|
pthend_idx = line.find("File Time Stamp")
|
||||||
acceptablePaths = [ dllPathShort.lower(),
|
acceptablePaths = [ dllPathShort.lower(),
|
||||||
dllPathInRegistry.lower(),
|
dllPathInRegistry.lower(),
|
||||||
os.path.join(sysroot, 'system32').lower()
|
os.path.join(sysroot, 'system32').lower()
|
||||||
]
|
]
|
||||||
@ -249,7 +249,7 @@ def PrintVersionResult(appl, minVersion, actualVersion, untestedVersion):
|
|||||||
print(appl,)
|
print(appl,)
|
||||||
print('version %d.%d.%d or above.....\t' % minVersion ,)
|
print('version %d.%d.%d or above.....\t' % minVersion ,)
|
||||||
print('found %d.%d.%d' % actualVersion ,)
|
print('found %d.%d.%d' % actualVersion ,)
|
||||||
if minVersion <= actualVersion < untestedVersion:
|
if minVersion <= actualVersion < untestedVersion:
|
||||||
print('...OK')
|
print('...OK')
|
||||||
elif actualVersion >= untestedVersion:
|
elif actualVersion >= untestedVersion:
|
||||||
print('...UNTESTED VERSION')
|
print('...UNTESTED VERSION')
|
||||||
@ -287,7 +287,7 @@ def Import_pyGtkIntoPython():
|
|||||||
#test the cairo version
|
#test the cairo version
|
||||||
try:
|
try:
|
||||||
import cairo
|
import cairo
|
||||||
PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER )
|
PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER )
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
PrintFailedImport(' cairo ', MIN_CAIRO_VER, NOT_FOUND_STR)
|
PrintFailedImport(' cairo ', MIN_CAIRO_VER, NOT_FOUND_STR)
|
||||||
|
Loading…
Reference in New Issue
Block a user