Skip to content

Commit 1839227

Browse files
committed
docs: update installation instructions for Ubuntu/Linux and macOS; add platform-specific build notes
1 parent eecf193 commit 1839227

File tree

2 files changed

+143
-20
lines changed

2 files changed

+143
-20
lines changed

DEVELOPER.md

Lines changed: 85 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,50 @@ Before you begin, ensure you have the following installed:
3636
- Windows 10 SDK
3737
- Python development support (optional)
3838

39+
### Ubuntu/Linux Requirements
40+
41+
#### 1. System Dependencies
42+
```bash
43+
# Install basic build dependencies
44+
sudo apt update
45+
sudo apt install -y build-essential python3-dev python3-pip
46+
47+
# Install Cairo and GTK3 for icon conversion
48+
sudo apt install -y libcairo2-dev libgirepository1.0-dev pkg-config
49+
50+
# Install networking tools
51+
sudo apt install -y net-tools iptables tcpdump
52+
53+
# Install NSIS (for creating installers on Linux)
54+
sudo apt install -y nsis
55+
```
56+
57+
#### 2. Python Libraries
58+
```bash
59+
pip3 install cairosvg pillow pyinstaller
60+
```
61+
62+
### macOS Requirements
63+
64+
#### 1. System Dependencies
65+
```bash
66+
# Install Homebrew if not already installed
67+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
68+
69+
# Install dependencies
70+
brew install cairo pkg-config
71+
brew install gtk+3
72+
brew install python3
73+
74+
# Optional: Install NSIS (for cross-building Windows installers)
75+
brew install makensis
76+
```
77+
78+
#### 2. Python Libraries
79+
```bash
80+
pip3 install cairosvg pillow pyinstaller
81+
```
82+
3983
### Python Dependencies
4084

4185
1. Create and activate a virtual environment:
@@ -75,31 +119,57 @@ The build process will:
75119
4. Create an installer (on Windows, if NSIS is installed)
76120

77121
Build outputs will be available in the `dist` directory:
78-
- `NetworkMonitor.exe`: Standalone executable
79-
- `NetworkMonitor_Setup_0.1.0.exe`: Windows installer (if NSIS was available)
122+
- Windows: `NetworkMonitor.exe` and `NetworkMonitor_Setup_0.1.0.exe`
123+
- Linux: `NetworkMonitor` executable
124+
- macOS: `NetworkMonitor` executable or `.app` bundle
125+
126+
## Platform-Specific Build Notes
127+
128+
### Linux (Ubuntu/Debian)
129+
Building on Linux creates a standalone executable that can be run on similar Linux distributions:
130+
```bash
131+
# Make the executable executable
132+
chmod +x dist/NetworkMonitor
133+
# Run the application
134+
sudo ./dist/NetworkMonitor
135+
```
136+
137+
### macOS
138+
Building on macOS creates a standalone executable:
139+
```bash
140+
# Make the executable executable
141+
chmod +x dist/NetworkMonitor
142+
# Run the application
143+
sudo ./dist/NetworkMonitor
144+
```
145+
146+
### Windows
147+
The Windows executable requires Administrator privileges to run properly:
148+
- Right-click on the executable
149+
- Select "Run as Administrator"
80150

81151
## Common Build Issues
82152

83153
### Icon Conversion Issues
84154
If you see "cairo library not found" errors:
85-
1. Install GTK3 runtime as described in prerequisites
86-
2. Add GTK3 bin directory to PATH
87-
3. Install Python packages: `pip install cairosvg Pillow`
88-
4. Restart your terminal/IDE
89-
5. Run build again
155+
1. Install Cairo and GTK3 as described in prerequisites for your platform
156+
2. Install Python packages: `pip install cairosvg Pillow`
157+
3. Restart your terminal/IDE
158+
4. Run build again
90159

91160
### NSIS Issues
92161
If installer creation fails:
93162
1. Ensure NSIS is installed and in PATH
94-
2. Install EnvVarUpdate plugin as described in prerequisites
163+
2. Install EnvVarUpdate plugin as described in prerequisites (Windows only)
95164
3. Check if the NSIS Include and Plugins directories contain the required files
96-
4. Run `makensis /VERSION` in terminal to verify NSIS is accessible
165+
4. Run `makensis -VERSION` in terminal to verify NSIS is accessible
97166

