Skip to content

Commit aa3de75

Browse files
committed
Changed build scripts for new split project structure
1 parent 27c48c1 commit aa3de75

10 files changed

+201
-144
lines changed

CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ add_executable (${PROJECT} ${HEADERS} ${SOURCES} ${UI_SOURCES} ${MOC_SOURCES} ${
135135
target_link_libraries (${PROJECT} ${QT_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIB_PROJECT})
136136
target_link_libraries (${LIB_PROJECT} ${QT_LIBRARIES} ${OPENSSL_LIBRARIES})
137137
install (TARGETS ${PROJECT} DESTINATION bin)
138-
install (TARGETS ${LIB_PROJECT} DESTINATION lib)
138+
install (TARGETS ${LIB_PROJECT} DESTINATION lib${LIB_SUFFIX})
139139
install (FILES ${DESKTOP_FILE} DESTINATION share/applications)
140140
install (FILES ${DOCS} DESTINATION share/doc/${PROJECT}-${PROJECT_VERSION})
141141

@@ -151,3 +151,9 @@ install (
151151
FILES images/icons/${PROJECT}.svg
152152
DESTINATION ${ICON_DEST_PATH}/scalable/apps
153153
)
154+
foreach (LIB_HEADER ${LIB_HEADERS})
155+
install (
156+
FILES ${LIB_HEADER}
157+
DESTINATION include/basketpwd
158+
)
159+
endforeach()

ChangeLog.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Версия 0.4.6
2+
* добавлены интерфейсные классы для реализации плагинов
3+
* исходники разбиты на составные части (отдельно библиотека, отдельно приложение)
4+
* исправлены косметические ошибки
15
Версия 0.4.5
26
* исправлено несколько ошибок утечки памяти
37
* обновлен перевод

basketpwd-gui.pro

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
TEMPLATE = app
2+
TARGET = basketpwd
3+
4+
QT = gui \
5+
core \
6+
xml
7+
# network # перенос в плагины
8+
CONFIG += qt \
9+
# warn_on \
10+
# debug_and_release \
11+
# windows \
12+
ordered
13+
14+
!mac:DESTDIR = bin
15+
OBJECTS_DIR = build
16+
MOC_DIR = build
17+
UI_DIR = build
18+
FORMS = ui/mainwindow.ui \
19+
ui/changepassword.ui \
20+
aboutdialog.ui \
21+
ui/settingsdialog.ui
22+
HEADERS = src/mainwindow.h \
23+
src/changepassword.h \
24+
aboutdialog.h \
25+
src/settingsdialog.h \
26+
model/basketmodel.h \
27+
src/pluginsloader.h
28+
SOURCES = src/mainwindow.cpp \
29+
src/main.cpp \
30+
src/changepassword.cpp \
31+
aboutdialog.cpp \
32+
src/settingsdialog.cpp \
33+
model/basketmodel.cpp \
34+
src/pluginsloader.cpp
35+
RESOURCES += icon-images.qrc
36+
RC_FILE = basketpwd.rc
37+
mac:RC_FILE = images/basketpwd.icns
38+
INCLUDEPATH += libs
39+
40+
QMAKE_INFO_PLIST = tools/Info.plist
41+
42+
ICON_SIZES = 128 192 256 32 36 48 64 72 96
43+
ICON_PATH =
44+
ICON_EXTRA =
45+
INSTALL_ROOT=/usr/local
46+
47+
defineTest(CopyIcons) {
48+
extra =
49+
path =
50+
for(icon_size, ICON_SIZES) {
51+
ICON_EXTRA += install -D -m 0644 -p $${_PRO_FILE_PWD_}/images/icons/basketpwd_$${icon_size}x$${icon_size}.png $(INSTALL_ROOT)/share/icons/hicolor/$${icon_size}x$${icon_size}/apps/basketpwd.png;
52+
ICON_PATH += /share/icons/hicolor/$${icon_size}x$${icon_size}/apps
53+
}
54+
export ( ICON_EXTRA )
55+
export ( ICON_PATH )
56+
}
57+
58+
win32 {
59+
CONFIG += static
60+
INCLUDEPATH += d:/devel/utils/openssl/openssl-shared-64/include
61+
LIBS += -ld:/devel/utils/openssl/openssl-shared-64/lib/libeay32
62+
}
63+
unix {
64+
LIBS += -lcrypto -lssl -lbasketpwd -L./bin
65+
target.path += /bin
66+
basket_desktop.files += tools/basketpwd.desktop
67+
basket_desktop.path += /share/applications
68+
CopyIcons()
69+
basket_icon.extra = $${ICON_EXTRA}
70+
basket_icon.path = $${ICON_PATH}
71+
basket_svg.files += images/icons/basketpwd.svg
72+
basket_svg.path += /share/icons/hicolor/scalable/apps
73+
74+
INSTALLS += target \
75+
basket_desktop \
76+
basket_icon \
77+
basket_svg
78+
}
79+
mac {
80+
TARGET = "Basket of passwords"
81+
}
82+
VERSION = 0.4.6
83+
VERSTR = '\\"$${VERSION}\\"'
84+
DEFINES += VER=\"$${VERSTR}\"
85+
DEFINES += QMAKE_SET=1
86+
OTHER_FILES += ChangeLog.txt
87+
TRANSLATIONS += basketpwd_en.ts

basketpwd.pro

+5-100
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,6 @@
1-
TEMPLATE = app
2-
QT = gui \
3-
core \
4-
xml
5-
# network # перенос в плагины
6-
CONFIG += qt \
7-
warn_on \
8-
debug_and_release \
9-
windows
10-
!mac:DESTDIR = bin
11-
OBJECTS_DIR = build
12-
MOC_DIR = build
13-
UI_DIR = build
14-
FORMS = ui/mainwindow.ui \
15-
ui/changepassword.ui \
16-
aboutdialog.ui \
17-
ui/settingsdialog.ui
18-
HEADERS = src/mainwindow.h \
19-
# src/basketutils.h \
20-
src/changepassword.h \
21-
aboutdialog.h \
22-
src/settingsdialog.h \
23-
# model/basketbaseitem.h \
24-
model/basketmodel.h \
25-
# src/coreplugin.h \
26-
src/pluginsloader.h
27-
# src/plugin_share.h
28-
# netsync/firstnetworksender.h \
29-
# netsync/qsyncclientlist.h \
30-
# netsync/syncclient.h \
31-
# netsync/udplistener.h \
32-
# netsync/udpnetworksocket.h
33-
SOURCES = src/mainwindow.cpp \
34-
src/main.cpp \
35-
# src/basketutils.cpp \
36-
src/changepassword.cpp \
37-
aboutdialog.cpp \
38-
src/settingsdialog.cpp \
39-
# model/basketbaseitem.cpp \
40-
model/basketmodel.cpp \
41-
# src/coreplugin.cpp \
42-
src/pluginsloader.cpp
43-
# netsync/firstnetworksender.cpp \
44-
# netsync/qsyncclientlist.cpp \
45-
# netsync/syncclient.cpp \
46-
# netsync/udplistener.cpp \
47-
# netsync/udpnetworksocket.cpp
48-
RESOURCES += icon-images.qrc
49-
RC_FILE = basketpwd.rc
50-
mac:RC_FILE = images/basketpwd.icns
51-
INCLUDEPATH += libs
1+
TEMPLATE = subdirs
2+
SUBDIRS = mainapp library
3+
mainapp.file = basketpwd-gui.pro
4+
mainapp.depends = library
5+
library.subdir = libs/basketpwd
526

53-
QMAKE_INFO_PLIST = tools/Info.plist
54-
55-
ICON_SIZES = 128 192 256 32 36 48 64 72 96
56-
ICON_PATH =
57-
ICON_EXTRA =
58-
INSTALL_ROOT=/usr/local
59-
60-
defineTest(CopyIcons) {
61-
extra =
62-
path =
63-
for(icon_size, ICON_SIZES) {
64-
ICON_EXTRA += install -D -m 0644 -p $${_PRO_FILE_PWD_}/images/icons/basketpwd_$${icon_size}x$${icon_size}.png $(INSTALL_ROOT)/usr/share/icons/hicolor/$${icon_size}x$${icon_size}/apps/basketpwd.png;
65-
ICON_PATH += /usr/share/icons/hicolor/$${icon_size}x$${icon_size}/apps
66-
}
67-
export ( ICON_EXTRA )
68-
export ( ICON_PATH )
69-
}
70-
71-
win32 {
72-
CONFIG += static
73-
INCLUDEPATH += d:/devel/utils/openssl/openssl-shared-64/include
74-
LIBS += -ld:/devel/utils/openssl/openssl-shared-64/lib/libeay32
75-
}
76-
unix {
77-
LIBS += -lcrypto -lssl -lbasketpwd -L/Users/alex/workspace/code/basketpwd/build
78-
TARGET = basketpwd
79-
target.path += /usr/bin
80-
basket_desktop.files += tools/basketpwd.desktop
81-
basket_desktop.path += /usr/share/applications
82-
CopyIcons()
83-
basket_icon.extra = $${ICON_EXTRA}
84-
basket_icon.path = $${ICON_PATH}
85-
basket_svg.files += images/icons/basketpwd.svg
86-
basket_svg.path += /usr/share/icons/hicolor/scalable/apps
87-
88-
INSTALLS += target \
89-
basket_desktop \
90-
basket_icon \
91-
basket_svg
92-
}
93-
mac {
94-
TARGET = "Basket of passwords"
95-
}
96-
VERSION = 0.4.5
97-
VERSTR = '\\"$${VERSION}\\"'
98-
DEFINES += VER=\"$${VERSTR}\"
99-
DEFINES += QMAKE_SET=1
100-
OTHER_FILES += ChangeLog.txt
101-
TRANSLATIONS += basketpwd_en.ts

libs/basketpwd/basketpwd-libs.pro libs/basketpwd/basketpwd.pro

+14-19
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ TEMPLATE = lib
1111

1212
DEFINES += BASKETPWD_LIBRARY
1313

14+
DESTDIR = ../../bin/
15+
1416
SOURCES += basketpwdlibs.cpp \
1517
coreplugin.cpp \
1618
basketutils.cpp \
@@ -25,28 +27,21 @@ HEADERS += basketpwdlibs.h\
2527

2628
unix {
2729
LIBS += -lcrypto -lssl
30+
eval($$QMAKE_HOST.arch = x86) {
31+
target.path = /lib
32+
}
33+
eval($$QMAKE_HOST.arch = x86_64) {
34+
target.path = /lib64
35+
}
36+
37+
# Headers for include
38+
include_headers.files += $${HEADERS}
39+
include_headers.path = /include/basketpwd
40+
41+
INSTALLS += target include_headers
2842
}
2943
win32 {
3044
CONFIG += static
3145
INCLUDEPATH += d:/devel/utils/openssl/openssl-shared-64/include
3246
LIBS += -ld:/devel/utils/openssl/openssl-shared-64/lib/libeay32
3347
}
34-
35-
symbian {
36-
MMP_RULES += EXPORTUNFROZEN
37-
TARGET.UID3 = 0xE426FAEC
38-
TARGET.CAPABILITY =
39-
TARGET.EPOCALLOWDLLDATA = 1
40-
addFiles.sources = basketpwd.dll
41-
addFiles.path = !:/sys/bin
42-
DEPLOYMENT += addFiles
43-
}
44-
45-
unix:!symbian {
46-
maemo5 {
47-
target.path = /opt/usr/lib
48-
} else {
49-
target.path = /usr/lib
50-
}
51-
INSTALLS += target
52-
}

tools/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<key>CFBundleName</key>
2424
<string>Basket of passwords</string>
2525
<key>CFBundleShortVersionString</key>
26-
<string>0.4.5</string>
26+
<string>0.4.6</string>
2727
<key>CFBundleVersion</key>
2828
<string>1</string>
2929
</dict>

tools/SlackBuild/README

+52-12
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,71 @@ or alternatively you can use GIT to get latest development version:
1313
Dependencies
1414
============
1515
* Qt libraries version 4.2.1 or later
16-
* libgcrypt version 1.4.0 or later
16+
* libgcrypt version 1.4.0 or later (WARNING!!! It is required only for basketpwd version < 0.4.2)
17+
* openssl version 0.9.7a or later (This required for basketpwd version >= 0.4.2)
18+
* cmake (optional)
1719

1820
Installation
1921
============
2022

21-
On GNU/Linux or FreeBSD
23+
On GNU/Linux or FreeBSD (without cmake)
2224
$ qmake (or qmake-qt4 in many linux distributives as Fedora Linux for example)
2325
$ make release
2426
# make install INSTALL_ROOT=/usr (for installing in /usr prefix)
2527
or
2628
$ sudo make install INSTALL_ROOT=/usr (if sudo configured)
2729

28-
Installation for Fedora Linux 13 (Goddard)
29-
==========================================
30-
* add repository rpmatis:
31-
# rpm -ivh http://repo.atisserv.ru/rpmatis/fedora/13/x86_64/rpmatis-release-13-3.noarch.rpm
32-
* run yum update:
33-
# yum update
34-
* install package basketpwd:
35-
# yum install basketpwd
30+
With cmake
31+
Run bellow commands in source folder
32+
$ mkdir build; cd build
33+
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr #(if you have install application in /usr or simple 'cmake ..' if you have install into /usr/local)
34+
35+
On Mac OS X
36+
$ mkdir build; cd buld
37+
$ cmake ..
38+
$ make
39+
$ make mac-bundle # for create only bundle
40+
or
41+
$ make mac-dmg # for create bundle and dmg file
42+
43+
Installation for Fedora Linux
44+
=============================
45+
for Fedora 13 and later basketpwd packages in RFRemix repository:
46+
# http://koji.russianfedora.ru/koji/packageinfo?packageID=101
47+
48+
Installation for Slackware Linux
49+
================================
50+
$ git clone git://github.com/elemc/basketpwd.git # clone repository from git
51+
$ cd basketpwd # enter to application directory
52+
$ tools/make-source-archive # make a tarboll for building
53+
$ cp ../basketpwd*.tar.bz2 tools/SlackBuild/ # copy tarboll to SlackBuild directory
54+
$ cd tools/SlackBuild
55+
if version of tarboll not equal version in basketpwd.SlackBuild, then edit to equal.
56+
$ su - # enter in root account
57+
# ./basketpwd.SlackBuild # build a package
58+
SlackBuild script tell where him create a package file, type
59+
# installpkg /path/to/package/basketpwd*.tgz
60+
61+
Installation for OpenSUSE Linux
62+
===============================
63+
First, add repository:
64+
* for 11.2 http://download.opensuse.org/repositories/home:/elemc/openSUSE_11.2
65+
* for 11.3 http://download.opensuse.org/repositories/home:/elemc/openSUSE_11.3
66+
* for 11.4 http://download.opensuse.org/repositories/home:/elemc/openSUSE_11.4
67+
* for Facctory http://download.opensuse.org/repositories/home:/elemc/openSUSE_Factory
68+
and install package named basketpwd, as example
69+
zypper in basketpwd
70+
71+
Installation for Windows
72+
========================
73+
Go to section Files on github.com/elemc/basketpwd and select one:
74+
* basketpwd-static-X.X.X.zip - is a statically linked one exe-file for mobility
75+
* basketpwd-setup-X.X.X.exe - is a windows installer
3676

3777
Reporting bugs
3878
==============
3979

40-
Please send bug reports to the <elemc@atisserv.ru>
80+
Please send bug reports to the <elemc AT atisserv DOT ru>
4181
or post to issue in http://github.com/elemc/basketpwd/issues
4282

43-
This all
83+
Thanks

tools/SlackBuild/basketpwd.SlackBuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Written by Alexei Panov <[email protected]>
44

55
PRGNAM=basketpwd
6-
VERSION=0.4.4
6+
VERSION=0.4.6
77
ARCH=${ARCH:-i486}
88
BUILD=${BUILD:-1}
99
TAG=${TAG:-_elemc}
@@ -51,7 +51,7 @@ chmod -R a-s,u+w,go+r-w .
5151

5252
mkdir build
5353
cd build
54-
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
54+
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX=$LIBDIRSUFFIX
5555
make
5656
make install DESTDIR=$PKG
5757
cd ..

0 commit comments

Comments
 (0)