From bcf5c47b7e5651d4387b951666be56850ff3b55f Mon Sep 17 00:00:00 2001 From: afiebig Date: Tue, 18 Jun 2019 11:53:19 -0400 Subject: [PATCH 1/4] Add Version resource to project --- Makefile | 3 ++- version.rc | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 version.rc diff --git a/Makefile b/Makefile index efd43cd..49bc06b 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,9 @@ wraper: windows-wrapper: swig -csharp -o wrapper/transbank_wrap.c -namespace Transbank.POS.Utils src/transbank.i + windres.exe version.rc -o build/version.o cd build && cc -fpic -c ../src/transbank.c ../wrapper/transbank_wrap.c ../src/transbank_serial_utils.c -I../src - cc -shared build/transbank.o build/transbank_wrap.o build/transbank_serial_utils.o -o build/TransbankWrap.dll -lserialport + cc -shared build/transbank.o build/transbank_wrap.o build/transbank_serial_utils.o build/version.o -o build/TransbankWrap.dll -lserialport -Wl,--subsystem,windows cp build/TransbankWrap.dll /c/msys64/mingw64/bin cmocka-test: diff --git a/version.rc b/version.rc new file mode 100644 index 0000000..b936d7b --- /dev/null +++ b/version.rc @@ -0,0 +1,35 @@ +#include + +// DLL version information. +VS_VERSION_INFO VERSIONINFO +FILEVERSION 1,4,0,0 +PRODUCTVERSION 1,4,0,0 +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG | VS_FF_PRERELEASE +#else + FILEFLAGS 0 +#endif +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_DLL +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904b0" + BEGIN + VALUE "CompanyName", "Transbank" + VALUE "FileDescription", "Library used by TransbankPosSDK to communicate with Verifone VX520 y VX520C integrated POS." + VALUE "FileVersion", "1.4.0.0" + VALUE "InternalName", "TransbankWrap" + VALUE "LegalCopyright", "2019 Transbank" + VALUE "OriginalFilename", "TransbankWrap.dll" + VALUE "ProductName", "TransbankWrap Library" + VALUE "ProductVersion", "1.4.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1200 + END +END From 3c511424a91efa287a0fb168f393f732729695cd Mon Sep 17 00:00:00 2001 From: afiebig Date: Tue, 18 Jun 2019 12:11:43 -0400 Subject: [PATCH 2/4] Add Changelog file --- Changelog.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Changelog.md diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..50ce287 --- /dev/null +++ b/Changelog.md @@ -0,0 +1,26 @@ +# Changelog + +Todos los cambios notables a este proyecto serán documentados en este archivo. + +El formato está basado en [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.4.0] - 2019-06-18 + +### Added + +- Función para Anulación. +- Función para Última Venta. +- Función para Detalle de Ventas. +- Función para Totales. + +## [1.0.0] - 2019-03-03 + +### Added + +- Función para listar puertos seriales. +- Función para POLL de POS. +- Función para Cambio a POS Normal. +- Función para Carga de Llaves. +- Función para Cierre. +- Función para Venta sin mensajes intermedios. From 9e1d7e038826209e66de93c2249e1626ffbf0c5a Mon Sep 17 00:00:00 2001 From: afiebig Date: Tue, 18 Jun 2019 14:45:23 -0400 Subject: [PATCH 3/4] Fix markdown style on Readme --- Changelog.md | 2 +- README.md | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Changelog.md b/Changelog.md index 50ce287..38c12a0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -14,7 +14,7 @@ y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.ht - Función para Detalle de Ventas. - Función para Totales. -## [1.0.0] - 2019-03-03 +## [1.0.0] - 2019-05-13 ### Added diff --git a/README.md b/README.md index 385fe7d..a24184a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Download and install **libserialport** dependency ([instructions](https://sigrok.org/wiki/Libserialport)) ```git clone git://sigrok.org/libserialport``` ### Drivers (This depends on the serial adapter you have) + - Driver USB Serial **Chipset CH340** for Windows: - Driver USB Serial **Chipset CH340** for macOS: - Driver USB Serial **Chipset Prolific** for macOS: @@ -14,12 +15,12 @@ Download and install **libserialport** dependency ([instructions](https://sigrok - Visual Studio 2017 + c++ utilities. - [msys2 - mingw-w64](http://www.msys2.org/) follow the instructions in the web site. - - Install mingw tolchain - - 32bits: ```pacman -S mingw-w64-i686-toolchain``` - - 64bits: ```pacman -S mingw-w64-x86_64-toolchain``` - - Install mingw cmocka - - 32bits: ```pacman -S mingw32/mingw-w64-i686-cmocka``` - - 64bits: ```pacman -S mingw64/mingw-w64-x86_64-cmocka``` + - Install mingw tolchain + - 32bits: ```pacman -S mingw-w64-i686-toolchain``` + - 64bits: ```pacman -S mingw-w64-x86_64-toolchain``` + - Install mingw cmocka + - 32bits: ```pacman -S mingw32/mingw-w64-i686-cmocka``` + - 64bits: ```pacman -S mingw64/mingw-w64-x86_64-cmocka``` - Swig (you can use [Chocolatey](https://chocolatey.org/)) ### macOS @@ -41,34 +42,34 @@ This instructions asume you have [homebrew](https://brew.sh/) installed. - swig - cmocka - ## Run / Examples & Installation -#### Build +### Build ```bash make build example=main ``` -#### Run +### Run ```bash make run example=main ``` -#### Debug +### Debug ```bash make debug example=main ``` -#### Installation +### Installation ```bash cp build/transbank.dylib /usr/local/lib ``` -#### Test +### Test + The project now uses [cmocka](https://cmocka.org) to run unit test. Once you have **cmocka** installed on yor machine, you can simply do: From 4edc0f750d19940c38d73f767aef9d6744ffc318 Mon Sep 17 00:00:00 2001 From: afiebig Date: Tue, 18 Jun 2019 16:02:57 -0400 Subject: [PATCH 4/4] Remove un implemented transacction --- Changelog.md | 1 - README.md | 52 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/Changelog.md b/Changelog.md index 38c12a0..c1e6e49 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,7 +11,6 @@ y este proyecto adhiere a [Semantic Versioning](http://semver.org/spec/v2.0.0.ht - Función para Anulación. - Función para Última Venta. -- Función para Detalle de Ventas. - Función para Totales. ## [1.0.0] - 2019-05-13 diff --git a/README.md b/README.md index a24184a..0bf358e 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,31 @@ -# Transbank POS - SDK in Clang +# Transbank POS - SDK en C -## Dev +## Desarrollo -Download and install **libserialport** dependency ([instructions](https://sigrok.org/wiki/Libserialport)) ```git clone git://sigrok.org/libserialport``` +Descarga e instala la dependencia **libserialport** ([instrucciones](https://sigrok.org/wiki/Libserialport)) ```git clone git://sigrok.org/libserialport``` -### Drivers (This depends on the serial adapter you have) +### Controladores (Dependiendo del adaptador/puerto serial que tengas) -- Driver USB Serial **Chipset CH340** for Windows: -- Driver USB Serial **Chipset CH340** for macOS: -- Driver USB Serial **Chipset Prolific** for macOS: +- USB Serial **Chipset CH340** para Windows: +- USB Serial **Chipset CH340** para macOS: +- USB Serial **Chipset Prolific** para macOS: ### Windows 10 -- Visual Studio 2017 + c++ utilities. +- Visual Studio 2017. -- [msys2 - mingw-w64](http://www.msys2.org/) follow the instructions in the web site. - - Install mingw tolchain +- [msys2 - mingw-w64](http://www.msys2.org/) sigue las instrucciones en la web: + - Instala mingw - 32bits: ```pacman -S mingw-w64-i686-toolchain``` - 64bits: ```pacman -S mingw-w64-x86_64-toolchain``` - Install mingw cmocka - 32bits: ```pacman -S mingw32/mingw-w64-i686-cmocka``` - 64bits: ```pacman -S mingw64/mingw-w64-x86_64-cmocka``` -- Swig (you can use [Chocolatey](https://chocolatey.org/)) +- Swig (puedes usar [Chocolatey](https://chocolatey.org/)) ### macOS -This instructions asume you have [homebrew](https://brew.sh/) installed. +Estas instrucciones asumen que tienes instalado [homebrew](https://brew.sh/). - ```brew install automake``` - ```brew install autoconf``` @@ -42,15 +42,13 @@ This instructions asume you have [homebrew](https://brew.sh/) installed. - swig - cmocka -## Run / Examples & Installation - -### Build +### Construir el Proyecto ```bash make build example=main ``` -### Run +### Ejecutar ejemplos ```bash make run example=main @@ -62,17 +60,31 @@ make run example=main make debug example=main ``` -### Installation +### Instalación ```bash -cp build/transbank.dylib /usr/local/lib +cp build/transbank.dll /ruta/en/tu/path ``` ### Test -The project now uses [cmocka](https://cmocka.org) to run unit test. -Once you have **cmocka** installed on yor machine, you can simply do: +Estamos usando [cmocka](https://cmocka.org) para ejecutar los test unitarios. +Una vez tengas **cmocka** instalado en tu maquina, debes ejecutar: ```bash make cmocka-test ``` + +### Generar una nueva versión + +Para generar una nueva versión se debe crear un nuevo pull request que contenga: + +1. Incrementar el número de versión en el archivo `version.rc` siguiendo la guía de SemVer. +2. Actualizar `Changelog.md` con los nuevos cambios/modificaciones incluidas en esta nueva versión. +3. Generar la DLL y el Wrapper (`make windows-wrapper`). + +Luego de mezclar el Pull Request: + +1. Crear inmediatamente un release en GitHub. +2. Incluir en el Release de GitHub la DLL creada. +3. Incluir también `libserialport-0.dll`.