Skip to content

Commit 70b0cae

Browse files
author
ale_bychuk
committed
add mac os x support (min 10.9)
1 parent b6d2fef commit 70b0cae

File tree

9 files changed

+607
-444
lines changed

9 files changed

+607
-444
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ qrc_*.cpp
55
*.pro.user
66
/Makefile
77
/Qldd
8+
*.qmake.stash

Qldd.app/Contents/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.plist
2+
/PkgInfo

Qldd.app/Contents/MacOS/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Qldd
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.lproj

Qldd.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
1111
TARGET = Qldd
1212
TEMPLATE = app
1313

14+
macx {
15+
QMAKE_MAC_SDK = macosx10.9
16+
}
1417

1518
SOURCES += main.cpp\
1619
mainwindow.cpp \

main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ int main(int argc, char *argv[]) {
3737
// QLdd qldd(fName, app.applicationDirPath());
3838
// size_t fsz = qldd.getFileSize();
3939
// }
40-
40+
#ifdef __APPLE__
41+
w.setWindowTitle("UnixDependency");
42+
#else
4143
w.setWindowTitle("LinuxDependency");
42-
44+
#endif
4345
w.show();
4446

4547
return app.exec();

mainwindow.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ void MainWindow::open() {
9999

100100
void MainWindow::about() {
101101
QMessageBox::about(this, tr("About Application"),
102-
tr("Linuxdependency shows all dependent libraries of a given executable or dynamic library on Linux. It is a GUI replacement for the ldd command."));
102+
#ifdef __APPLE__
103+
tr("UnixDependency shows all dependent libraries of a "
104+
#else
105+
tr("LinuxDependency shows all dependent libraries of a "
106+
#endif
107+
"given executable or dynamic library on Linux. It is a GUI replacement for the ldd, file and nm command."));
103108
}
104109

105110
void MainWindow::createActions() {

0 commit comments

Comments
 (0)