docs: add bilingual README (EN/IT)
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
# nsProcess NSIS Plugin v1.6
|
# nsProcess NSIS Plugin v1.6
|
||||||
|
|
||||||
**Versione personale modificata**
|
**Personal modified version**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Descrizione Originale
|
## Original Description
|
||||||
|
|
||||||
**2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)**
|
**2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)**
|
||||||
|
|
||||||
@@ -119,61 +119,65 @@ Include `nsProcess.nsh` to use the macros:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚠️ Differenze nella versione personale
|
## ⚠️ Differences in the Personal Version
|
||||||
|
|
||||||
### Nuova architettura supportata: x64 (amd64-unicode)
|
### New supported architecture: x64 (amd64-unicode)
|
||||||
|
|
||||||
L'originale supportava solo:
|
The original supported only:
|
||||||
- x86-ansi (Plugins\nsProcess.dll)
|
- x86-ansi (Plugins\nsProcess.dll)
|
||||||
- x86-unicode (nsProcessW.dll da rinominare in nsProcess.dll)
|
- x86-unicode (nsProcessW.dll renamed to nsProcess.dll)
|
||||||
|
|
||||||
La versione personale aggiunge il supporto per:
|
The personal version adds support for:
|
||||||
- **amd64-unicode** (x64)
|
- **amd64-unicode** (x64)
|
||||||
|
|
||||||
### Progetto Visual Studio
|
### Visual Studio Project
|
||||||
|
|
||||||
L'originale includeva:
|
The original included:
|
||||||
- `Source/nsProcess.sln` - Solution VS2008
|
- `Source/nsProcess.sln` - VS2008 Solution
|
||||||
- `Source/nsProcess.vcproj` - Progetto VS2008 (solo x86)
|
- `Source/nsProcess.vcproj` - VS2008 Project (x86 only)
|
||||||
|
|
||||||
La versione personale converte a VS2022 con supporto x64:
|
The personal version upgrades to VS2022 with x64 support:
|
||||||
- `nsProcess.sln` - Solution VS2022
|
- `nsProcess.sln` - VS2022 Solution
|
||||||
- `nsProcess/nsProcess.vcxproj` - Progetto VS2022 (x86-ansi, x86-unicode, amd64-unicode)
|
- `nsProcess/nsProcess.vcxproj` - VS2022 Project (x86-ansi, x86-unicode, amd64-unicode)
|
||||||
|
|
||||||
### File aggiunti
|
### Added Files
|
||||||
|
|
||||||
- `build_plugin.py` - Script Python per compilare il plugin per tutte le architetture
|
- `build_plugin.py` - Python script to compile the plugin for all architectures
|
||||||
- `nsis/` - Cartella con gli header NSIS per la compilazione:
|
- `nsis/` - Folder with NSIS headers for compilation:
|
||||||
- `api.h`, `crt.c`, `nsis_tchar.h`, `pluginapi.c`, `pluginapi.h`
|
- `api.h`, `crt.c`, `nsis_tchar.h`, `pluginapi.c`, `pluginapi.h`
|
||||||
|
|
||||||
### File rimossi
|
### Removed Files
|
||||||
|
|
||||||
I file DLL precompilati sono stati rimossi dalla distribuzione:
|
Pre-compiled DLL files have been removed from the distribution:
|
||||||
|
|
||||||
- `Plugins/nsProcess.dll` (x86 ANSI)
|
- `Plugins/nsProcess.dll` (x86 ANSI)
|
||||||
- `nsProcessW.dll` (x86 UNICODE)
|
- `nsProcessW.dll` (x86 UNICODE)
|
||||||
|
|
||||||
### Compilazione
|
### Build
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
cd nsProcess
|
cd nsProcess
|
||||||
python build_plugin.py
|
python build_plugin.py
|
||||||
```
|
```
|
||||||
|
|
||||||
I DLL vengono copiati in `plugins/{platform}/nsProcess.dll`.
|
DLLs are copied to `plugins/{platform}/nsProcess.dll`.
|
||||||
|
|
||||||
### Opzioni build
|
### Build Options
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
python build_plugin.py --config x86-unicode # Solo un'architettura (x86-ansi|x86-unicode|amd64-unicode|all)
|
python build_plugin.py --config x86-unicode # Single architecture (x86-ansi|x86-unicode|amd64-unicode|all)
|
||||||
python build_plugin.py --toolset 2026 # Toolset specifico (2022|2026|auto)
|
python build_plugin.py --toolset 2026 # Specific toolset (2022|2026|auto)
|
||||||
python build_plugin.py --jobs 4 # Numero di job MSBuild paralleli (default: CPU count)
|
python build_plugin.py --jobs 4 # Number of parallel MSBuild jobs (default: CPU count)
|
||||||
python build_plugin.py --clean # Pulizia dist/ prima della build
|
python build_plugin.py --clean # Clean dist/ before build
|
||||||
python build_plugin.py --install-dir "C:\NSIS\Plugins" # Copia in directory NSIS aggiuntiva
|
python build_plugin.py --install-dir "C:\NSIS\Plugins" # Copy to additional NSIS directory
|
||||||
python build_plugin.py --verbose # Output MSBuild esteso
|
python build_plugin.py --verbose # Extended MSBuild output
|
||||||
python build_plugin.py --version # Stampa versione ed esce
|
python build_plugin.py --version # Print version and exit
|
||||||
```
|
```
|
||||||
|
|
||||||
### Modifiche funzionali
|
### Functional Changes
|
||||||
|
|
||||||
Nessuna modifica funzionale rispetto all'originale. Le modifiche riguardano solo l'infrastruttura di build e il supporto x64.
|
No functional changes compared to the original. Modifications are limited to the build infrastructure and x64 support.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*See [README_IT.md](README_IT.md) for the Italian version.*
|
||||||
|
|||||||
+175
@@ -0,0 +1,175 @@
|
|||||||
|
# nsProcess NSIS Plugin v1.6
|
||||||
|
|
||||||
|
**Versione personale modificata**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Descrizione Originale
|
||||||
|
|
||||||
|
**2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)**
|
||||||
|
|
||||||
|
Funzione sorgente FIND_PROC_BY_NAME basata sul codice di Ravi Kochhar (kochhar@physiology.wisc.edu).
|
||||||
|
Grazie a iceman_k (plugin FindProcDLL) e DITMan (plugin KillProcDLL) per l'ispirazione.
|
||||||
|
Versione NSIS UNICODE compatibile (1.6) di brainsucker.
|
||||||
|
|
||||||
|
## Funzionalità
|
||||||
|
|
||||||
|
- Cerca un processo per nome
|
||||||
|
- Termina tutti i processi con il nome specificato (non solo uno)
|
||||||
|
- Chiude tutti i processi con il nome specificato (prima tenta di chiudere le finestre, attende 3 secondi, poi termina se ancora attivo)
|
||||||
|
- Il nome del processo non è case-sensitive
|
||||||
|
- Supporto Win95/98/ME/NT/2000/XP/Win7
|
||||||
|
- Dimensione plugin ridotta (4 Kb)
|
||||||
|
- Supporto NSIS UNICODE
|
||||||
|
|
||||||
|
## Utilizzo
|
||||||
|
|
||||||
|
### Ricerca processo
|
||||||
|
|
||||||
|
```nsis
|
||||||
|
${nsProcess::FindProcess} "[file.exe]" $var
|
||||||
|
```
|
||||||
|
|
||||||
|
**Parametri:**
|
||||||
|
- `[file.exe]` - Nome processo (es. "notepad.exe")
|
||||||
|
|
||||||
|
**Valori restituiti ($var):**
|
||||||
|
| Codice | Descrizione |
|
||||||
|
|--------|-------------|
|
||||||
|
| 0 | Successo |
|
||||||
|
| 603 | Processo non in esecuzione |
|
||||||
|
| 604 | Impossibile identificare il tipo di sistema |
|
||||||
|
| 605 | OS non supportato |
|
||||||
|
| 606 | Impossibile caricare NTDLL.DLL |
|
||||||
|
| 607 | Impossibile ottenere l'indirizzo della procedura da NTDLL.DLL |
|
||||||
|
| 608 | NtQuerySystemInformation fallita |
|
||||||
|
| 609 | Impossibile caricare KERNEL32.DLL |
|
||||||
|
| 610 | Impossibile ottenere l'indirizzo della procedura da KERNEL32.DLL |
|
||||||
|
| 611 | CreateToolhelp32Snapshot fallita |
|
||||||
|
|
||||||
|
### Terminazione/Chiusura processo
|
||||||
|
|
||||||
|
```nsis
|
||||||
|
${nsProcess::KillProcess} "[file.exe]" $var
|
||||||
|
${nsProcess::CloseProcess} "[file.exe]" $var
|
||||||
|
```
|
||||||
|
|
||||||
|
**Valori restituiti ($var):**
|
||||||
|
| Codice | Descrizione |
|
||||||
|
|--------|-------------|
|
||||||
|
| 0 | Successo |
|
||||||
|
| 601 | Permessi insufficienti per terminare il processo |
|
||||||
|
| 602 | Non tutti i processi sono stati terminati |
|
||||||
|
| 603 | Processo non in esecuzione |
|
||||||
|
| 604 | Impossibile identificare il tipo di sistema |
|
||||||
|
| 605 | OS non supportato |
|
||||||
|
| ... | (vedi sopra) |
|
||||||
|
|
||||||
|
### Chiamata diretta al plugin (senza macro)
|
||||||
|
|
||||||
|
```nsis
|
||||||
|
nsProcess::_CloseProcess "notepad.exe"
|
||||||
|
Pop $R0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Scaricamento plugin
|
||||||
|
|
||||||
|
```nsis
|
||||||
|
${nsProcess::Unload}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Esempio
|
||||||
|
|
||||||
|
```nsis
|
||||||
|
!include "nsProcess.nsh"
|
||||||
|
|
||||||
|
Section "Verifica Notepad"
|
||||||
|
${nsProcess::FindProcess} "notepad.exe" $R0
|
||||||
|
${If} $R0 == 0
|
||||||
|
MessageBox MB_YESNO "Notepad è in esecuzione. Chiuderlo?" IDNO skip
|
||||||
|
${nsProcess::CloseProcess} "notepad.exe" $R0
|
||||||
|
${If} $R0 == 0
|
||||||
|
MessageBox MB_OK "Notepad chiuso con successo"
|
||||||
|
${Else}
|
||||||
|
MessageBox MB_OK "Impossibile chiudere Notepad"
|
||||||
|
${EndIf}
|
||||||
|
skip:
|
||||||
|
${Else}
|
||||||
|
MessageBox MB_OK "Notepad non è in esecuzione"
|
||||||
|
${EndIf}
|
||||||
|
${nsProcess::Unload}
|
||||||
|
SectionEnd
|
||||||
|
```
|
||||||
|
|
||||||
|
## File include
|
||||||
|
|
||||||
|
Includi `nsProcess.nsh` per utilizzare le macro:
|
||||||
|
|
||||||
|
```nsis
|
||||||
|
!include "nsProcess.nsh"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚠️ Differenze nella versione personale
|
||||||
|
|
||||||
|
### Nuova architettura supportata: x64 (amd64-unicode)
|
||||||
|
|
||||||
|
L'originale supportava solo:
|
||||||
|
- x86-ansi (Plugins\nsProcess.dll)
|
||||||
|
- x86-unicode (nsProcessW.dll da rinominare in nsProcess.dll)
|
||||||
|
|
||||||
|
La versione personale aggiunge il supporto per:
|
||||||
|
- **amd64-unicode** (x64)
|
||||||
|
|
||||||
|
### Progetto Visual Studio
|
||||||
|
|
||||||
|
L'originale includeva:
|
||||||
|
- `Source/nsProcess.sln` - Solution VS2008
|
||||||
|
- `Source/nsProcess.vcproj` - Progetto VS2008 (solo x86)
|
||||||
|
|
||||||
|
La versione personale converte a VS2022 con supporto x64:
|
||||||
|
- `nsProcess.sln` - Solution VS2022
|
||||||
|
- `nsProcess/nsProcess.vcxproj` - Progetto VS2022 (x86-ansi, x86-unicode, amd64-unicode)
|
||||||
|
|
||||||
|
### File aggiunti
|
||||||
|
|
||||||
|
- `build_plugin.py` - Script Python per compilare il plugin per tutte le architetture
|
||||||
|
- `nsis/` - Cartella con gli header NSIS per la compilazione:
|
||||||
|
- `api.h`, `crt.c`, `nsis_tchar.h`, `pluginapi.c`, `pluginapi.h`
|
||||||
|
|
||||||
|
### File rimossi
|
||||||
|
|
||||||
|
I file DLL precompilati sono stati rimossi dalla distribuzione:
|
||||||
|
|
||||||
|
- `Plugins/nsProcess.dll` (x86 ANSI)
|
||||||
|
- `nsProcessW.dll` (x86 UNICODE)
|
||||||
|
|
||||||
|
### Compilazione
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
cd nsProcess
|
||||||
|
python build_plugin.py
|
||||||
|
```
|
||||||
|
|
||||||
|
I DLL vengono copiati in `plugins/{platform}/nsProcess.dll`.
|
||||||
|
|
||||||
|
### Opzioni build
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
python build_plugin.py --config x86-unicode # Solo un'architettura (x86-ansi|x86-unicode|amd64-unicode|all)
|
||||||
|
python build_plugin.py --toolset 2026 # Toolset specifico (2022|2026|auto)
|
||||||
|
python build_plugin.py --jobs 4 # Numero di job MSBuild paralleli (default: CPU count)
|
||||||
|
python build_plugin.py --clean # Pulizia dist/ prima della build
|
||||||
|
python build_plugin.py --install-dir "C:\NSIS\Plugins" # Copia in directory NSIS aggiuntiva
|
||||||
|
python build_plugin.py --verbose # Output MSBuild esteso
|
||||||
|
python build_plugin.py --version # Stampa versione ed esce
|
||||||
|
```
|
||||||
|
|
||||||
|
### Modifiche funzionali
|
||||||
|
|
||||||
|
Nessuna modifica funzionale rispetto all'originale. Le modifiche riguardano solo l'infrastruttura di build e il supporto x64.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*See [README.md](README.md) for the English version.*
|
||||||
Reference in New Issue
Block a user