Merge pull request #41 from fabricio-godoi/master

feat(.desktop): include script to create system shortcut
This commit is contained in:
Lakindu Akash 2020-04-17 20:48:57 +05:30 committed by GitHub
commit c399af64f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 1 deletions

View File

@ -30,18 +30,24 @@ set (appdir "/usr/share")
set (appbin "/usr/bin")
add_custom_target(install_build
# echo "HERE: $(HOME)"
COMMAND mkdir -p $ENV{DESTDIR}${appdir}/${PROJECT_NAME}
COMMAND mkdir -p $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/glade
COMMAND install -Dm755 ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/${PROJECT_NAME}
COMMAND install -Dm755 ${CMAKE_CURRENT_BINARY_DIR}/glade/* $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/glade/
COMMAND ln -rs $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/${PROJECT_NAME} $ENV{DESTDIR}${appbin}/${PROJECT_NAME}
#COMMAND ${CMAKE_COMMAND} -E create_symlink $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/${PROJECT_NAME} $ENV{DESTDIR}${appbin}/${PROJECT_NAME}
COMMAND echo $ENV{DESTDIR}
COMMAND install -Dm644 ${CMAKE_SOURCE_DIR}/desktop/hotspot.png $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/hotspot.png
COMMAND install -Dm644 ${CMAKE_SOURCE_DIR}/desktop/wifihotspot.desktop $ENV{DESTDIR}${appdir}/${PROJECT_NAME}/${PROJECT_NAME}.desktop
COMMAND install -Dm644 ${CMAKE_SOURCE_DIR}/desktop/wifihotspot.desktop $ENV{DESTDIR}${appdir}/applications/${PROJECT_NAME}.desktop
DEPENDS ${PROJECT_NAME}
COMMENT Installing files...
)
add_custom_target(uninstall_build
COMMAND rm -r $ENV{DESTDIR}${appdir}/${PROJECT_NAME}
COMMAND rm -rf $ENV{DESTDIR}${appdir}/${PROJECT_NAME}
COMMAND rm -f $ENV{DESTDIR}${appbin}/${PROJECT_NAME}
COMMAND rm -f $ENV{DESTDIR}${appdir}/applications/${PROJECT_NAME}.desktop
COMMENT Unstalling files...
)

BIN
src/desktop/hotspot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=WifiHotspot
Icon=/usr/share/wihotspot/hotspot.png
Exec=sh -c 'pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY sudo /usr/bin/wihotspot'
Terminal=false
Categories=System
Keywords=Hotspot;WiFi

View File

@ -13,6 +13,7 @@ install:
install -Dm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
install -Dm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
uninstall:
rm -f $(DESTDIR)$(BINDIR)/create_ap
rm -f $(DESTDIR)/etc/create_ap.conf

View File

@ -87,3 +87,6 @@ Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basi
FreeBSD
- Copyright (c) 2013, oblique
- Copyright (c) 2019, lakinduakash
## Disclaimer
<div>Icons made by <a href="https://www.flaticon.com/authors/photo3idea-studio" title="photo3idea_studio">photo3idea_studio</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>