-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use of delegates to keep the connection non blocking and alive; bug f…
…ix in the resolutions; send of 25C temp; better error handling in the retries to download the image
- Loading branch information
1 parent
36f34cf
commit f13ea33
Showing
13 changed files
with
443 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ AppPublisherURL=mailto:[email protected] | |
AppSupportURL=http://tech.groups.yahoo.com/group/ASCOM-Talk/ | ||
AppUpdatesURL=http://ascom-standards.org/ | ||
VersionInfoVersion=1.0.0 | ||
MinVersion=0,5.0.2195sp4 | ||
;MinVersion=0,5.0.2195sp4 | ||
MinVersion=0,6.0 | ||
DefaultDirName="{cf}\ASCOM\Camera" | ||
DisableDirPage=yes | ||
DisableProgramGroupPage=yes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
; | ||
; Script generated by the ASCOM Driver Installer Script Generator 6.4.0.0 | ||
; Generated by robert hasson on 3/14/2019 (UTC) | ||
; | ||
[Setup] | ||
AppID={{77b4d898-3116-40a5-91d4-4c41ff123d93} | ||
AppName=ASCOM ASCOM.LumixG80.Camera Camera Driver | ||
AppVerName=ASCOM ASCOM.LumixG80.Camera Camera Driver 0.1 | ||
AppVersion=0.1 | ||
AppPublisher=robert hasson <[email protected]> | ||
AppPublisherURL=mailto:[email protected] | ||
AppSupportURL=http://tech.groups.yahoo.com/group/ASCOM-Talk/ | ||
AppUpdatesURL=http://ascom-standards.org/ | ||
VersionInfoVersion=1.0.0 | ||
MinVersion=0,5.0.2195sp4 | ||
DefaultDirName="{cf}\ASCOM\Camera" | ||
DisableDirPage=yes | ||
DisableProgramGroupPage=yes | ||
;OutputDir="." | ||
OutputBaseFilename="ASCOM.LumixG80.Camera Setup32" | ||
Compression=lzma | ||
SolidCompression=yes | ||
; Put there by Platform if Driver Installer Support selected | ||
WizardImageFile="C:\Program Files (x86)\ASCOM\Platform 6 Developer Components\Installer Generator\Resources\WizardImage.bmp" | ||
LicenseFile="C:\Program Files (x86)\ASCOM\Platform 6 Developer Components\Installer Generator\Resources\CreativeCommons.txt" | ||
; {cf}\ASCOM\Uninstall\Camera folder created by Platform, always | ||
UninstallFilesDir="{cf}\ASCOM\Uninstall\Camera\ASCOM.LumixG80.Camera" | ||
OutputDir=Z:\ | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Dirs] | ||
Name: "{cf}\ASCOM\Uninstall\Camera\ASCOM.LumixG80.Camera" | ||
; TODO: Add subfolders below {app} as needed (e.g. Name: "{app}\MyFolder") | ||
;C:\Users\robert.hasson\source\repos\LumixCamera\LumixCamera\bin\x86\Release | ||
[Files] | ||
Source: "C:\Users\robert.hasson\source\repos\LumixCamera\LumixCamera\bin\x86\Release\ASCOM.LumixG80.Camera.dll"; DestDir: "{app}" | ||
; Require a read-me HTML to appear after installation, maybe driver's Help doc | ||
Source: "C:\Users\robert.hasson\source\repos\LumixCamera\readme.md"; DestDir: "{app}"; Flags: isreadme | ||
; TODO: Add other files needed by your driver here (add subfolders above) | ||
Source: "C:\Users\robert.hasson\source\repos\LumixCamera\readme_files\*"; DestDir: "{app}\readme_files\"; | ||
Source: "C:\Users\robert.hasson\source\repos\LumixCamera\packages\NDCRaw.0.5.2\lib\net461\dcraw.exe"; DestDir: "{app}"; | ||
Source: "C:\Users\robert.hasson\source\repos\LumixCamera\packages\NDCRaw.0.5.2\lib\net461\NDCRaw.dll"; DestDir: "{app}"; | ||
Source: "C:\Users\robert.hasson\source\repos\LumixCamera\packages\MedallionShell.1.5.1\lib\net45\MedallionShell.dll"; DestDir: "{app}"; | ||
|
||
|
||
; Only if driver is .NET | ||
[Run] | ||
; Only for .NET assembly/in-proc drivers | ||
Filename: "{dotnet4032}\regasm.exe"; Parameters: "/codebase ""{app}\ASCOM.LumixG80.Camera.dll"""; Flags: runhidden 32bit | ||
Filename: "{dotnet4032}\regasm.exe"; Parameters: "/codebase ""{app}\NDCRaw.dll""";Flags: runhidden 32bit | ||
Filename: "{dotnet4032}\regasm.exe"; Parameters: "/codebase ""{app}\MedallionShell.dll""";Flags: runhidden 32bit | ||
|
||
|
||
; Only if driver is .NET | ||
[UninstallRun] | ||
; Only for .NET assembly/in-proc drivers | ||
Filename: "{dotnet4032}\regasm.exe"; Parameters: "-u ""{app}\ASCOM.LumixG80.Camera.dll"""; Flags: runhidden 32bit | ||
; This helps to give a clean uninstall | ||
|
||
|
||
|
||
|
||
[Code] | ||
const | ||
REQUIRED_PLATFORM_VERSION = 6.2; // Set this to the minimum required ASCOM Platform version for this application | ||
// | ||
// Function to return the ASCOM Platform's version number as a double. | ||
// | ||
function PlatformVersion(): Double; | ||
var | ||
PlatVerString : String; | ||
begin | ||
Result := 0.0; // Initialise the return value in case we can't read the registry | ||
try | ||
if RegQueryStringValue(HKEY_LOCAL_MACHINE_32, 'Software\ASCOM','PlatformVersion', PlatVerString) then | ||
begin // Successfully read the value from the registry | ||
Result := StrToFloat(PlatVerString); // Create a double from the X.Y Platform version string | ||
end; | ||
except | ||
ShowExceptionMessage; | ||
Result:= -1.0; // Indicate in the return value that an exception was generated | ||
end; | ||
end; | ||
// | ||
// Before the installer UI appears, verify that the required ASCOM Platform version is installed. | ||
// | ||
function InitializeSetup(): Boolean; | ||
var | ||
PlatformVersionNumber : double; | ||
begin | ||
Result := FALSE; // Assume failure | ||
PlatformVersionNumber := PlatformVersion(); // Get the installed Platform version as a double | ||
If PlatformVersionNumber >= REQUIRED_PLATFORM_VERSION then // Check whether we have the minimum required Platform or newer | ||
Result := TRUE | ||
else | ||
if PlatformVersionNumber = 0.0 then | ||
MsgBox('No ASCOM Platform is installed. Please install Platform ' + Format('%3.1f', [REQUIRED_PLATFORM_VERSION]) + ' or later from http://www.ascom-standards.org', mbCriticalError, MB_OK) | ||
else | ||
MsgBox('ASCOM Platform ' + Format('%3.1f', [REQUIRED_PLATFORM_VERSION]) + ' or later is required, but Platform '+ Format('%3.1f', [PlatformVersionNumber]) + ' is installed. Please install the latest Platform before continuing; you will find it at http://www.ascom-standards.org', mbCriticalError, MB_OK); | ||
end; | ||
// Code to enable the installer to uninstall previous versions of itself when a new version is installed | ||
procedure CurStepChanged(CurStep: TSetupStep); | ||
var | ||
ResultCode: Integer; | ||
UninstallExe: String; | ||
UninstallRegistry: String; | ||
begin | ||
if (CurStep = ssInstall) then // Install step has started | ||
begin | ||
// Create the correct registry location name, which is based on the AppId | ||
UninstallRegistry := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppId")}' + '_is1'); | ||
// Check whether an extry exists | ||
if RegQueryStringValue(HKLM, UninstallRegistry, 'UninstallString', UninstallExe) then | ||
begin // Entry exists and previous version is installed so run its uninstaller quietly after informing the user | ||
MsgBox('Setup will now remove the previous version.', mbInformation, MB_OK); | ||
Exec(RemoveQuotes(UninstallExe), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); | ||
sleep(1000); //Give enough time for the install screen to be repainted before continuing | ||
end | ||
end; | ||
end; | ||
Oops, something went wrong.