Skip to content

Commit

Permalink
Prepare 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstevenson committed May 27, 2022
1 parent 7e2f941 commit 9dfc704
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
33 changes: 23 additions & 10 deletions src/installer/userdrivers.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
type
TUserDriverRec = record
Driver : TDriverRec;
Delete : Boolean;
Remove : Boolean;
end;
TUserDriverList = Array[0..1] of TUserDriverRec;
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand All @@ -124,6 +127,7 @@ var
Instance: TInstanceRec;
Driver: TDriverRec;
Found: Boolean;
Text: String;
begin
Expand Down Expand Up @@ -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;
Expand All @@ -184,7 +195,7 @@ begin
if Count = 0 then
begin
Debug('No user drivers found');
Debug('No legacy drivers found');
Exit;
end;
Expand All @@ -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;
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/version.iss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
; Update this only when creating a new release
#define AppVersion "0.8.0"
#define AppVersion "1.0.0"

0 comments on commit 9dfc704

Please sign in to comment.