Skip to content

Commit e0695f6

Browse files
authored
chore: add uninstall instructions (#117)
* chore: add uninstall instructions * chore: update changelog
1 parent 1431494 commit e0695f6

File tree

8 files changed

+181
-338
lines changed

8 files changed

+181
-338
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.9.2] 2025-11-04
11+
### Added
12+
- Add uninstall instructions to `INSTALLATION.md`
13+
14+
### Fixed
15+
- Fix installation scripts
16+
1017
## [0.9.1] 2025-11-04
1118
### Fixed
1219
- Fix installation scripts
@@ -167,3 +174,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
167174
[0.8.1]: https://github.com/scanoss/scanoss.cc/compare/v0.8.0...v0.8.1
168175
[0.9.0]: https://github.com/scanoss/scanoss.cc/compare/v0.8.1...v0.9.0
169176
[0.9.1]: https://github.com/scanoss/scanoss.cc/compare/v0.9.0...v0.9.1
177+
[0.9.2]: https://github.com/scanoss/scanoss.cc/compare/v0.9.1...v0.9.2

INSTALLATION.md

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ The installation scripts automatically:
5353
- [Linux](#linux)
5454
- [Automated Installation Script](#automated-installation-script-2)
5555
- [Manual Installation](#manual-installation-1)
56+
- [Uninstalling](#uninstalling)
5657
- [Troubleshooting](#troubleshooting)
5758

5859
---
@@ -127,8 +128,6 @@ source ~/.zshrc
127128

128129
**Note:** The full .app bundle must be in /Applications for GUI features (like folder picker dialogs) to work properly due to macOS bundle path resolution.
129130

130-
For more details, see [INSTALL_MACOS.md](INSTALL_MACOS.md).
131-
132131
---
133132

134133
## Windows
@@ -270,6 +269,109 @@ EOF
270269

271270
---
272271

272+
## Uninstalling
273+
274+
### macOS
275+
276+
#### If Installed via Homebrew
277+
278+
Simply use Homebrew's uninstall command:
279+
```bash
280+
brew uninstall scanoss-code-compare
281+
```
282+
283+
This will remove the application and all associated files managed by Homebrew.
284+
285+
#### If Installed via DMG or Automated Script
286+
287+
1. **Remove the application:**
288+
```bash
289+
sudo rm -rf /Applications/scanoss-cc.app
290+
```
291+
292+
2. **Remove the CLI symlink:**
293+
```bash
294+
sudo rm /usr/local/bin/scanoss-cc
295+
```
296+
297+
3. **Remove configuration files (optional):**
298+
```bash
299+
rm -rf ~/.scanoss/
300+
```
301+
302+
This directory contains your settings and scan history. Skip this step if you plan to reinstall later and want to preserve your configuration.
303+
304+
### Windows
305+
306+
1. **Remove the application folder:**
307+
- Navigate to `C:\Program Files\SCANOSS\`
308+
- Delete the entire `SCANOSS` folder
309+
- You may need administrator privileges
310+
311+
2. **Remove from System PATH:**
312+
313+
**Option A: Using System Properties (GUI)**
314+
- Open System Properties (Win + Pause/Break or search "Environment Variables")
315+
- Click "Environment Variables"
316+
- Under "System variables", find and select "Path"
317+
- Click "Edit"
318+
- Find and remove the entry: `C:\Program Files\SCANOSS`
319+
- Click "OK" on all dialogs
320+
321+
**Option B: Using PowerShell (as Administrator)**
322+
```powershell
323+
$path = [Environment]::GetEnvironmentVariable("Path", "Machine")
324+
$newPath = ($path.Split(';') | Where-Object { $_ -ne "C:\Program Files\SCANOSS" }) -join ';'
325+
[Environment]::SetEnvironmentVariable("Path", $newPath, "Machine")
326+
```
327+
328+
3. **Remove Start Menu shortcut:**
329+
- Navigate to: `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\`
330+
- Delete: `SCANOSS Code Compare.lnk`
331+
332+
4. **Remove configuration files (optional):**
333+
- Navigate to: `%USERPROFILE%\.scanoss\`
334+
- Delete the entire `.scanoss` folder
335+
- This contains your settings and scan history. Skip if you want to preserve your configuration.
336+
337+
### Linux
338+
339+
1. **Remove the binary:**
340+
```bash
341+
sudo rm /usr/local/bin/scanoss-cc
342+
```
343+
344+
2. **Remove desktop entry (if created):**
345+
```bash
346+
rm ~/.local/share/applications/scanoss-code-compare.desktop
347+
# Or if installed system-wide:
348+
sudo rm /usr/share/applications/scanoss-code-compare.desktop
349+
```
350+
351+
3. **Remove configuration files (optional):**
352+
```bash
353+
rm -rf ~/.scanoss/
354+
```
355+
356+
This directory contains your settings and scan history. Skip this step if you plan to reinstall later and want to preserve your configuration.
357+
358+
**Note:** System dependencies (GTK3, WebKit2GTK) are not removed as they may be used by other applications. If you want to remove them:
359+
```bash
360+
# Ubuntu/Debian
361+
sudo apt-get remove libgtk-3-0 libwebkit2gtk-4.0-37
362+
363+
# Fedora/RHEL
364+
sudo dnf remove gtk3 webkit2gtk4.0
365+
366+
# Arch/Manjaro
367+
sudo pacman -R gtk3 webkit2gtk
368+
369+
# openSUSE
370+
sudo zypper remove gtk3 webkit2gtk3
371+
```
372+
373+
---
374+
273375
## Troubleshooting
274376

275377
### macOS

INSTALL_MACOS.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ brew install scanoss/dist/scanoss-code-compare
6363
2. Extract and open the DMG
6464
3. Drag the app to Applications
6565

66-
See [INSTALL_MACOS.md](INSTALL_MACOS.md) for detailed instructions.
67-
</details>
66+
See [INSTALLATION.md](INSTALLATION.md) for detailed instructions.
6867

6968
<details>
7069
<summary><b>Windows</b></summary>
@@ -97,6 +96,10 @@ After installation, verify that the CLI is available:
9796
scanoss-cc --version
9897
```
9998

99+
### Uninstalling
100+
101+
For complete uninstall instructions for all platforms, see [INSTALLATION.md](INSTALLATION.md#uninstalling).
102+
100103
### Auto-Updates
101104

102105
SCANOSS Code Compare includes an automatic update system that notifies you when new versions are available:

scripts/install-linux.sh

Lines changed: 12 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,29 @@ install_dependencies() {
5454
case "$distro" in
5555
ubuntu|debian|pop|linuxmint)
5656
log_info "Using apt package manager..."
57-
sudo apt-get update
58-
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 || {
57+
$SUDO apt-get update
58+
$SUDO apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 || {
5959
log_warn "Some dependencies may not be available"
6060
log_warn "The application may still work"
6161
}
6262
;;
6363
fedora|rhel|centos)
6464
log_info "Using dnf package manager..."
65-
sudo dnf install -y gtk3 webkit2gtk4.0 || {
65+
$SUDO dnf install -y gtk3 webkit2gtk4.0 || {
6666
log_warn "Some dependencies may not be available"
6767
log_warn "The application may still work"
6868
}
6969
;;
7070
arch|manjaro)
7171
log_info "Using pacman package manager..."
72-
sudo pacman -S --noconfirm gtk3 webkit2gtk || {
72+
$SUDO pacman -S --noconfirm gtk3 webkit2gtk || {
7373
log_warn "Some dependencies may not be available"
7474
log_warn "The application may still work"
7575
}
7676
;;
7777
opensuse*|sles)
7878
log_info "Using zypper package manager..."
79-
sudo zypper install -y gtk3 webkit2gtk3 || {
79+
$SUDO zypper install -y gtk3 webkit2gtk3 || {
8080
log_warn "Some dependencies may not be available"
8181
log_warn "The application may still work"
8282
}
@@ -87,47 +87,15 @@ install_dependencies() {
8787
log_warn "Required packages:"
8888
log_warn " - GTK 3.0"
8989
log_warn " - WebKit2GTK 4.0"
90+
log_warn "Continuing with installation..."
9091
echo >&2
91-
if ! confirm "Continue anyway?" "y"; then
92-
abort "Installation cancelled"
93-
fi
9492
;;
9593
esac
9694

9795
echo >&2
98-
log_info "✓ Dependencies installed"
96+
log_info "✓ Dependencies check complete"
9997
}
10098

101-
# Create desktop entry
102-
create_desktop_entry() {
103-
local desktop_file="$DESKTOP_DIR/scanoss-code-compare.desktop"
104-
105-
log_info "Creating desktop entry..."
106-
107-
# Create desktop entry content
108-
local desktop_content="[Desktop Entry]
109-
Name=SCANOSS Code Compare
110-
Comment=Open source code comparison and analysis tool
111-
Exec=$INSTALL_DIR/$APP_NAME
112-
Icon=code
113-
Terminal=false
114-
Type=Application
115-
Categories=Development;Utility;
116-
Keywords=scanoss;code;compare;analysis;
117-
StartupNotify=true
118-
"
119-
120-
# Write desktop entry (needs sudo)
121-
echo "$desktop_content" | sudo tee "$desktop_file" > /dev/null
122-
sudo chmod 644 "$desktop_file"
123-
124-
# Update desktop database
125-
if command_exists update-desktop-database; then
126-
sudo update-desktop-database "$DESKTOP_DIR" 2>/dev/null || true
127-
fi
128-
129-
log_info "✓ Desktop entry created"
130-
}
13199

132100
# Main installation logic
133101
install_linux() {
@@ -141,28 +109,11 @@ install_linux() {
141109
abort "This installer is for Linux only. Please use the appropriate installer for your platform."
142110
fi
143111

144-
# Detect non-interactive mode
145-
if [ ! -t 0 ]; then
146-
log_info "Running in non-interactive mode (using default options)"
147-
echo >&2
148-
fi
149-
150-
# Check if we need sudo
151-
local need_sudo=false
152-
if [ ! -w "$INSTALL_DIR" ]; then
153-
need_sudo=true
154-
log_info "Installation requires administrator privileges (sudo)"
155-
fi
156-
157-
# Install dependencies
112+
setup_sudo
158113
echo >&2
159-
if confirm "Install required dependencies (GTK3, WebKit2GTK)?" "y"; then
160-
install_dependencies
161-
else
162-
log_warn "Skipping dependency installation"
163-
log_warn "Application may not work without required libraries"
164-
echo >&2
165-
fi
114+
115+
# Install dependencies automatically
116+
install_dependencies
166117

167118
# Setup temporary directory
168119
local temp_dir=$(setup_temp_dir)
@@ -197,22 +148,10 @@ install_linux() {
197148

198149
# Install to system
199150
log_info "Installing to $INSTALL_DIR..."
200-
201-
if [ "$need_sudo" = true ]; then
202-
sudo install -m 755 "$binary_path" "$INSTALL_DIR/$APP_NAME"
203-
else
204-
install -m 755 "$binary_path" "$INSTALL_DIR/$APP_NAME"
205-
fi
151+
$SUDO install -m 755 "$binary_path" "$INSTALL_DIR/$APP_NAME"
206152

207153
echo >&2
208154
log_info "✓ Binary installed successfully"
209-
210-
# Offer to create desktop entry
211-
echo >&2
212-
if confirm "Create desktop application entry?" "y"; then
213-
create_desktop_entry
214-
fi
215-
216155
echo >&2
217156
log_info "✓ Installation complete!"
218157
}

0 commit comments

Comments
 (0)