Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
b434b400
Commit
b434b400
authored
Jan 28, 2016
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read currently installed USB serial drivers and skip reinstallation
parent
9ff40d6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
qgroundcontrol_installer.nsi
deploy/qgroundcontrol_installer.nsi
+29
-1
No files found.
deploy/qgroundcontrol_installer.nsi
View file @
b434b400
...
...
@@ -18,7 +18,35 @@ Section
WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "DisplayName" "QGroundControl"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString" "$\"$INSTDIR\QGroundControl_uninstall.exe$\""
; Only attempt to install the PX4 driver if the version isn't present
!define ROOTKEY "SYSTEM\CurrentControlSet\Control\Class\{4D36E978-E325-11CE-BFC1-08002BE10318}"
StrCpy $0 0
loop:
EnumRegKey $1 HKLM ${ROOTKEY} $0
StrCmp $1 "" notfound cont1
cont1:
StrCpy $2 "${ROOTKEY}\$1"
ReadRegStr $3 HKLM $2 "ProviderName"
StrCmp $3 "3D Robotics" found_provider
mismatch:
IntOp $0 $0 + 1
goto loop
found_provider:
ReadRegStr $3 HKLM $2 "DriverVersion"
StrCmp $3 "2.0.0.4" skip_driver
goto mismatch
notfound:
DetailPrint "USB Driver not found... installing"
ExecWait '"msiexec" /i "px4driver.msi"'
goto done
skip_driver:
DetailPrint "USB Driver found... skipping install"
done:
SectionEnd
Section "Uninstall"
...
...
@@ -43,4 +71,4 @@ Function .onInit
"QGroundControl is already installed. $\n$\nYou must uninstall the previous version before installing a new one."
Abort
done:
FunctionEnd
\ No newline at end of file
FunctionEnd
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment