add make install, uninstall, clean
This commit is contained in:
parent
5f746999c2
commit
7fb01df39f
24
HACKING.md
24
HACKING.md
|
@ -82,6 +82,30 @@ Enable debugging symbols:
|
|||
-DCMAKE_BUILD_TYPE=Debug
|
||||
```
|
||||
|
||||
## Make
|
||||
|
||||
To install WOWlet in local user directory, run:
|
||||
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
For macOS, the app is moved to user's Desktop.
|
||||
|
||||
To remove all installed files, run:
|
||||
|
||||
```bash
|
||||
make uninstall
|
||||
```
|
||||
|
||||
This will also delete the the app's .config file. So, if you want to keep
|
||||
configurations, be sure to back up the file before uninstalling.
|
||||
|
||||
To delete the build directory, run:
|
||||
|
||||
```bash
|
||||
make clean
|
||||
```
|
||||
|
||||
## Wowlet
|
||||
|
||||
It's best to install Tor locally as a service and start `wowlet` with `--use-local-tor`, this
|
||||
|
|
42
Makefile
42
Makefile
|
@ -74,3 +74,45 @@ mac-release:
|
|||
cmake -Bbuild $(CMAKEFLAGS)
|
||||
$(MAKE) -Cbuild
|
||||
$(MAKE) -Cbuild deploy
|
||||
|
||||
install:
|
||||
ifeq ($(shell uname),Linux)
|
||||
install -d ~/.local/bin
|
||||
install -d ~/.local/share/man/man1
|
||||
install -d ~/.local/share/applications
|
||||
install -d ~/.local/share/icons/hicolor/scalable/apps
|
||||
install -m755 build/bin/wowlet ~/.local/bin
|
||||
install -m644 src/assets/wowlet.1.gz ~/.local/share/man/man1
|
||||
install -m644 src/assets/org.wowlet.wowlet.desktop ~/.local/share/applications
|
||||
install -m644 src/assets/images/appicons/wowlet.svg ~/.local/share/icons/hicolor/scalable/apps
|
||||
@echo "Wowlet installed locally to $HOME/.local/bin. To remove program, run: make uninstall"; \
|
||||
exit 0;
|
||||
endif
|
||||
ifeq ($(shell uname),Darwin)
|
||||
cp -r build/bin/wowlet.app ~/Desktop/wowlet.app
|
||||
@echo "Copied wowlet.app to Desktop."; \
|
||||
exit 0;
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
ifeq ($(shell uname),Linux)
|
||||
rm -rf ~/.local/bin/wowlet
|
||||
rm -rf ~/.local/share/man/man1/wowlet.1.gz
|
||||
rm -rf ~/.local/share/applications/org.wowlet.wowlet.desktop
|
||||
rm -rf ~/.local/share/icons/hicolor/scalable/apps/wowlet.svg
|
||||
rm -rf ~/.config/wowlet
|
||||
@echo "Removed wowlet and cleared config files."; \
|
||||
exit 0;
|
||||
endif
|
||||
ifeq ($(shell uname),Darwin)
|
||||
rm -rf ~/Desktop/wowlet.app
|
||||
rm -rf ~/.config/wowlet
|
||||
@echo "Removed wowlet.app from Desktop and cleared config files."; \
|
||||
exit 0;
|
||||
endif
|
||||
|
||||
clean:
|
||||
@echo "WARNING: This will delete the build directory."; \
|
||||
read -r -p "Did you want to continue (y/N)?: " CONTINUE; \
|
||||
[ $$CONTINUE = "y" ] || [ $$CONTINUE = "Y" ] || [ $$CONTINUE = "yes" ] || [ $$CONTINUE = "Yes" ] || exit 1;
|
||||
rm -rf build
|
Loading…
Reference in New Issue