diff --git a/Libraries/CANAPI/uvcanpcb.rc b/Libraries/CANAPI/uvcanpcb.rc index 44efa5d..e9eed9a 100644 Binary files a/Libraries/CANAPI/uvcanpcb.rc and b/Libraries/CANAPI/uvcanpcb.rc differ diff --git a/Libraries/CANAPI/uvcanpcb.vcxproj b/Libraries/CANAPI/uvcanpcb.vcxproj index 4283179..d500247 100644 --- a/Libraries/CANAPI/uvcanpcb.vcxproj +++ b/Libraries/CANAPI/uvcanpcb.vcxproj @@ -152,7 +152,7 @@ Level3 true - WIN32;_DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;_DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -170,7 +170,7 @@ Level3 true - WIN32;_DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;_DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -190,7 +190,7 @@ true true true - WIN32;NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -211,7 +211,7 @@ true true true - WIN32;NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -230,7 +230,7 @@ Level3 true - _DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + _DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -248,7 +248,7 @@ Level3 true - _DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + _DEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -268,7 +268,7 @@ true true true - NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h @@ -289,7 +289,7 @@ true true true - NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + NDEBUG;UVCANPCB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=1 true Use pch.h diff --git a/Libraries/PeakCAN/PeakCAN.rc b/Libraries/PeakCAN/PeakCAN.rc index a553c56..9b24099 100644 Binary files a/Libraries/PeakCAN/PeakCAN.rc and b/Libraries/PeakCAN/PeakCAN.rc differ diff --git a/Libraries/PeakCAN/PeakCAN.vcxproj b/Libraries/PeakCAN/PeakCAN.vcxproj index c6e5266..818d49c 100644 --- a/Libraries/PeakCAN/PeakCAN.vcxproj +++ b/Libraries/PeakCAN/PeakCAN.vcxproj @@ -152,7 +152,7 @@ Level3 true - WIN32;_DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;_DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -170,7 +170,7 @@ Level3 true - WIN32;_DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;_DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -190,7 +190,7 @@ true true true - WIN32;NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -211,7 +211,7 @@ true true true - WIN32;NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + WIN32;NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -230,7 +230,7 @@ Level3 true - _DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + _DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -248,7 +248,7 @@ Level3 true - _DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + _DEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -268,7 +268,7 @@ true true true - NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h @@ -289,7 +289,7 @@ true true true - NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1 + NDEBUG;PEAKCAN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;OPTION_CANAPI_DLLEXPORT=0;OPTION_CANCPP_DLLEXPORT=1;OPTION_CANAPI_LIBRARY=0;OPTION_CANAPI_DRIVER=1;OPTION_CANAPI_COMPANIONS=1;OPTION_CANAPI_RETVALS=0 true Use pch.h diff --git a/Sources/CANAPI/.gitignore b/Sources/CANAPI/.gitignore index 1dbd7ad..a810feb 100644 --- a/Sources/CANAPI/.gitignore +++ b/Sources/CANAPI/.gitignore @@ -1,3 +1,4 @@ .svn # we don't use the JSON files yet can_dev.? +vanilla.? diff --git a/Sources/CANAPI/CANAPI.h b/Sources/CANAPI/CANAPI.h index 2b16188..93cb1a7 100644 --- a/Sources/CANAPI/CANAPI.h +++ b/Sources/CANAPI/CANAPI.h @@ -73,9 +73,9 @@ /// zero to compile your program with the CAN API source files or to /// link your program with the static library at compile-time. /// -/// \author $Author: eris $ +/// \author $Author: quaoar $ // -/// \version $Rev: 1270 $ +/// \version $Rev: 1286 $ // /// \defgroup can_api CAN Interface API, Version 3 /// \{ @@ -191,7 +191,20 @@ class CANCPP CCanApi { char m_szVendorName[CANPROP_MAX_BUFFER_SIZE]; ///< vendor name at actual index in the vendor list char m_szVendorDllName[CANPROP_MAX_BUFFER_SIZE]; ///< file name of the DLL at actual index in the vendor list }; - /// \brief query library information of the first CAN API library in the + /// \brief sets the search path for readings library informations from + /// JSON files. + // + /// \note The search path can only be set once, either by ths function + /// or by the non-default constructor with a path argument. + // + /// \param[in] path - path name, or NULL for current working directory + // + /// \returns true if the search path has been successfully set, or + /// false on error. + // + static bool SetSearchPath(const char *path); + + /// \brief queries library information of the first CAN API library in the /// list of vendors, if any. // /// \param[out] info - the library information of the first entry in the list @@ -201,7 +214,7 @@ class CANCPP CCanApi { // static bool GetFirstLibrary(SLibraryInfo &info); - /// \brief query library information of the next CAN API library in the + /// \brief queries library information of the next CAN API library in the /// list of vendors, if any. // /// \param[out] info - the library information of the next entry in the list @@ -211,7 +224,7 @@ class CANCPP CCanApi { // static bool GetNextLibrary(SLibraryInfo &info); #endif - /// \brief query channel information of the first CAN interface in the + /// \brief queries channel information of the first CAN interface in the /// list of CAN interfaces, if any. // /// \param[in] library - library id of the CAN interface list, or -1 for all vendors @@ -227,7 +240,7 @@ class CANCPP CCanApi { static bool GetFirstChannel(SChannelInfo &info, void *param = NULL); #endif - /// \brief query channel information of the next CAN interface in the + /// \brief queries channel information of the next CAN interface in the /// list of CAN interfaces, if any. // /// \param[out] info - the channel information of the next entry in the list @@ -515,4 +528,4 @@ class CANCPP CCanApi { /// \} #endif // CANAPI_H_INCLUDED /// \} -// $Id: CANAPI.h 1270 2024-04-15 18:42:43Z eris $ Copyright (c) UV Software // +// $Id: CANAPI.h 1286 2024-05-10 17:03:31Z quaoar $ Copyright (c) UV Software // diff --git a/Sources/CANAPI/CANAPI_Types.h b/Sources/CANAPI/CANAPI_Types.h index 0ae52f2..1d09faf 100644 --- a/Sources/CANAPI/CANAPI_Types.h +++ b/Sources/CANAPI/CANAPI_Types.h @@ -49,9 +49,9 @@ * * @brief CAN API V3 for generic CAN Interfaces - Data Types and Defines * - * @author $Author: eris $ + * @author $Author: quaoar $ * - * @version $Rev: 1270 $ + * @version $Rev: 1286 $ * * @addtogroup can_api * @{ @@ -320,13 +320,13 @@ extern "C" { #define CANPROP_GET_PATCH_NO 2U /**< patch number of the library (uint8_t) */ #define CANPROP_GET_BUILD_NO 3U /**< build number of the library (uint32_t) */ #define CANPROP_GET_LIBRARY_ID 4U /**< library id of the library (int32_t) */ -#define CANPROP_GET_LIBRARY_VENDOR 5U /**< vendor name of the library (char[256]) */ -#define CANPROP_GET_LIBRARY_DLLNAME 6U /**< file name of the library DLL (char[256]) */ +#define CANPROP_GET_LIBRARY_VENDOR 5U /**< vendor name of the library (char[]) */ +#define CANPROP_GET_LIBRARY_DLLNAME 6U /**< file name of the library DLL (char[]) */ #define CANPROP_GET_DEVICE_TYPE 10U /**< device type of the CAN interface (int32_t) */ -#define CANPROP_GET_DEVICE_NAME 11U /**< device name of the CAN interface (char[256]) */ -#define CANPROP_GET_DEVICE_VENDOR 12U /**< vendor name of the CAN interface (char[256]) */ -#define CANPROP_GET_DEVICE_DLLNAME 13U /**< file name of the CAN interface DLL (char[256]) */ -#define CANPROP_GET_DEVICE_PARAM 14U /**< device parameter of the CAN interface (char[256]) */ +#define CANPROP_GET_DEVICE_NAME 11U /**< device name of the CAN interface (char[]) */ +#define CANPROP_GET_DEVICE_VENDOR 12U /**< vendor name of the CAN interface (char[]) */ +#define CANPROP_GET_DEVICE_DLLNAME 13U /**< file name of the CAN interface DLL (char[]) */ +#define CANPROP_GET_DEVICE_PARAM 14U /**< device parameter of the CAN interface (char[]) */ #define CANPROP_GET_OP_CAPABILITY 15U /**< supported operation modes of the CAN controller (uint8_t) */ #define CANPROP_GET_OP_MODE 16U /**< active operation mode of the CAN controller (uint8_t) */ #define CANPROP_GET_BITRATE 17U /**< active bit-rate of the CAN controller (can_bitrate_t) */ @@ -355,21 +355,21 @@ extern "C" { #define CANPROP_GET_BTR_INDEX 64U /**< bit-rate as CiA index (int32_t) */ #define CANPROP_GET_BTR_VALUE 65U /**< bit-rate as struct (can_bitrate_t) */ #define CANPROP_GET_BTR_SPEED 66U /**< bit-rate as bus speed (can_speed_t) */ -#define CANPROP_GET_BTR_STRING 67U /**< bit-rate as string (char[256]) */ +#define CANPROP_GET_BTR_STRING 67U /**< bit-rate as string (char[]) */ #define CANPROP_GET_BTR_SJA1000 68U /**< bit-rate as SJA1000 register (uint16_t) */ #define CANPROP_SET_BTR_INDEX 72U /**< set value for conversion form CiA index (int32_t) */ #define CANPROP_SET_BTR_VALUE 73U /**< set value for conversion form struct (can_bitrate_t) */ #define CANPROP_SET_BTR_SPEED 74U /**< set value for conversion form bus speed (can_speed_t) */ -#define CANPROP_SET_BTR_STRING 75U /**< set value for conversion form string (char[256]) */ +#define CANPROP_SET_BTR_STRING 75U /**< set value for conversion form string (char[]) */ #define CANPROP_SET_BTR_SJA1000 76U /**< set value for conversion form SJA1000 register (uint16_t) */ /* - - build-in message formatter - - - - - - - - - - - - - - - - - - */ -#define CANPROP_GET_MSG_STRING 128U /**< last received or sent message as formatted string (char[1024]) */ -#define CANPROP_GET_MSG_TIME 129U /**< time-stamp of last received or sent message (char[256]) */ -#define CANPROP_GET_MSG_ID 130U /**< identifier of last received or sent message (char[256]) */ -#define CANPROP_GET_MSG_DLC 131U /**< DLC/length of last received or sent message (char[256]) */ -#define CANPROP_GET_MSG_FLAGS 132U /**< flags of last received or sent message (char[256]) */ -#define CANPROP_GET_MSG_DATA 133U /**< data of last received or sent message (char[256]) */ -#define CANPROP_GET_MSG_ASCII 134U /**< data as ASCII of last received or sent message (char[256]) */ +#define CANPROP_GET_MSG_STRING 128U /**< last received or sent message as formatted string (char[]) */ +#define CANPROP_GET_MSG_TIME 129U /**< time-stamp of last received or sent message (char[]) */ +#define CANPROP_GET_MSG_ID 130U /**< identifier of last received or sent message (char[]) */ +#define CANPROP_GET_MSG_DLC 131U /**< DLC/length of last received or sent message (char[]) */ +#define CANPROP_GET_MSG_FLAGS 132U /**< flags of last received or sent message (char[]) */ +#define CANPROP_GET_MSG_DATA 133U /**< data of last received or sent message (char[]) */ +#define CANPROP_GET_MSG_ASCII 134U /**< data as ASCII of last received or sent message (char[]) */ #define CANPROP_SET_MSG_FORMAT 144U /**< set message output format {DEFAULT, ...} (int) */ #define CANPROP_SET_FMT_TIMESTAMP 145U /**< set formatter option: time-stamp {ZERO, ABS, REL} (int) */ #define CANPROP_SET_FMT_TIEMUSEC 146U /**< set formatter option: time-stamp in usec {OFF, ON} (int) */ @@ -396,22 +396,23 @@ extern "C" { #define CANPROP_SET_FIRST_VENDOR 224U /**< set index to the first entry in the vendor list (NULL) */ #define CANPROP_SET_NEXT_VENDOR 225U /**< set index to the next entry in the vendor list (NULL) */ #define CANPROP_GET_VENDOR_ID 226U /**< get library id at actual index in the vendor list (int32_t) */ -#define CANPROP_GET_VENDOR_NAME 227U /**< get vendor name at actual index in the vendor list (char[256]) */ -#define CANPROP_GET_VENDOR_DLLNAME 228U /**< get file name of the DLL at actual index in the vendor list (char[256]) */ +#define CANPROP_GET_VENDOR_NAME 227U /**< get vendor name at actual index in the vendor list (char[]) */ +#define CANPROP_GET_VENDOR_DLLNAME 228U /**< get file name of the DLL at actual index in the vendor list (char[]) */ #endif #define CANPROP_SET_FIRST_CHANNEL 240U /**< set index to the first entry in the interface list (int32_t or NULL) */ #define CANPROP_SET_NEXT_CHANNEL 241U /**< set index to the next entry in the interface list (NULL) */ #define CANPROP_GET_CHANNEL_NO 242U /**< get channel no. at actual index in the interface list (int32_t) */ -#define CANPROP_GET_CHANNEL_NAME 243U /**< get channel name at actual index in the interface list (char[256]) */ -#define CANPROP_GET_CHANNEL_DLLNAME 244U /**< get file name of the DLL at actual index in the interface list (char[256]) */ +#define CANPROP_GET_CHANNEL_NAME 243U /**< get channel name at actual index in the interface list (char[]) */ +#define CANPROP_GET_CHANNEL_DLLNAME 244U /**< get file name of the DLL at actual index in the interface list (char[]) */ #define CANPROP_GET_CHANNEL_VENDOR_ID 245U /**< get library id at actual index in the interface list (int32_t) */ -#define CANPROP_GET_CHANNEL_VENDOR_NAME 246U /**< get vendor name at actual index in the interface list (char[256]) */ +#define CANPROP_GET_CHANNEL_VENDOR_NAME 246U /**< get vendor name at actual index in the interface list (char[]) */ /* - - search path for JSON files (for C++ wrapper classes) - - - - - */ #if (OPTION_CANAPI_LIBRARY != 0) -#define CANPROP_SET_SEARCH_PATH 253U /**< set search path for interface configuration files (char[256]) */ +#define CANPROP_SET_SEARCH_PATH 253U /**< set search path for interface configuration files (char[]) */ +#define CANPROP_GET_SEARCH_PATH 254U /**< get search path for interface configuration files (char[]) */ #endif /* - - access to device handle (for C++ wrapper classes) - - - - - - - */ -#define CANPROP_GET_CPP_BACKDOOR 255U /**< get device handle (int32_t) */ +#define CANPROP_GET_CPP_BACKDOOR 255U /**< get device handle (int) */ /* - - access to vendor-specific properties - - - - - - - - - - - - - */ #define CANPROP_GET_VENDOR_PROP 256U /**< offset to get a vendor-specific property value (void*) */ #define CANPROP_SET_VENDOR_PROP 512U /**< offset to set a vendor-specific property value (void*) */ diff --git a/Sources/CANAPI/README.md b/Sources/CANAPI/README.md index 7a5adca..e3585aa 100644 --- a/Sources/CANAPI/README.md +++ b/Sources/CANAPI/README.md @@ -1,9 +1,9 @@ ### CAN Interface API, Version 3 -_Copyright © 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \ +_Copyright © 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \ _All rights reserved._ -Version $Rev: 1270 $ +Version $Rev: 1289 $ # A CAN Interface Wrapper Specification @@ -69,13 +69,17 @@ See header file `can_api.h` for a description of the provided functions. A generic documentation of the CAN API V3 application programming interface can be found [here](https://uv-software.github.io/CANAPI-Docs/#/). +### vanilla-json + +The implementation is using [vanilla-json](https://github.com/uv-software/vanilla-json) to read CAN API wrapper configurations from JSON files. + +**vanilla-json** is a very simple JSON parser by UV Software written in C90, and it has the same dual-license model as CAN API V3; see below. + ### Dual-License This work is dual-licensed under the terms of the BSD 2-Clause "Simplified" License and under the terms of the GNU General Public License v3.0 (or any later version). You can choose between one of them if you use this work in whole or in part. -`SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later` - ### Contact E-Mail: mailto://info@uv-software.com \ diff --git a/Sources/CANAPI/can_api.h b/Sources/CANAPI/can_api.h index 64dc677..f2ed3e2 100644 --- a/Sources/CANAPI/can_api.h +++ b/Sources/CANAPI/can_api.h @@ -49,9 +49,9 @@ * * @brief CAN API V3 for generic CAN Interfaces * - * @author $Author: eris $ + * @author $Author: quaoar $ * - * @version $Rev: 1270 $ + * @version $Rev: 1286 $ * * @defgroup can_api CAN Interface API, Version 3 * @{ @@ -76,9 +76,14 @@ extern "C" { * @brief Options for conditional compilation. * @{ */ /** @note Set define OPTION_CANAPI_LIBRARY to a non-zero value to compile - * the master loader library (e.g. in the build environment). Or + * the CAN API V3 loader library (e.g. in the build environment). Or * optionally set define OPTION_CANAPI_DRIVER to a non-zero value - * to compile a driver/wrapper library. + * to compile a CAN API V3 driver/wrapper library (default). + */ +/** @note Set define OPTION_CANAPI_RETVALS to a non-zero value to compile + * with CAN API V2 return values (e.g. in the build environment). + * This should be the default for the C interface. Unfortunately + * the logic is swapped. */ /** @note Set define OPTION_CANAPI_DLLEXPORT to a non-zero value to compile * as a dynamic link library (e.g. in the build environment). @@ -143,21 +148,31 @@ typedef int can_handle_t; */ #if (OPTION_CANAPI_LIBRARY != 0) -/** @brief CAN Board Vendor: +/** @brief CAN Board Vendor + * @note A CAN library from a board vendor is identified by its library id. + * @remarks Deprecated: This variable should not be used anymore! + * Use the properties 'CANPROP_GET_VENDOR_ID' and + * 'CANPROP_GET_VENDOR_NAME' in conjunction with + * 'CANPROP_SET_FIRST_VENDOR' and 'CANPROP_SET_NEXT_VENDOR'. */ typedef struct can_vendor_t_ { - int32_t library; /**< library id */ + int32_t library; /**< library id. */ char *name; /**< vendor name */ } can_vendor_t; #endif -/** @brief CAN Interface Board: +/** @brief CAN Interface Board + * @note A CAN interface board is identified by its channel no. + * @remarks Deprecated: This variable should not be used anymore! + * Use the properties 'CANPROP_GET_CHANNEL_NO' and + * 'CANPROP_GET_CHANNEL_NAME' in conjunction with + * 'CANPROP_SET_FIRST_CHANNEL' and 'CANPROP_SET_NEXT_CHANNEL'. */ typedef struct can_board_t_ { #if (OPTION_CANAPI_LIBRARY != 0) - int32_t library; /**< library id */ + int32_t library; /**< library id. */ #endif - int32_t type; /**< board type */ - char *name; /**< board name */ + int32_t type; /**< channel no. */ + char *name; /**< channel name */ } can_board_t; @@ -172,6 +187,22 @@ CANAPI can_board_t can_boards[]; /**< list of CAN interface boards */ /* ----------- prototypes --------------------------------------------- */ +#if (OPTION_CANAPI_LIBRARY != 0) +/** @brief sets the search path for readings library informations from + * JSON files. + * + * @note The search path can only be set once, either by ths function + * or by the non-default constructor with a path argument. + * + * @param[in] pathname - path name, or NULL for current working directory + * + * @returns true if the search path has been successfully set, or + * false on error. + * + * @retval CANERR_YETINIT - search path already set + */ +CANAPI int can_path(const char* pathname); +#endif /** @brief probes if the CAN interface (hardware and driver) given by * the argument [ 'library' and ] 'channel' is present, and diff --git a/Sources/PCANBasic/PCANBasic.h b/Sources/PCANBasic/PCANBasic.h index 4ac61b8..5ef917c 100644 --- a/Sources/PCANBasic/PCANBasic.h +++ b/Sources/PCANBasic/PCANBasic.h @@ -8,12 +8,12 @@ // // ------------------------------------------------------------------ // Author : Keneth Wagner -// Last change: 2023-08-28 +// Last change: 2024-01-26 // // Language: ANSI-C // ------------------------------------------------------------------ // -// Copyright (C) 1999-2023 PEAK-System Technik GmbH, Darmstadt +// Copyright (C) 1999-2024 PEAK-System Technik GmbH, Darmstadt // more Info at http://www.peak-system.com // #ifndef __PCANBASICH__ @@ -184,6 +184,7 @@ #define PCAN_ALLOW_ECHO_FRAMES 0x2CU // Echo messages reception status within a PCAN-Channel #define PCAN_DEVICE_PART_NUMBER 0x2DU // Get the part number associated to a device #define PCAN_HARD_RESET_STATUS 0x2EU // Activation status of hard reset processing via CAN_Reset calls +#define PCAN_LAN_CHANNEL_DIRECTION 0x2FU // Communication direction of a PCAN-Channel representing a PCAN-LAN interface // DEPRECATED parameters // @@ -223,6 +224,10 @@ #define SERVICE_STATUS_STOPPED 0x01U // The service is not running #define SERVICE_STATUS_RUNNING 0x04U // The service is running +#define LAN_DIRECTION_READ 0x01U // The PCAN-Channel is limited to incoming communication only +#define LAN_DIRECTION_WRITE 0x02U // The PCAN-Channel is limited to outgoing communication only +#define LAN_DIRECTION_READ_WRITE (LAN_DIRECTION_READ | LAN_DIRECTION_WRITE) // The PCAN-Channel communication is bidirectional + // Other constants // #define MAX_LENGTH_HARDWARE_NAME 33 // Maximum length of the name of a device: 32 characters + terminator diff --git a/Sources/PeakCAN.cpp b/Sources/PeakCAN.cpp index 00d3a7a..b2ee0ec 100644 --- a/Sources/PeakCAN.cpp +++ b/Sources/PeakCAN.cpp @@ -1,8 +1,9 @@ // SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later // -// CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) +// CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) // -// Copyright (c) 2010-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com) +// Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen +// Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) // All rights reserved. // // This file is part of PCANBasic-Wrapper. @@ -68,6 +69,10 @@ #define PLATFORM "x64" #elif defined(_WIN32) #define PLATFORM "x86" +#elif defined(__linux__) +#define PLATFORM "Linux" +#elif defined(__APPLE__) +#define PLATFORM "macOS" #else #error Platform not supported #endif @@ -83,7 +88,7 @@ #define SPRINTF_S(buf,size,format,...) sprintf_s(buf,size,format,__VA_ARGS__) #endif -#if (OPTION_PEAKCAN_DYLIB != 0) +#if (OPTION_PEAKCAN_DYLIB != 0) || (OPTION_PEAKCAN_SO != 0) __attribute__((constructor)) static void _initializer() { // default initializer @@ -97,7 +102,11 @@ static void _finalizer() { #define EXPORT #endif -static const char version[] = "CAN API V3 for Peak-System PCAN Interfaces, Version " VERSION_STRING; +#if !defined(__APPLE__) +static const char version[] = "CAN API V3 for PEAK-System PCAN Interfaces, Version " VERSION_STRING; +#else +static const char version[] = "CAN API V3 for PEAK-System PCAN USB Interfaces, Version " VERSION_STRING; +#endif EXPORT CPeakCAN::CPeakCAN() { diff --git a/Sources/PeakCAN.h b/Sources/PeakCAN.h index d472370..6955289 100644 --- a/Sources/PeakCAN.h +++ b/Sources/PeakCAN.h @@ -1,8 +1,9 @@ // SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later // -// CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) +// CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) // -// Copyright (c) 2017-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com) +// Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen +// Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) // All rights reserved. // // This file is part of PCANBasic-Wrapper. @@ -52,21 +53,20 @@ #include "PeakCAN_Defaults.h" #include "CANAPI.h" -/// \name PCAN -/// \brief PCAN dynamic library +/// \name PeakCAN +/// \brief PeakCAN dynamic library /// \{ #define PEAKCAN_LIBRARY_ID CANLIB_PCANBASIC #define PEAKCAN_LIBRARY_NAME CANDLL_PCANBASIC #define PEAKCAN_LIBRARY_VENDOR "UV Software, Berlin" #define PEAKCAN_LIBRARY_LICENSE "BSD-2-Clause OR GPL-3.0-or-later" -#define PEAKCAN_LIBRARY_COPYRIGHT "Copyright (c) 2015-2024 by Uwe Vogt, UV Software, Berlin" +#define PEAKCAN_LIBRARY_COPYRIGHT "Copyright (c) 2005-2024 by Uwe Vogt, UV Software, Berlin" #define PEAKCAN_LIBRARY_HAZARD_NOTE "If you connect your CAN device to a real CAN network when using this library,\n" \ "you might damage your application." /// \} - /// \name PeakCAN API -/// \brief CAN API V3 driver for Peak-System PCAN-Basic interfaces +/// \brief CAN API V3 driver for PEAK-System PCAN-Basic interfaces /// \note See CCanApi for a description of the overridden methods /// \{ class CANCPP CPeakCAN : public CCanApi { diff --git a/Sources/PeakCAN_Defaults.h b/Sources/PeakCAN_Defaults.h index bd791b2..5b66d28 100644 --- a/Sources/PeakCAN_Defaults.h +++ b/Sources/PeakCAN_Defaults.h @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */ /* - * CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) + * CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) * - * Copyright (c) 2017-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com) + * Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen + * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) * All rights reserved. * * This file is part of PCANBasic-Wrapper. diff --git a/Sources/PeakCAN_Defines.h b/Sources/PeakCAN_Defines.h index b1418f0..4fcf668 100644 --- a/Sources/PeakCAN_Defines.h +++ b/Sources/PeakCAN_Defines.h @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */ /* - * CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) + * CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) * - * Copyright (c) 2017-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com) + * Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen + * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) * All rights reserved. * * This file is part of PCANBasic-Wrapper. @@ -171,6 +172,11 @@ extern "C" { #define PCAN_LIB_WRAPPER "libUVCANPCB.dylib" #define PCAN_LIB_MIN_MAJOR 0U #define PCAN_LIB_MIN_MINOR 9U +#elif defined(__linux__) + #define PCAN_LIB_BASIC "libpcanbasic.so" + #define PCAN_LIB_WRAPPER "libuvcanpcb.so" + #define PCAN_LIB_MIN_MAJOR 8U + #define PCAN_LIB_MIN_MINOR 0U #else #error Platform not supported #endif diff --git a/Sources/Version.h b/Sources/Version.h index 68490e7..d086c01 100644 --- a/Sources/Version.h +++ b/Sources/Version.h @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */ /* - * CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) + * CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) * - * Copyright (c) 2005-2010 Uwe Vogt, UV Software, Friedrichshafen - * Copyright (c) 2014-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com) + * Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen + * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) * All rights reserved. * * This file is part of PCANBasic-Wrapper. @@ -49,9 +49,15 @@ #ifndef VERSION_H_INCLUDED #define VERSION_H_INCLUDED #include "build_no.h" +#ifdef _MSC_VER #define VERSION_MAJOR 0 #define VERSION_MINOR 5 -#define VERSION_PATCH 0 +#define VERSION_PATCH 1 +#else +#define VERSION_MAJOR 0 +#define VERSION_MINOR 2 +#define VERSION_PATCH 8 +#endif #define VERSION_BUILD BUILD_NO #if (VERSION_PATCH == 0) #define VERSION_STRING TOSTRING(VERSION_MAJOR) "." TOSTRING(VERSION_MINOR) " (" TOSTRING(BUILD_NO) ")" diff --git a/Sources/Wrapper/can_api.c b/Sources/Wrapper/can_api.c index d171517..3d57974 100644 --- a/Sources/Wrapper/can_api.c +++ b/Sources/Wrapper/can_api.c @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */ /* - * CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) + * CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) * - * Copyright (c) 2005-2010 Uwe Vogt, UV Software, Friedrichshafen - * Copyright (c) 2014-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com) + * Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen + * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) * All rights reserved. * * This file is part of PCANBasic-Wrapper. @@ -59,6 +59,10 @@ #define PLATFORM "x64" #elif defined(_WIN32) #define PLATFORM "x86" +#elif defined(__linux__) +#define PLATFORM "Linux" +#elif defined(__APPLE__) +#define PLATFORM "macOS" #else #error Platform not supported #endif @@ -75,7 +79,11 @@ #else #include #include +#if defined(__APPLE__) #include "PCBUSB.h" +#else +#include "PCANBasic.h" +#endif #endif #include "Version.h" @@ -88,7 +96,7 @@ #if (OPTION_CAN_2_0_ONLY != 0) #error Compilation with legacy CAN 2.0 frame format! #endif -#if (OPTION_CANAPI_PEAKCAN_DYLIB != 0) +#if (OPTION_CANAPI_PCBUSB_DYLIB != 0) || (OPTION_CANAPI_PCANBASIC_SO != 0) __attribute__((constructor)) static void _initializer() { // default initializer @@ -170,6 +178,8 @@ typedef struct { // PCAN interface: WORD brd_irq; // board parameter: interrupt number #if defined(_WIN32) || defined(_WIN64) HANDLE event; // event handle for blocking read +#else + int fdes; // file descriptor for blocking read #endif can_mode_t mode; // operation mode of the CAN channel can_filter_t filter; // message filtering settings @@ -196,7 +206,11 @@ static int drv_parameter(int handle, uint16_t param, void *value, size_t nbyte); /* ----------- variables ---------------------------------------------- */ -static const char version[] = "CAN API V3 for Peak-System PCAN Interfaces, Version " VERSION_STRING; +#if !defined(__APPLE__) +static const char version[] = "CAN API V3 for PEAK-System PCAN Interfaces, Version " VERSION_STRING; +#else +static const char version[] = "CAN API V3 for PEAK-System PCAN USB Interfaces, Version " VERSION_STRING; +#endif EXPORT can_board_t can_boards[PCAN_BOARDS+1]=// list of CAN Interface boards: diff --git a/Sources/Wrapper/can_defs.h b/Sources/Wrapper/can_defs.h index d425bf1..cf99060 100644 --- a/Sources/Wrapper/can_defs.h +++ b/Sources/Wrapper/can_defs.h @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */ /* - * CAN Interface API, Version 3 (for Peak-System PCAN Interfaces) + * CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces) * - * Copyright (c) 2005-2010 Uwe Vogt, UV Software, Friedrichshafen - * Copyright (c) 2014-2022 Uwe Vogt, UV Software, Berlin (info@uv-software.com) + * Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen + * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com) * All rights reserved. * * This file is part of PCANBasic-Wrapper. diff --git a/Tests/x64_build.bat b/Tests/x64_build.bat index 55c4c99..ac4bba2 100644 --- a/Tests/x64_build.bat +++ b/Tests/x64_build.bat @@ -1,15 +1,35 @@ @echo off -pushd -call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" x64 -popd +set VCVARS="True" +set NORUN="False" +rem parse arguments: [NOVARS] [NORUN] +:LOOP +if "%1" == "NOVARS" set VCVARS="False" +if "%1" == "NORUN" set NORUN="True" +SHIFT +if not "%1" == "" goto LOOP + +rem set MSBuild environment variables +if %VCVARS% == "True" ( + pushd + call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" x64 + popd +) pushd + +rem build the test suites call msbuild.exe .\pcb_testing.vcxproj /t:Clean;Build /p:"Configuration=Debug";"Platform=x64" if errorlevel 1 goto end -call .\x64\Debug\pcb_testing.exe --gtest_filter=SmokeTest.* +rem execute the smoke-test +if %NORUN% == "False" ( + call .\x64\Debug\pcb_testing.exe --gtest_filter=SmokeTest.* +) +rem end of the job :end popd -pause +if %VCVARS% == "True" ( + pause +) diff --git a/Tests/x86_build.bat b/Tests/x86_build.bat index c215b1c..2805e3a 100644 --- a/Tests/x86_build.bat +++ b/Tests/x86_build.bat @@ -1,15 +1,35 @@ @echo off -pushd -call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat" x86 -popd +set VCVARS="True" +set NORUN="False" +rem parse arguments: [NOVARS] [NORUN] +:LOOP +if "%1" == "NOVARS" set VCVARS="False" +if "%1" == "NORUN" set NORUN="True" +SHIFT +if not "%1" == "" goto LOOP + +rem set MSBuild environment variables +if %VCVARS% == "True" ( + pushd + call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat" x86 + popd +) pushd + +rem build the test suites call msbuild.exe .\pcb_testing.vcxproj /t:Clean;Build /p:"Configuration=Debug";"Platform=Win32" if errorlevel 1 goto end -call .\Debug\pcb_testing.exe --gtest_filter=SmokeTest.* +rem execute the smoke-test +if %NORUN% == "False" ( + call .\Debug\pcb_testing.exe --gtest_filter=SmokeTest.* +) +rem end of the job :end popd -pause +if %VCVARS% == "True" ( + pause +) diff --git a/xxl_build.bat b/xxl_build.bat new file mode 100644 index 0000000..ead42ff --- /dev/null +++ b/xxl_build.bat @@ -0,0 +1,24 @@ +@echo off +rem set MSBuild environment variables +pushd +call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat" x86 +popd +set PWD="%~dp0" +pushd + +rem build libraries, utilities and the trial program +call .\x64_build.bat NOVARS +if not errorlevel 0 goto end +call .\x86_build.bat NOVARS +if not errorlevel 0 goto end + +rem build test suites +cd /D .\Tests +call .\x64_build.bat NOVARS NORUN +if not errorlevel 0 goto end +call .\x86_build.bat NOVARS NORUN +if not errorlevel 0 goto end + +rem end of the job +:end +popd