mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fixed help.locale path references under Qt and fixed packaging to include the locale folder.
This commit is contained in:
parent
d3918724c0
commit
66303a2076
@ -55,8 +55,11 @@ def package_windows(edition, dev):
|
|||||||
print_and_do("upx --best \"{0}\"".format(op.join(distdir, lib)))
|
print_and_do("upx --best \"{0}\"".format(op.join(distdir, lib)))
|
||||||
|
|
||||||
help_path = op.join('build', 'help')
|
help_path = op.join('build', 'help')
|
||||||
print("Copying {0} to dist\\help".format(help_path))
|
print("Copying {} to dist\\help".format(help_path))
|
||||||
shutil.copytree(help_path, op.join(distdir, 'help'))
|
shutil.copytree(help_path, op.join(distdir, 'help'))
|
||||||
|
locale_path = op.join('build', 'locale')
|
||||||
|
print("Copying {} to dist\\locale".format(locale_path))
|
||||||
|
shutil.copytree(locale_path, op.join(distdir, 'locale'))
|
||||||
|
|
||||||
# AdvancedInstaller.com has to be in your PATH
|
# AdvancedInstaller.com has to be in your PATH
|
||||||
# this is so we don'a have to re-commit installer.aip at every version change
|
# this is so we don'a have to re-commit installer.aip at every version change
|
||||||
|
@ -236,7 +236,7 @@ class DupeGuru(QObject):
|
|||||||
self.about_box.show()
|
self.about_box.show()
|
||||||
|
|
||||||
def showHelpTriggered(self):
|
def showHelpTriggered(self):
|
||||||
base_path = platform.HELP_PATH.format(self.EDITION)
|
base_path = platform.HELP_PATH
|
||||||
url = QUrl.fromLocalFile(op.abspath(op.join(base_path, 'index.html')))
|
url = QUrl.fromLocalFile(op.abspath(op.join(base_path, 'index.html')))
|
||||||
QDesktopServices.openUrl(url)
|
QDesktopServices.openUrl(url)
|
||||||
|
|
||||||
|
@ -6,13 +6,19 @@
|
|||||||
# which should be included with this package. The terms are also available at
|
# which should be included with this package. The terms are also available at
|
||||||
# http://www.hardcoded.net/licenses/bsd_license
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
|
import os.path as op
|
||||||
from hscommon.plat import ISWINDOWS, ISOSX, ISLINUX
|
from hscommon.plat import ISWINDOWS, ISOSX, ISLINUX
|
||||||
|
|
||||||
|
# We want to get the absolute path or our root folder. We know that in that folder we're inside
|
||||||
|
# qt/base, so we just fo back two levels.
|
||||||
|
BASE_PATH = op.abspath(op.join(op.dirname(__file__), '..', '..'))
|
||||||
|
HELP_PATH = op.join(BASE_PATH, 'help')
|
||||||
|
|
||||||
if ISWINDOWS:
|
if ISWINDOWS:
|
||||||
from .platform_win import *
|
INITIAL_FOLDER_IN_DIALOGS = 'C:\\'
|
||||||
elif ISOSX:
|
elif ISOSX:
|
||||||
from .platform_osx import *
|
INITIAL_FOLDER_IN_DIALOGS = '/'
|
||||||
elif ISLINUX:
|
elif ISLINUX:
|
||||||
from .platform_lnx import *
|
INITIAL_FOLDER_IN_DIALOGS = '/'
|
||||||
else:
|
else:
|
||||||
pass # unsupported platform
|
pass # unsupported platform
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Created By: Virgil Dupras
|
|
||||||
# Created On: 2010-02-13
|
|
||||||
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
#
|
|
||||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
|
||||||
# which should be included with this package. The terms are also available at
|
|
||||||
# http://www.hardcoded.net/licenses/bsd_license
|
|
||||||
|
|
||||||
INITIAL_FOLDER_IN_DIALOGS = '/'
|
|
||||||
HELP_PATH = '/usr/share/dupeguru_{0}/help'
|
|
@ -1,13 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Created By: Virgil Dupras
|
|
||||||
# Created On: 2009-10-14
|
|
||||||
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
#
|
|
||||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
|
||||||
# which should be included with this package. The terms are also available at
|
|
||||||
# http://www.hardcoded.net/licenses/bsd_license
|
|
||||||
|
|
||||||
# dummy unit to allow the app to run under OSX during development
|
|
||||||
|
|
||||||
INITIAL_FOLDER_IN_DIALOGS = '/'
|
|
||||||
HELP_PATH = ''
|
|
@ -1,11 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Created By: Virgil Dupras
|
|
||||||
# Created On: 2009-08-31
|
|
||||||
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
#
|
|
||||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
|
||||||
# which should be included with this package. The terms are also available at
|
|
||||||
# http://www.hardcoded.net/licenses/bsd_license
|
|
||||||
|
|
||||||
INITIAL_FOLDER_IN_DIALOGS = 'C:\\'
|
|
||||||
HELP_PATH = 'help'
|
|
@ -6,6 +6,7 @@
|
|||||||
# http://www.hardcoded.net/licenses/bsd_license
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os.path as op
|
||||||
import sip
|
import sip
|
||||||
sip.setapi('QVariant', 1)
|
sip.setapi('QVariant', 1)
|
||||||
|
|
||||||
@ -28,7 +29,8 @@ if __name__ == "__main__":
|
|||||||
QCoreApplication.setApplicationVersion(__version__)
|
QCoreApplication.setApplicationVersion(__version__)
|
||||||
settings = QSettings()
|
settings = QSettings()
|
||||||
lang = settings.value('Language').toString()
|
lang = settings.value('Language').toString()
|
||||||
install_gettext_trans_under_qt(lang)
|
locale_folder = op.join(op.dirname(__file__), 'locale')
|
||||||
|
install_gettext_trans_under_qt(locale_folder, lang)
|
||||||
# Many strings are translated at import time, so this is why we only import after the translator
|
# Many strings are translated at import time, so this is why we only import after the translator
|
||||||
# has been installed
|
# has been installed
|
||||||
from qt.{{edition}}.app import DupeGuru
|
from qt.{{edition}}.app import DupeGuru
|
||||||
|
Loading…
x
Reference in New Issue
Block a user