diff --git a/build.py b/build.py
index 229db03f..a3f9e694 100644
--- a/build.py
+++ b/build.py
@@ -16,7 +16,8 @@ from setuptools import setup
from distutils.extension import Extension
from hscommon import sphinxgen
-from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, ensure_empty_folder)
+from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, ensure_empty_folder,
+ filereplace, get_module_version)
def build_cocoa(edition, dev):
print("Building dg_cocoa.plugin")
@@ -47,6 +48,9 @@ def build_cocoa(edition, dev):
pthpath = op.join(pluginpath, 'Contents/Resources/dev.pth')
open(pthpath, 'w').write(op.abspath('.'))
os.chdir(cocoa_project_path)
+ print('Generating Info.plist')
+ app_version = get_module_version('core_{}'.format(edition))
+ filereplace('InfoTemplate.plist', 'Info.plist', version=app_version)
print("Building the XCode project")
args = []
if dev:
diff --git a/cocoa/me/Info.plist b/cocoa/me/InfoTemplate.plist
similarity index 97%
rename from cocoa/me/Info.plist
rename to cocoa/me/InfoTemplate.plist
index 4cd94ed1..29b34e78 100644
--- a/cocoa/me/Info.plist
+++ b/cocoa/me/InfoTemplate.plist
@@ -23,7 +23,7 @@
CFBundleSignature
hsft
CFBundleVersion
- 5.10.4
+ {version}
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/cocoa/pe/Info.plist b/cocoa/pe/InfoTemplate.plist
similarity index 97%
rename from cocoa/pe/Info.plist
rename to cocoa/pe/InfoTemplate.plist
index 82a50dca..174a5775 100644
--- a/cocoa/pe/Info.plist
+++ b/cocoa/pe/InfoTemplate.plist
@@ -23,7 +23,7 @@
CFBundleSignature
hsft
CFBundleVersion
- 1.11.3
+ {version}
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/cocoa/se/Info.plist b/cocoa/se/InfoTemplate.plist
similarity index 97%
rename from cocoa/se/Info.plist
rename to cocoa/se/InfoTemplate.plist
index ffb22ae9..b9e39ea5 100644
--- a/cocoa/se/Info.plist
+++ b/cocoa/se/InfoTemplate.plist
@@ -23,7 +23,7 @@
CFBundleSignature
hsft
CFBundleVersion
- 2.12.3
+ {version}
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/core_me/__init__.py b/core_me/__init__.py
index e69de29b..2dc05ef9 100644
--- a/core_me/__init__.py
+++ b/core_me/__init__.py
@@ -0,0 +1 @@
+__version__ = '5.10.4'
\ No newline at end of file
diff --git a/core_pe/__init__.py b/core_pe/__init__.py
index e69de29b..1f0566c7 100644
--- a/core_pe/__init__.py
+++ b/core_pe/__init__.py
@@ -0,0 +1 @@
+__version__ = '1.11.3'
\ No newline at end of file
diff --git a/qt/me/app.py b/qt/me/app.py
index 6cb9cd64..676fc249 100644
--- a/qt/me/app.py
+++ b/qt/me/app.py
@@ -6,7 +6,7 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
-from core_me import data, scanner, fs
+from core_me import data, scanner, fs, __version__
from ..base.app import DupeGuru as DupeGuruBase
from .details_dialog import DetailsDialog
@@ -17,7 +17,7 @@ class DupeGuru(DupeGuruBase):
EDITION = 'me'
LOGO_NAME = 'logo_me'
NAME = 'dupeGuru Music Edition'
- VERSION = '5.10.4'
+ VERSION = __version__
DELTA_COLUMNS = frozenset([2, 3, 4, 5, 7])
def __init__(self):
diff --git a/qt/pe/app.py b/qt/pe/app.py
index 09efbb96..c3b339df 100644
--- a/qt/pe/app.py
+++ b/qt/pe/app.py
@@ -14,8 +14,7 @@ from PyQt4.QtGui import QImage, QImageReader
from hscommon.util import get_file_ext
from core import fs
-from core_pe import data as data_pe
-from core_pe.cache import Cache
+from core_pe import data as data_pe, __version__
from core_pe.scanner import ScannerPE
from ..base.app import DupeGuru as DupeGuruBase
@@ -60,7 +59,7 @@ class DupeGuru(DupeGuruBase):
EDITION = 'pe'
LOGO_NAME = 'logo_pe'
NAME = 'dupeGuru Picture Edition'
- VERSION = '1.11.3'
+ VERSION = __version__
DELTA_COLUMNS = frozenset([2, 5])
def __init__(self):
diff --git a/qt/se/app.py b/qt/se/app.py
index cb630bc4..642bbf6b 100644
--- a/qt/se/app.py
+++ b/qt/se/app.py
@@ -27,7 +27,7 @@ class DupeGuru(DupeGuruBase):
EDITION = 'se'
LOGO_NAME = 'logo_se'
NAME = 'dupeGuru'
- VERSION = '2.12.3'
+ VERSION = __version__
DELTA_COLUMNS = frozenset([2, 4])
def __init__(self):