cleaned up qmake project file, improved mac app bundle generation

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@161 b624d157-de02-0410-bad0-e51aec6abb33
master
tarek_saidi 16 years ago
parent 863bd3316d
commit e8be8e8a2b
  1. 0
      share/keepassx/doc/css/style.css
  2. 0
      share/keepassx/doc/images/headerbackground.png
  3. 0
      share/keepassx/doc/images/logo.png
  4. 0
      share/keepassx/doc/index.html
  5. 0
      share/keepassx/doc/keepassx.adp
  6. 0
      share/keepassx/icons/alarmclock.png
  7. 0
      share/keepassx/icons/appsettings.png
  8. 0
      share/keepassx/icons/autotype.png
  9. 0
      share/keepassx/icons/bookmark.png
  10. 0
      share/keepassx/icons/bookmark_add.png
  11. 0
      share/keepassx/icons/bookmark_del.png
  12. 0
      share/keepassx/icons/bookmark_edit.png
  13. 0
      share/keepassx/icons/bookmark_folder.png
  14. 0
      share/keepassx/icons/bookmark_this.png
  15. 0
      share/keepassx/icons/clientic.png
  16. 0
      share/keepassx/icons/clock.png
  17. 0
      share/keepassx/icons/cloneentry.png
  18. 0
      share/keepassx/icons/copypwd.png
  19. 0
      share/keepassx/icons/copyusername.png
  20. 0
      share/keepassx/icons/dbsearch.png
  21. 0
      share/keepassx/icons/dbsettings.png
  22. 0
      share/keepassx/icons/delete.png
  23. 0
      share/keepassx/icons/deleteentry.png
  24. 0
      share/keepassx/icons/deletegroup.png
  25. 0
      share/keepassx/icons/dice.png
  26. 0
      share/keepassx/icons/document.png
  27. 0
      share/keepassx/icons/down.png
  28. 0
      share/keepassx/icons/editentry.png
  29. 0
      share/keepassx/icons/editgroup.png
  30. 0
      share/keepassx/icons/exit.png
  31. 0
      share/keepassx/icons/expired.png
  32. 0
      share/keepassx/icons/fileclose.png
  33. 0
      share/keepassx/icons/filedelete.png
  34. 0
      share/keepassx/icons/filenew.png
  35. 0
      share/keepassx/icons/fileopen.png
  36. 0
      share/keepassx/icons/filesave.png
  37. 0
      share/keepassx/icons/filesaveas.png
  38. 0
      share/keepassx/icons/filesavedisabled.png
  39. 0
      share/keepassx/icons/generator.png
  40. 0
      share/keepassx/icons/groupsearch.png
  41. 0
      share/keepassx/icons/help.png
  42. 0
      share/keepassx/icons/i18n.png
  43. 0
      share/keepassx/icons/keepassx.png
  44. 0
      share/keepassx/icons/keepassx_large.png
  45. 0
      share/keepassx/icons/keepassx_locked.png
  46. 0
      share/keepassx/icons/key.png
  47. 0
      share/keepassx/icons/lock.png
  48. 0
      share/keepassx/icons/manual.png
  49. 0
      share/keepassx/icons/newentry.png
  50. 0
      share/keepassx/icons/newgroup.png
  51. 0
      share/keepassx/icons/ok.png
  52. 0
      share/keepassx/icons/openurl.png
  53. 0
      share/keepassx/icons/pwd_hide.png
  54. 0
      share/keepassx/icons/pwd_show.png
  55. 0
      share/keepassx/icons/restore.png
  56. 0
      share/keepassx/icons/search.png
  57. 0
      share/keepassx/icons/swap.png
  58. 0
      share/keepassx/icons/templates.png
  59. 0
      share/keepassx/icons/text_block.png
  60. 0
      share/keepassx/icons/text_bold.png
  61. 0
      share/keepassx/icons/text_center.png
  62. 0
      share/keepassx/icons/text_italic.png
  63. 0
      share/keepassx/icons/text_left.png
  64. 0
      share/keepassx/icons/text_right.png
  65. 0
      share/keepassx/icons/text_under.png
  66. 0
      share/keepassx/icons/trashcan.png
  67. 0
      share/keepassx/icons/up.png
  68. 0
      share/keepassx/license.html
  69. BIN
      share/macx_bundle/icon.icns
  70. 26
      src/main.cpp
  71. 1
      src/main.h
  72. 96
      src/src.pro

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 634 B

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 754 B

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 818 B

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 206 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 183 B

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

