diff --git a/.gitattributes b/.gitattributes index 2125666142..a3670db85e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,3 @@ -* text=auto \ No newline at end of file +* text=auto +# Signed driver packages: catalog hashes require byte-exact INF files +Resources/DLLs/*_Driver/** -text diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 05f7bc8f7c..ab312f516b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -21,9 +21,13 @@ on: - 'Source/**' - 'CMakeLists.txt' - 'HelperFunctions.cmake' + release: + types: [published] + workflow_dispatch: jobs: build-ubuntu: + if: github.event_name != 'release' || !github.event.release.prerelease runs-on: ubuntu-22.04 @@ -31,6 +35,27 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: check release ref + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + env: + RELEASE_BRANCH: ${{ vars.RELEASE_BRANCH || 'main' }} + REF_NAME: ${{ github.ref_name }} + REF_TYPE: ${{ github.ref_type }} + run: | + # Release builds must come from a commit that is already on the release branch + git fetch --no-tags origin "$RELEASE_BRANCH" + if ! git merge-base --is-ancestor HEAD FETCH_HEAD; then + echo "::error::$REF_NAME is not part of $RELEASE_BRANCH. Release builds must come from $RELEASE_BRANCH" + exit 1 + fi + + # Release tags must match the version in CMakeLists.txt + gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?") + if [ "$REF_TYPE" == 'tag' ] && [ "$REF_NAME" != "$gui_ver" ]; then + echo "::error::Tag $REF_NAME does not match GUI_VERSION in CMakeLists.txt ($gui_ver)" + exit 1 + fi + shell: bash - name: build env: CC: gcc-10 @@ -47,15 +72,15 @@ jobs: run: | gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?") - if [ ${{github.ref_name}} == 'development' ]; then + if [ ${{github.event_name}} == 'release' ] || [ ${{github.event_name}} == 'workflow_dispatch' ]; then + artifactory_repo=Release + elif [ ${{github.ref_name}} == 'development' ]; then version_suffix=-dev artifactory_repo=Dev gui_ver=latest elif [ ${{github.ref_name}} == 'testing' ]; then version_suffix=-beta artifactory_repo=Test - elif [ ${{github.ref_name}} == 'main' ]; then - artifactory_repo=Release else echo "This branch is not configured for deployment." exit 0 diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 0775dc65fc..33afcb5be3 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -21,9 +21,13 @@ on: - 'Source/**' - 'CMakeLists.txt' - 'HelperFunctions.cmake' + release: + types: [published] + workflow_dispatch: jobs: build-osx: + if: github.event_name != 'release' || !github.event.release.prerelease runs-on: ${{ matrix.os }} strategy: @@ -34,6 +38,27 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: check release ref + if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + env: + RELEASE_BRANCH: ${{ vars.RELEASE_BRANCH || 'main' }} + REF_NAME: ${{ github.ref_name }} + REF_TYPE: ${{ github.ref_type }} + run: | + # Release builds must come from a commit that is already on the release branch + git fetch --no-tags origin "$RELEASE_BRANCH" + if ! git merge-base --is-ancestor HEAD FETCH_HEAD; then + echo "::error::$REF_NAME is not part of $RELEASE_BRANCH. Release builds must come from $RELEASE_BRANCH" + exit 1 + fi + + # Release tags must match the version in CMakeLists.txt + gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?") + if [ "$REF_TYPE" == 'tag' ] && [ "$REF_NAME" != "$gui_ver" ]; then + echo "::error::Tag $REF_NAME does not match GUI_VERSION in CMakeLists.txt ($gui_ver)" + exit 1 + fi + shell: bash - name: configure run: | cd Build @@ -55,15 +80,15 @@ jobs: run: | gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?") - if [ ${{github.ref_name}} == 'development' ]; then + if [ ${{github.event_name}} == 'release' ] || [ ${{github.event_name}} == 'workflow_dispatch' ]; then + artifactory_repo=Release + elif [ ${{github.ref_name}} == 'development' ]; then version_suffix=-dev artifactory_repo=Dev gui_ver=latest elif [ ${{github.ref_name}} == 'testing' ]; then version_suffix=-beta artifactory_repo=Test - elif [ ${{github.ref_name}} == 'main' ]; then - artifactory_repo=Release else echo "This branch is not configured for deployment." exit 0 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ca006dd77c..10b1b7ef3c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,9 +21,13 @@ on: - 'Source/**' - 'CMakeLists.txt' - 'HelperFunctions.cmake' + release: + types: [published] + workflow_dispatch: jobs: build-windows: + if: github.event_name != 'release' && github.event_name != 'workflow_dispatch' runs-on: ${{ matrix.os }} strategy: @@ -56,8 +60,6 @@ jobs: elif [ ${{github.ref_name}} == 'testing' ]; then version_suffix=-beta artifactory_repo=Test - elif [ ${{github.ref_name}} == 'main' ]; then - artifactory_repo=Release else echo "This branch is not configured for deployment." exit 0 @@ -74,8 +76,6 @@ jobs: user_info="X-JFrog-Art-Api:$ARTIFACTORY_ACCESS_TOKEN" curl -H $user_info -T $zipfile "https://openephys.jfrog.io/artifactory/GUI-binaries/${artifactory_repo}/windows/$zipfile" - cp ../Resources/DLLs/FrontPanelUSB-DriverOnly-4.5.5.exe open-ephys - cp ../Resources/DLLs/FTD3XXDriver_WHQLCertified_1.3.0.10_Installer.exe open-ephys cd open-ephys rm -f msvcp140.dll vcruntime140.dll vcruntime140_1.dll cd ../../Resources/Installers/Windows @@ -84,3 +84,108 @@ jobs: mv Open-Ephys_Installer.exe $installer curl -H $user_info -T $installer "https://openephys.jfrog.io/artifactory/GUI-binaries/${artifactory_repo}-Installer/windows/$installer" shell: bash + + # Signed release build. Runs only when a GitHub release is published or when triggered manually, + # and uses the code-signing environment, which holds the Azure Key Vault configuration + release-windows: + if: (github.event_name == 'release' && !github.event.release.prerelease) || github.event_name == 'workflow_dispatch' + + runs-on: windows-2022 + environment: code-signing + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: check release ref + env: + RELEASE_BRANCH: ${{ vars.RELEASE_BRANCH || 'main' }} + REF_NAME: ${{ github.ref_name }} + REF_TYPE: ${{ github.ref_type }} + run: | + # Release builds must come from a commit that is already on the release branch + git fetch --no-tags origin "$RELEASE_BRANCH" + if ! git merge-base --is-ancestor HEAD FETCH_HEAD; then + echo "::error::$REF_NAME is not part of $RELEASE_BRANCH. Release builds must come from $RELEASE_BRANCH" + exit 1 + fi + + # Release tags must match the version in CMakeLists.txt + gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?") + if [ "$REF_TYPE" == 'tag' ] && [ "$REF_NAME" != "$gui_ver" ]; then + echo "::error::Tag $REF_NAME does not match GUI_VERSION in CMakeLists.txt ($gui_ver)" + exit 1 + fi + shell: bash + - name: configure + run: | + cd Build + cmake -G "Visual Studio 17 2022" -A x64 .. + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v3 + - name: build + run: | + msbuild Build/ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m + - name: Azure login + uses: azure/login@v3 + with: + client-id: ${{ vars.AZURE_CLIENT_ID }} + tenant-id: ${{ vars.AZURE_TENANT_ID }} + subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} + - name: Install AzureSignTool + run: | + dotnet tool install --global AzureSignTool --version 7.0.1 + "$env:USERPROFILE\.dotnet\tools" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 + shell: pwsh + - name: sign binaries + env: + AZURE_KEY_VAULT_URL: ${{ vars.AZURE_KEY_VAULT_URL }} + AZURE_KEY_VAULT_CERTIFICATE: ${{ vars.AZURE_KEY_VAULT_CERTIFICATE }} + run: | + # Sign every executable and library in the build output. Files already signed by their vendor are skipped + Get-ChildItem -Path Build/Release -Recurse -Include *.exe,*.dll | ForEach-Object { $_.FullName } | Set-Content files_to_sign.txt + Get-Content files_to_sign.txt + AzureSignTool sign -kvu $env:AZURE_KEY_VAULT_URL -kvc $env:AZURE_KEY_VAULT_CERTIFICATE -kvm ` + -fd sha256 -tr http://timestamp.digicert.com -td sha256 ` + -d "Open Ephys GUI" -du https://open-ephys.org -s -v -ifl files_to_sign.txt + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + Remove-Item files_to_sign.txt + $invalid = Get-ChildItem -Path Build/Release -Recurse -Include *.exe,*.dll | Get-AuthenticodeSignature | Where-Object { $_.Status -ne 'Valid' } + if ($invalid) { $invalid | Format-Table -AutoSize; Write-Error "Some binaries are not properly signed"; exit 1 } + shell: pwsh + - name: deploy + env: + ARTIFACTORY_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + AZURE_KEY_VAULT_URL: ${{ vars.AZURE_KEY_VAULT_URL }} + AZURE_KEY_VAULT_CERTIFICATE: ${{ vars.AZURE_KEY_VAULT_CERTIFICATE }} + run: | + gui_ver=v$(grep -w CMakeLists.txt -e 'GUI_VERSION' | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z\.-]+))?") + artifactory_repo=Release + + cd Build + cp -r Release open-ephys + cp ../LICENSE open-ephys + cp C:/Windows/System32/msvcp140.dll open-ephys + cp C:/Windows/System32/vcruntime140.dll open-ephys + cp C:/Windows/System32/vcruntime140_1.dll open-ephys + zipfile=open-ephys-${gui_ver}-windows.zip + powershell Compress-Archive -Path "open-ephys" -DestinationPath "$zipfile" + user_info="X-JFrog-Art-Api:$ARTIFACTORY_ACCESS_TOKEN" + curl -H "$user_info" -T "$zipfile" "https://openephys.jfrog.io/artifactory/GUI-binaries/${artifactory_repo}/windows/$zipfile" + + cd open-ephys + rm -f msvcp140.dll vcruntime140.dll vcruntime140_1.dll + cd ../../Resources/Installers/Windows + # Inno Setup signs both the installer and the embedded uninstaller through the azsign tool + # $q and $f are Inno Setup placeholders (quote and file to sign), not shell variables + # shellcheck disable=SC2016 + sign_cmd='AzureSignTool sign -kvu '"$AZURE_KEY_VAULT_URL"' -kvc '"$AZURE_KEY_VAULT_CERTIFICATE"' -kvm -fd sha256 -tr http://timestamp.digicert.com -td sha256 -d $qOpen Ephys GUI$q -du https://open-ephys.org $f' + MSYS_NO_PATHCONV=1 iscc /DSIGN "/Sazsign=$sign_cmd" "windows_installer_script.iss" + installer=Install-Open-Ephys-GUI-${gui_ver}.exe + mv Open-Ephys_Installer.exe "$installer" + powershell -Command "if ((Get-AuthenticodeSignature '$installer').Status -ne 'Valid') { Write-Error 'Installer signature is not valid'; exit 1 }" + curl -H "$user_info" -T "$installer" "https://openephys.jfrog.io/artifactory/GUI-binaries/${artifactory_repo}-Installer/windows/$installer" + shell: bash diff --git a/Resources/DLLs/FTD3XXDriver_WHQLCertified_1.3.0.10_Installer.exe b/Resources/DLLs/FTD3XXDriver_WHQLCertified_1.3.0.10_Installer.exe deleted file mode 100644 index 149a0790c5..0000000000 Binary files a/Resources/DLLs/FTD3XXDriver_WHQLCertified_1.3.0.10_Installer.exe and /dev/null differ diff --git a/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.Inf b/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.Inf new file mode 100644 index 0000000000..4867710a7d --- /dev/null +++ b/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.Inf @@ -0,0 +1,296 @@ +; FTDIBUS3.INF +; +; Copyright © 2000-2015 Future Technology Devices International Limited +; +; USB serial converter driver installation file for +; Windows 7, Windows 8, Windows 8.1 and Windows 10. +; +; +; IMPORTANT NOTICE: PLEASE READ CAREFULLY BEFORE INSTALLING THE RELEVANT +; SOFTWARE: This licence agreement (Licence) is a legal agreement between you (Licensee or +; you) and Future Technology Devices International Limited of 2 Seaward Place, Centurion Business +; Park, Glasgow G41 1HH, Scotland (UK Company Number SC136640) (Licensor or we) for use of +; driver software provided by the Licensor(Software). +; +; BY INSTALLING OR USING THIS SOFTWARE YOU AGREE TO THE TERMS OF THIS LICENCE +; WHICH WILL BIND YOU. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENCE, WE ARE +; UNWILLING TO LICENSE THE SOFTWARE TO YOU AND YOU MUST DISCONTINUE +; INSTALLATION OF THE SOFTWARE NOW. +; +; 1. GRANT AND SCOPE OF LICENCE +; +; 1.1 In consideration of you agreeing to abide by the terms of this Licence, the Licensor hereby +; grants to you a non-exclusive, non-transferable, royalty free licence to use the Software on +; the terms of this Licence. +; +; 1.2 In this Licence a "Genuine FTDI Component" means an item of hardware that was +; manufactured for, and sold by, the Licensor or a member of the Licensor's group of +; companies. It does not include any counterfeit or fake products. +; +; 1.3 If you are a manufacturer of a device that includes a Genuine FTDI Component (each a +; "Device") then you may install the Software onto that device. If you are a seller or distributor +; of a Device then you may distribute the Software with the Device. If you are a user of a +; Device then you may install the Software on the Device, or onto a computer system in order +; to use the Device. +; +; 1.4 In each of those cases you may: +; +; 1.4.1 install and use the Software for your purposes only; and +; +; 1.4.2 only use the Software in conjunction with products based on and/or incorporating a +; Genuine FTDI Component. +; +; 1.5 The Software will not function properly on or with a component that is not a Genuine FTDI +; Component. Use of the Software as a driver for, or installation of the Software onto, a +; component that is not a Genuine FTDI Component, including without limitation counterfeit +; components, MAY IRRETRIEVABLY DAMAGE THAT COMPONENT. It is the Licensee's +; responsibility to make sure that all chips it installs the Software on, or uses the Software as a +; driver for, are Genuine FTDI Components. If in doubt then contact the Licensor. +; +; 2. If a custom vendor ID and/or product ID or description string are used, it is the responsibility of +; the product manufacturer to maintain any changes and subsequent WHQL re-certification as +; a result of making these changes. +; +; 3. LICENSEE'S UNDERTAKINGS +; +; 3.1 Except as expressly set out in this Licence or as permitted by any local law, you undertake: +; +; 3.1.1 not to copy the Software, except where such copying is incidental to normal use of +; the Software or where it is necessary for the purpose of back-up or operational +; security; +; +; 3.1.2 not to rent, lease, sub-license, loan, translate, merge, adapt, vary or modify the +; Software or any part of it; +; +; 3.1.3 not to make alterations to, or modifications of, the whole or any part of the Software +; nor permit the Software or any part of it to be combined with, or become +; incorporated in, any other programs; +; +; 3.1.4 not to disassemble, de-compile, reverse engineer or create derivative works based +; on the whole or any part of the Software; +; +; 3.1.5 to keep all copies of the Software secure; +; +; 3.1.6 to include the copyright notice of the Licensor on all entire and partial copies of the +; Software in any form; and +; +; 3.1.7 not to provide, or otherwise make available, the Software in any form, in whole or in +; part (including, but not limited to, program listings, object and source program +; listings, object code and source code) to any person. +; +; 4. INTELLECTUAL PROPERTY RIGHTS +; +; 4.1 You acknowledge that all intellectual property rights in the Software throughout the world +; belong to the Licensor, that rights in the Software are licensed (not sold) to you, and that you +; have no rights in, or to, the Software other than the right to use them in accordance with the +; terms of this Licence. +; +; 5. WARRANTY +; +; 5.1 To the maximum extent permitted by applicable law, the software is provided "as is". +; +; 5.2 All implied warranties, implied conditions and/or implied licences are excluded from this +; Licence, including but not limited to implied warranties of quality and/or fitness for purpose (in +; all cases) to the fullest extent permitted by law. +; +; 5.3 You acknowledge that the Software has not been developed to meet your individual +; requirements and that the Software may not be uninterrupted or free of bugs or errors. +; +; 6. LICENSOR'S LIABILITY +; +; 6.1 To the maximum extent permitted by applicable law, in no event shall the Licensor be liable +; for any: +; +; 6.1.1 special loss or damage; +; +; 6.1.2 incidental loss or damage; +; +; 6.1.3 indirect or consequential loss or damage: +; +; 6.1.4 loss of income; +; +; 6.1.5 loss of business; +; +; 6.1.6 loss of profits; +; +; 6.1.7 loss of revenue; +; +; 6.1.8 loss of contracts; +; +; 6.1.9 business interruption; +; +; 6.1.10 loss of the use of money or anticipated savings; +; +; 6.1.11 loss of information; +; +; 6.1.12 loss of opportunity; +; +; 6.1.13 loss of goodwill or reputation; and/or +; +; 6.1.14 loss of, damage to or corruption of data; +; +; (in each case) of any kind howsoever arising and whether caused by delict (including +; negligence), breach of contract or otherwise. +; +; 6.2 FTDI's total liability to you in relation to the Software shall not exceed 500 US Dollars. +; +; 6.3 Nothing in this Licence limits or excludes liability for death or personal injury or for fraud. +; +; 7. TERMINATION +; +; 7.1 The Licensor may terminate this Licence immediately if: +; +; 7.1.1 you fail to comply with any of the terms and conditions of the Licence; or +; +; 7.1.2 you commence or participate in any legal proceedings against the Licensor. +; +; 7.2 Upon termination: +; +; 7.2.1 all rights granted to you under this Licence shall cease; +; +; 7.2.2 you must cease all activities authorised by this Licence; and +; +; 7.2.3 you must immediately delete or remove the Software from all computer equipment +; in your possession and immediately destroy all copies of the Software then in your +; possession, custody or control. +; +; 8. TRANSFER OF RIGHTS AND OBLIGATIONS +; +; 8.1 You may not transfer, assign, charge or otherwise dispose of this Licence, or any of your +; rights or obligations arising under it. +; +; 8.2 The Licensor may transfer, assign, charge, sub-contract or otherwise dispose of this Licence, +; or any of his rights or obligations arising under it, at any time during the term of the Licence. +; +; 9. WAIVER +; +; 9.1 If the Licensor fails, at any time during the term of this Licence, to insist on strict performance +; of any of your obligations under this Licence, or if the Licensor fails to exercise any of the +; rights or remedies to which he is entitled under this Licence, this shall not constitute a waiver +; of such rights or remedies and shall not relieve you from compliance with such obligations. +; +; 9.2 A waiver by the Licensor of any default shall not constitute a waiver of any subsequent +; default. +; +; 9.3 No waiver by the Licensor of any of these terms and conditions shall be effective unless it is +; expressly stated to be a waiver and is communicated to you in writing. +; +; 10. SEVERABILITY +; +; If any of the terms of this Licence are determined by any competent authority to be invalid, +; unlawful or unenforceable to any extent, such term, condition or provision will to that extent be +; severed from the remaining terms, conditions and provisions which will continue to be valid to +; the fullest extent permitted by law. +; +; 11. ENTIRE AGREEMENT +; +; 11.1 This Licence constitutes the whole agreement between us and supersedes any previous +; arrangement, understanding or agreement between us, relating to the licensing of the +; Software. +; +; 11.2 Each party acknowledges that in entering into this Licence it does not rely on any statement, +; representation, warranty or understanding other than those expressly set out in this Licence. +; Each party agrees that it will have no remedy in respect of any statement, representation, +; warranty or understanding that is not expressly set out in this Licence. Each party agrees that +; its only remedy in respect of those representations, statements, assurances and warranties +; that are set out in this Licence will be for breach of contract in accordance with the terms of +; this Licence. +; +; 11.3 The parties agree that nothing in this Licence will limit or exclude any liability they may have +; for fraud. +; +; 12. MISCELLANEOUS +; +; 12.1 This Licence does not create a partnership or joint venture between the parties to it, nor +; authorise a party to act as agent for the other. +; +; 12.2 This Licence does not create any legal rights enforceable by any third party. +; +; 12.3 This Licence may only be varied by express written legal agreement between the parties. +; +; 13. LAW AND JURISDICTION +; +; This Licence, its subject matter or its formation (including non-contractual disputes or claims) +; shall be governed by and construed in accordance with Scots law and submitted to the non- +; exclusive jurisdiction of the Scottish courts. +; + + +[Version] +Signature="$Windows NT$" +Class=USB +ClassGuid={36fc9e60-c465-11cf-8056-444553540000} +Provider=%FTDI% +DriverVer = 03/27/2024,1.3.0.10 +CatalogFile=FTDIBUS3.cat +PnpLockdown=1 + +[Manufacturer] +%MfgName%=FTDI,NTamd64.10 + +[FTDI.NTamd64.10] +%USB\VID_0403&PID_601E&MI_00.DeviceDesc%=FTDIBUS3.Dev, USB\VID_0403&PID_601E&MI_00 ; FT600 +%USB\VID_0403&PID_601F&MI_00.DeviceDesc%=FTDIBUS3.Dev, USB\VID_0403&PID_601F&MI_00 ; FT601 +%USB\VID_0403&PID_FFFF.DeviceDesc%=FTDIBUS3.Dev, USB\VID_0403&PID_FFFF + +[FTDIBUS3.Dev.NT] +CopyFiles=FTDIBUS3.Files.Ext + +[FTDIBUS3.Dev.NT.Services] +Addservice = FTDIBUS3, 0x00000002, FTDIBUS3.AddService + +[FTDIBUS3.AddService] +DisplayName = %FTDIBUS3.SvcDesc% +ServiceType = 1 +StartType = 3 +ErrorControl = 1 +ServiceBinary = %10%\System32\Drivers\FTDIBUS3.sys +LoadOrderGroup = Base +AddReg = FTDIBUS3.AddService.AddReg + +[FTDIBUS3.AddService.AddReg] +HKR,Parameters,"MaximumTransferSize",0x10001,2097152 + +[FTDIBUS3.Files.Ext] +FTDIBUS3.sys + +[SourceDisksNames] +1=%Disk_Description%,,, + +[SourceDisksFiles] +FTDIBUS3.sys = 1 +; + + +[DestinationDirs] +DefaultDestDir = 12 +CoInstaller_CopyFiles = 11 + +[FTDIBUS3.Dev.NT.CoInstallers] +AddReg=CoInstaller_AddReg +CopyFiles=CoInstaller_CopyFiles + +[CoInstaller_CopyFiles] +; + + +[CoInstaller_AddReg] +; + + +[FTDIBUS3.Dev.NT.Wdf] +KmdfService = FTDIBUS3, FTDIBUS3_wdfsect + +[FTDIBUS3_wdfsect] +KmdfLibraryVersion = 1.15 + +[Strings] +FTDI = "FTDI" +MfgName = "FTDI" +Disk_Description = "FT60X Installation Disk" +FTDIBUS3.SvcDesc = "WDF Driver for FTDI USB 3.0 Devices" +ClassName = "USB" +USB\VID_0403&PID_601E&MI_00.DeviceDesc="FTDI FT600 USB 3.0 Bridge Device" +USB\VID_0403&PID_601F&MI_00.DeviceDesc="FTDI FT601 USB 3.0 Bridge Device" +USB\VID_0403&PID_FFFF.DeviceDesc="FTDI FT60X USB 3.0 Bridge Device" + diff --git a/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.Sys b/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.Sys new file mode 100644 index 0000000000..8ce76d17da Binary files /dev/null and b/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.Sys differ diff --git a/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.cat b/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.cat new file mode 100644 index 0000000000..f548f86677 Binary files /dev/null and b/Resources/DLLs/FTD3XX_1.3.0.10_Driver/ftdibus3.cat differ diff --git a/Resources/DLLs/FrontPanelUSB-DriverOnly-4.5.5.exe b/Resources/DLLs/FrontPanelUSB-DriverOnly-4.5.5.exe deleted file mode 100644 index 3bd1885905..0000000000 Binary files a/Resources/DLLs/FrontPanelUSB-DriverOnly-4.5.5.exe and /dev/null differ diff --git a/Resources/DLLs/FrontPanel_4.5.5_Driver/WdfCoInstaller01009.dll b/Resources/DLLs/FrontPanel_4.5.5_Driver/WdfCoInstaller01009.dll new file mode 100644 index 0000000000..1731b962d6 Binary files /dev/null and b/Resources/DLLs/FrontPanel_4.5.5_Driver/WdfCoInstaller01009.dll differ diff --git a/Resources/DLLs/FrontPanel_4.5.5_Driver/WinUSBCoInstaller2.dll b/Resources/DLLs/FrontPanel_4.5.5_Driver/WinUSBCoInstaller2.dll new file mode 100644 index 0000000000..30e55025b2 Binary files /dev/null and b/Resources/DLLs/FrontPanel_4.5.5_Driver/WinUSBCoInstaller2.dll differ diff --git a/Resources/DLLs/FrontPanel_4.5.5_Driver/okusb.cat b/Resources/DLLs/FrontPanel_4.5.5_Driver/okusb.cat new file mode 100644 index 0000000000..2069558579 Binary files /dev/null and b/Resources/DLLs/FrontPanel_4.5.5_Driver/okusb.cat differ diff --git a/Resources/DLLs/FrontPanel_4.5.5_Driver/okusb.inf b/Resources/DLLs/FrontPanel_4.5.5_Driver/okusb.inf new file mode 100644 index 0000000000..fa70f8e61c --- /dev/null +++ b/Resources/DLLs/FrontPanel_4.5.5_Driver/okusb.inf @@ -0,0 +1,228 @@ +; Installation INF for the Opal Kelly USB Driver for Windows 2000/XP/Vista/7 +; Devices covered by this INF: +; XEM3001v1 VID:151F PID:0020 +; XEM3001v2 VID:151F PID:0021 +; XEM3010 VID:151F PID:0022 +; XEM3005 VID:151F PID:0023 +; XEM3001CL VID:151F PID:0024 +; XEM3020 VID:151F PID:0025 +; XEM3050 VID:151F PID:0028 +; XEM9002 VID:151F PID:0029 +; XEM3001RB VID:151F PID:002A +; XEM5010 VID:151F PID:002B +; XEM6001 VID:151F PID:002C +; XEM6010-LX45 VID:151F PID:002D +; XEM6010-LX150 VID:151F PID:002E +; XEM6006-LX9 VID:151F PID:002F +; XEM6006-LX16 VID:151F PID:0030 +; XEM6006-LX25 VID:151F PID:0031 +; XEM5010-LX110 VID:151F PID:0032 +; XEM6002-LX9 VID:151F PID:0033 +; XEM7001-A15 VID:151F PID:0034 +; XEM7001-A35 VID:151F PID:0035 +; ZEM4310 VID:151F PID:0120 +; XEM6310-LX45 VID:151F PID:0121 +; XEM6310-LX150 VID:151F PID:0122 +; XEM6310MT-LX45T VID:151F PID:0123 +; XEM6320-LX130T VID:151F PID:0124 +; XEM7350-K70T VID:151F PID:0125 +; XEM7350-K160T VID:151F PID:0126 +; XEM7350-K410T VID:151F PID:0127 +; XEM6310MT-LX150T VID:151F PID:0128 +; ZEM5305-A2 VID:151F PID:0129 +; ZEM5305-A7 VID:151F PID:012A +; XEM7360-K160T VID:151F PID:012B +; XEM7360-K410T VID:151F PID:012C +; + +; ================ Version section ================= +[Version] +Signature = "$Windows NT$" +Class = okFrontPanelClass +ClassGuid = {C4CAF39F-201C-46d2-813B-9F6542CC7686} +Provider = %OPALKELLY% +CatalogFile = okusb.cat +DriverVer = 05/05/2012, 2.3.0.0 + +; ========== Manufacturer/Models sections =========== +[Manufacturer] +%ProviderName% = OpalKellyDevice,NTx86,NTamd64 + +[OpalKellyDevice.NTx86] +%VID_151F&PID_0020.DeviceDesc%=USB_Install, USB\VID_151F&PID_0020 +%VID_151F&PID_0021.DeviceDesc%=USB_Install, USB\VID_151F&PID_0021 +%VID_151F&PID_0022.DeviceDesc%=USB_Install, USB\VID_151F&PID_0022 +%VID_151F&PID_0023.DeviceDesc%=USB_Install, USB\VID_151F&PID_0023 +%VID_151F&PID_0024.DeviceDesc%=USB_Install, USB\VID_151F&PID_0024 +%VID_151F&PID_0025.DeviceDesc%=USB_Install, USB\VID_151F&PID_0025 +%VID_151F&PID_0028.DeviceDesc%=USB_Install, USB\VID_151F&PID_0028 +%VID_151F&PID_0029.DeviceDesc%=USB_Install, USB\VID_151F&PID_0029 +%VID_151F&PID_002A.DeviceDesc%=USB_Install, USB\VID_151F&PID_002A +%VID_151F&PID_002B.DeviceDesc%=USB_Install, USB\VID_151F&PID_002B +%VID_151F&PID_002C.DeviceDesc%=USB_Install, USB\VID_151F&PID_002C +%VID_151F&PID_002D.DeviceDesc%=USB_Install, USB\VID_151F&PID_002D +%VID_151F&PID_002E.DeviceDesc%=USB_Install, USB\VID_151F&PID_002E +%VID_151F&PID_002F.DeviceDesc%=USB_Install, USB\VID_151F&PID_002F +%VID_151F&PID_0030.DeviceDesc%=USB_Install, USB\VID_151F&PID_0030 +%VID_151F&PID_0031.DeviceDesc%=USB_Install, USB\VID_151F&PID_0031 +%VID_151F&PID_0032.DeviceDesc%=USB_Install, USB\VID_151F&PID_0032 +%VID_151F&PID_0033.DeviceDesc%=USB_Install, USB\VID_151F&PID_0033 +%VID_151F&PID_0034.DeviceDesc%=USB_Install, USB\VID_151F&PID_0034 +%VID_151F&PID_0035.DeviceDesc%=USB_Install, USB\VID_151F&PID_0035 +%VID_151F&PID_0120.DeviceDesc%=USB_Install, USB\VID_151F&PID_0120 +%VID_151F&PID_0121.DeviceDesc%=USB_Install, USB\VID_151F&PID_0121 +%VID_151F&PID_0122.DeviceDesc%=USB_Install, USB\VID_151F&PID_0122 +%VID_151F&PID_0123.DeviceDesc%=USB_Install, USB\VID_151F&PID_0123 +%VID_151F&PID_0124.DeviceDesc%=USB_Install, USB\VID_151F&PID_0124 +%VID_151F&PID_0125.DeviceDesc%=USB_Install, USB\VID_151F&PID_0125 +%VID_151F&PID_0126.DeviceDesc%=USB_Install, USB\VID_151F&PID_0126 +%VID_151F&PID_0127.DeviceDesc%=USB_Install, USB\VID_151F&PID_0127 +%VID_151F&PID_0128.DeviceDesc%=USB_Install, USB\VID_151F&PID_0128 +%VID_151F&PID_0129.DeviceDesc%=USB_Install, USB\VID_151F&PID_0129 +%VID_151F&PID_012A.DeviceDesc%=USB_Install, USB\VID_151F&PID_012A +%VID_151F&PID_012B.DeviceDesc%=USB_Install, USB\VID_151F&PID_012B +%VID_151F&PID_012C.DeviceDesc%=USB_Install, USB\VID_151F&PID_012C + +[OpalKellyDevice.NTamd64] +%VID_151F&PID_0020.DeviceDesc%=USB_Install, USB\VID_151F&PID_0020 +%VID_151F&PID_0021.DeviceDesc%=USB_Install, USB\VID_151F&PID_0021 +%VID_151F&PID_0022.DeviceDesc%=USB_Install, USB\VID_151F&PID_0022 +%VID_151F&PID_0023.DeviceDesc%=USB_Install, USB\VID_151F&PID_0023 +%VID_151F&PID_0024.DeviceDesc%=USB_Install, USB\VID_151F&PID_0024 +%VID_151F&PID_0025.DeviceDesc%=USB_Install, USB\VID_151F&PID_0025 +%VID_151F&PID_0028.DeviceDesc%=USB_Install, USB\VID_151F&PID_0028 +%VID_151F&PID_0029.DeviceDesc%=USB_Install, USB\VID_151F&PID_0029 +%VID_151F&PID_002A.DeviceDesc%=USB_Install, USB\VID_151F&PID_002A +%VID_151F&PID_002B.DeviceDesc%=USB_Install, USB\VID_151F&PID_002B +%VID_151F&PID_002C.DeviceDesc%=USB_Install, USB\VID_151F&PID_002C +%VID_151F&PID_002D.DeviceDesc%=USB_Install, USB\VID_151F&PID_002D +%VID_151F&PID_002E.DeviceDesc%=USB_Install, USB\VID_151F&PID_002E +%VID_151F&PID_002F.DeviceDesc%=USB_Install, USB\VID_151F&PID_002F +%VID_151F&PID_0030.DeviceDesc%=USB_Install, USB\VID_151F&PID_0030 +%VID_151F&PID_0031.DeviceDesc%=USB_Install, USB\VID_151F&PID_0031 +%VID_151F&PID_0032.DeviceDesc%=USB_Install, USB\VID_151F&PID_0032 +%VID_151F&PID_0033.DeviceDesc%=USB_Install, USB\VID_151F&PID_0033 +%VID_151F&PID_0034.DeviceDesc%=USB_Install, USB\VID_151F&PID_0034 +%VID_151F&PID_0035.DeviceDesc%=USB_Install, USB\VID_151F&PID_0035 +%VID_151F&PID_0120.DeviceDesc%=USB_Install, USB\VID_151F&PID_0120 +%VID_151F&PID_0121.DeviceDesc%=USB_Install, USB\VID_151F&PID_0121 +%VID_151F&PID_0122.DeviceDesc%=USB_Install, USB\VID_151F&PID_0122 +%VID_151F&PID_0123.DeviceDesc%=USB_Install, USB\VID_151F&PID_0123 +%VID_151F&PID_0124.DeviceDesc%=USB_Install, USB\VID_151F&PID_0124 +%VID_151F&PID_0125.DeviceDesc%=USB_Install, USB\VID_151F&PID_0125 +%VID_151F&PID_0126.DeviceDesc%=USB_Install, USB\VID_151F&PID_0126 +%VID_151F&PID_0127.DeviceDesc%=USB_Install, USB\VID_151F&PID_0127 +%VID_151F&PID_0128.DeviceDesc%=USB_Install, USB\VID_151F&PID_0128 +%VID_151F&PID_0129.DeviceDesc%=USB_Install, USB\VID_151F&PID_0129 +%VID_151F&PID_012A.DeviceDesc%=USB_Install, USB\VID_151F&PID_012A +%VID_151F&PID_012B.DeviceDesc%=USB_Install, USB\VID_151F&PID_012B +%VID_151F&PID_012C.DeviceDesc%=USB_Install, USB\VID_151F&PID_012C + + + +; ================== Installation ================== +[ClassInstall] +AddReg=ClassAddReg + +[ClassInstall32] +AddReg=ClassAddReg + +[ClassAddReg] +HKR,,,,"%ClassName%" +HKR,,Icon,,-28 + +[USB_Install] +Include = WinUSB.inf +Needs = WinUSB.NT + +[USB_Install.Services] +Include = WinUSB.inf +AddService = WinUSB, 0x00000002, WinUSB_ServiceInstall + +[WinUSB_ServiceInstall] +DisplayName = %WinUSB_SvcDesc% +ServiceType = 1 +StartType = 3 +ErrorControl = 1 +ServiceBinary = %12%\WinUSB.sys + +[USB_Install.Wdf] +KmdfService = WinUSB, WinUSB_Install + +[WinUSB_Install] +KmdfLibraryVersion = 1.9 + +[USB_Install.HW] +AddReg = Dev_AddReg + +[Dev_AddReg] +HKR,,DeviceInterfaceGUIDs,0x00010000,"{7A1A3EB2-9C2C-47be-BE55-FF3332A722FD}" + +[USB_Install.CoInstallers] +AddReg = CoInstallers_AddReg +CopyFiles = CoInstallers_CopyFiles + +[CoInstallers_AddReg] +HKR, , CoInstallers32, 0x00010000, "WinUSBCoInstaller2.dll","WdfCoInstaller01009.dll, WdfCoInstaller" + +[CoInstallers_CopyFiles] +WinUSBCoInstaller2.dll +WdfCoInstaller01009.dll + +[DestinationDirs] +CoInstallers_CopyFiles = 11 + +[SourceDisksNames.x86] +1 = %MediaDescription%,,, +[SourceDisksNames.amd64] +1 = %MediaDescription%,,, + +[SourceDisksFiles.x86] +WinUSBCoInstaller2.dll = 1 +WdfCoInstaller01009.dll = 1 + +[SourceDisksFiles.amd64] +WinUSBCoInstaller2.dll = 1 +WdfCoInstaller01009.dll = 1 + + +; ==================== Strings ===================== +[Strings] +OPALKELLY="Opal Kelly" +ClassName="FrontPanel devices" +ProviderName="Opal Kelly" +MediaDescription="Opal Kelly Installation Disc" +WinUSB_SvcDesc="Opal Kelly USB FrontPanel Driver" +VID_151F&PID_0020.DeviceDesc="Opal Kelly XEM3001v1" +VID_151F&PID_0021.DeviceDesc="Opal Kelly XEM3001v2" +VID_151F&PID_0022.DeviceDesc="Opal Kelly XEM3010" +VID_151F&PID_0023.DeviceDesc="Opal Kelly XEM3005" +VID_151F&PID_0024.DeviceDesc="Opal Kelly XEM3001CL" +VID_151F&PID_0025.DeviceDesc="Opal Kelly XEM3020" +VID_151F&PID_0028.DeviceDesc="Opal Kelly XEM3050" +VID_151F&PID_0029.DeviceDesc="Opal Kelly XEM9002" +VID_151F&PID_002A.DeviceDesc="Opal Kelly XEM3001RB" +VID_151F&PID_002B.DeviceDesc="Opal Kelly XEM5010" +VID_151F&PID_002C.DeviceDesc="Opal Kelly XEM6001" +VID_151F&PID_002D.DeviceDesc="Opal Kelly XEM6010-LX45" +VID_151F&PID_002E.DeviceDesc="Opal Kelly XEM6010-LX150" +VID_151F&PID_002F.DeviceDesc="Opal Kelly XEM6006-LX9" +VID_151F&PID_0030.DeviceDesc="Opal Kelly XEM6006-LX16" +VID_151F&PID_0031.DeviceDesc="Opal Kelly XEM6006-LX25" +VID_151F&PID_0032.DeviceDesc="Opal Kelly XEM5010-LX110" +VID_151F&PID_0033.DeviceDesc="Opal Kelly XEM6002-LX9" +VID_151F&PID_0034.DeviceDesc="Opal Kelly XEM7001-A15" +VID_151F&PID_0035.DeviceDesc="Opal Kelly XEM7001-A35" +VID_151F&PID_0120.DeviceDesc="Opal Kelly ZEM4310" +VID_151F&PID_0121.DeviceDesc="Opal Kelly XEM6310-LX45" +VID_151F&PID_0122.DeviceDesc="Opal Kelly XEM6310-LX150" +VID_151F&PID_0123.DeviceDesc="Opal Kelly XEM6310MT-LX45T" +VID_151F&PID_0124.DeviceDesc="Opal Kelly XEM6320-LX130T" +VID_151F&PID_0125.DeviceDesc="Opal Kelly XEM7350-K70T" +VID_151F&PID_0126.DeviceDesc="Opal Kelly XEM7350-K160T" +VID_151F&PID_0127.DeviceDesc="Opal Kelly XEM7350-K410T" +VID_151F&PID_0128.DeviceDesc="Opal Kelly XEM6310MT-LX150T" +VID_151F&PID_0129.DeviceDesc="Opal Kelly ZEM5305-A2" +VID_151F&PID_012A.DeviceDesc="Opal Kelly ZEM5305-A7" +VID_151F&PID_012B.DeviceDesc="Opal Kelly XEM7360-K160T" +VID_151F&PID_012C.DeviceDesc="Opal Kelly XEM7360-K410T" diff --git a/Resources/Installers/Windows/windows_installer_script.iss b/Resources/Installers/Windows/windows_installer_script.iss index 32e401ca68..c570f805d8 100644 --- a/Resources/Installers/Windows/windows_installer_script.iss +++ b/Resources/Installers/Windows/windows_installer_script.iss @@ -22,6 +22,10 @@ AllowNoIcons=yes WizardStyle=modern dynamic ArchiveExtraction=enhanced/nopassword SetupLogging=yes +#ifdef SIGN +SignTool=azsign +SignedUninstaller=yes +#endif [Tasks] Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" @@ -32,19 +36,19 @@ Name: install_ok_usb; Description: "Install Opal Kelly Front Panel USB driver (O [Files] Source: "..\..\..\Build\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; BeforeInstall: UpdateProgress(0); -Source: "..\..\DLLs\FTD3XXDriver_WHQLCertified_1.3.0.10_Installer.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Tasks: install_ftdi\13010; BeforeInstall: UpdateProgress(80); +Source: "..\..\DLLs\FTD3XX_1.3.0.10_Driver\*"; DestDir: "{tmp}\FTD3XX_1.3.0.10_Driver"; Flags: deleteafterinstall; Tasks: install_ftdi\13010; BeforeInstall: UpdateProgress(80); Source: "..\..\DLLs\WU_FTD3XX_Driver\FTD3XXWU.Inf"; DestDir: "{tmp}"; Flags: deleteafterinstall; Tasks: install_ftdi\14001; BeforeInstall: UpdateProgress(50); Source: "..\..\DLLs\WU_FTD3XX_Driver\FTD3XXWU.cat"; DestDir: "{tmp}"; Flags: deleteafterinstall; Tasks: install_ftdi\14001; -Source: "..\..\DLLs\FrontPanelUSB-DriverOnly-4.5.5.exe"; DestDir: {tmp}; Flags: deleteafterinstall; BeforeInstall: UpdateProgress(90); +Source: "..\..\DLLs\FrontPanel_4.5.5_Driver\*"; DestDir: "{tmp}\FrontPanel_4.5.5_Driver"; Flags: deleteafterinstall; Tasks: install_ok_usb; BeforeInstall: UpdateProgress(90); [Icons] Name: "{autodesktop}\Open Ephys GUI"; Filename: "{app}\open-ephys.exe"; Tasks: desktopicon Name: "{autoprograms}\Open Ephys GUI"; Filename: "{app}\open-ephys.exe" [Run] -Filename: "{tmp}\FTD3XXDriver_WHQLCertified_1.3.0.10_Installer.exe"; StatusMsg: "Installing FTDI D3XX driver v1.3.0.10..."; Tasks: install_ftdi\13010; Flags: skipifsilent +Filename: "{sys}\pnputil.exe"; Parameters: "/add-driver ""{tmp}\FTD3XX_1.3.0.10_Driver\ftdibus3.Inf"" /install"; StatusMsg: "Installing FTDI D3XX driver v1.3.0.10..."; Tasks: install_ftdi\13010; Flags: runascurrentuser skipifsilent Filename: "{sys}\pnputil.exe"; Parameters: "/add-driver ""{tmp}\FTD3XXWU.Inf"" /install"; StatusMsg: "Installing FTDI D3XX driver v1.4.0.1..."; Tasks: install_ftdi\14001; Flags: runascurrentuser skipifsilent -Filename: "{tmp}\FrontPanelUSB-DriverOnly-4.5.5.exe"; StatusMsg: "Installing Front Panel USB driver..."; Tasks: install_ok_usb; Flags: skipifsilent +Filename: "{sys}\pnputil.exe"; Parameters: "/add-driver ""{tmp}\FrontPanel_4.5.5_Driver\okusb.inf"" /install"; StatusMsg: "Installing Front Panel USB driver..."; Tasks: install_ok_usb; Flags: runascurrentuser skipifsilent Filename: "{app}\open-ephys.exe"; Description: "Launch Open Ephys GUI"; Flags: postinstall nowait skipifsilent [InstallDelete]