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
14 changes: 8 additions & 6 deletions Aminet/MintPRINT.readme
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Short: IPP/AirPrint driver and setup tool
Author: Darren Banfi (boingball)
Uploader: boingball@gmail.com
Type: driver/print
Version: 1.3.2
Version: 1.3.3
Requires: 68000+; AmigaOS 2.04+; TCP/IP stack providing bsdsocket.library
Architecture: m68k-amigaos >= 2.04

Expand Down Expand Up @@ -148,8 +148,9 @@ After rebooting:
7. Use Test Print to verify the complete printer.device -> MintPRINT ->
IPP path.

The active printer configuration is Unit0. Additional configurations can
be stored in Unit1-Unit7 and copied to Unit0 when required.
The active printer configuration is kept separately in ENV:MintPRINT/Active
and ENVARC:MintPRINT/Active. Unit0 through Unit7 remain independent saved
profiles; Activate changes the live profile without overwriting any Unit.

AmigaOS 2.x/3.0/3.1 notes
--------------------------
Expand Down Expand Up @@ -224,13 +225,14 @@ cross-project collaboration: sharing compatibility findings and recent fixes,
allowing MintPRINT's implementation to be compared against AmiAirPrint, and
helping identify gaps in classic application and printer compatibility.

What's new in 1.3.2
What's new in 1.3.3
-------------------

- Final driver revision 41.19.
- Test Print uses the selected Unit1-Unit7 profile for that one job without
replacing the active Unit0 printer.
- Activating a saved unit accepts profiles stored in either ENV: or ENVARC:.
replacing the active printer.
- Activate now writes a separate live ENV:/ENVARC: profile, preserving
Unit0 through Unit7.
- Query Printer selections for media/tray, colour, quality and scaling now
save correctly, including on the AmigaOS 2.x-compatible event path.
- View Spooler now shows the current RAM/T: job and retains a failed rendered
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ Keep the full version-by-version history here. The front page and Aminet
readme should carry only a short summary of the latest version, with a link
to this page; replace that summary when preparing the next release.

