Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.9.2] 2025-11-04
### Added
- Add uninstall instructions to `INSTALLATION.md`

### Fixed
- Fix installation scripts

## [0.9.1] 2025-11-04
### Fixed
- Fix installation scripts
Expand Down Expand Up @@ -167,3 +174,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[0.8.1]: https://github.com/scanoss/scanoss.cc/compare/v0.8.0...v0.8.1
[0.9.0]: https://github.com/scanoss/scanoss.cc/compare/v0.8.1...v0.9.0
[0.9.1]: https://github.com/scanoss/scanoss.cc/compare/v0.9.0...v0.9.1
[0.9.2]: https://github.com/scanoss/scanoss.cc/compare/v0.9.1...v0.9.2
106 changes: 104 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The installation scripts automatically:
- [Linux](#linux)
- [Automated Installation Script](#automated-installation-script-2)
- [Manual Installation](#manual-installation-1)
- [Uninstalling](#uninstalling)
- [Troubleshooting](#troubleshooting)

---
Expand Down Expand Up @@ -127,8 +128,6 @@ source ~/.zshrc

**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.

For more details, see [INSTALL_MACOS.md](INSTALL_MACOS.md).

---

## Windows
Expand Down Expand Up @@ -270,6 +269,109 @@ EOF

---

## Uninstalling

### macOS

#### If Installed via Homebrew

Simply use Homebrew's uninstall command:
```bash
brew uninstall scanoss-code-compare
```

This will remove the application and all associated files managed by Homebrew.

#### If Installed via DMG or Automated Script

1. **Remove the application:**
```bash
sudo rm -rf /Applications/scanoss-cc.app
```

2. **Remove the CLI symlink:**
```bash
sudo rm /usr/local/bin/scanoss-cc
```

3. **Remove configuration files (optional):**
```bash
rm -rf ~/.scanoss/
```

This directory contains your settings and scan history. Skip this step if you plan to reinstall later and want to preserve your configuration.

### Windows

1. **Remove the application folder:**
- Navigate to `C:\Program Files\SCANOSS\`
- Delete the entire `SCANOSS` folder
- You may need administrator privileges

2. **Remove from System PATH:**

**Option A: Using System Properties (GUI)**
- Open System Properties (Win + Pause/Break or search "Environment Variables")
- Click "Environment Variables"
- Under "System variables", find and select "Path"
- Click "Edit"
- Find and remove the entry: `C:\Program Files\SCANOSS`
- Click "OK" on all dialogs

**Option B: Using PowerShell (as Administrator)**
```powershell
$path = [Environment]::GetEnvironmentVariable("Path", "Machine")
$newPath = ($path.Split(';') | Where-Object { $_ -ne "C:\Program Files\SCANOSS" }) -join ';'
[Environment]::SetEnvironmentVariable("Path", $newPath, "Machine")
```

3. **Remove Start Menu shortcut:**
- Navigate to: `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\`
- Delete: `SCANOSS Code Compare.lnk`

4. **Remove configuration files (optional):**
- Navigate to: `%USERPROFILE%\.scanoss\`
- Delete the entire `.scanoss` folder
- This contains your settings and scan history. Skip if you want to preserve your configuration.

### Linux

1. **Remove the binary:**
```bash
sudo rm /usr/local/bin/scanoss-cc
```

2. **Remove desktop entry (if created):**
```bash
rm ~/.local/share/applications/scanoss-code-compare.desktop
# Or if installed system-wide:
sudo rm /usr/share/applications/scanoss-code-compare.desktop
```

3. **Remove configuration files (optional):**
```bash
rm -rf ~/.scanoss/
```

This directory contains your settings and scan history. Skip this step if you plan to reinstall later and want to preserve your configuration.

**Note:** System dependencies (GTK3, WebKit2GTK) are not removed as they may be used by other applications. If you want to remove them:
```bash
# Ubuntu/Debian
sudo apt-get remove libgtk-3-0 libwebkit2gtk-4.0-37

# Fedora/RHEL
sudo dnf remove gtk3 webkit2gtk4.0

# Arch/Manjaro
sudo pacman -R gtk3 webkit2gtk

# openSUSE
sudo zypper remove gtk3 webkit2gtk3
```

---

## Troubleshooting

### macOS
Expand Down
69 changes: 0 additions & 69 deletions INSTALL_MACOS.md

This file was deleted.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ brew install scanoss/dist/scanoss-code-compare
2. Extract and open the DMG
3. Drag the app to Applications

See [INSTALL_MACOS.md](INSTALL_MACOS.md) for detailed instructions.
</details>
See [INSTALLATION.md](INSTALLATION.md) for detailed instructions.

<details>
<summary><b>Windows</b></summary>
Expand Down Expand Up @@ -97,6 +96,10 @@ After installation, verify that the CLI is available:
scanoss-cc --version
```

### Uninstalling

For complete uninstall instructions for all platforms, see [INSTALLATION.md](INSTALLATION.md#uninstalling).

### Auto-Updates

SCANOSS Code Compare includes an automatic update system that notifies you when new versions are available:
Expand Down
85 changes: 12 additions & 73 deletions scripts/install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,29 @@ install_dependencies() {
case "$distro" in
ubuntu|debian|pop|linuxmint)
log_info "Using apt package manager..."
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 || {
$SUDO apt-get update
$SUDO apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 || {
log_warn "Some dependencies may not be available"
log_warn "The application may still work"
}
;;
fedora|rhel|centos)
log_info "Using dnf package manager..."
sudo dnf install -y gtk3 webkit2gtk4.0 || {
$SUDO dnf install -y gtk3 webkit2gtk4.0 || {
log_warn "Some dependencies may not be available"
log_warn "The application may still work"
}
;;
arch|manjaro)
log_info "Using pacman package manager..."
sudo pacman -S --noconfirm gtk3 webkit2gtk || {
$SUDO pacman -S --noconfirm gtk3 webkit2gtk || {
log_warn "Some dependencies may not be available"
log_warn "The application may still work"
}
;;
opensuse*|sles)
log_info "Using zypper package manager..."
sudo zypper install -y gtk3 webkit2gtk3 || {
$SUDO zypper install -y gtk3 webkit2gtk3 || {
log_warn "Some dependencies may not be available"
log_warn "The application may still work"
}
Expand All @@ -87,47 +87,15 @@ install_dependencies() {
log_warn "Required packages:"
log_warn " - GTK 3.0"
log_warn " - WebKit2GTK 4.0"
log_warn "Continuing with installation..."
echo >&2
if ! confirm "Continue anyway?" "y"; then
abort "Installation cancelled"
fi
;;
esac

echo >&2
log_info "✓ Dependencies installed"
log_info "✓ Dependencies check complete"
}

# Create desktop entry
create_desktop_entry() {
local desktop_file="$DESKTOP_DIR/scanoss-code-compare.desktop"

log_info "Creating desktop entry..."

# Create desktop entry content
local desktop_content="[Desktop Entry]
Name=SCANOSS Code Compare
Comment=Open source code comparison and analysis tool
Exec=$INSTALL_DIR/$APP_NAME
Icon=code
Terminal=false
Type=Application
Categories=Development;Utility;
Keywords=scanoss;code;compare;analysis;
StartupNotify=true
"

# Write desktop entry (needs sudo)
echo "$desktop_content" | sudo tee "$desktop_file" > /dev/null
sudo chmod 644 "$desktop_file"

# Update desktop database
if command_exists update-desktop-database; then
sudo update-desktop-database "$DESKTOP_DIR" 2>/dev/null || true
fi

log_info "✓ Desktop entry created"
}

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

# Detect non-interactive mode
if [ ! -t 0 ]; then
log_info "Running in non-interactive mode (using default options)"
echo >&2
fi

# Check if we need sudo
local need_sudo=false
if [ ! -w "$INSTALL_DIR" ]; then
need_sudo=true
log_info "Installation requires administrator privileges (sudo)"
fi

# Install dependencies
setup_sudo
echo >&2
if confirm "Install required dependencies (GTK3, WebKit2GTK)?" "y"; then
install_dependencies
else
log_warn "Skipping dependency installation"
log_warn "Application may not work without required libraries"
echo >&2
fi

# Install dependencies automatically
install_dependencies

# Setup temporary directory
local temp_dir=$(setup_temp_dir)
Expand Down Expand Up @@ -197,22 +148,10 @@ install_linux() {

# Install to system
log_info "Installing to $INSTALL_DIR..."

if [ "$need_sudo" = true ]; then
sudo install -m 755 "$binary_path" "$INSTALL_DIR/$APP_NAME"
else
install -m 755 "$binary_path" "$INSTALL_DIR/$APP_NAME"
fi
$SUDO install -m 755 "$binary_path" "$INSTALL_DIR/$APP_NAME"

echo >&2
log_info "✓ Binary installed successfully"

# Offer to create desktop entry
echo >&2
if confirm "Create desktop application entry?" "y"; then
create_desktop_entry
fi

echo >&2
log_info "✓ Installation complete!"
}
Expand Down
Loading
Loading