diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..eaf32b5d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,118 @@ +name: build + +on: + push: + branches: [ "**" ] # All branches, including forks + pull_request: + branches: [ "**" ] # All pull requests + +permissions: + contents: read + +jobs: + # Build Windows binaries + build-windows: + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - arch: x86 + platform: Win32 + runner: windows-latest + - arch: x64 + platform: x64 + runner: windows-latest + # Uncomment when ARM64 runners are available + # - arch: arm64 + # platform: ARM64 + # runner: windows-11-arm + + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Restore NuGet packages + run: nuget restore ./Builds/MsVc2022.win/OdbcFb.sln + + - name: Build ${{ matrix.arch }} + run: | + msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} ./Builds/MsVc2022.win/OdbcFb.sln + + # - name: Run tests (${{ matrix.arch }}) + # run: | + # echo "Tests would run here for ${{ matrix.arch }}" + + - name: Upload ${{ matrix.arch }} binaries + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-win-${{ matrix.arch }}-build + path: | + Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.dll + Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.lib + Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.pdb + if-no-files-found: error + + # Build Linux binaries + build-linux: + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-22.04-arm + steps: + - uses: actions/checkout@v4 + + - name: Build Linux ${{ matrix.arch }} + run: | + # Install dependencies (unixodbc) + sudo apt-get update -y + sudo apt-get install -y unixodbc unixodbc-dev build-essential + + # Build ODBC driver + cd Builds/Gcc.lin + cp makefile.linux makefile + make + + # - name: Run tests (${{ matrix.arch }}) + # run: | + # echo "Tests would run here for ${{ matrix.arch }}" + + - name: Upload Linux ${{ matrix.arch }} build artifacts + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-linux-${{ matrix.arch }}-build + path: Builds/Gcc.lin/Release_*/libOdbcFb.so + if-no-files-found: error + + # Summary job to provide clear CI status + build-summary: + needs: [build-windows, build-linux] + runs-on: ubuntu-latest + if: always() + steps: + - name: Build Summary + run: | + echo "## Build Results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + if [[ "${{ needs.build-windows.result }}" == "success" ]]; then + echo "✅ Windows builds: **PASSED**" >> $GITHUB_STEP_SUMMARY + else + echo "❌ Windows builds: **FAILED**" >> $GITHUB_STEP_SUMMARY + fi + + if [[ "${{ needs.build-linux.result }}" == "success" ]]; then + echo "✅ Linux builds: **PASSED**" >> $GITHUB_STEP_SUMMARY + else + echo "❌ Linux builds: **FAILED**" >> $GITHUB_STEP_SUMMARY + fi + + echo "" >> $GITHUB_STEP_SUMMARY + echo "Build completed for commit: \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index e0620523..00000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Linux - -on: - push: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install UnixODBC package - run: sudo apt-get install -y unixodbc unixodbc-dev - - - name: Go to build folder & make - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - cd Builds/Gcc.lin - cp makefile.linux makefile - make - - - uses: actions/upload-artifact@v4 - with: - name: linux_libs - path: | - ./Builds/Gcc.lin/Release_* - !./Builds/Gcc.lin/Release_*/obj diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml deleted file mode 100644 index b1b57e51..00000000 --- a/.github/workflows/msbuild.yml +++ /dev/null @@ -1,110 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: MSBuild - -on: - push: - branches: [ "master" ] - -env: - # Path to the solution file relative to the root of the project. - SOLUTION_FILE_PATH: ./Builds/MsVc2022.win/OdbcFb.sln - - # Configuration type to build. - # You can convert this to a build matrix if you need coverage of multiple configuration types. - # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - BUILD_CONFIGURATION: Release - - INNO_SETUP_PATH: 'C:\Program Files (x86)\Inno Setup 6' - -permissions: - contents: read - -jobs: - build: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Install html-help-workshop, sed, innosetup - run: | - choco install html-help-workshop - choco install sed - choco install innosetup - - - name: Restore NuGet packages - working-directory: ${{env.GITHUB_WORKSPACE}} - run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - - name: Stub - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - #cd "C:\Program Files (x86)\" - #dir - env - - - name: Build win32 - working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=Win32 ${{env.SOLUTION_FILE_PATH}} - - - name: Build x64 - working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}} - - - name: Build InnoSetup installers - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - cd Install\Win32 - dir - ./MakePackage.bat - ./MakePackage.bat WIN32 - - - name: VirusTotal Scan - uses: crazy-max/ghaction-virustotal@v4 - id: virustotal_scan - with: - #vt_api_key: ${{ secrets.VT_API_KEY }} - vt_api_key: effc35cbb3eb35975d5cf74eee8b75a1a1b12b6af0d66ed2a65cba48becaecc0 - files: | - ./Install/Win32/install_image/*_Win32.exe - ./Install/Win32/install_image/*_x64.exe - - - name: Upload artefacts - run: | - echo "${{ steps.virustotal_scan.outputs.analysis }}" > ./Install/Win32/install_image/VirusTotalScan.txt - - - uses: actions/upload-artifact@v4 - id: upload_step1 - with: - name: VirusTotalScan - path: ./Install/Win32/install_image/VirusTotalScan.txt - - - uses: actions/upload-artifact@v4 - id: upload_step2 - with: - name: Win32Installer - path: ./Install/Win32/install_image/*_Win32.exe - - - uses: actions/upload-artifact@v4 - id: upload_step3 - with: - name: x64Installer - path: ./Install/Win32/install_image/*_x64.exe - - - name: Upload results - run: | - echo 'VirusTotalScan: Artifact ID is ${{ steps.upload_step1.outputs.artifact-id }}, URL is ${{ steps.upload_step1.outputs.artifact-url }}' - echo 'Win32Installer: Artifact ID is ${{ steps.upload_step2.outputs.artifact-id }}, URL is ${{ steps.upload_step2.outputs.artifact-url }}' - echo 'x64Installer: Artifact ID is ${{ steps.upload_step3.outputs.artifact-id }}, URL is ${{ steps.upload_step3.outputs.artifact-url }}' - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..1cf232cc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,275 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: read + +jobs: + # Stage 1: Build Windows binaries + build-windows: + if: ${{ github.repository == 'FirebirdSQL/firebird-odbc-driver' }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - arch: x86 + platform: Win32 + runner: windows-latest + - arch: x64 + platform: x64 + runner: windows-latest + # Uncomment when ARM64 runners are available + # - arch: arm64 + # platform: ARM64 + # runner: windows-11-arm + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Restore NuGet packages + run: nuget restore ./Builds/MsVc2022.win/OdbcFb.sln + + - name: Build ${{ matrix.arch }} + run: | + msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} ./Builds/MsVc2022.win/OdbcFb.sln + + # - name: Run tests (${{ matrix.arch }}) + # run: | + # echo "Tests would run here for ${{ matrix.arch }}" + + - name: Upload ${{ matrix.arch }} binaries + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-win-${{ matrix.arch }}-release + path: | + Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.dll + Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.lib + Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.pdb + if-no-files-found: error + + # Stage 2: Package Windows binaries into zip files + package-windows: + needs: build-windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + arch: [x86, x64] # Add arm64 when ready + steps: + - uses: actions/checkout@v4 + + - name: Download ${{ matrix.arch }} binaries + uses: actions/download-artifact@v4 + with: + name: firebird-odbc-win-${{ matrix.arch }}-binaries + path: binaries/ + + - name: Create ${{ matrix.arch }} .zip packages + run: | + # Create folders + New-Item -ItemType Directory -Force -Path "package" + New-Item -ItemType Directory -Force -Path "package-debug" + + # Copy binaries + Copy-Item "binaries/*" "package/" -Recurse -Exclude "*.pdb" + Copy-Item "binaries/*" "package-debug/" -Recurse + + # Copy documentation + Copy-Item "Install/Win32/Readme.txt" "package/" + Copy-Item "Install/IDPLicense.txt" "package/" + Copy-Item "Install/Win32/Readme.txt" "package-debug/" + Copy-Item "Install/IDPLicense.txt" "package-debug/" + + # Create zip files + Compress-Archive -Path "package/*" -DestinationPath "firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}.zip" + Compress-Archive -Path "package-debug/*" -DestinationPath "firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}-with-debug-symbols.zip" + + - name: Upload ${{ matrix.arch }} main .zip package + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-windows-${{ matrix.arch }} + path: firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}.zip + + - name: Upload ${{ matrix.arch }} debug .zip package + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-windows-${{ matrix.arch }}-debug + path: firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}-with-debug-symbols.zip + + # Stage 3: Create Windows installers + installer-windows: + needs: build-windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + - arch: x86 + platform: Win32 + - arch: x64 + platform: x64 + needs_x86: true + steps: + - uses: actions/checkout@v4 + + - name: Install tools + run: | + choco install --no-progress --yes html-help-workshop + choco install --no-progress --yes innosetup + + - name: Download ${{ matrix.arch }} binaries + uses: actions/download-artifact@v4 + with: + name: firebird-odbc-win-${{ matrix.arch }}-binaries + path: Builds/MsVc2022.win/${{ matrix.platform }}/Release/ + + - name: Download x86 binaries (for x64 dual-arch installer) + if: matrix.needs_x86 + uses: actions/download-artifact@v4 + with: + name: firebird-odbc-win-x86-binaries + path: Builds/MsVc2022.win/Win32/Release/ + + - name: Debug - List downloaded files + run: | + echo "=== Downloaded ${{ matrix.arch }} binaries ===" + Get-ChildItem -Recurse Builds/MsVc2022.win/${{ matrix.platform }}/Release/ | Format-Table Name, FullName + if ("${{ matrix.needs_x86 }}" -eq "true") { + echo "=== Downloaded x86 binaries ===" + Get-ChildItem -Recurse Builds/MsVc2022.win/Win32/Release/ | Format-Table Name, FullName + } + + - name: Compile HTML Help (${{ matrix.arch }}) + run: | + cd Install/Win32 + $hhcPath = "C:/Program Files (x86)/HTML Help Workshop/hhc.exe" + Write-Host "Compiling help file '../HtmlHelp/OdbcJdbc.hhp' using $hhcPath..." + + # HTML Help Compiler returns exit code 1 even on success, so we need to handle this. + + # Run the HTML Help Compiler and capture the result + $result = & $hhcPath "../HtmlHelp/OdbcJdbc.hhp" 2>&1 + $hhcExitCode = $LASTEXITCODE + + Write-Host "HTML Help Compiler output:" + Write-Host $result + Write-Host "HTML Help Compiler exit code: $hhcExitCode" + + # Check if the compilation was successful by verifying the output file exists + $chmFile = "../HtmlHelp/FirebirdODBC.chm" + if (Test-Path $chmFile) { + Write-Host "✅ HTML Help compilation successful. Created: $chmFile" + exit 0 + } else { + Write-Host "❌ HTML Help compilation failed. File not found: $chmFile" + exit 1 + } + shell: pwsh + + - name: Compile Inno Setup Script (${{ matrix.arch }}) + run: | + cd Install/Win32 + + $finalInstallerBaseName = "firebird-odbc-windows-${{ matrix.arch }}-installer-${{ github.ref_name }}" + + $appVersion = "${{ github.ref_name }}" + $platformDefine = "${{ matrix.platform }}" + + Write-Host "Compiling Inno Setup script 'OdbcJdbcSetup.iss'..." + Write-Host "Output installer base name: $finalInstallerBaseName" + Write-Host "Platform: $platformDefine, Version: $appVersion" + + # Chocolatey puts "iscc.exe" in the PATH, so we can call it directly + & iscc.exe "OdbcJdbcSetup.iss" /F"$finalInstallerBaseName" ` + /DPlatformTarget="$platformDefine" ` + /DProductVersion="$appVersion" ` + /DHtmlHelp="1" + Write-Host "✅ Inno Setup compilation command executed." + shell: pwsh + + - name: Upload ${{ matrix.arch }} installer + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-windows-${{ matrix.arch }}-installer + path: Install/Win32/install_image/firebird-odbc-windows-${{ matrix.arch }}-installer-${{ github.ref_name }}.exe + if-no-files-found: error + + build-linux: + if: ${{ github.repository == 'FirebirdSQL/firebird-odbc-driver' }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-22.04-arm + steps: + - uses: actions/checkout@v4 + + - name: Build Linux ${{ matrix.arch }} + run: | + # Install dependencies (unixodbc) + sudo apt-get update -y + sudo apt-get install -y unixodbc unixodbc-dev build-essential + + # Build ODBC driver + cd Builds/Gcc.lin + cp makefile.linux makefile + make + + # Package with documentation + mkdir -p firebird-odbc-linux-${{ matrix.arch }} + cp Release_*/libOdbcFb.so firebird-odbc-linux-${{ matrix.arch }}/ + cp ../../Install/IDPLicense.txt firebird-odbc-linux-${{ matrix.arch }}/ + cp ../../README.md firebird-odbc-linux-${{ matrix.arch }}/ + tar -czf firebird-odbc-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz firebird-odbc-linux-${{ matrix.arch }}/ + + - name: Upload Linux ${{ matrix.arch }} Artifact + uses: actions/upload-artifact@v4 + with: + name: firebird-odbc-linux-${{ matrix.arch }} + path: Builds/Gcc.lin/firebird-odbc-linux-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz + + create-release: + needs: [ + package-windows, + installer-windows, + build-linux + ] + runs-on: ubuntu-latest + permissions: + contents: write # Needed to create releases + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + merge-multiple: true + + - name: List downloaded artifacts + run: | + echo "=== Downloaded artifacts ===" + find . -type f -name "*.zip" -o -name "*.exe" -o -name "*.tar.gz" | sort + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: | + firebird-odbc-windows-x86-${{ github.ref_name }}.zip + firebird-odbc-windows-x64-${{ github.ref_name }}.zip + firebird-odbc-windows-x86-${{ github.ref_name }}-with-debug-symbols.zip + firebird-odbc-windows-x64-${{ github.ref_name }}-with-debug-symbols.zip + firebird-odbc-linux-x64-${{ github.ref_name }}.tar.gz + firebird-odbc-linux-arm64-${{ github.ref_name }}.tar.gz + firebird-odbc-windows-x86-installer-${{ github.ref_name }}.exe + firebird-odbc-windows-x64-installer-${{ github.ref_name }}.exe + draft: false + prerelease: false diff --git a/.github/workflows/rpi_arm64.yml b/.github/workflows/rpi_arm64.yml deleted file mode 100644 index 40dcb38c..00000000 --- a/.github/workflows/rpi_arm64.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: RaspberryPI - -on: - push: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: pguyot/arm-runner-action@v2 - with: - base_image: raspios_lite_arm64:latest - copy_repository_path: /opt/fb_odbc - copy_artifact_path: | - Builds/Gcc.lin/Release_* - commands: | - sudo apt-get install -y unixodbc unixodbc-dev - cd /opt/fb_odbc/Builds/Gcc.lin - cp makefile.linux makefile - make - - - uses: actions/upload-artifact@v4 - with: - name: linux_arm64_libs - path: | - Release_* - !Release_*/obj - diff --git a/Install/Win32/MakePackage.bat b/Install/Win32/MakePackage.bat deleted file mode 100644 index fe0c6611..00000000 --- a/Install/Win32/MakePackage.bat +++ /dev/null @@ -1,150 +0,0 @@ -:: Initial Developer's Public License. -:: The contents of this file are subject to the Initial Developer's Public -:: License Version 1.0 (the "License"). You may not use this file except -:: in compliance with the License. You may obtain a copy of the License at -:: http://www.ibphoenix.com?a=ibphoenix&page=ibp_idpl -:: Software distributed under the License is distributed on an "AS IS" basis, -:: WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -:: for the specific language governing rights and limitations under the -:: License. -:: -:: The Original Code is copyright 2004 Paul Reeves. -:: -:: The Initial Developer of the Original Code is Paul Reeves -:: -:: All Rights Reserved. -:: -::============================================================================= -:: -:: Take a build and package it. -:: -@echo off - - -::Check if on-line help is required -@for /F "usebackq tokens=1,2 delims==-/ " %%i in ('%*') do @( -@if /I "%%i"=="h" (goto :HELP & goto :EOF) -@if /I "%%i"=="?" (goto :HELP & goto :EOF) -@if /I "%%i"=="HELP" (goto :HELP & goto :EOF) -) - - -@goto :MAIN -@goto :EOF - - - -:SET_ENVIRONMENT -::Assume we are preparing a production build -if not defined BUILDCONFIG (set BUILDCONFIG=release) -set FB_TARGET_PLATFORM=x64 - -:: See what we have on the command line -for %%v in ( %* ) do ( - ( if /I "%%v"=="DEBUG" (set BUILDCONFIG=debug) ) - ( if /I "%%v"=="WIN32" (set FB_TARGET_PLATFORM=Win32) ) -) - -@cd ..\.. -@for /f "delims=" %%a in ('@cd') do (set ROOT_PATH=%%a) -@cd %~dp0 - -if not defined FB_TARGET_PLATFORM ( - @if "%PROCESSOR_ARCHITECTURE%"=="x86" (set FB_TARGET_PLATFORM=Win32) - @if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (set FB_TARGET_PLATFORM=x64) -) - -@goto :EOF - - -:SED_MAGIC -:: Do some sed magic to make sure that the final product -:: includes the version string in the filename. -:: If the Firebird Unix tools for Win32 aren't on -:: the path this will fail! Use of the cygwin tools has not -:: been tested and may produce unexpected results. -::======================================================== -sed /"#define BUILDNUM_VERSION"/!d %ROOT_PATH%\WriteBuildNo.h > %temp%.\b$1.bat -sed -n -e s/\"//g -e s/"#define BUILDNUM_VERSION"//w%temp%.\b$2.bat %temp%.\b$1.bat -for /f "tokens=*" %%a in ('type %temp%.\b$2.bat') do set PRODUCT_VER_STRING=3.0.0.%%a -@echo s/1.2.0/%PRODUCT_VER_STRING%/ > %temp%.\b$3.bat -::@echo s/define MSVC_VERSION 6/define MSVC_VERSION %MSVC_VERSION%/ >> %temp%.\b$3.bat -@echo s/#define BUILDCONFIG "release"/#define BUILDCONFIG "%BUILDCONFIG%"/ >> %temp%.\b$3.bat -@echo s/PRODUCT_VER_STRING/%PRODUCT_VER_STRING%/ >> %temp%.\b$3.bat -@set PRODUCT_VERSION=%PRODUCT_VER_STRING% -sed -f %temp%.\b$3.bat %~dp0\OdbcJdbcSetup.iss > %~dp0\OdbcJdbcSetup_%PRODUCT_VER_STRING%.iss -del %temp%.\b$?.bat -@goto :EOF - - -:BUILD_HELP -::========= -if exist "%ProgramFiles%\HTML Help Workshop\hhc.exe" ( -set HTMLHELP="%ProgramFiles%\HTML Help Workshop\hhc.exe" -) else ( - if exist "%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe" ( - set HTMLHELP="%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe" - ) else ( - echo HTML Help Workshop is not available - goto :EOF - ) -) -%HTMLHELP% %ROOT_PATH%\Install\HtmlHelp\OdbcJdbc.hhp -::echo ERRORLEVEL is %ERRORLEVEL% - -goto :EOF - - -:ISX -::======== -if NOT DEFINED INNO_SETUP_PATH set INNO_SETUP_PATH=C:\Program Files (x86)\Inno Setup 5 -@Echo Now let's compile the InnoSetup scripts -@Echo. -"%INNO_SETUP_PATH%"\iscc "%ROOT_PATH%\Install\Win32\OdbcJdbcSetup_%PRODUCT_VER_STRING%.iss" -goto :EOF - - -:HELP -::========== -@echo. -@echo. -@echo Parameters can be passed in any order. -@echo Parameters are NOT case-sensitive. -@echo Currently the recognised params are: -@echo. -@echo DEBUG Create a DEBUG build. -@echo. -@echo HELP This help screen -@echo This option excludes all others. -@echo. -goto :EOF - - -:MAKE_PACKAGE -::============ -@Echo. -@Echo Setting environment... -@(@call :SET_ENVIRONMENT %* )|| (@echo Error calling SET_ENVIRONMENT & @goto :EOF) -@Echo. -@Echo Setting version number... -@(@call :SED_MAGIC ) || (@echo Error calling SED_MAGIC & @goto :EOF) -@Echo. -@Echo Building help file... -::Note errorlevel seems to be set to 1, even if compiler completes successfully -::So testing for an error seems pointless. -@(@call :BUILD_HELP ) & (@if ERRORLEVEL 2 (@echo Error %ERRORLEVEL% calling BUILD_HELP & @goto :EOF)) -@Echo. -@Echo Building Installable Binary... -@(@call :ISX ) || (@echo Error calling Inno Setup Extensions & @goto :EOF) -@Echo. - -goto :EOF - - -:MAIN -::==== -call :MAKE_PACKAGE %* -goto :EOF - - -:EOF diff --git a/Install/Win32/OdbcJdbcSetup.iss b/Install/Win32/OdbcJdbcSetup.iss index 9c4e868a..159fe94c 100644 --- a/Install/Win32/OdbcJdbcSetup.iss +++ b/Install/Win32/OdbcJdbcSetup.iss @@ -23,7 +23,7 @@ ; ; OdbcJdbcSetup.iss ; -; Currently compiled against InnoSetup v5.3 from http://www.innosetup.com/ +; Currently compiled against InnoSetup v6.4 from https://innosetup.com/ ; ; @@ -52,34 +52,14 @@ BUILD_ENV undefined #define FIREBIRD_URL "http://www.firebirdsql.org" -;---- If we haven't already set PlatformTarget then pick it up from the environment. -#ifndef PlatformTarget -#define PlatformTarget GetEnv("FB_TARGET_PLATFORM") -#endif -#if PlatformTarget == "" -#define PlatformTarget "win32" -#endif - -;---- If we haven't already set ProductVersion then pick it up from the environment. -#ifndef ProductVersion -#define ProductVersion GetEnv("PRODUCT_VERSION") -#endif - -#define BUILD_ROOT="..\..\" +#define BUILD_ROOT "..\\..\\" #define SOURCE_LIBS "Builds\"+AddBackslash(BUILD_ENV)+AddBackslash(PlatformTarget)+AddBackslash(BUILDCONFIG) #define SOURCE_DOCS="Install\" #if PlatformTarget == "x64" -#define SOURCE_LIBS32="Builds\"+AddBackslash(BUILD_ENV)+AddBackslash("Win32")+AddBackslash(BUILDCONFIG) +#define SOURCE_LIBS32="Builds\\"+AddBackslash(BUILD_ENV)+AddBackslash("Win32")+AddBackslash(BUILDCONFIG) #endif -; Check if HTML help is available -#ifndef HtmlHelp -#define HtmlHelp GetEnv("HTMLHELP") -#endif -#if HtmlHelp == "" -#undef HtmlHelp -#endif [Setup] DisableDirPage=No @@ -119,6 +99,7 @@ ArchitecturesAllowed=x64 ArchitecturesInstallIn64BitMode=x64 #endif + [Languages] Name: en; MessagesFile: compiler:Default.isl Name: ru; MessagesFile: compiler:Default.isl,compiler:Languages\Russian.isl @@ -150,7 +131,6 @@ Source: {#SOURCE_DOCS}\HtmlHelp\images\*.*; DestDir: {app}\images; Components: D #endif Source: {#SOURCE_DOCS}\Win32\Readme.txt; DestDir: {app}; Components: DocumentationComponent; Flags: isreadme Source: {#SOURCE_DOCS}\IDPLicense.txt; DestDir: {app}; Components: DocumentationComponent -;Source: {#SOURCE_DOCS}\ReleaseNotes_v2.0.html; DestDir: {app}; Components: DocumentationComponent #if PlatformTarget == "x64" Source: {#SOURCE_LIBS32}{#OBJNAME}.dll; DestDir: {sys}; Components: DeveloperComponent DeploymentComponent; Flags: regserver restartreplace 32bit @@ -162,6 +142,7 @@ Source: {#SOURCE_DOCS}\HtmlHelp\{#OBJNAME}.chm; DestDir: {syswow64}; Components: #endif #endif + [Icons] Name: {group}\Uninstall Firebird ODBC driver; Filename: {uninstallexe}; Components: DocumentationComponent; Comment: Remove Firebird ODBC Driver Documentation Name: {group}\Uninstall Firebird ODBC driver; Filename: {uninstallexe}; Components: DeveloperComponent; Comment: Remove Firebird ODBC Driver Library and Documentation @@ -170,19 +151,10 @@ Name: {group}\Firebird ODBC Help; Filename: {app}\{#OBJNAME}.chm; Components: Do Name: {group}\Firebird ODBC Help; Filename: {sys}\{#OBJNAME}.chm; Components: DeveloperComponent Name: {app}\Firebird ODBC Help; Filename: {sys}\{#OBJNAME}.chm; Components: DeveloperComponent #endif -;Name: {group}\Firebird ODBC v2.0 Release Notes; Filename: {app}\ReleaseNotes_v2.0.html; Components: DocumentationComponent Name: {group}\Firebird ODBC readme.txt; Filename: {app}\Readme.txt; Components: DocumentationComponent Name: {group}\Firebird ODBC license.txt; Filename: {app}\IDPLicense.txt; Components: DocumentationComponent -[Run] -;Filename: {sys}\regsvr32.exe; Parameters: "/s ""{app}""\{#OBJNAME}.dll"; Components: DeveloperComponent DeploymentComponent - - -[UninstallRun] -;Filename: {sys}\regsvr32.exe; Parameters: "/u /s ""{app}""\{#OBJNAME}.dll"; Components: DeveloperComponent DeploymentComponent - - [UninstallDelete] Type: Files; Name: {sys}\{#OBJNAME}.dll; Components: DeveloperComponent DeploymentComponent @@ -195,12 +167,12 @@ en.DeveloperComponent=Install driver to en.DeploymentComponent=Install driver only. No docs, uninstall. en.DocumentationComponent=Documentation in CHM and HTML format -ru.DeveloperInstall= - , . -ru.DeploymentInstall= - , , . -ru.DocumentationInstall= . -ru.DeveloperComponent= -ru.DeploymentComponent= , . -ru.DocumentationComponent= CHM HTML +ru.DeveloperInstall=Полная установка - драйвер в системную папку, документацию в группу программ. +ru.DeploymentInstall=Только драйвер - никаких документов, меню, иконок. +ru.DocumentationInstall=Только документацию. +ru.DeveloperComponent=Установка драйвера в +ru.DeploymentComponent=Установка только драйвера, без документации и деинсталяции. +ru.DocumentationComponent=Документация в формате CHM и HTML [Code] diff --git a/README.md b/README.md index 99a8a5f8..c68add89 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,16 @@ All the new features and fixes are documented here - * [ChangeLog](https://raw.githubusercontent.com/FirebirdSQL/firebird-odbc-driver/master/ChangeLog_v3.0) ## Downloads -The latest build artifacts: -* [Windows installation package](https://github.com/user-attachments/files/19207749/win_installers.zip) [![MSBuild](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/msbuild.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/msbuild.yml) -* [Linux x86-64](https://github.com/user-attachments/files/19207739/linux_libs.zip) [![Linux](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/linux.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/linux.yml) -* [Linux_ARM64](https://github.com/user-attachments/files/19210460/linux_arm64_libs.zip) [![RaspberryPI](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/rpi_arm64.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/rpi_arm64.yml) -You can also download the lastest & archive build packages here: https://github.com/FirebirdSQL/firebird-odbc-driver/wiki +[![Build](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/build.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/build.yml) + +### Latest Release Packages +Download the latest stable release from the [Releases page](https://github.com/FirebirdSQL/firebird-odbc-driver/releases/latest): + +* **Windows**: Installation packages (.exe) and ZIP archives (.zip) for x86 and x64 +* **Linux**: TAR.GZ packages (.tar.gz) for x64 and ARM64 + +You can also find additional build packages and archives here: https://github.com/FirebirdSQL/firebird-odbc-driver/wiki ## Build from sources