Files
Windows_installer/README.md
T

86 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Windows Setup by Paravis — C++ port
Native Win32 port of `Windows_installer_NEW\setup.au3`.
## Build
Requirements: Visual Studio 2022 (Desktop C++) and CMake 3.20+.
```bat
build.cmd
```
Outputs:
```
build_x64\Release\setup_x64.exe
build_x86\Release\setup_x86.exe
```
The executables use a static CRT, are GUI subsystem, and use the same
`asInvoker` manifest / Common Controls 6 as the AutoIt builds.
## Preview
- `setup_x64.exe /preview` or an executable named `setup_preview*.exe`
starts preview mode: fixed 307×259 position, all buttons enabled, no
`src_*.exe` helper, preview wallpaper.
- The ported `setup_preview.exe` in `..\Windows_installer_NEW` is the x64
build used this way.
## Deployment
On a PARAVIS flash the two Windows Setup WIMs are:
- `\efi\Paravis\Boot\ws64.wim`, image 1, `\Windows\Setup.exe` — x64 build
- `\efi\Paravis\Boot\ws86.wim`, image 1, `\Windows\Setup.exe` — x86 build
`Winpeshl.ini` in both WIMs already launches `%SYSTEMROOT%\setup.exe`.
The launcher starts the real setup from `X:\sources\setup.exe`.
The window is layered with color key `0xABCDEF`. The Montserrat fonts are
embedded as RCDATA; the 1024×768 wallpaper is embedded as a lossless PNG and
decoded with GDI+ at startup. This keeps each executable around 1 MB.
The UI is the same 376/410/360-wide layout as the AutoIt version, with native
buttons. GDI+ and ole32 are standard components of the Windows Setup boot.wim
(verified in the target image).
## Behaviour
- Searches all drives for `\WindowsESD\NOT.DEL` or
`\efi\Paravis\Windows\NOT.DEL`.
- Warns and exits if both image folders are present.
- Finds `\efi\Paravis\Boot\NOT.DEL` for `src_x64.exe` / `src_x86.exe`
and Total Commander.
- Uses `%WINDIR%\SYSWOW64` to select the x64 UI; `firmware_type` selects
Legacy vs UEFI for the x86 UI.
- Builds the same `X:\sources\setup.exe /installfrom:... /m:... [/unattend:...]`
command lines as AutoIt.
- Disables Windows buttons when the corresponding ESD image is missing.
- Reboot button exits the launcher (the WinPE startup script performs the
reboot).
- Debug log: set `PARAVIS_DEBUG_LOG=1` to write
`%TEMP%\winsetup_cpp_debug.log`.
## Repository layout
```
src/ C++ sources and resources
assets/ fonts, wallpapers and UI images (incl. Montserrat OFL)
legacy-au3/ original AutoIt scripts
app.rc resource script
app.manifest application manifest
build.cmd release build (x64 + x86)
```
## License
MIT for the program code. See [`LICENSE`](LICENSE).
Montserrat is licensed under the SIL Open Font License 1.1; see
[`assets/OFL.txt`](assets/OFL.txt) and [`THIRD-PARTY.md`](THIRD-PARTY.md).
This repository contains source code only. Windows installation images
(`*.wim`, `*.esd`, `Data.pf`), Microsoft font derivatives and third-party
binaries are not distributed here.