From ef1ededb2f39a3297111ac0f01c50f1dcaf98bfe Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 12 Jun 2015 15:40:14 +0200 Subject: [PATCH 01/21] ! fix remutx windows API calls --- remutex/src/windows.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/remutex/src/windows.rs b/remutex/src/windows.rs index 2130554ef..f0b1fdb8f 100644 --- a/remutex/src/windows.rs +++ b/remutex/src/windows.rs @@ -19,7 +19,10 @@ impl ReentrantMutex { mem::uninitialized() } - pub unsafe fn init(&mut self) -> ReentrantMutex { + //pub unsafe fn init(&mut self) -> ReentrantMutex { + // ffi::InitializeCriticalSection(self.inner.get()); + //} + pub unsafe fn init(&mut self) { ffi::InitializeCriticalSection(self.inner.get()); } @@ -42,7 +45,7 @@ impl ReentrantMutex { } mod ffi { - use libc::{LPVOID, LONG, HANDLE, c_ulong}; + use libc::{LPVOID, LONG, HANDLE, c_ulong, BOOLEAN}; pub type ULONG_PTR = c_ulong; #[repr(C)] From 0983e1a43f3dc90ee92c095f77e1307d26d63bd4 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 12 Jun 2015 17:23:26 +0200 Subject: [PATCH 02/21] + extern defs for Windows --- libhdf5-sys/src/h5p.rs | 2 +- src/globals.rs | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/libhdf5-sys/src/h5p.rs b/libhdf5-sys/src/h5p.rs index cc14ef1c9..37a284b58 100644 --- a/libhdf5-sys/src/h5p.rs +++ b/libhdf5-sys/src/h5p.rs @@ -111,7 +111,7 @@ extern { pub static H5P_LST_LINK_ACCESS_g: hid_t; } -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "windows"))] extern { // Property list classes (OSX version of the library) pub static H5P_CLS_ROOT_ID_g: hid_t; diff --git a/src/globals.rs b/src/globals.rs index b65386834..61d2f17c5 100644 --- a/src/globals.rs +++ b/src/globals.rs @@ -176,6 +176,41 @@ link_hid!(H5T_NATIVE_UINT_FAST64, H5T_NATIVE_UINT_FAST64_g); #[cfg(target_os = "macos")] link_hid!(H5P_LST_LINK_CREATE_ID, H5P_LST_LINK_CREATE_ID_g); #[cfg(target_os = "macos")] link_hid!(H5P_LST_LINK_ACCESS_ID, H5P_LST_LINK_ACCESS_ID_g); +// Property list classes (Windows version of the library) +#[cfg(target_os = "windows")] link_hid!(H5P_ROOT, H5P_CLS_ROOT_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_OBJECT_CREATE, H5P_CLS_OBJECT_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_FILE_CREATE, H5P_CLS_FILE_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_FILE_ACCESS, H5P_CLS_FILE_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_DATASET_CREATE, H5P_CLS_DATASET_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_DATASET_ACCESS, H5P_CLS_DATASET_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_DATASET_XFER, H5P_CLS_DATASET_XFER_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_FILE_MOUNT, H5P_CLS_FILE_MOUNT_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_GROUP_CREATE, H5P_CLS_GROUP_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_GROUP_ACCESS, H5P_CLS_GROUP_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_DATATYPE_CREATE, H5P_CLS_DATATYPE_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_DATATYPE_ACCESS, H5P_CLS_DATATYPE_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_STRING_CREATE, H5P_CLS_STRING_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_ATTRIBUTE_CREATE, H5P_CLS_ATTRIBUTE_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_OBJECT_COPY, H5P_CLS_OBJECT_COPY_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LINK_CREATE, H5P_CLS_LINK_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LINK_ACCESS, H5P_CLS_LINK_ACCESS_ID_g); + +// Default property lists (Windows version of the library) +#[cfg(target_os = "windows")] link_hid!(H5P_LST_FILE_CREATE_ID, H5P_LST_FILE_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_FILE_ACCESS_ID, H5P_LST_FILE_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_DATASET_CREATE_ID, H5P_LST_DATASET_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_DATASET_ACCESS_ID, H5P_LST_DATASET_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_DATASET_XFER_ID, H5P_LST_DATASET_XFER_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_FILE_MOUNT_ID, H5P_LST_FILE_MOUNT_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_GROUP_CREATE_ID, H5P_LST_GROUP_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_GROUP_ACCESS_ID, H5P_LST_GROUP_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_DATATYPE_CREATE_ID, H5P_LST_DATATYPE_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_DATATYPE_ACCESS_ID, H5P_LST_DATATYPE_ACCESS_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_ATTRIBUTE_CREATE_ID, H5P_LST_ATTRIBUTE_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_OBJECT_COPY_ID, H5P_LST_OBJECT_COPY_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_LINK_CREATE_ID, H5P_LST_LINK_CREATE_ID_g); +#[cfg(target_os = "windows")] link_hid!(H5P_LST_LINK_ACCESS_ID, H5P_LST_LINK_ACCESS_ID_g); + // Error class link_hid!(H5E_ERR_CLS, H5E_ERR_CLS_g); From fa6ba01d4d95a72a619aa846471927b62d70867f Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Mon, 15 Jun 2015 13:06:33 +0200 Subject: [PATCH 03/21] + ignore Vim & Vagrant files --- .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 731599926..021e249c2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,11 @@ Cargo.lock **/target/release /tmp.* **/*.h5 + +# vim +*~ +*.swp + +# vagrant +.vagrant/ + From 8d0f77933ee271f05c8b64ecb9636f5f4ae8485a Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Mon, 15 Jun 2015 13:22:05 +0200 Subject: [PATCH 04/21] + allow non-standard type names --- remutex/src/windows.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/remutex/src/windows.rs b/remutex/src/windows.rs index f0b1fdb8f..3b565a433 100644 --- a/remutex/src/windows.rs +++ b/remutex/src/windows.rs @@ -46,8 +46,10 @@ impl ReentrantMutex { mod ffi { use libc::{LPVOID, LONG, HANDLE, c_ulong, BOOLEAN}; + #[allow(non_camel_case_types)] pub type ULONG_PTR = c_ulong; + #[allow(non_snake_case)] #[repr(C)] pub struct CRITICAL_SECTION { CriticalSectionDebug: LPVOID, From 56181dbf5f580c1373229f48547e0f104baa2d7f Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Mon, 15 Jun 2015 13:46:48 +0200 Subject: [PATCH 05/21] + build instructions on Windows --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 1ddcf0687..68e082ea1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,21 @@ Thread-safe Rust bindings and high-level wrappers for the HDF5 library API. Note that this project is in its early development stage and hence things are likely to change and break on a regular basis. +## Building + +### Windows + +Building hdf5-rs on Windows currently needs some manual preparation steps: + +* A HDF5 binary, namely the shared library `hdf5.dll` is needed for linking. For (currently) unknown reasons, the prebuilt binaries from [HDF-Group](http://www.hdfgroup.org/) do not work. It has to be build with gcc. Instructions for building HDF5 on Windows can be found [here](http://www.hdfgroup.org/HDF5/release/cmakebuild.html). For building the [TDM distribution](http://tdm-gcc.tdragon.net/)of MinGW-GCC is recommended, as it contains bintools for both 32bit & 64bit. + +* Set the environment variable `HDF5_LIBDIR` to point to the folder with the newly build `hdf5.dll`. Explanation: `pkg-config` will silently fail if not present and the path from the before-mentioned environment variable is added to the rustc commands by cargo. (Hint: Avoid path names with spaces, as they are difficult to escape correctly). + +* Run `cargo build` and/or `cargo test` to build and rust library and run the tests, repsectively. Hint: After changing the build environment, e.g. `HDF5_LIBDIR`, a `cargo clean` might be necessary. + +* Make sure `hdf5.dll` is on your search path, otherwise the tests will fail. + + ## License `hdf5-rs` is primarily distributed under the terms of both the MIT license and the From e7eb0fe4494715dfd5d0bcde1da4b0c4c63435ef Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Mon, 15 Jun 2015 13:49:48 +0200 Subject: [PATCH 06/21] ! fix typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68e082ea1..28f1bb278 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ and break on a regular basis. Building hdf5-rs on Windows currently needs some manual preparation steps: -* A HDF5 binary, namely the shared library `hdf5.dll` is needed for linking. For (currently) unknown reasons, the prebuilt binaries from [HDF-Group](http://www.hdfgroup.org/) do not work. It has to be build with gcc. Instructions for building HDF5 on Windows can be found [here](http://www.hdfgroup.org/HDF5/release/cmakebuild.html). For building the [TDM distribution](http://tdm-gcc.tdragon.net/)of MinGW-GCC is recommended, as it contains bintools for both 32bit & 64bit. +* A HDF5 binary, namely the shared library `hdf5.dll` is needed for linking. For (currently) unknown reasons, the prebuilt binaries from [HDF-Group](http://www.hdfgroup.org/) do not work (they are build with MSVC). It has to be build with gcc. Instructions for building HDF5 on Windows can be found [here](http://www.hdfgroup.org/HDF5/release/cmakebuild.html). For building the [TDM distribution](http://tdm-gcc.tdragon.net/) of MinGW-GCC is recommended, as it contains bintools for both 32bit & 64bit. * Set the environment variable `HDF5_LIBDIR` to point to the folder with the newly build `hdf5.dll`. Explanation: `pkg-config` will silently fail if not present and the path from the before-mentioned environment variable is added to the rustc commands by cargo. (Hint: Avoid path names with spaces, as they are difficult to escape correctly). From fadf168296f857fa92c6d30278e8c455c7f47b65 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 26 Jun 2015 08:45:18 +0200 Subject: [PATCH 07/21] + inline attribute for winapi wrapper add #[inline] attributes for simple winapi wrappers as suggested by @retep998 https://github.com/retep998/hdf5-rs/commit/c121ce2f280654d60bbc6ef060c809cc22d5eeef --- remutex/src/windows.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/remutex/src/windows.rs b/remutex/src/windows.rs index 3b565a433..19493754a 100644 --- a/remutex/src/windows.rs +++ b/remutex/src/windows.rs @@ -15,17 +15,17 @@ unsafe impl Send for ReentrantMutex {} unsafe impl Sync for ReentrantMutex {} impl ReentrantMutex { + #[inline] pub unsafe fn uninitialized() -> ReentrantMutex { mem::uninitialized() } - //pub unsafe fn init(&mut self) -> ReentrantMutex { - // ffi::InitializeCriticalSection(self.inner.get()); - //} + #[inline] pub unsafe fn init(&mut self) { ffi::InitializeCriticalSection(self.inner.get()); } + #[inline] pub unsafe fn lock(&self) { ffi::EnterCriticalSection(self.inner.get()); } @@ -35,10 +35,12 @@ impl ReentrantMutex { ffi::TryEnterCriticalSection(self.inner.get()) != 0 } + #[inline] pub unsafe fn unlock(&self) { ffi::LeaveCriticalSection(self.inner.get()); } + #[inline] pub unsafe fn destroy(&self) { ffi::DeleteCriticalSection(self.inner.get()); } From 66e26560a0ff394688d8770796814ccfc0fafbd7 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 15:29:20 +0200 Subject: [PATCH 08/21] + setup rust --- appveyor.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..f63ccb4a1 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,22 @@ +# appveyor.yml +# +# vim: sw=4 ts=4 et +# +environment: + RUST_TARGET: x86_64-pc-windows-gnu + CARGO_TARGET: x86_64-pc-windows-gnu + HDF5_LIBDIR: C:\hdf5_bin + +install: + # get rust & cargo + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rustc-1.1.0-${RUST_TARGET}.exe" + - rustc-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" + + - set PATH=%PATH%;C:\Program Files\Rust\bin + + # output version info + - rustc --version + - cargo --version + +build: false + From c2f36d54aef39b2940c7a4a1f2f02a8078ca259b Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 15:46:47 +0200 Subject: [PATCH 09/21] ! fix ps environment variable --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f63ccb4a1..64ee5d881 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,12 +4,11 @@ # environment: RUST_TARGET: x86_64-pc-windows-gnu - CARGO_TARGET: x86_64-pc-windows-gnu HDF5_LIBDIR: C:\hdf5_bin install: # get rust & cargo - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rustc-1.1.0-${RUST_TARGET}.exe" + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rustc-1.1.0-${env:RUST_TARGET}.exe" - rustc-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" - set PATH=%PATH%;C:\Program Files\Rust\bin From 9f3ec7ccb8df21cc73c631e7045ed2c3791ccc0a Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 15:59:21 +0200 Subject: [PATCH 10/21] ! fix rust installer name --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 64ee5d881..a8c6c18de 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ environment: install: # get rust & cargo - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rustc-1.1.0-${env:RUST_TARGET}.exe" + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-1.1.0-${env:RUST_TARGET}.exe" - rustc-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" - set PATH=%PATH%;C:\Program Files\Rust\bin From 5cb5fd3d6ae594a0a764df52d9d60ae15d3844ee Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 16:10:43 +0200 Subject: [PATCH 11/21] ! fix rust installer name (now really) --- appveyor.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a8c6c18de..7be24eba2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,10 +9,13 @@ environment: install: # get rust & cargo - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-1.1.0-${env:RUST_TARGET}.exe" - - rustc-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" + - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" - set PATH=%PATH%;C:\Program Files\Rust\bin + # get hdf5 binary (first approach, later this should be build locally) + - ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" + # output version info - rustc --version - cargo --version From 02173586272be869def3200572215faef6551078 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 16:21:37 +0200 Subject: [PATCH 12/21] + run cargo test --- appveyor.yml | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7be24eba2..0fab749a2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,24 +1,34 @@ # appveyor.yml # -# vim: sw=4 ts=4 et +# vim: sw=2 ts=2 et # + +version: 0.1.{build} + environment: - RUST_TARGET: x86_64-pc-windows-gnu - HDF5_LIBDIR: C:\hdf5_bin + RUST_TARGET: x86_64-pc-windows-gnu + HDF5_LIBDIR: C:\hdf5_bin install: - # get rust & cargo - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-1.1.0-${env:RUST_TARGET}.exe" - - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" + # get rust & cargo + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-1.1.0-${env:RUST_TARGET}.exe" + - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" - - set PATH=%PATH%;C:\Program Files\Rust\bin + - set PATH=%PATH%;C:\Program Files\Rust\bin - # get hdf5 binary (first approach, later this should be build locally) - - ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" + # get hdf5 binary (just get a prebuild binary for now) + - ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" + - dir + - mkdir C:\hdf5_bin + - move .\hdf5.dll C:\hdf5_bin + - set PATH=C:\hdf5_bin;%PATH% - # output version info - - rustc --version - - cargo --version + # output version info + - rustc --version + - cargo --version build: false +test-script: + - cargo test + From 49957e2b9e66f4e27ad56f8d3ecce28c45f97792 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 16:27:04 +0200 Subject: [PATCH 13/21] ! fix test_script typo --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0fab749a2..db77fb0ac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,6 +29,6 @@ install: build: false -test-script: +test_script: - cargo test From 4f7a5433ea0eb46233ec29b02d473e72e2c5a054 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 16:58:02 +0200 Subject: [PATCH 14/21] ! use WebRequest for file download --- appveyor.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index db77fb0ac..e7bf194ce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,11 +17,15 @@ install: - set PATH=%PATH%;C:\Program Files\Rust\bin # get hdf5 binary (just get a prebuild binary for now) - - ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" - - dir - - mkdir C:\hdf5_bin - - move .\hdf5.dll C:\hdf5_bin + #- ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" + #- mkdir C:\hdf5_bin + #- move .\hdf5.dll C:\hdf5_bin + - ps: | + $src = "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" + $dst = "C:\hdf5_bin\hdf5.dll" + Invoke-WebRequest $src -OutFile $dst - set PATH=C:\hdf5_bin;%PATH% + - dir C:\hdf5_bin # output version info - rustc --version @@ -30,5 +34,5 @@ install: build: false test_script: - - cargo test + - cargo test --verbose From e4683c954c17ea7777424ce305865faa2c8554ae Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 17:01:22 +0200 Subject: [PATCH 15/21] ! fix ps script indentation --- appveyor.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e7bf194ce..3ecbbb660 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,10 +20,7 @@ install: #- ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" #- mkdir C:\hdf5_bin #- move .\hdf5.dll C:\hdf5_bin - - ps: | - $src = "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" - $dst = "C:\hdf5_bin\hdf5.dll" - Invoke-WebRequest $src -OutFile $dst + - ps: Invoke-WebRequest "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" -OutFile "C:\hdf5_bin\hdf5.dll" - set PATH=C:\hdf5_bin;%PATH% - dir C:\hdf5_bin From 32cb3f9651fd43837941138c164debcc96f0c051 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Thu, 2 Jul 2015 17:10:47 +0200 Subject: [PATCH 16/21] + generate missing folder --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3ecbbb660..566980674 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ install: # get hdf5 binary (just get a prebuild binary for now) #- ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" - #- mkdir C:\hdf5_bin + - mkdir C:\hdf5_bin #- move .\hdf5.dll C:\hdf5_bin - ps: Invoke-WebRequest "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" -OutFile "C:\hdf5_bin\hdf5.dll" - set PATH=C:\hdf5_bin;%PATH% From 09de8cd93d38016552c423d10735733631651bc3 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 3 Jul 2015 10:57:03 +0200 Subject: [PATCH 17/21] ! use github release for hdf5 binary --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 566980674..c46c94eed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ install: #- ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" - mkdir C:\hdf5_bin #- move .\hdf5.dll C:\hdf5_bin - - ps: Invoke-WebRequest "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" -OutFile "C:\hdf5_bin\hdf5.dll" + - ps: Invoke-WebRequest "https://github.com/kkirstein/hdf5-rs/releases/download/alpha/hdf5.dll" -OutFile "C:\hdf5_bin\hdf5.dll" - set PATH=C:\hdf5_bin;%PATH% - dir C:\hdf5_bin From 55b27428acaf816bbd79f39b740fb886439dc9a4 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 3 Jul 2015 12:44:21 +0200 Subject: [PATCH 18/21] + prepare for muliple rust versions --- appveyor.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c46c94eed..f4c93a095 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,19 +7,22 @@ version: 0.1.{build} environment: RUST_TARGET: x86_64-pc-windows-gnu + RUST_VERSION: 1.1.0 HDF5_LIBDIR: C:\hdf5_bin +#matrix: +# - RUST_VERSION: 1.1.0 +# - RUST_VERSION: nightly + install: # get rust & cargo - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-1.1.0-${env:RUST_TARGET}.exe" - - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust" + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:RUST_TARGET}.exe" + - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust-%RUST_VERSION%" - - set PATH=%PATH%;C:\Program Files\Rust\bin + - set PATH=%PATH%;C:\Program Files\Rust-%RUST_VERSION%\bin # get hdf5 binary (just get a prebuild binary for now) - #- ps: Start-FileDownload "https://www.dropbox.com/s/8i2dkznq2bpu0js/hdf5.dll?dl=0" - mkdir C:\hdf5_bin - #- move .\hdf5.dll C:\hdf5_bin - ps: Invoke-WebRequest "https://github.com/kkirstein/hdf5-rs/releases/download/alpha/hdf5.dll" -OutFile "C:\hdf5_bin\hdf5.dll" - set PATH=C:\hdf5_bin;%PATH% - dir C:\hdf5_bin From ae767520f035e9e56070365b71d4f84cefe82f8f Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 3 Jul 2015 13:04:27 +0200 Subject: [PATCH 19/21] ! enable build with nightly rust --- appveyor.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f4c93a095..bd16ec19e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,25 +7,23 @@ version: 0.1.{build} environment: RUST_TARGET: x86_64-pc-windows-gnu - RUST_VERSION: 1.1.0 + #RUST_VERSION: 1.1.0 HDF5_LIBDIR: C:\hdf5_bin -#matrix: -# - RUST_VERSION: 1.1.0 -# - RUST_VERSION: nightly +matrix: + - RUST_VERSION: 1.1.0 + - RUST_VERSION: nightly install: # get rust & cargo - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:RUST_TARGET}.exe" - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust-%RUST_VERSION%" - - set PATH=%PATH%;C:\Program Files\Rust-%RUST_VERSION%\bin # get hdf5 binary (just get a prebuild binary for now) - mkdir C:\hdf5_bin - ps: Invoke-WebRequest "https://github.com/kkirstein/hdf5-rs/releases/download/alpha/hdf5.dll" -OutFile "C:\hdf5_bin\hdf5.dll" - set PATH=C:\hdf5_bin;%PATH% - - dir C:\hdf5_bin # output version info - rustc --version From 4fee1d96065cae86a435093960d30523f7905620 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 3 Jul 2015 13:07:56 +0200 Subject: [PATCH 20/21] ! fix environment indent --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bd16ec19e..d5c201366 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,9 +10,9 @@ environment: #RUST_VERSION: 1.1.0 HDF5_LIBDIR: C:\hdf5_bin -matrix: - - RUST_VERSION: 1.1.0 - - RUST_VERSION: nightly + matrix: + - RUST_VERSION: 1.1.0 + - RUST_VERSION: nightly install: # get rust & cargo From 17674b4a8694027b8049a36f5191fa3e2bb18508 Mon Sep 17 00:00:00 2001 From: Kay-Uwe Kirstein Date: Fri, 3 Jul 2015 14:37:20 +0200 Subject: [PATCH 21/21] ! fix rust installer name for multiple versions --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d5c201366..0fcf27def 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,7 @@ environment: install: # get rust & cargo - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:RUST_TARGET}.exe" - - rust-1.1.0-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust-%RUST_VERSION%" + - rust-%RUST_VERSION%-%RUST_TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files\Rust-%RUST_VERSION%" - set PATH=%PATH%;C:\Program Files\Rust-%RUST_VERSION%\bin # get hdf5 binary (just get a prebuild binary for now)