diff --git a/.gitignore b/.gitignore index 0fc1e2e..4eb3de2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.mexa64 *.mexw64 *.exe +*.dll src/Experiments src/Algorithms/orensemble/boostrank-* *~ diff --git a/doc/windows-install.md b/doc/windows-install.md index 92a4eff..c3d6ab4 100644 --- a/doc/windows-install.md +++ b/doc/windows-install.md @@ -1,6 +1,6 @@ # Windows instalation process -The following steps provide all the methos but 'ORBoost': +The following steps provide all the methods but 'ORBoost': 1. Install a [supported compiler](https://es.mathworks.com/support/compilers.html). The easier way is to use the "Add-ons" assistant to download and install [MinGW](http://es.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html). @@ -8,12 +8,13 @@ and install [MinGW](http://es.mathworks.com/help/matlab/matlab_external/install- 1. Inside MATLAB's console, run `make` in folder `src\Algorithms` 1. From `src` run `runtestssingle` to check the instalation. -To compile 'ORBoost' you need to install 'w64-mingw32': +We provide binaries and dlls for 'ORBoost' to avoid the *complex* build task in Windows. Make will unpak all the binary files. If you need to compile your own binaries, these are the steeps. -1. Open a terminal by presing Windows key and tipping 'cmd.exe'. -1. Set Windows path to your 'w64-mingw32' installation binaries dir, for instance: +1. Install [w64-mingw32](https://mingw-w64.org). +1. Open a terminal by presing Windows key and type `cmd.exe`. +1. Set Windows path to your `w64-mingw32` installation binaries dir, for instance: ``` set PATH=C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev0\mingw64\bin;"%PATH%" ``` -1. Change to directory `orca\src\Algorithms\orensemble\` (Right now only works in `orca\src\Algorithms\orensemble\orensemble\`.). +1. Move to directory `orca\src\Algorithms\orensemble\orensemble`. 1. Run `mingw32-make.exe Makefile.win all`. diff --git a/src/Algorithms/orensemble/Makefile.win b/src/Algorithms/orensemble/Makefile.win index 0dee5f5..feb7509 100644 --- a/src/Algorithms/orensemble/Makefile.win +++ b/src/Algorithms/orensemble/Makefile.win @@ -1,10 +1,7 @@ -all: untar +all: mingw32-make -e -C orensemble - mv orensemble/boostrank-predict . - mv orensemble/boostrank-train . - -untar: - #tar xzf orensemble.tar.gz - -clean: - #rm -Rf orensemble + move orensemble\boostrank-predict.exe . + move orensemble\boostrank-train.exe . + copy "orensemble\libgcc_s_seh-1.dll" . + copy "orensemble\libstdc++-6.dll" . + copy "orensemble\libwinpthread-1.dll" . diff --git a/src/Algorithms/orensemble/make.m b/src/Algorithms/orensemble/make.m index 80c61dd..01ae2b3 100644 --- a/src/Algorithms/orensemble/make.m +++ b/src/Algorithms/orensemble/make.m @@ -1,9 +1,14 @@ % ORBoost does not have a matlab's interface. There we use external -% Makefile +% Makefile function make(opt) if nargin < 1 try - system('make'); + if ispc + warning('Compilation of ORBoost is not supported from MATLAB console in Windows. Unpaking binaries. Please see instalation instructions. ') + unzip('orensemble-binaries-win.zip') + else + system('make'); + end catch err fprintf('Error: %s failed\n', err.stack(1).file); disp(err.message); @@ -17,4 +22,4 @@ function make(opt) otherwise error('make option "%s" not recognized', opt) end -end \ No newline at end of file +end diff --git a/src/Algorithms/orensemble/orensemble-binaries-win.zip b/src/Algorithms/orensemble/orensemble-binaries-win.zip new file mode 100644 index 0000000..8823ebf Binary files /dev/null and b/src/Algorithms/orensemble/orensemble-binaries-win.zip differ