From 5f1fa99dacaeed358db74d54ad1415bc596940a6 Mon Sep 17 00:00:00 2001 From: Jason Dagit Date: Mon, 24 Oct 2016 11:51:18 -0700 Subject: [PATCH 1/4] Add MSVC install instructions --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 64d4a9ea..3d0d18b4 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,31 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). into your cargo project, right next to your Cargo.toml. +### Windows (MSVC) + +1. Unpack SDL2-devel-2.0.x-VC.zip to a folder of your choosing (You can delete it afterwards). +2. Copy all lib files from + > SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\ + + to (for Rust 1.6 and above) + > C:\Program Files\Rust\\**lib**\rustlib\x86_64-pc-windows-msvc\lib + + or to (for Rust versions 1.5 and below) + > C:\Program Files\Rust\\**bin**\rustlib\x86_64-pc-windows-msvc\lib + + or to your library folder of choice, and ensure you have a system environment variable of + > LIB = C:\your\rust\library\folder + + For Rustup users, this folder will be in + > C:\Users\{Your Username}\.multirust\toolchains\{current toolchain}\lib\rustlib\{current toolchain}\lib + + Where current toolchain is likely `stable-x86_64-pc-windows-msvc`. + +3. Copy SDL2.dll from + > SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\ + + into your cargo project, right next to your Cargo.toml. + # Installation If you're using [cargo][crates] to manage your project, you can From 3bbebbbee1486004b062cddd97e0e9d8cff691c9 Mon Sep 17 00:00:00 2001 From: Jason Dagit Date: Mon, 24 Oct 2016 17:33:29 -0700 Subject: [PATCH 2/4] Changes requested in PR --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3d0d18b4..a91ed314 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,6 @@ use_sdl2_mac_framework = ["sdl2/use_mac_framework"] ``` ### Windows (MinGW) -On Windows, make certain you are using the MinGW version of SDL; the native -version will crash on `sdl2::init`. 1. Download mingw development libraries from http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). @@ -127,8 +125,9 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). ### Windows (MSVC) -1. Unpack SDL2-devel-2.0.x-VC.zip to a folder of your choosing (You can delete it afterwards). -2. Copy all lib files from +1. Download MSVC development libraries from http://www.libsdl.org/ (SDL2-devel-2.0.x-VC.zip). +2. Unpack SDL2-devel-2.0.x-VC.zip to a folder of your choosing (You can delete it afterwards). +3. Copy all lib files from > SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\ to (for Rust 1.6 and above) @@ -145,7 +144,7 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). Where current toolchain is likely `stable-x86_64-pc-windows-msvc`. -3. Copy SDL2.dll from +4. Copy SDL2.dll from > SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\ into your cargo project, right next to your Cargo.toml. From da2de4b50f67a05d9a95a65a533e18e18bbb117f Mon Sep 17 00:00:00 2001 From: Jason Dagit Date: Mon, 24 Oct 2016 17:36:12 -0700 Subject: [PATCH 3/4] Update rustup paths --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a91ed314..fddc7cc4 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,10 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). or to your library folder of choice, and ensure you have a system environment variable of > LIBRARY_PATH = C:\your\rust\library\folder - For Multirust Users, this folder will be in - > C:\Users\{Your Username}\AppData\Local\.multirust\toolchains\{current toolchain}\lib\rustlib\x86_64-pc-windows-gnu\lib + For Rustup users, this folder will be in + > C:\Users\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib + + Where current toolchain is likely `stable-x86_64-pc-windows-gnu`. 4. Copy SDL2.dll from > SDL2-devel-2.0.x-mingw\SDL2-2.0.x\x86_64-w64-mingw32\bin @@ -140,7 +142,7 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). > LIB = C:\your\rust\library\folder For Rustup users, this folder will be in - > C:\Users\{Your Username}\.multirust\toolchains\{current toolchain}\lib\rustlib\{current toolchain}\lib + > C:\Users\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib Where current toolchain is likely `stable-x86_64-pc-windows-msvc`. From 84101a4cd7c6d29f7b7fb2e1fbeb81cb6463f7c0 Mon Sep 17 00:00:00 2001 From: Jason Dagit Date: Mon, 24 Oct 2016 17:39:42 -0700 Subject: [PATCH 4/4] Fix 2 more path typos These typos only show up in the rendered markdown. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fddc7cc4..08be8185 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). > LIBRARY_PATH = C:\your\rust\library\folder For Rustup users, this folder will be in - > C:\Users\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib + > C:\Users\\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib Where current toolchain is likely `stable-x86_64-pc-windows-gnu`. @@ -142,7 +142,7 @@ http://www.libsdl.org/ (SDL2-devel-2.0.x-mingw.tar.gz). > LIB = C:\your\rust\library\folder For Rustup users, this folder will be in - > C:\Users\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib + > C:\Users\\{Your Username}\.multirust\toolchains\\{current toolchain}\lib\rustlib\\{current toolchain}\lib Where current toolchain is likely `stable-x86_64-pc-windows-msvc`.