Skip to content

Commit 1950334

Browse files
committed
Update: Remove desktop shortcut creation and removal from installation and uninstallation process
1 parent 87aad45 commit 1950334

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

Makefile

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,57 +23,11 @@ clean:
2323
uninstall: clean
2424
@echo "Uninstalling $(PROJECT)..."
2525
@rm -rf $(EXECUTABLE).app $(EXECUTABLE)d.app
26-
@OS_NAME=$(shell uname -s 2>/dev/null || echo "Windows"); \
27-
if [ "$$OS_NAME" = "Darwin" ]; then \
28-
rm -rf "$(HOME)/Desktop/$(EXECUTABLE).app"; \
29-
echo "MacOS: Shortcut removed..."; \
30-
elif [ "$$OS_NAME" = "Linux" ] && grep -qi "microsoft" /proc/version 2>/dev/null; then \
31-
rm -rf "$(HOME)/Desktop/$(EXECUTABLE)"; \
32-
echo "WSL: Shortcut removed..."; \
33-
elif [ "$$OS_NAME" = "Linux" ]; then \
34-
rm -rf "$(HOME)/Desktop/$(EXECUTABLE)"; \
35-
echo "Linux: Shortcut removed..."; \
36-
elif echo "$$OS_NAME" | grep -qE "CYGWIN|MINGW|MSYS"; then \
37-
rm -f "$(USERPROFILE)/Desktop/$(EXECUTABLE).exe"; \
38-
echo "Cygwin/Mingw/MSYS: Shortcut removed..."; \
39-
elif [ "$$OS_NAME" = "Windows" ]; then \
40-
if [ -n "$$USERPROFILE" ]; then \
41-
cmd /c "if exist \"$$USERPROFILE\\Desktop\\$(EXECUTABLE).exe\" del /f /q \"$$USERPROFILE\\Desktop\\$(EXECUTABLE).exe\"" && echo "Windows: Shortcut removed..."; \
42-
else \
43-
echo "Windows: Could not determine user profile directory."; \
44-
fi \
45-
fi
4626

4727
# Install the project
4828
install: build
4929
@echo "Installing $(PROJECT)..."
5030
@cd $(BUILD_DIR) && make
51-
@echo "Do you want to create a shortcut on the desktop? (Y/n)"
52-
@read choice; \
53-
if [ "$$choice" = "y" ] || [ "$$choice" = "Y" ]; then \
54-
echo "Creating shortcut..."; \
55-
OS_NAME=$(shell uname -s); \
56-
if [ "$$OS_NAME" = "Darwin" ]; then \
57-
echo "MacOS Detected..."; \
58-
cp -R $(EXECUTABLE).app ~/Desktop/; \
59-
elif [ "$$OS_NAME" = "Linux" ] && grep -qi "microsoft" /proc/version 2>/dev/null; then \
60-
echo "WSL Detected..."; \
61-
cp $(EXECUTABLE) ~/Desktop/; \
62-
elif [ "$$OS_NAME" = "Linux" ]; then \
63-
echo "Linux Detected..."; \
64-
cp $(EXECUTABLE) ~/Desktop/; \
65-
elif echo "$$OS_NAME" | grep -qE "CYGWIN|MINGW|MSYS"; then \
66-
echo "Windows-like Environment Detected (Cygwin/MSYS)..."; \
67-
cp $(EXECUTABLE).exe "$$USERPROFILE/Desktop/"; \
68-
elif [ "$$OS_NAME" = "Windows" ]; then \
69-
echo "Native Windows Detected..."; \
70-
if [ -n "$$USERPROFILE" ]; then \
71-
cp $(EXECUTABLE).exe "$$USERPROFILE/Desktop/"; \
72-
else \
73-
echo "Windows: Could not determine user profile directory."; \
74-
fi \
75-
fi \
76-
fi
7731
@echo "$(PROJECT) installed."
7832

7933
build_tests: build

0 commit comments

Comments
 (0)