Skip to content

Commit

Permalink
Merge pull request #26 from TransbankDevelopers/chore/prepare-release…
Browse files Browse the repository at this point in the history
…-1.4.0

Prepare release 1.4.0
  • Loading branch information
Alfredo Fiebig authored Jun 19, 2019
2 parents 75509b5 + b1d3020 commit 51e3fba
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 27 deletions.
25 changes: 25 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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 Totales.

## [1.0.0] - 2019-05-13

### 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.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
64 changes: 38 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +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`

If you´re using macos and Homebrew, you can install with `brew install libserialport`
### Controladores (Dependiendo del adaptador/puerto serial que tengas)

### Drivers (This depends on the serial adapter you have)

- Driver USB Serial **Chipset CH340** for Windows: <http://www.wch.cn/download/CH341SER_EXE.html>
- Driver USB Serial **Chipset CH340** for macOS: <https://blog.sengotta.net/signed-mac-os-driver-for-winchiphead-ch340-serial-bridge/>
- Driver USB Serial **Chipset Prolific** for macOS: <http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41>
- USB Serial **Chipset CH340** para Windows: <http://www.wch.cn/download/CH341SER_EXE.html>
- USB Serial **Chipset CH340** para macOS: <https://blog.sengotta.net/signed-mac-os-driver-for-winchiphead-ch340-serial-bridge/>
- USB Serial **Chipset Prolific** para macOS: <http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41>

### 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
- 32bits: `pacman -S mingw-w64-i686-toolchain`
- 64bits: `pacman -S mingw-w64-x86_64-toolchain`
- [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/))
- 32bits: ```pacman -S mingw32/mingw-w64-i686-cmocka```
- 64bits: ```pacman -S mingw64/mingw-w64-x86_64-cmocka```
- 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`
Expand All @@ -44,37 +42,51 @@ This instructions asume you have [homebrew](https://brew.sh/) installed.
- swig
- cmocka

### Run / Examples & Installation
### Construir el Proyecto

#### Build

```bash
make build example=main
```

#### Run
### Ejecutar ejemplos

```bash
make run example=main
```

#### Debug
### Debug

```bash
make debug example=main
```

#### Installation
### Instalación

```bash
cp build/transbank.dylib /usr/local/lib
cp build/transbank.dll /ruta/en/tu/path
```

#### 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:
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`.
35 changes: 35 additions & 0 deletions version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <windows.h>

// 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

0 comments on commit 51e3fba

Please sign in to comment.