From 8553cfb529a67a4375ffa151bba41b4dff7acc1f Mon Sep 17 00:00:00 2001 From: pavel Date: Sat, 28 Mar 2015 13:49:00 +0300 Subject: [PATCH] Fixed vs2008 vcproj, added prep for rel. scripts --- README.md | 12 +++- .../vsproj/hidusb-relay-cmd(vc2008).vcproj | 4 +- make_release_linux.sh | 56 +++++++++++++++++++ make_release_osx.sh | 47 ++++++++++++++++ make_release_win.bat | 56 +++++++++++++++++++ 5 files changed, 170 insertions(+), 5 deletions(-) create mode 100644 make_release_linux.sh create mode 100644 make_release_osx.sh create mode 100644 make_release_win.bat diff --git a/README.md b/README.md index 5adaa3a..9649707 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Our intent is to make these devices work on Linux, 64-bit Windows and other plat Binary downloads, documentation, bugs, TO-DOs and more ---------------------- -All this is in the [Github project](http://git.io/bGcxrQ) - see the wiki pages and Issues. +All this is in the [Github project](http://git.io/bGcxrQ) : releases, wiki pages and Issues. @@ -29,11 +29,17 @@ Current state A simple command-line utility for Linux (x86 or x64), Apple OS X and Windows (XP and newer, 32 and 64-bit). -Source of the Windows DLL (USB_RELAY_DEVICE.DLL) and GUI demo app is now available. This is quite compatible with the binaries from the device vendors. +Shared library for Linux (x86 or x64), Apple OS X and Windows. +Python (CPython) - supported thru the shared library + +The Windows version of the shared lib, `USB_RELAY_DEVICE.DLL`, is backward compatible with the binary from the device vendor. +Windows GUI demo app is similar to the device vendor's but written in C++/CLI. + +Required to build: - Windows version: builds with VC++ and WDK 7.1, or VC++ 2013 "community edition" with its matching SDK (Win8.1). -- Linux version builds with gcc and libusb v. 0.1. Tested on RH and Ubuntu. +- Linux version builds with gcc and libusb v. 0.1. Tested on RH, Ubuntu, Mint. - OS-X 10.9+ version builds with Xcode and plain IOKit libraries. diff --git a/commandline/vsproj/hidusb-relay-cmd(vc2008).vcproj b/commandline/vsproj/hidusb-relay-cmd(vc2008).vcproj index 0cbe8d7..6ec7963 100644 --- a/commandline/vsproj/hidusb-relay-cmd(vc2008).vcproj +++ b/commandline/vsproj/hidusb-relay-cmd(vc2008).vcproj @@ -18,7 +18,7 @@ @@ -90,7 +90,7 @@ diff --git a/make_release_linux.sh b/make_release_linux.sh new file mode 100644 index 0000000..bf778bc --- /dev/null +++ b/make_release_linux.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# Make release, Linux binaries +# Run this after build +# TODO detect x86/x64 build mode ?? + +# Release tree: +# bin-Linux-x86/ +# bin-Linux-x64/ +# doc/ +# usb_relay_device_lib_devel/ +# (nothing for linux?) +# Test/ + +echo "TO DO!" && exit 1 + +set -e + +export REL=_rel + +mkdirr() { + if [ ! -d $1 ]; then mkdir -r $1 ; fi +} + +mkdirr $REL + +copy_x86() { +mkdirr $1 +cp commandline/makemake/hidusb-relay-cmd $1 +cp commandline/makemake/usb_relay_device.so $1 +} + +copy_x64() { +mkdirr $1 +cp commandline/makemake/hidusb-relay-cmd $1 +cp commandline/makemake/usb_relay_device.so $1 +} + +copy_x86 $REL/bin-Linux-x86 +# copy_x64 $REL/bin-Linux-x64 + +copy_noarch() { +mkdirr $REL/doc +cp doc/Readme_USB-Relay-DLL.md $REL/doc/ +cp commandline/README-hidusb-relay-cmd.txt $REL/doc/ + +mkdirr $REL/usb_relay_device_lib_devel +cp lib/usb_relay_device.h $REL/usb_relay_device_lib_devel +} + +copy_noarch + +# Tests ... +mkdirr $REL/Test +cp commandline/relay1-pulse.sh $REL/Test + +echo "Done" diff --git a/make_release_osx.sh b/make_release_osx.sh new file mode 100644 index 0000000..eef58c5 --- /dev/null +++ b/make_release_osx.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Make release, OS X binaries, universal +# Run this after build + +# Release tree: +# bin-OSX/ +# doc/ +# usb_relay_device_lib_devel/ +# OS X framework ?? +# Test/ + +echo "TO DO!" && exit 1 + +set -e + +export REL=_rel + +mkdirr() { + if [ ! -d $1 ]; then mkdir -r $1 ; fi +} + +mkdirr $REL + +copy_bin_osx() { +mkdirr $1 +cp commandline/makeosx/hidusb-relay-cmd $1 +cp commandline/makeosx/usb_relay_device.dylib $1 +} + +copy_bin_osx $REL/bin-OSX + +copy_noarch() { +mkdirr $REL/doc +cp doc/Readme_USB-Relay-DLL.md $REL/doc/ +cp commandline/README-hidusb-relay-cmd.txt $REL/doc/ + +mkdirr $REL/usb_relay_device_lib_devel +cp lib/usb_relay_device.h $REL/usb_relay_device_lib_devel +} + +copy_noarch + +# Tests ... +mkdirr $REL/Test +cp commandline/relay1-pulse.sh $REL/Test + +echo "Done" diff --git a/make_release_win.bat b/make_release_win.bat new file mode 100644 index 0000000..387ab6c --- /dev/null +++ b/make_release_win.bat @@ -0,0 +1,56 @@ +@echo off +: Make release, Windows binaries +: Run this after binaries are built + +: Release tree: +: bin-Win32/ +: bin-Win64/ +: doc/ +: Test/ +: usb_relay_device_lib_devel/ +: Win32, Win64 ... +: bin-Linux-x86/ +: bin-Linux-x64/ +: bin-OSX/ + +set REL=_rel +if not exist _rel mkdir _rel +if not exist %REL%\bin-Win32 mkdir %REL%\bin-Win32 +if not exist %REL%\bin-Win64 mkdir %REL%\bin-Win64 + +@echo Copying x86 binaries... +copy Windows-VS\Release\USB_RELAY_DEVICE.dll %REL%\bin-Win32 +: ... vp +copy Windows-VS\Release\hidusb-relay-cmd.exe %REL%\bin-Win32 +: ... vp +copy Windows-VS\Release\GUIapp.exe %REL%\bin-Win32 +: ... vp + +if not exist Windows-VS\x64\Release\* goto L64_1 +@echo Copying x64 binaries... +copy Windows-VS\x64\Release\USB_RELAY_DEVICE.dll %REL%\bin-Win64 +: ... vp +copy Windows-VS\x64\Release\hidusb-relay-cmd.exe %REL%\bin-Win64 +: ... vp +copy Windows-VS\x64\Release\GUIapp.exe %REL%\bin-Win64 +: ... vp +:L64_1 + +@echo Copying docum ... +if not exist %REL%\doc mkdir %REL%\doc +copy doc\Readme_USB-Relay-DLL.md %REL%\doc +copy commandline\README-hidusb-relay-cmd.txt %REL%\doc + +@echo Copying developer stuff ... +if not exist %REL%\usb_relay_device_lib_devel mkdir %REL%\usb_relay_device_lib_devel +mkdir %REL%\usb_relay_device_lib_devel\Win32 +mkdir %REL%\usb_relay_device_lib_devel\Win64 +copy lib\usb_relay_device.h %REL%\usb_relay_device_lib_devel +copy Windows-VS\Release\USB_RELAY_DEVICE.lib %REL%\usb_relay_device_lib_devel\Win32 +copy Windows-VS\x64\Release\USB_RELAY_DEVICE.lib %REL%\usb_relay_device_lib_devel\Win64 + +: ?? Copy also PDBs? debug binaries? + +: Test ... + +@echo Done. -- 2.25.1