-
Notifications
You must be signed in to change notification settings - Fork 104
Fix: complete uninstall target to remove presets and assets directories #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sudip-mondal-2002
merged 13 commits into
sudip-mondal-2002:main
from
Soujanya-Mctrl:fix/makefile-uninstall-cleanup
May 26, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fae9319
Fix: uninstall cleanup removes installed assets
Soujanya-Mctrl 554476d
Merge branch 'main' into fix/makefile-uninstall-cleanup
Soujanya-Mctrl 5a8a106
Test: Add install and uninstall CI smoke test
Soujanya-Mctrl 421c918
Fix: uninstall cleanup removes installed assets
Soujanya-Mctrl 6a1d783
Test: Add install and uninstall CI smoke test
Soujanya-Mctrl db01bb2
chore: merge origin/fix/makefile-uninstall-cleanup
Soujanya-Mctrl 12d0fb5
Test: Add macOS and Windows install/uninstall CI smoke tests
Soujanya-Mctrl 47d5643
Test: Use cmake --install for Windows smoke test (make not present in…
Soujanya-Mctrl 5312d1e
Merge remote-tracking branch 'upstream/main' into fix/makefile-uninst…
Soujanya-Mctrl 1deea00
Fix: move smoke tests to macOS CI
Soujanya-Mctrl ddbac3a
Merge branch 'main' into fix/makefile-uninstall-cleanup
Soujanya-Mctrl 60ffb7f
Merge branch 'main' into fix/makefile-uninstall-cleanup
sudip-mondal-2002 113dab2
Merge branch 'main' into fix/makefile-uninstall-cleanup
Soujanya-Mctrl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| BUILD_DIR := build | ||
| BUILD_TYPE ?= Release | ||
| CMAKE_FLAGS ?= | ||
| PREFIX ?= /usr/local | ||
| NPROC := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4) | ||
|
|
||
| .PHONY: all build clean rebuild install uninstall setup run help | ||
|
|
@@ -23,7 +24,7 @@ build: $(BUILD_DIR)/Makefile | |
| @echo "=== Building Guitar Amp Simulator ($(BUILD_TYPE)) ===" | ||
| @cmake --build $(BUILD_DIR) --config $(BUILD_TYPE) -j$(NPROC) | ||
| @echo "=== Build complete ===" | ||
| @echo "Binary: $(BUILD_DIR)/amplitron" | ||
| @echo "Binary: $(BUILD_DIR)/Amplitron" | ||
|
|
||
| clean: | ||
| @echo "=== Cleaning build directory ===" | ||
|
|
@@ -33,15 +34,17 @@ rebuild: clean build | |
|
|
||
| install: build | ||
| @echo "=== Installing ===" | ||
| @cmake --install $(BUILD_DIR) --prefix /usr/local | ||
| @cmake --install $(BUILD_DIR) --prefix $(PREFIX) | ||
|
|
||
| uninstall: | ||
| @echo "=== Uninstalling ===" | ||
| @rm -f /usr/local/bin/amplitron | ||
| @rm -f $(PREFIX)/bin/Amplitron | ||
| @rm -rf $(PREFIX)/share/amplitron | ||
| @rm -rf $(PREFIX)/bin/assets | ||
|
|
||
| run: build | ||
| @echo "=== Running Guitar Amp Simulator ===" | ||
| @./$(BUILD_DIR)/amplitron | ||
| @./$(BUILD_DIR)/Amplitron | ||
|
|
||
| debug: | ||
| @$(MAKE) BUILD_TYPE=Debug build | ||
|
|
@@ -54,10 +57,11 @@ help: | |
| @echo " make debug - Build the project (Debug)" | ||
| @echo " make clean - Remove build directory" | ||
| @echo " make rebuild - Clean + build" | ||
| @echo " make install - Install to /usr/local/bin" | ||
| @echo " make install - Install to $(PREFIX)/bin" | ||
| @echo " make uninstall - Remove installed binary" | ||
| @echo " make run - Build and run" | ||
| @echo "" | ||
| @echo "Variables:" | ||
| @echo " BUILD_TYPE=Debug|Release (default: Release)" | ||
| @echo " PREFIX=/path/to/install (default: /usr/local)" | ||
| @echo " CMAKE_FLAGS=... (extra CMake flags)" | ||
|
Comment on lines
+60
to
67
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update uninstall help text to reflect full cleanup. Line 61 still says uninstall removes only the binary, but Lines 41-43 also remove presets/assets directories. Please align the help description with actual behavior. 🤖 Prompt for AI Agents |
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: sudip-mondal-2002/Amplitron
Length of output: 285
Windows uninstall smoke test should exercise
make uninstall(and Makefile must removeAmplitron.exe).github/workflows/ci.ymllines 516-526) manually deletes"$INSTALL_PREFIX/bin/Amplitron.exe"(and related dirs) instead of runningmake PREFIX="$INSTALL_PREFIX" uninstall.Makefileuninstall:target currently removes$(PREFIX)/bin/Amplitron(no.exe), somake uninstallon Windows would leave the installedAmplitron.exebehind.Update the
Makefileuninstall logic to remove$(PREFIX)/bin/Amplitron.exeon Windows (platform-specific if needed), then switch the Windows CI step to runmake PREFIX="$INSTALL_PREFIX" uninstallfor consistency; otherwise document the Windows limitation.Recommended CI adjustment after fixing Makefile
- name: Uninstall Smoke Test shell: msys2 {0} env: INSTALL_PREFIX: ${{ runner.temp }}\amplitron-install run: | - rm -f "$INSTALL_PREFIX/bin/Amplitron.exe" - rm -rf "$INSTALL_PREFIX/share/amplitron" - rm -rf "$INSTALL_PREFIX/bin/assets" + make PREFIX="$INSTALL_PREFIX" uninstall test ! -e "$INSTALL_PREFIX/bin/Amplitron.exe" test ! -e "$INSTALL_PREFIX/share/amplitron" test ! -e "$INSTALL_PREFIX/bin/assets"🤖 Prompt for AI Agents