98167
### Missing DLL Errors
99168
If you see missing DLL errors when running the built executable:
100-
1. Install Visual C++ Redistributable 2015-2022
101-
2. Install GTK3 runtime if using icon conversion
102-
3. Ensure all dependencies are installed: `pip install -r requirements.txt`
169+
1. Windows: Install Visual C++ Redistributable 2015-2022
170+
2. Linux: Install required system libraries using apt
171+
3. macOS: Install required libraries using brew
172+
4. Ensure all dependencies are installed: `pip install -r requirements.txt`
103173

104174
## Development Guidelines
105175

@@ -140,9 +210,9 @@ python build.py
140210
- Clear pip cache if needed: `python -m pip cache purge`
141211

142212
### Installation Issues
143-
- Run the installer as Administrator
144-
- Check Windows Event Viewer for installation errors
145-
- Look for error logs in `%TEMP%` directory
213+
- Run the installer as Administrator (Windows)
214+
- Run with sudo on Linux/macOS
215+
- Check system logs for installation errors
146216

147217
### Runtime Issues
148218
- Check logs in `networkmonitor.log`

README.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,51 @@ A powerful network monitoring and control tool with ARP protection capabilities.
1010
- Control device bandwidth
1111
- RESTful API for integration
1212

13-
## Quick Install (Windows)
13+
## Quick Install
14+
15+
### Windows
1416
1. Download the latest installer from Releases
1517
2. Run the installer as Administrator
1618
3. Launch Network Monitor from the Start Menu or Desktop shortcut
1719

20+
### Ubuntu/Linux
21+
```bash
22+
# Install dependencies
23+
sudo apt update
24+
sudo apt install -y python3-pip python3-dev libcairo2-dev net-tools iptables
25+
26+
# Install Network Monitor
27+
pip3 install networkmonitor
28+
29+
# Run with admin privileges
30+
sudo networkmonitor
31+
```
32+
33+
### macOS
34+
```bash
35+
# Install Homebrew if needed
36+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
37+
38+
# Install dependencies
39+
brew install cairo python3
40+
41+
# Install Network Monitor
42+
pip3 install networkmonitor
43+
44+
# Run with admin privileges
45+
sudo networkmonitor
46+
```
47+
1848
## Manual Installation
1949
If you prefer to install from source or need the latest development version:
2050

2151
### Prerequisites
2252
- Python 3.8 or higher
2353
- Administrator privileges (required for network monitoring)
24-
- Windows: Visual C++ Redistributable
54+
- Platform-specific dependencies:
55+
- Windows: Visual C++ Redistributable
56+
- Linux: net-tools, iptables
57+
- macOS: cairo library
2558
- See [DEVELOPER.md](DEVELOPER.md) for complete build requirements
2659

2760
### Install from Source
@@ -32,20 +65,24 @@ cd networkmonitor
3265

3366
# Create virtual environment
3467
python -m venv venv
35-
venv\Scripts\activate # Windows
3668
source venv/bin/activate # Linux/Mac
69+
venv\Scripts\activate # Windows
3770

3871
# Install dependencies
3972
pip install -r requirements.txt
4073

41-
# Run the application
74+
# Run the application (with admin privileges)
75+
# Windows: Run as Administrator
4276
python -m networkmonitor
77+
78+
# Linux/Mac:
79+
sudo python -m networkmonitor
4380
```
4481

4582
For detailed build instructions and development setup, see [DEVELOPER.md](DEVELOPER.md).
4683

4784
## Usage
48-
1. Start Network Monitor (requires Administrator privileges)
85+
1. Start Network Monitor (requires Administrator/root privileges)
4986
2. Access web interface at http://localhost:5000
5087
3. View connected devices and monitor network activity
5188
4. Use protection features as needed
@@ -66,6 +103,22 @@ curl -X POST http://localhost:5000/api/device/protect -d '{"ip":"192.168.1.100"}
66103

67104
Full API documentation available at http://localhost:5000/api/docs when running.
68105

106+
## Platform Support
107+
108+
### Windows
109+
- Windows 10 or higher recommended
110+
- Requires Administrator privileges
111+
- Uses Npcap for packet capture
112+
113+
### Linux
114+
- Ubuntu 20.04 or higher recommended
115+
- Debian, Fedora, and other major distributions supported
116+
- Requires root privileges
117+
118+
### macOS
119+
- macOS 11 (Big Sur) or higher recommended
120+
- Requires root privileges
121+
69122
## Security Notes
70123
- Run as Administrator/root for full functionality
71124
- Use device protection features responsibly

0 commit comments

Comments
 (0)