[1.3.2](#132) | [1.3.1](#131) | [1.3.0](#130) | [1.2.7](#127) | [1.2.6](#126) | [1.2.5](#125) | [1.2.4](#124) | [1.2.3](#123) | [1.2.2](#122) | [1.2.1](#121) | [1.2.0](#120) | [1.1.0](#110) | [1.0.3b](#103b) | [1.0.3](#103) | [1.0.2](#102) | [1.0.0](#100)
[1.3.3](#133) | [1.3.2](#132) | [1.3.1](#131) | [1.3.0](#130) | [1.2.7](#127) | [1.2.6](#126) | [1.2.5](#125) | [1.2.4](#124) | [1.2.3](#123) | [1.2.2](#122) | [1.2.1](#121) | [1.2.0](#120) | [1.1.0](#110) | [1.0.3b](#103b) | [1.0.3](#103) | [1.0.2](#102) | [1.0.0](#100)

## 1.3.3

MintPRINT 1.3.3 fixes non-destructive activation of saved printer profiles.

- **Unit profiles are preserved.** Activate now writes a separate live
`ENV:MintPRINT/Active` and `ENVARC:MintPRINT/Active` profile, leaving
Unit0 through Unit7 untouched.
- **Active-unit state is restored at startup.** The GUI records the active
Unit separately and opens on that profile. Existing installations without
Active continue to use their legacy Unit0 configuration.

## 1.3.2

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ MintPrint Settings for setup, discovery and test printing.
<img width="525" height="327" alt="image" src="https://github.com/user-attachments/assets/ba4cfd1f-8b0f-4aee-91b9-a6b221712ca5" />


## What's new in 1.3.2
## What's new in 1.3.3

- **Final driver revision 41.19.**
- **Selected-unit Test Print:** testing Unit1-Unit7 uses that profile for the
one job without replacing the active Unit0 printer.
- **Reliable unit activation:** profiles stored in either ENV: or ENVARC: can
now be activated successfully.
one job without replacing the active printer.
- **Non-destructive activation:** Activate writes a separate live profile;
Unit0-Unit7 are preserved as independent saved printer profiles.
- **Query results now save correctly:** media/tray, colour, quality and scaling
choices selected by **Query Printer** are synchronised with the Unit config,
including on the AmigaOS 2.x-compatible event path.
Expand Down
28 changes: 14 additions & 14 deletions docs/MINTPRINT_CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
MintPRINT reads its printer endpoint at the start of every graphics print job.
The live profile is:

ENV:MintPRINT/Unit0
ENV:MintPRINT/Active

If that file is absent, the driver falls back to:

ENVARC:MintPRINT/Active

For older installations that have no separate Active profile, it then
falls back to the legacy live paths:

ENV:MintPRINT/Unit0
ENVARC:MintPRINT/Unit0

If neither exists, the driver defaults to an empty host and simply does
If none exists, the driver defaults to an empty host and simply does
nothing (query or print) rather than falling back to any hardcoded
address - an early build defaulted to a specific test printer's address,
which meant an unconfigured Unit0 could silently send traffic to
whatever device happened to be at that address on someone else's
network.

The driver itself has no concept of multiple units - it only ever reads
`Unit0`. MintPrint Settings' Unit dropdown (see `docs/MINTPRINT_PREFS.md`)
manages `Unit1`, `Unit2`, ... as switchable saved profiles for people with
more than one printer, and its **Activate** button is how one of those
becomes the live `Unit0` this driver reads.
address. Unit0 through Unit7 are saved printer profiles; the separate
Active file is the profile currently used by the driver. MintPrint
Settings' **Activate** button writes the selected profile to Active
without changing any Unit profile.

## Unit0 format
## Active and Unit profile format

The file is plain text (`HOST=` below is a placeholder - MintPrint
Active and Unit profile files are plain text (`HOST=` below is a placeholder - MintPrint
Settings always fills in a real printer address before saving):

HOST=192.168.1.100
Expand Down
35 changes: 20 additions & 15 deletions docs/MINTPRINT_PREFS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ MintPrint Settings (`src/MintPrintSettings.c`, formerly `IPP-Test16.c` /

Startup behaviour:

- Load `ENV:MintPRINT/Unit0` first (the Unit dropdown starts on Unit0).
- Fall back to `ENVARC:MintPRINT/Unit0`.
- Load the recorded active unit, defaulting to Unit0 for older installations.
- Load that unit's saved profile from `ENV:MintPRINT/UnitN`, falling back to
`ENVARC:MintPRINT/UnitN`.
- The driver reads the separate live profile from `ENV:MintPRINT/Active`,
falling back to `ENVARC:MintPRINT/Active`, with legacy Unit0 fallback.
- Saved media, colour, quality and scaling values are shown before a query.
- If no saved value exists, capability controls show `Not Detected` and are
ghosted until Query Printer succeeds.
Expand Down Expand Up @@ -41,29 +44,31 @@ engine, media, cached capabilities, everything - from that unit's saved
files, exactly like **File > Reload Driver Settings** does for the current
one.

**Only Unit0 is what `DEVS:Printers/MintPRINT` actually reads at print
time** - the driver has no concept of "which unit" it was opened as, so
Unit1+ are switchable *saved profiles*, not simultaneously-active printers.
**Activate**, next to the Unit dropdown, is how a different printer becomes
the one that actually prints: it copies the selected unit's saved
`ENV:`/`ENVARC:` config (and cached capabilities, if any) over Unit0's, then
switches the dropdown back to Unit0 so the window reflects what is now
live. Unit0's own previous settings are overwritten by this - if they are
worth keeping, save them to an empty unit slot first. Activate on Unit0
itself is a no-op (it is already active); on a unit with nothing saved yet
it just reports that there is nothing to copy.
The **Unit** dropdown is the saved-profile selector. Unit0 through Unit7
remain independent profiles and are never overwritten by activation.

MintPrint Settings keeps the currently active printer in a separate live
profile:

ENV:MintPRINT/Active
ENVARC:MintPRINT/Active

**Activate** writes the selected Unit's current settings to that Active
profile and records which Unit is active. It does not modify Unit0 or any
other saved Unit profile. Saving the active Unit also updates Active so the
driver stays in step.

`ENGINE=jpeg`, `ENGINE=postscript`, `ENGINE=pwg-raster`, `ENGINE=urf`, and
`ENGINE=pdf` are persisted by the preferences program and all five are real
driver backends:
`DEVS:Printers/MintPRINT` reads Unit0's `ENGINE=` and produces a JPEG, a
`DEVS:Printers/MintPRINT` reads the Active profile's `ENGINE=` and produces a JPEG, a
PostScript (`application/postscript`), PWG Raster (`image/pwg-raster`), Apple
Raster (`image/urf`), or a PDF (`application/pdf`) document accordingly. See
`docs/POSTSCRIPT_ENGINE.md`,
`docs/PWG_RASTER.md`, and `docs/PDF_ENGINE.md` for how each encoder works and
what has and hasn't been physically test-printed yet.

The driver reloads Unit0 at the start of every graphics print. Replacing the
The driver reloads the Active profile at the start of every graphics print. Replacing the
printer driver binary itself still requires a reboot before testing it.

## Duplex
Expand Down
21 changes: 12 additions & 9 deletions docs/MintPrintSettings.guide
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For a brand new printer, the quickest path is:
in AmigaOS Printer Preferences and save there too.
6. Click Test Print to confirm everything actually reaches paper.

Only Unit0 is what the installed driver reads when it prints - see
The installed driver reads the separate Active profile when it prints - see
@{" Multiple printers (Units) " LINK "Units"} if you have more than one
network printer.

Expand Down Expand Up @@ -293,14 +293,17 @@ Picking a different Unit reloads the entire window - IP/host, path,
engine, media, cached capabilities, everything - from that Unit's own
saved files.

IMPORTANT: only Unit0 is what the installed MintPRINT driver actually
reads when it prints. Unit1-7 are switchable saved profiles, not
simultaneously active printers. To make a different Unit the one that
actually prints, select it and click Activate: this copies that Unit's
saved settings (and cached capabilities) over Unit0's, then switches
the dropdown back to Unit0. Activating overwrites Unit0's previous
settings, so save them to a spare empty Unit first if you want to keep
them.
The installed MintPRINT driver reads the separate live profile:

ENV:MintPRINT/Active
ENVARC:MintPRINT/Active

Unit0 through Unit7 are independent saved profiles. To make a different
Unit the one that actually prints, select it and click Activate: this
writes that Unit's settings to the Active profile and records it as the
active Unit. Unit0 and every other saved profile remain unchanged. Saving
the active Unit also updates the Active profile. Older installations
without Active fall back to their existing Unit0 configuration.

@{" Back to Contents " LINK "Main"}
@endnode
Expand Down
35 changes: 25 additions & 10 deletions driver/config.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* MintPRINT runtime configuration.
*
* Live settings are read from ENV:MintPRINT/Unit0. If that file does not
* exist, ENVARC:MintPRINT/Unit0 is used. Missing or invalid values fall back
* to the known-good development defaults.
* Live settings are read from ENV:MintPRINT/Active first. If that file
* does not exist, ENVARC:MintPRINT/Active is used. Older installations that
* have no Active file fall back to ENV:/ENVARC:MintPRINT/Unit0. Missing or
* invalid values fall back to the known-good development defaults.
*/

#include <exec/types.h>
Expand Down Expand Up @@ -247,20 +248,34 @@ LONG mp_config_load(struct MPConfig *cfg)
if (!DOSBase) return MP_CONFIG_SOURCE_DEFAULTS;

/* MintPrint Settings' regression suite writes a complete, one-job
* override here. It deliberately wins over Unit0 so the suite never
* mutates the user's saved printer profile. DriverOpen removes it
* after loading; Init may read it first when the driver is cold, so
* config.c itself must not consume/delete it. */
* override here. It deliberately wins over the live Active profile so
* the suite never mutates any user's saved printer profile. DriverOpen
* removes it after loading; Init may read it first when the driver is
* cold, so config.c itself must not consume/delete it. */
fh = Open((CONST_STRPTR)"T:MintPRINT-testsuite.cfg", MODE_OLDFILE);
if (fh) {
source = MP_CONFIG_SOURCE_TEST;
} else {
fh = Open((CONST_STRPTR)"ENV:MintPRINT/Unit0", MODE_OLDFILE);
/* Active is the live printer configuration. Unit0 remains a normal
* saved profile; the Unit0 paths below are the legacy fallback for
* installations created before the separate Active profile existed. */
fh = Open((CONST_STRPTR)"ENV:MintPRINT/Active", MODE_OLDFILE);
if (fh) {
source = MP_CONFIG_SOURCE_ENV;
} else {
fh = Open((CONST_STRPTR)"ENVARC:MintPRINT/Unit0", MODE_OLDFILE);
if (fh) source = MP_CONFIG_SOURCE_ENVARC;
fh = Open((CONST_STRPTR)"ENVARC:MintPRINT/Active", MODE_OLDFILE);
if (fh) {
source = MP_CONFIG_SOURCE_ENVARC;
} else {
fh = Open((CONST_STRPTR)"ENV:MintPRINT/Unit0", MODE_OLDFILE);
if (fh) {
source = MP_CONFIG_SOURCE_ENV;
} else {
fh = Open((CONST_STRPTR)"ENVARC:MintPRINT/Unit0",
MODE_OLDFILE);
if (fh) source = MP_CONFIG_SOURCE_ENVARC;
}
}
}
}

Expand Down
Loading
Loading