diff --git a/bypy/init_env.py b/bypy/init_env.py index 5f42b4fdb8..2eb78aa252 100644 --- a/bypy/init_env.py +++ b/bypy/init_env.py @@ -113,9 +113,14 @@ def initialize_constants(): nv = re.search(r'numeric_version\s+=\s+\((\d+), (\d+), (\d+)\)', src) calibre_constants['version' ] = '%s.%s.%s' % (nv.group(1), nv.group(2), nv.group(3)) - calibre_constants['appname'] = re.search( - r'__appname__\s+=\s+(u{0,1})[\'"]([^\'"]+)[\'"]', src - ).group(2) + def get_str_assign(which): + pat = r'__appname__\s+=\s+(u{0,1})[\'"]([^\'"]+)[\'"]'.replace('__appname__', which) + return re.search(pat, src).group(2) + + calibre_constants['appname'] = get_str_assign('__appname__') + calibre_constants['MAIN_APP_UID'] = get_str_assign('MAIN_APP_UID') + calibre_constants['VIEWER_APP_UID'] = get_str_assign('VIEWER_APP_UID') + calibre_constants['EDITOR_APP_UID'] = get_str_assign('EDITOR_APP_UID') epsrc = re.compile(r'entry_points = (\{.*?\})', re.DOTALL).search(read_cal_file('linux.py')).group(1) entry_points = eval(epsrc, {'__appname__': calibre_constants['appname']}) diff --git a/bypy/windows/wix-template.xml b/bypy/windows/wix-template.xml index 178b19f2ac..901a054b0a 100644 --- a/bypy/windows/wix-template.xml +++ b/bypy/windows/wix-template.xml @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -78,9 +78,15 @@ - - - + + + + + + + + + @@ -94,7 +100,7 @@ - + @@ -140,12 +146,12 @@ - + - + @@ -155,7 +161,7 @@ -