diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef7d708..22f0fbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: tcjavatoads - path: dist/TcJavaToAds-3.0.0.jar + path: dist/TcJavaToAds-3.1.0.jar retention-days: 3 build-ubuntu: @@ -177,19 +177,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: 3.0.0-${{ github.run_number }} - release_name: 3.0.0-${{ github.run_number }} + tag_name: 3.1.0-${{ github.run_number }} + release_name: 3.1.0-${{ github.run_number }} generate_release_notes: true - - name: 'Upload release asset: TcJavaToAds-3.0.0.jar' + - name: 'Upload release asset: TcJavaToAds-3.1.0.jar' if: github.ref == 'refs/heads/main' uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./TcJavaToAds-3.0.0.jar - asset_name: TcJavaToAds-3.0.0.jar + asset_path: ./TcJavaToAds-3.1.0.jar + asset_name: TcJavaToAds-3.1.0.jar asset_content_type: application/java-archive - name: 'Upload release asset: documentation.zip' if: github.ref == 'refs/heads/main' diff --git a/README.md b/README.md index 658d382..d7bb39b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Linux support is still in the beta phase, as detailed below. 1. **Windows:** `AdsToJava-3.dll`: A JNI-based wrapper ([Java Native Interface](https://en.wikipedia.org/wiki/Java_Native_Interface)) for the `TcAdsDll.dll`. **Tc/BSD:** `libAdsToJava-3.so`: A JNI-based wrapper ([Java Native Interface](https://en.wikipedia.org/wiki/Java_Native_Interface)) for the `libTcAdsDll.so`. -2. `TcJavaToAds-3.0.0.jar`: A Java archive that provides a straightforward way to call this JNI. +2. `TcJavaToAds-3.1.0.jar`: A Java archive that provides a straightforward way to call this JNI. ## Requirements on Windows diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 7d333b8..b6aa529 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.18.0) -project(AdsToJava-3 VERSION 3.0.0) +project(AdsToJava-3 VERSION 3.1.0) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -13,7 +13,7 @@ include(CTest) enable_testing() set(ADSTOJAVA_FILE_VERSION_MAJOR 3) -set(ADSTOJAVA_FILE_VERSION_MINOR 0) +set(ADSTOJAVA_FILE_VERSION_MINOR 1) set(ADSTOJAVA_FILE_VERSION "${ADSTOJAVA_FILE_VERSION_MAJOR}.${ADSTOJAVA_FILE_VERSION_MINOR}") add_compile_definitions(ADSTOJAVA_FILE_VERSION_MAJOR=${ADSTOJAVA_FILE_VERSION_MAJOR}) add_compile_definitions(ADSTOJAVA_FILE_VERSION_MINOR=${ADSTOJAVA_FILE_VERSION_MINOR}) diff --git a/pom.xml b/pom.xml index 145191e..a116e6c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ de.beckhoff.jni TcJavaToAds - 3.0.0 + 3.1.0 UTF-8 diff --git a/run/build_java.bat b/run/build_java.bat index c8f1b62..6a89f5d 100644 --- a/run/build_java.bat +++ b/run/build_java.bat @@ -6,4 +6,4 @@ REM this call also runs all the tests and create coverage report REM (https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html) CALL mvn.cmd package -Dmaven.test.skip -f "pom.xml" || exit /b %errorlevel% -xcopy target\TcJavaToAds-3.0.0.jar dist\ || exit /b %errorlevel% +xcopy target\TcJavaToAds-3.1.0.jar dist\ || exit /b %errorlevel% diff --git a/run/build_java.sh b/run/build_java.sh index 7f9d4c6..0886058 100755 --- a/run/build_java.sh +++ b/run/build_java.sh @@ -5,4 +5,4 @@ set -e # (https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html) mvn package -Dmaven.test.skip -f "pom.xml" -cp ./target/TcJavaToAds-3.0.0.jar ./dist/ +cp ./target/TcJavaToAds-3.1.0.jar ./dist/ diff --git a/run/build_java_full.bat b/run/build_java_full.bat index c8a4a93..ea3ee76 100644 --- a/run/build_java_full.bat +++ b/run/build_java_full.bat @@ -8,4 +8,4 @@ REM this call also runs all the tests and create coverage report REM (https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html) CALL mvn.cmd package -f "pom.xml" || exit /b %errorlevel% -xcopy target\TcJavaToAds-3.0.0.jar dist\ || exit /b %errorlevel% +xcopy target\TcJavaToAds-3.1.0.jar dist\ || exit /b %errorlevel% diff --git a/run/build_java_full.sh b/run/build_java_full.sh index 8da41c8..13e9a3d 100755 --- a/run/build_java_full.sh +++ b/run/build_java_full.sh @@ -25,4 +25,4 @@ mvn spotbugs:check -f "pom.xml" # (https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html) mvn package -f "pom.xml" -cp ./target/TcJavaToAds-3.0.0.jar ./dist/ +cp ./target/TcJavaToAds-3.1.0.jar ./dist/ diff --git a/run/build_samples.bat b/run/build_samples.bat index eebaf6e..6b3b51e 100644 --- a/run/build_samples.bat +++ b/run/build_samples.bat @@ -1,67 +1,67 @@ @ECHO OFF REM Sample 02 -javac samples\tcadsdll\02_AccessByVariableName\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\02_AccessByVariableName\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\02_AccessByVariableName.jar -C samples\tcadsdll\02_AccessByVariableName Main.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\02_AccessByVariableName\*.class || exit /b %errorlevel% echo "Sample 02_AccessByVariableName was compiled." REM Sample 03 -javac samples\tcadsdll\03_AccessAnArray\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\03_AccessAnArray\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\03_AccessAnArray.jar -C samples\tcadsdll\03_AccessAnArray Main.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\03_AccessAnArray\*.class || exit /b %errorlevel% echo "Sample 03_AccessAnArray was compiled." REM Sample 04 -javac samples\tcadsdll\04_TransmittingStructures\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\04_TransmittingStructures\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\04_TransmittingStructures.jar -C samples\tcadsdll\04_TransmittingStructures Main.class -C samples\tcadsdll\04_TransmittingStructures TransferObject.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\04_TransmittingStructures\*.class || exit /b %errorlevel% echo "Sample 04_TransmittingStructures was compiled." REM Sample 05 -javac samples\tcadsdll\05_ReadingAVariableDeclaration\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\05_ReadingAVariableDeclaration\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\05_ReadingAVariableDeclaration.jar -C samples\tcadsdll\05_ReadingAVariableDeclaration Main.class -C samples\tcadsdll\05_ReadingAVariableDeclaration ValueString.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\05_ReadingAVariableDeclaration\*.class || exit /b %errorlevel% echo "Sample 05_ReadingAVariableDeclaration was compiled." REM Sample 06 -javac samples\tcadsdll\06_WriteFlagSynchronously\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\06_WriteFlagSynchronously\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\06_WriteFlagSynchronously.jar -C samples\tcadsdll\06_WriteFlagSynchronously Main.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\06_WriteFlagSynchronously\*.class || exit /b %errorlevel% echo "Sample 06_WriteFlagSynchronously was compiled." REM Sample 07 -javac samples\tcadsdll\07_ReadFlagSynchronously\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\07_ReadFlagSynchronously\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\07_ReadFlagSynchronously.jar -C samples\tcadsdll\07_ReadFlagSynchronously Main.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\07_ReadFlagSynchronously\*.class || exit /b %errorlevel% echo "Sample 07_ReadFlagSynchronously was compiled." REM Sample 08 -javac samples\tcadsdll\08_ReleaseVariableHandle\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\08_ReleaseVariableHandle\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\08_ReleaseVariableHandle.jar -C samples\tcadsdll\08_ReleaseVariableHandle Main.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\08_ReleaseVariableHandle\*.class || exit /b %errorlevel% echo "Sample 08_ReleaseVariableHandle was compiled." REM Sample 09 -javac samples\tcadsdll\09_EventDrivenReading\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\09_EventDrivenReading\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\09_EventDrivenReading.jar -C samples\tcadsdll\09_EventDrivenReading Main.class -C samples\tcadsdll\09_EventDrivenReading AdsListener.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\09_EventDrivenReading\*.class || exit /b %errorlevel% echo "Sample 09_EventDrivenReading was compiled." REM Sample 11 -javac samples\tcadsdll\11_EventDrivenDetectionOfSymbolTableChanges\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\11_EventDrivenDetectionOfSymbolTableChanges\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\11_EventDrivenDetectionOfSymbolTableChanges.jar -C samples\tcadsdll\11_EventDrivenDetectionOfSymbolTableChanges Main.class -C samples\tcadsdll\11_EventDrivenDetectionOfSymbolTableChanges AdsListener.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\11_EventDrivenDetectionOfSymbolTableChanges\*.class || exit /b %errorlevel% echo "Sample 11_EventDrivenDetectionOfSymbolTableChanges was compiled." REM Sample 12 -javac samples\tcadsdll\12_SumCommandReleaseVariableHandles\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\12_SumCommandReleaseVariableHandles\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\12_SumCommandReleaseVariableHandles.jar -C samples\tcadsdll\12_SumCommandReleaseVariableHandles Main.class -C samples\tcadsdll\12_SumCommandReleaseVariableHandles ReleaseData.class -C samples\tcadsdll\12_SumCommandReleaseVariableHandles RequestData.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\12_SumCommandReleaseVariableHandles\*.class || exit /b %errorlevel% echo "Sample 12_SumCommandReleaseVariableHandles was compiled." REM Sample 13 -javac samples\tcadsdll\13_SumCommandReadingWritingVariables\*.java -classpath dist\TcJavaToAds-3.0.0.jar -deprecation || exit /b %errorlevel% +javac samples\tcadsdll\13_SumCommandReadingWritingVariables\*.java -classpath dist\TcJavaToAds-3.1.0.jar -deprecation || exit /b %errorlevel% jar cmf samples\MANIFEST.MF dist\13_SumCommandReadingWritingVariables.jar -C samples\tcadsdll\13_SumCommandReadingWritingVariables Main.class -C samples\tcadsdll\13_SumCommandReadingWritingVariables RequestData.class || exit /b %errorlevel% del /f /q /s samples\tcadsdll\13_SumCommandReadingWritingVariables\*.class || exit /b %errorlevel% echo "Sample 13_SumCommandReadingWritingVariables was compiled." diff --git a/run/build_samples.sh b/run/build_samples.sh index 4e187ec..9b70ea9 100755 --- a/run/build_samples.sh +++ b/run/build_samples.sh @@ -4,7 +4,7 @@ set -e ########## ADSLIB ########## # Sample 02 -javac ./samples/adslib/02_AccessByVariableName/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/adslib/02_AccessByVariableName/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/02_AccessByVariableName_adslib.jar -C ./samples/adslib/02_AccessByVariableName Main.class rm ./samples/adslib/02_AccessByVariableName/*.class echo "Sample 02_AccessByVariableName was compiled." @@ -12,67 +12,67 @@ echo "Sample 02_AccessByVariableName was compiled." ########## TCADSDLL ########## # Sample 02 -javac ./samples/tcadsdll/02_AccessByVariableName/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/02_AccessByVariableName/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/02_AccessByVariableName.jar -C ./samples/tcadsdll/02_AccessByVariableName Main.class rm ./samples/tcadsdll/02_AccessByVariableName/*.class echo "Sample 02_AccessByVariableName was compiled." # Sample 03 -javac ./samples/tcadsdll/03_AccessAnArray/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/03_AccessAnArray/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/03_AccessAnArray.jar -C ./samples/tcadsdll/03_AccessAnArray Main.class rm ./samples/tcadsdll/03_AccessAnArray/*.class echo "Sample 03_AccessAnArray was compiled." # Sample 04 -javac ./samples/tcadsdll/04_TransmittingStructures/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/04_TransmittingStructures/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/04_TransmittingStructures.jar -C ./samples/tcadsdll/04_TransmittingStructures Main.class -C ./samples/tcadsdll/04_TransmittingStructures TransferObject.class rm ./samples/tcadsdll/04_TransmittingStructures/*.class echo "Sample 04_TransmittingStructures was compiled." # Sample 05 -javac ./samples/tcadsdll/05_ReadingAVariableDeclaration/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/05_ReadingAVariableDeclaration/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/05_ReadingAVariableDeclaration.jar -C ./samples/tcadsdll/05_ReadingAVariableDeclaration Main.class -C ./samples/tcadsdll/05_ReadingAVariableDeclaration ValueString.class rm ./samples/tcadsdll/05_ReadingAVariableDeclaration/*.class echo "Sample 05_ReadingAVariableDeclaration was compiled." # Sample 06 -javac ./samples/tcadsdll/06_WriteFlagSynchronously/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/06_WriteFlagSynchronously/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/06_WriteFlagSynchronously.jar -C ./samples/tcadsdll/06_WriteFlagSynchronously Main.class rm ./samples/tcadsdll/06_WriteFlagSynchronously/*.class echo "Sample 06_WriteFlagSynchronously was compiled." # Sample 07 -javac ./samples/tcadsdll/07_ReadFlagSynchronously/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/07_ReadFlagSynchronously/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/07_ReadFlagSynchronously.jar -C ./samples/tcadsdll/07_ReadFlagSynchronously Main.class rm ./samples/tcadsdll/07_ReadFlagSynchronously/*.class echo "Sample 07_ReadFlagSynchronously was compiled." # Sample 08 -javac ./samples/tcadsdll/08_ReleaseVariableHandle/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/08_ReleaseVariableHandle/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/08_ReleaseVariableHandle.jar -C ./samples/tcadsdll/08_ReleaseVariableHandle Main.class rm ./samples/tcadsdll/08_ReleaseVariableHandle/*.class echo "Sample 08_ReleaseVariableHandle was compiled." # Sample 09 -javac ./samples/tcadsdll/09_EventDrivenReading/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/09_EventDrivenReading/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/09_EventDrivenReading.jar -C ./samples/tcadsdll/09_EventDrivenReading Main.class -C ./samples/tcadsdll/09_EventDrivenReading AdsListener.class rm ./samples/tcadsdll/09_EventDrivenReading/*.class echo "Sample 09_EventDrivenReading was compiled." # Sample 11 -javac ./samples/tcadsdll/11_EventDrivenDetectionOfSymbolTableChanges/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/11_EventDrivenDetectionOfSymbolTableChanges/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/11_EventDrivenDetectionOfSymbolTableChanges.jar -C ./samples/tcadsdll/11_EventDrivenDetectionOfSymbolTableChanges Main.class -C ./samples/tcadsdll/11_EventDrivenDetectionOfSymbolTableChanges AdsListener.class rm ./samples/tcadsdll/11_EventDrivenDetectionOfSymbolTableChanges/*.class echo "Sample 11_EventDrivenDetectionOfSymbolTableChanges was compiled." # Sample 12 -javac ./samples/tcadsdll/12_SumCommandReleaseVariableHandles/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/12_SumCommandReleaseVariableHandles/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/12_SumCommandReleaseVariableHandles.jar -C ./samples/tcadsdll/12_SumCommandReleaseVariableHandles Main.class -C ./samples/tcadsdll/12_SumCommandReleaseVariableHandles ReleaseData.class -C ./samples/tcadsdll/12_SumCommandReleaseVariableHandles RequestData.class rm ./samples/tcadsdll/12_SumCommandReleaseVariableHandles/*.class echo "Sample 12_SumCommandReleaseVariableHandles was compiled." # Sample 13 -javac ./samples/tcadsdll/13_SumCommandReadingWritingVariables/*.java -classpath ./dist/TcJavaToAds-3.0.0.jar -deprecation +javac ./samples/tcadsdll/13_SumCommandReadingWritingVariables/*.java -classpath ./dist/TcJavaToAds-3.1.0.jar -deprecation jar cmf ./samples/MANIFEST.MF ./dist/13_SumCommandReadingWritingVariables.jar -C ./samples/tcadsdll/13_SumCommandReadingWritingVariables Main.class -C ./samples/tcadsdll/13_SumCommandReadingWritingVariables RequestData.class rm ./samples/tcadsdll/13_SumCommandReadingWritingVariables/*.class echo "Sample 13_SumCommandReadingWritingVariables was compiled." diff --git a/samples/MANIFEST.MF b/samples/MANIFEST.MF index f9330be..2956ded 100644 --- a/samples/MANIFEST.MF +++ b/samples/MANIFEST.MF @@ -1,3 +1,3 @@ Manifest-Version: 1.0 Main-Class: Main -Class-Path: TcJavaToAds-3.0.0.jar +Class-Path: TcJavaToAds-3.1.0.jar