Skip to content

Commit

Permalink
Fixed vs2008 vcproj, added prep for rel. scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel committed Mar 28, 2015
1 parent efc403e commit 8553cfb
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 5 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand All @@ -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.


Expand Down
4 changes: 2 additions & 2 deletions commandline/vsproj/hidusb-relay-cmd(vc2008).vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="Debug"
ConfigurationType="1"
>
Expand Down Expand Up @@ -90,7 +90,7 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="Release"
ConfigurationType="1"
>
Expand Down
56 changes: 56 additions & 0 deletions make_release_linux.sh
Original file line number Diff line number Diff line change
@@ -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"
47 changes: 47 additions & 0 deletions make_release_osx.sh
Original file line number Diff line number Diff line change
@@ -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"
56 changes: 56 additions & 0 deletions make_release_win.bat
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 8553cfb

Please sign in to comment.