From 9dfc7044a225b726f8a7517994abf02c88a3b44e Mon Sep 17 00:00:00 2001 From: John Stevenson Date: Fri, 27 May 2022 18:32:56 +0100 Subject: [PATCH] Prepare 1.0.0 --- CHANGELOG.md | 5 ++++- README.md | 9 ++++----- src/installer/userdrivers.iss | 33 +++++++++++++++++++++++---------- src/version.iss | 2 +- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71fe3dd..908c328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ ## [Unreleased] + +## [1.0.0] - 2022-05-27 * Added: Option to remove legacy drivers when uninstalling the program. ## [0.8.0] - 2022-05-21 * Initial public release -[Unreleased]: https://github.com/johnstevenson/pl2303-legacy/compare/0.8.0...HEAD +[Unreleased]: https://github.com/johnstevenson/pl2303-legacy/compare/1.0.0...HEAD +[1.0.0]: https://github.com/johnstevenson/pl2303-legacy/compare/0.8.0...1.0.0 [0.8.0]: https://github.com/johnstevenson/pl2303-legacy/compare/2ac4a04daa...0.8.0 diff --git a/README.md b/README.md index b66ec01..47304be 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,11 @@ Legacy drivers are provided for the following microchips: PL2303HXA and PL2303XA were phased out in 2012 due to counterfeit Chinese copies. Note that this driver will only be installed if Prolific recognizes the microchip. -This driver also supports older microchips (PL2303H, PL2303HX and PL2303X). If it is not suitable * +This driver also supports older microchips (PL2303H, PL2303HX and PL2303X). If it is not suitable you can try the excellent [Prolific PL-2303 Code 10 Fix][codefix] program from -[Family Software][family], which uses an earlier driver version (3.3.2.102) from 2008. - -_* Earlier PL2303 drivers sometimes fail on later Windows versions (where data can be read from but -not written to the device), depending on the methods used by the calling program._ +[Family Software][family], which uses an earlier driver version (3.3.2.102) from 2008. Older +applications sometimes fail to write to the device, so using an earlier driver may +solve this. ### PL2303 TA/TB diff --git a/src/installer/userdrivers.iss b/src/installer/userdrivers.iss index 7875de2..a8287c4 100644 --- a/src/installer/userdrivers.iss +++ b/src/installer/userdrivers.iss @@ -2,7 +2,7 @@ type TUserDriverRec = record Driver : TDriverRec; - Delete : Boolean; + Remove : Boolean; end; TUserDriverList = Array[0..1] of TUserDriverRec; @@ -38,10 +38,13 @@ begin if not UserDriversSelect(List) then Exit; - for I := Low(List) to High(List) - 1 do + for I := Low(List) to High(List) do begin - if List[I].Delete then + if not List[I].Driver.Exists then + Continue; + + if List[I].Remove then begin if ExecPnpDeleteDriver(List[I].Driver, True) then Action := 'Removed' @@ -98,10 +101,10 @@ end; function UserDriversGetLegacy: TUserDriverList; begin - Result[0].Delete := True; + Result[0].Remove := False; Result[0].Driver := UserDriversInit('Legacy PL2303 HXA/XA', LEGACY_HXA); - Result[1].Delete := True; + Result[1].Remove := False; Result[1].Driver := UserDriversInit('Legacy PL2303 TA/TB', LEGACY_TAB); end; @@ -124,6 +127,7 @@ var Instance: TInstanceRec; Driver: TDriverRec; Found: Boolean; + Text: String; begin @@ -160,6 +164,13 @@ begin end; + if Result.Count = 1 then + Text := 'driver' + else + Text := 'drivers'; + + Debug(Format('Found %d PL2303 %s', [Result.Count, Text])); + end; function UserDriversSelect(var List: TUserDriverList): Boolean; @@ -184,7 +195,7 @@ begin if Count = 0 then begin - Debug('No user drivers found'); + Debug('No legacy drivers found'); Exit; end; @@ -204,6 +215,8 @@ begin if not Driver.Exists then Continue; + Debug(Format('Offering %s (%s) for removal', [Driver.DisplayName, Driver.Version])); + GUserForm.ListBox.AddCheckBox(Driver.DisplayName, Driver.Version, 0, True, True, False, False, TObject(I)); end; @@ -216,17 +229,17 @@ begin begin Index := Integer(GUserForm.ListBox.ItemObject[I]); - List[Index].Delete := GUserForm.ListBox.Checked[I]; + List[Index].Remove := GUserForm.ListBox.Checked[I]; - if List[Index].Delete then + if List[Index].Remove then Result := True; end; if Result then - Debug('User chose to delete drivers') + Debug('User chose to remove legacy drivers') else - Debug('User chose not to delete drivers'); + Debug('User chose not to remove legacy drivers'); finally GUserForm.Main.Free(); diff --git a/src/version.iss b/src/version.iss index b9ceeaa..1dcbaaf 100644 --- a/src/version.iss +++ b/src/version.iss @@ -1,2 +1,2 @@ ; Update this only when creating a new release -#define AppVersion "0.8.0" +#define AppVersion "1.0.0"