##// END OF EJS Templates
Improved install.
Jeandet Alexis -
r13:de3e229c2027 tip default
parent child
Show More
@@ -0,0 +1,15
1 [Desktop Entry]
2 Version=1.0
3 Name=ExeCut
4 Type=Application
5 GenericName=ExeCut
6
7 Comment=ExeCut is a graphical tool for executable files viewing.
8
9 Exec=execut
10 Icon=/usr/share/ExeCut/icon.png
11 Terminal=false
12 Type=Application
13 Categories=Application;Programming;
14 MimeType=application/x-executable;text/plain;application/octet-stream;
15 Name[fr_FR]=ExeCut
@@ -0,0 +1,28
1 #include "aboutexecut.h"
2 #include <QFile>
3 #include <QTextStream>
4 #include <QDesktopServices>
5
6 aboutExecut::aboutExecut(QWidget *parent) :
7 QTextBrowser(parent)
8 {
9 this->setReadOnly(true);
10 QString code;
11 QFile file;
12 code.clear();
13 file.setFileName(":/about/about.html");
14 this->setAcceptRichText(true);
15 file.open(QIODevice::ReadOnly);
16 QTextStream filestrm(&file);
17 while(!filestrm.atEnd())code.append(filestrm.readLine()+"\n");
18 this->setHtml(code);
19 file.close();
20 this->setMinimumSize(400,400);
21 connect(this,SIGNAL(anchorClicked(QUrl)),this,SLOT(anchorClicked_slt(QUrl)));
22 this->setOpenLinks(false);
23 }
24
25 void aboutExecut::anchorClicked_slt(const QUrl &url)
26 {
27 QDesktopServices::openUrl(url);
28 }
@@ -0,0 +1,19
1 #ifndef ABOUTEXECUT_H
2 #define ABOUTEXECUT_H
3
4 #include <QTextBrowser>
5
6 class aboutExecut : public QTextBrowser
7 {
8 Q_OBJECT
9 public:
10 explicit aboutExecut(QWidget *parent = 0);
11
12 signals:
13
14 public slots:
15 void anchorClicked_slt(const QUrl &url);
16
17 };
18
19 #endif // ABOUTEXECUT_H
1 NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,29
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 </head>
5 <body style="background-color : #dbdbdb;">
6
7 <div align="center">
8 <a href="http://www.cnrs.fr/"> <IMG src=":/images/logocnrs.png" alt="CNRS" width="47" height="47" align="top" border="0" ></a>
9 <a href="http://www.lpp.fr/"> <IMG src=":/images/logolpp.png" width="158" height="47" align="top" border="0" ></a>
10 </div>
11 <hr>
12 <div align="center">
13 <B style="font-size : 150%;">About SocExplorer</B>
14 </div>
15 <hr>
16 <div align="center">
17 <B>ExeCut</B><BR><BR>
18 Copyright (C) 2014 Plasmas Physic Laboratory.<BR>
19 This is free software; licenced under the terms of the GPLV2 license.<BR><BR>
20 This program uses:
21 <div align="left" style="margin-left : 50%;">
22 <ul>
23 <LI><a href="http://qt.digia.com/" title="Qt">Qt</a> (Copyright 2008-2014 Digia Plc).</LI>
24 <LI><a href="http://code.google.com/p/qhexedit2/" title="qhexedit">QHexEdit</a></LI>
25 </ul>
26 </div>
27 </div>
28 </body>
29 </html>
@@ -0,0 +1,12
1 <RCC>
2 <qresource prefix="/icon">
3 <file>icon.png</file>
4 </qresource>
5 <qresource prefix="/about">
6 <file>about.html</file>
7 </qresource>
8 <qresource prefix="/images">
9 <file alias="logolpp.png">logo-lpp.png</file>
10 <file alias="logocnrs.png">LOGO CNRS.png</file>
11 </qresource>
12 </RCC>
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
@@ -14,8 +14,6 MOC_DIR = moc
14 14 RCC_DIR = resources
15 15 OBJECTS_DIR = obj
16 16
17 #win32:CONFIG += dll
18 #win32:CONFIG -= static
19 17
20 18 win32:INCLUDEPATH += $${PWD}/genericBinaryFiles/elf/libelfWin32/include
21 19 win32:INCLUDEPATH += $${PWD}/genericBinaryFiles/elf/libelfWin32/include/libelf
@@ -45,7 +43,8 SOURCES += main.cpp\
45 43 genericBinaryFiles/genericbinaryfilewidget.cpp \
46 44 genericBinaryFiles/qtablewidgetintitem.cpp \
47 45 genericBinaryFiles/filelist.cpp \
48 genericBinaryFiles/qvpushbutton.cpp
46 genericBinaryFiles/qvpushbutton.cpp \
47 aboutexecut.cpp
49 48
50 49 HEADERS += mainwindow.h \
51 50 qhexedit/qhexedit_p.h \
@@ -64,7 +63,8 HEADERS += mainwindow.h \
64 63 genericBinaryFiles/genericbinaryfilewidget.h \
65 64 genericBinaryFiles/qtablewidgetintitem.h \
66 65 genericBinaryFiles/filelist.h \
67 genericBinaryFiles/qvpushbutton.h
66 genericBinaryFiles/qvpushbutton.h \
67 aboutexecut.h
68 68
69 69 FORMS += mainwindow.ui \
70 70 genericBinaryFiles/elf/elffilewidget.ui \
@@ -73,4 +73,14 FORMS += mainwindow.ui \
73 73 genericBinaryFiles/genericbinaryfilewidget.ui
74 74
75 75 RESOURCES += \
76 genericBinaryFiles/ressources/genericBinaryFiles.qrc
76 genericBinaryFiles/ressources/genericBinaryFiles.qrc \
77 resources/execut.qrc
78
79 unix{
80 ExeCut.path = /usr/share/applications/
81 ExeCut.files = ExeCut.desktop
82 icon.path = /usr/share/ExeCut
83 icon.files = resources/icon.png
84 target.path = /usr/bin
85 INSTALLS+=ExeCut icon target
86 }
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the ExeCut Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 22 #include "mainwindow.h"
2 23 #include <QApplication>
3 24
@@ -1,3 +1,24
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the ExeCut Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 22 #include "mainwindow.h"
2 23 #include "ui_mainwindow.h"
3 24
@@ -17,9 +38,11 MainWindow::MainWindow(QWidget *parent)
17 38 left: 10px;\
18 39 padding: 0 3px 0 3px;\
19 40 }\ ");
41 this->p_about = new aboutExecut();
20 42 layout()->setContentsMargins(0,0,0,0);
21 43 connect(this->ui->actionQuit,SIGNAL(triggered()),this,SLOT(close()));
22 44 connect(this->ui->actionOpen,SIGNAL(triggered()),this->ui->binFileWdgt,SLOT(openFile()));
45 connect(this->ui->actionAbout,SIGNAL(triggered()),this,SLOT(showAboutBox()));
23 46 }
24 47
25 48 MainWindow::~MainWindow()
@@ -27,3 +50,8 MainWindow::~MainWindow()
27 50 delete ui;
28 51 }
29 52
53 void MainWindow::showAboutBox()
54 {
55 p_about->show();
56 }
57
@@ -1,7 +1,29
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the ExeCut Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 22 #ifndef MAINWINDOW_H
2 23 #define MAINWINDOW_H
3 24
4 25 #include <QMainWindow>
26 #include "aboutexecut.h"
5 27
6 28 namespace Ui {
7 29 class MainWindow;
@@ -14,9 +36,11 class MainWindow : public QMainWindow
14 36 public:
15 37 explicit MainWindow(QWidget *parent = 0);
16 38 ~MainWindow();
17
39 public slots:
40 void showAboutBox();
18 41 private:
19 42 Ui::MainWindow *ui;
43 aboutExecut* p_about;
20 44 };
21 45
22 46 #endif // MAINWINDOW_H
@@ -13,6 +13,10
13 13 <property name="windowTitle">
14 14 <string>ExeCut</string>
15 15 </property>
16 <property name="windowIcon">
17 <iconset resource="resources/execut.qrc">
18 <normaloff>:/icon/icon.png</normaloff>:/icon/icon.png</iconset>
19 </property>
16 20 <widget class="QWidget" name="centralWidget">
17 21 <layout class="QGridLayout" name="gridLayout">
18 22 <item row="0" column="0">
@@ -37,7 +41,14
37 41 <addaction name="separator"/>
38 42 <addaction name="actionQuit"/>
39 43 </widget>
44 <widget class="QMenu" name="menuHelp">
45 <property name="title">
46 <string>help</string>
47 </property>
48 <addaction name="actionAbout"/>
49 </widget>
40 50 <addaction name="menuFile"/>
51 <addaction name="menuHelp"/>
41 52 </widget>
42 53 <action name="actionOpen">
43 54 <property name="text">
@@ -49,6 +60,11
49 60 <string>Quit</string>
50 61 </property>
51 62 </action>
63 <action name="actionAbout">
64 <property name="text">
65 <string>about</string>
66 </property>
67 </action>
52 68 </widget>
53 69 <layoutdefault spacing="6" margin="11"/>
54 70 <customwidgets>
@@ -59,6 +75,8
59 75 <container>1</container>
60 76 </customwidget>
61 77 </customwidgets>
62 <resources/>
78 <resources>
79 <include location="resources/execut.qrc"/>
80 </resources>
63 81 <connections/>
64 82 </ui>
General Comments 0
You need to be logged in to leave comments. Login now