Skip to content

Commit

Permalink
Make the project able to install
Browse files Browse the repository at this point in the history
  • Loading branch information
edisionnano committed Jun 22, 2024
1 parent 3d980d1 commit 4957c6b
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
mkdir -p AppDir/usr/bin
cp build/QDiskInfo AppDir/usr/bin/
cp .github/scripts/smartctl AppDir/usr/bin/
cp .github/scripts/QDiskInfo.desktop AppDir/
cp src/icon.svg AppDir/QDiskInfo.svg
cp dist/QDiskInfo.desktop AppDir/
cp dist/QDiskInfo.svg AppDir/QDiskInfo.svg
APPIMAGE_EXTRACT_AND_RUN=1 NO_STRIP=1 QMAKE=/usr/bin/qmake6 ARCH=x86_64 ./linuxdeploy-static-x86_64.AppImage --appdir=AppDir/ -d AppDir/QDiskInfo.desktop -i AppDir/QDiskInfo.svg -e AppDir/usr/bin/QDiskInfo --plugin qt
echo 'export PATH="$this_dir"/usr/bin:"$PATH"' >> AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ install(TARGETS QDiskInfo
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(FILES "dist/QDiskInfo.desktop"
DESTINATION "share/applications")
install(FILES "dist/QDiskInfo.svg"
DESTINATION "share/icons/hicolor/scalable/apps")

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(QDiskInfo)
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,25 @@
CrystalDiskInfo alternative for Linux
![mockup](https://github.com/edisionnano/QDiskInfo/assets/26039434/e5488f41-6ea2-4304-9ae8-13d5dac7715b)
The icon is a modified version of the KDE Partition Manager logo which is available under GPL-3.0+

## Compiling and Installing
First you will need to clone the repository and cd inside
```sh
https://github.com/edisionnano/QDiskInfo.git && cd QDiskInfo
```
Then you must create a build directory and cd inside
```sh
mkdir build && cd build
```
After that use CMake to setup the project, Qt version can also be set to 5 (for example for Ubuntu)
```sh
cmake .. -DCMAKE_BUILD_TYPE:STRING=MinSizeRel -DQT_VERSION_MAJOR=6
```
And finally compile the project with all the threads
```sh
make -j$(nproc)
```
This will create a `QDiskInfo` binary on the build directory but you can also install it using
```sh
sudo make install
```
2 changes: 2 additions & 0 deletions .github/scripts/QDiskInfo.desktop → dist/QDiskInfo.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Type=Application
Version=1.0
Name=QDiskInfo
GenericName=SMART Viwer
Comment=SMART data viewer
Icon=QDiskInfo
Exec=QDiskInfo
Terminal=false
Expand Down
File renamed without changes
10 changes: 5 additions & 5 deletions src/resources.qrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<RCC>
<qresource prefix="/icons">
<file>icon.svg</file>
<file alias="icon.svg">../dist/QDiskInfo.svg</file>
</qresource>
<qresource prefix="/">
<file alias="translations/qdiskinfo_el_GR.qm">../translations/qdiskinfo_el_GR.qm</file>
<file alias="translations/qdiskinfo_es_ES.qm">../translations/qdiskinfo_es_ES.qm</file>
<file alias="translations/qdiskinfo_pt_BR.qm">../translations/qdiskinfo_pt_BR.qm</file>
<qresource prefix="/translations">
<file alias="qdiskinfo_el_GR.qm">../translations/qdiskinfo_el_GR.qm</file>
<file alias="qdiskinfo_es_ES.qm">../translations/qdiskinfo_es_ES.qm</file>
<file alias="qdiskinfo_pt_BR.qm">../translations/qdiskinfo_pt_BR.qm</file>
</qresource>
</RCC>

0 comments on commit 4957c6b

Please sign in to comment.