@ -70,6 +70,7 @@ QHash<QString,QIcon*>IconCache;
KpxConfig *config;
QString AppDir;
QString HomeDir;
QString DataDir;
QString PluginLoadError;
bool TrActive;
QString DetailViewTemplate;
@ -97,6 +98,12 @@ int main(int argc, char **_argv)
#else
HomeDir = QDir::homePath()+"/.keepassx";
#endif
#if defined Q_WS_MACX
DataDir=AppDir+"/../Resources/keepassx";
#else
DataDir=AppDir+"/../share/keepassx";
#endif
bool ArgMin = false;
bool ArgLock = false;
parseCmdLineArgs(argc,argv,ArgFile,ArgCfg,ArgLang,ArgMin,ArgLock);
@ -182,8 +189,7 @@ int main(int argc, char **_argv)
qtTranslator=new QTranslator;
if(loadTranslation(translator,"keepass-",loc.name(),QStringList()
<< AppDir+"/../share/keepass/i18n/"
<< AppDir+"/share/i18n/"
<< DataDir+"/i18n/"
<< HomeDir))
{
app->installTranslator(translator);
@ -201,8 +207,7 @@ int main(int argc, char **_argv)
if(TrActive){
if(loadTranslation(qtTranslator,"qt_",loc.name(),QStringList()
<< QLibraryInfo::location(QLibraryInfo::TranslationsPath)
<< AppDir+"/../share/keepass/i18n/"
<< AppDir+"/share/i18n/"
<< DataDir+"/i18n/"
<< HomeDir))
app->installTranslator(qtTranslator);
else{
@ -321,10 +326,8 @@ void openBrowser(const QString& UrlString){
}
QString getImageFile(const QString& name){
if (QFile::exists(AppDir+"/../share/keepass/icons/"+name))
return AppDir+"/../share/keepass/icons/"+name;
else if (QFile::exists(AppDir+"/share/icons/"+name))
return AppDir+"/share/icons/"+name;
if (QFile::exists(DataDir+"/icons/"+name))
return DataDir+"/icons/"+name;
else{
QMessageBox::critical(0,QApplication::translate("Main","Error"),
QApplication::translate("Main","File '%1' could not be found.")
@ -501,12 +504,13 @@ QString applicationFilePath()
});
return filePath.filePath();
#elif defined(Q_WS_MAC)
#elif defined(Q_WS_MAC)
CFURLRef bundleURL(CFBundleCopyExecutableURL(CFBundleGetMainBundle()));
assert(bundleURL);
//assert(bundleURL);
CFStringRef cfPath(CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle));
assert(cfPath);
//assert(cfPath);
CFIndex length = CFStringGetLength(cfPath);
const UniChar *chars = CFStringGetCharactersPtr(cfPath);
if (chars)

@ -61,6 +61,7 @@ extern QString PluginLoadError;
extern KpxConfig *config;
extern QString AppDir;
extern QString HomeDir;
extern QString DataDir;
extern bool TrActive;
extern QString DetailViewTemplate;
extern QPixmap *EntryIcons;

@ -1,35 +1,34 @@
DEPENDPATH += crypto \
dialogs \
export \
forms \
import \
lib \
translations \
res
CONFIG = qt uic resources thread stl warn_off release
QT += xml
win32:QMAKE_WIN32 = 1
DEPENDPATH += crypto dialogs export forms import lib translations res
INCLUDEPATH += . lib crypto plugins/interfaces export import dialogs
MOC_DIR = ../build/moc
UI_DIR = ../build/ui
OBJECTS_DIR = ../build
RCC_DIR = ../build/rcc
INSTALLS += target data
data.files += ../share/keepass/*
TARGET = ../bin/keepassx
isEqual(DEBUG,1) {
CONFIG += debug
}
unix : !macx : !isEqual(QMAKE_WIN32,1) {
#-------------------------------------------------------------------------------
# Platform Specific: Unix (except MacOS X)
#-------------------------------------------------------------------------------
unix : !macx {
isEmpty(PREFIX):PREFIX = /usr
!isEqual(AUTOTYPE,0) {
DEFINES += AUTOTYPE
!isEqual(GLOBAL_AUTOTYPE,0) {
DEFINES += GLOBAL_AUTOTYPE
}
}
target.path = $${PREFIX}/bin
data.path = $${PREFIX}/share/keepass
TARGET = ../bin/keepassx
TARGET.path = $${PREFIX}/bin
data.path = $${PREFIX}/share
pixmaps.files = ../share/pixmaps/*
pixmaps.path = $${PREFIX}/share/pixmaps
desktop.files = ../share/applications/*
@ -44,30 +43,58 @@ unix : !macx : !isEqual(QMAKE_WIN32,1) {
SOURCES += Application_X11.cpp
HEADERS += Application_X11.h
}
isEqual(BUILD_FOR_LSB,1) {
QMAKE_CXX = lsbcc
}
}
#-------------------------------------------------------------------------------
# Platform Specific: MacOS X
#-------------------------------------------------------------------------------
macx {
isEmpty(PREFIX):PREFIX = /Applications
target.path = $${PREFIX}
data.path = $${PREFIX}/keepassx.app/Contents/share/keepass
TARGET = ../bin/KeePassX
TARGET.path = $${PREFIX}
data.path = Contents/Resources
isEmpty(QT_FRAMEWORK_DIR) : QT_FRAMEWORK_DIR = /Library/Frameworks
private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtCore.framework
private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtGui.framework
private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtXml.framework
private_frameworks.path = Contents/Frameworks
QMAKE_BUNDLE_DATA += data private_frameworks
LIBS += -framework CoreFoundation
ICON = ../share/macx_bundle/icon.icns
CONFIG += app_bundle
isEqual(ARCH,UNIVERSAL) : CONFIG += x86 ppc
isEqual(ARCH,INTEL) : CONFIG += x86
isEqual(ARCH,PPC) : CONFIG += ppc
}
isEqual(QMAKE_WIN32,1) {
#-------------------------------------------------------------------------------
# Platform Specific: Windows
#-------------------------------------------------------------------------------
win32 {
CONFIG += windows
isEmpty(PREFIX):PREFIX = "C:/Program files/KeePassX"
target.path = $${PREFIX}
TARGET = ../bin/KeePassX
TARGET.path = $${PREFIX}
data.path = $${PREFIX}/share
RC_FILE = ../share/ico/keepassx.rc
QMAKE_LINK_OBJECT_SCRIPT = $${OBJECTS_DIR}/$${QMAKE_LINK_OBJECT_SCRIPT}
}
data.files += ../share/keepassx
INSTALLS += TARGET data
contains(DEFINES,GLOBAL_AUTOTYPE) {
FORMS += forms/AutoTypeDlg.ui
HEADERS += dialogs/AutoTypeDlg.h
SOURCES += dialogs/AutoTypeDlg.cpp
}
FORMS += forms/EditGroupDlg.ui \
forms/SearchDlg.ui \
forms/AboutDlg.ui \
@ -210,30 +237,3 @@ SOURCES += lib/UrlLabel.cpp \
dialogs/ManageBookmarksDlg.cpp
RESOURCES += res/resources.qrc
CONFIG = qt \
uic \
resources \
thread \
stl \
warn_off
QT += xml
TEMPLATE = app
INCLUDEPATH += . \
lib \
crypto \
plugins/interfaces \
export \
import \
dialogs \
./
isEqual(RELEASE,1) {
CONFIG += release
}
else {
CONFIG += debug
}
isEqual(QMAKE_WIN32,1) {
CONFIG += windows
}