Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installer: Select Win7/8/8.1 vs. Win10 driver at runtime #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
29 changes: 23 additions & 6 deletions installer/tap-windows6.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ ReserveFile "install-whirl.bmp"
Section /o "TAP Virtual Ethernet Adapter" SecTAP

SetOverwrite on
${If} ${IsWow64}
SetRegView 64
${EndIf}

ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentMajorVersionNumber"

${If} ${RunningX64}
DetailPrint "We are running on an x86_64 64-bit system."
Expand All @@ -114,9 +119,15 @@ Section /o "TAP Virtual Ethernet Adapter" SecTAP
File "${DEVCON64}"

SetOutPath "$INSTDIR\driver"
File "${IMAGE}\amd64\OemVista.inf"
File "${IMAGE}\amd64\${PRODUCT_TAP_WIN_COMPONENT_ID}.cat"
File "${IMAGE}\amd64\${PRODUCT_TAP_WIN_COMPONENT_ID}.sys"
${If} $R0 == ""
File "${IMAGE}\amd64\OemVista.inf"
File "${IMAGE}\amd64\${PRODUCT_TAP_WIN_COMPONENT_ID}.cat"
File "${IMAGE}\amd64\${PRODUCT_TAP_WIN_COMPONENT_ID}.sys"
${Else}
File "${IMAGE}\amd64\win10\OemVista.inf"
File "${IMAGE}\amd64\win10\${PRODUCT_TAP_WIN_COMPONENT_ID}.cat"
File "${IMAGE}\amd64\win10\${PRODUCT_TAP_WIN_COMPONENT_ID}.sys"
${EndIf}
${ElseIf} ${RunningArm64}
DetailPrint "We are running on an ARM64 64-bit system."

Expand All @@ -134,9 +145,15 @@ Section /o "TAP Virtual Ethernet Adapter" SecTAP
File "${DEVCON32}"

SetOutPath "$INSTDIR\driver"
File "${IMAGE}\i386\OemVista.inf"
File "${IMAGE}\i386\${PRODUCT_TAP_WIN_COMPONENT_ID}.cat"
File "${IMAGE}\i386\${PRODUCT_TAP_WIN_COMPONENT_ID}.sys"
${If} $R0 == ""
File "${IMAGE}\i386\OemVista.inf"
File "${IMAGE}\i386\${PRODUCT_TAP_WIN_COMPONENT_ID}.cat"
File "${IMAGE}\i386\${PRODUCT_TAP_WIN_COMPONENT_ID}.sys"
${Else}
File "${IMAGE}\i386\win10\OemVista.inf"
File "${IMAGE}\i386\win10\${PRODUCT_TAP_WIN_COMPONENT_ID}.cat"
File "${IMAGE}\i386\win10\${PRODUCT_TAP_WIN_COMPONENT_ID}.sys"
${EndIf}
${Else}
DetailPrint "Native architecture not recognized!"
${EndIf}
Expand Down