Files
inno-installers/Template/README.md
cproudlock 691c6f9656 Add JT2GO, NetworkDriveManager, and Template projects
JT2GO:
- Inno Setup installer for JT2Go with prerequisite checking
- Checks for VC++ x86/x64 redistributables and .NET 4.8
- Verifies admin privileges before installation
- Supports silent installation mode

NetworkDriveManager:
- Full Inno Setup implementation with integrated PowerShell logic
- Menu-based interface for managing legacy domain network drives
- Features: backup/restore mappings, credential testing, drive reset
- Server migration from rd.ds.ge.com to wjs.geaerospace.net
- Three-phase reconnection to prevent error 1219 with multiple shares
- Add predefined drives (S:, V:, Y:) functionality

Template:
- Reusable Inno Setup project template for co-workers
- Documented sections with examples and best practices
- Includes utility functions and common patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:07:07 -05:00

126 lines
3.3 KiB
Markdown

# Inno Setup Project Template
A starting point for creating Windows installers with Inno Setup.
## Quick Start
1. **Copy this folder** to a new location and rename it for your project
2. **Rename `Template.iss`** to `YourProjectName.iss`
3. **Generate a new GUID** for `AppId` (Tools > Generate GUID in Inno Setup)
4. **Update the `[Setup]` section** with your app name, version, publisher, etc.
5. **Add your files** to the `[Files]` section
6. **Compile** with Inno Setup Compiler (right-click > Compile)
## Files Included
| File | Description |
|------|-------------|
| `Template.iss` | Main Inno Setup script with examples |
| `gea-logo.ico` | Setup icon (replace with your own) |
| `banner.bmp` | Wizard banner image (164x314 pixels) |
| `banner-sm.bmp` | Wizard small image (55x58 pixels) |
| `README.md` | This file |
## Common Tasks
### Install Files
```iss
[Files]
Source: "MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "Data\*"; DestDir: "{app}\Data"; Flags: ignoreversion recursesubdirs
```
### Create Shortcuts
```iss
[Icons]
Name: "{group}\My App"; Filename: "{app}\MyApp.exe"
Name: "{userdesktop}\My App"; Filename: "{app}\MyApp.exe"; Tasks: desktopicon
```
### Run After Install
```iss
[Run]
Filename: "{app}\MyApp.exe"; Description: "Launch My App"; Flags: postinstall nowait
```
### Check Prerequisites
```pascal
function InitializeSetup: Boolean;
begin
Result := True;
if not IsDotNet48Installed then
begin
MsgBox('.NET Framework 4.8 is required.', mbError, MB_OK);
Result := False;
end;
end;
```
### Execute PowerShell
```pascal
var
Output: String;
begin
ExecPowerShell('Get-Process | Select-Object -First 5', Output);
ShowResultsDialog('Processes', Output);
end;
```
### Silent Installation
```batch
:: Silent install
MySetup.exe /VERYSILENT /SUPPRESSMSGBOXES
:: Silent install with log
MySetup.exe /VERYSILENT /LOG="C:\install.log"
:: Silent uninstall
MySetup.exe /VERYSILENT /UNINSTALL
```
## Useful Constants
| Constant | Description | Example |
|----------|-------------|---------|
| `{app}` | Application directory | `C:\Program Files\MyApp` |
| `{tmp}` | Temporary directory | `C:\Users\X\AppData\Local\Temp\is-XXXXX` |
| `{userdesktop}` | User's desktop | `C:\Users\X\Desktop` |
| `{userdocs}` | User's documents | `C:\Users\X\Documents` |
| `{commonpf}` | Program Files | `C:\Program Files` |
| `{commonpf32}` | Program Files (x86) | `C:\Program Files (x86)` |
| `{autopf}` | Auto Program Files | Picks 32/64-bit automatically |
| `{win}` | Windows directory | `C:\Windows` |
| `{sys}` | System32 directory | `C:\Windows\System32` |
| `{src}` | Setup source directory | Where setup.exe is located |
| `{group}` | Start Menu folder | `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyApp` |
## Privileges
```iss
; Requires admin (for Program Files installs)
PrivilegesRequired=admin
; User-level only (no elevation)
PrivilegesRequired=lowest
; Try admin, fall back to user
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
```
## Resources
- [Inno Setup Documentation](https://jrsoftware.org/ishelp/)
- [Inno Setup Download](https://jrsoftware.org/isdl.php)
- [Pascal Scripting Reference](https://jrsoftware.org/ishelp/index.php?topic=scriptintro)
## Author
WJDT / GE Aerospace