User Tools

Site Tools


development:compiling:player:windows:visual-studio

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
development:compiling:player:windows:visual-studio [2012/01/18 22:59] fdelapenadevelopment:compiling:player:windows:visual-studio [2017/08/18 16:52] – external edit 127.0.0.1
Line 4: Line 4:
  
 ====EasyRPG Source Code==== ====EasyRPG Source Code====
-Kind of obvious as you can't compile something you haven't, check [[development:compiling-easyrpg:getting-sources|]] for more info.+Kind of obvious as you can't compile something you haven't, check [[../../getting-sources|]] for more info.
  
-====Visual C++ 2010==== +====Visual C++ 2015==== 
-You can find Visual Studio 2010 [[http://www.microsoft.com/visualstudio/en-us/|here]]. +You can find Visual Studio 2015 [[https://www.visualstudio.com/vs/community/|Microsoft website]]. 
-You can find a free version of Visual C++ 2010 [[http://www.microsoft.com/express/|here]].+Visual Studio 2015 Community is the free version
 + 
 +Older compilers won't work because they don't support C++11If you have already installed Visual Studio 2015 make sure that you update it to Update 2.
  
 ====Precompiled libraries==== ====Precompiled libraries====
-EasyRPG Player needs several libraries for compiling. It would be a bit tedious getting all those libraries one by one, so we have prepared a simple and quick installer with the needed dependencies.+EasyRPG Player needs several libraries for compiling. It would be a bit tedious getting all those libraries one by one, so we have prepared a [[ 
 +https://github.com/EasyRPG/easyrpg-buildscripts|git repository]] [DEAD] with needed dependencies in the ''windows'' folder.
  
-You can get the last version of the installer [[http://easy-rpg.org/downloads/EasyRPG%20Dev%20MSVC%202011-02-29.msi|here]]. Install it and skip to [[development/compiling-easyrpg/player-visual-studio#Compiling Player|Compiling Player]]. If Visual Studio was running during the installation you have to restart it!+=== Compiling with Visual Studio 2015 ===
  
-Or, if you want a zipped file with all precompiled libs instead get [[http://easy-rpg.org/downloads/EasyRPG%20Dev%20MSVC%202011-02-29.zip|this]]. You will need to manually add the EASYDEV_MSVC enviroment variable and target the path where you place them.+Follow the instructions in the ''README'' file of the windows folder in the buildscripts repo.
  
-====Getting the libraries==== +== Before compiling ==
-''If you are using the precompiled libraries you can skip this part.''+
  
-You can get the needed libraries from the following pages: +Create an environment variable EASYDEV_MSVC that points to '''buildscripts/windows/build'''To create new environment variables enter the "Windows Control Panel" and select "System" (or enter "environment variable" in the search field). Sometimes new environment variables are not detectedLogout and -in again in order to fix this.
-  * [[http://www.libsdl.org/download-1.2.php|SDL 1.2]], file SDL-devel-1.2.XX-VC8.zip (where XX is the current release number) +
-  * [[http://www.libsdl.org/projects/SDL_image/|SDL Image 1.2]], file SDL_image-devel-1.2.XX-VC.zip (where XX is the current release number) +
-  * [[http://www.libsdl.org/projects/SDL_mixer/|SDL Mixer 1.2]], file SDL_mixer-devel-1.2.XX-VC.zip (where XX is the current release number) +
-  * [[http://www.libsdl.org/projects/SDL_ttf/|SDL TTF 2.0]], file SDL_ttf-devel-2.0.XX-VC.zip (where XX is the current release number) +
-  * [[http://www.ferzkopp.net/joomla/content/view/19/14/|SDL GFX 2.0]], you will need to compile SDL GFX+
  
-You will need to adjust the project include directories for these libraries.+== Compiling == 
 + 
 +To compile open a Visual Studio Command Prompt (32 or 64 bit) and execute 
 + 
 +'' 
 +powershell .\setup.ps1 
 +build v140 
 +'' 
 + 
 +====Used libraries==== 
 +//If you are using the precompiled libraries you can skip this part.// 
 + 
 +If you want to compile by yourself: 
 + 
 +  * expat 
 +  * freetype 
 +  * harfbuzz 
 +  * icu4c 
 +  * libmodplug 
 +  * libogg 
 +  * libpng 
 +  * libsndfile 
 +  * libvorbis 
 +  * libvorbisfile (included with libvorbis) 
 +  * mpg123 
 +  * native_midi (included with SDL_mixer) 
 +  * pixman 
 +  * SDL2 
 +  * SDL2_mixer 
 +  * speexdsp 
 +  * zlib
  
 ===== Compiling Player ===== ===== Compiling Player =====
  
-Open the solution file in player\builds\vs2010 , select the "Release" configuration from the configuration manager pulldown menu and then go to Build->Build solution, or just press Control-F7 to compile it.+You need to place the [[https://github.com/EasyRPG/liblcf|liblcf]] sources into the player lib/liblcf folder. 
 + 
 +Open the solution file in ''player\builds\vs2015'', select "Debug" or "Release" configuration from the configuration manager pulldown menu and then go to Build->Build solution, or just press Control-F7 to compile it
 + 
 +The Player executable should be in the folder ''bin''. If you are not using the precompiled libraries, and you have dynamically linked Player, you will need to place the required .dll in the same folder Player.exe is. 
 + 
 +===== Troubleshooting ===== 
 + 
 +==== "Already defined" linker error ==== 
 + 
 +This usually happens if you link against the wrong visual studio runtime and shouldn't happen if you follow the build instructions mentioned above. 
 + 
 +If you got the libraries from other sources make sure that their runtime library (Project Properties -> C++ -> Code generation) is set to "Multithreaded Debug" (/MTd) for debug and "Multithreaded" (/MT) for release. To hide the error go to "Project Properties -> Linker -> Input -> Ignore Specific Default Libraries" and ignore LIBCMT.LIB or LIBCMTD.LIB (ignoring one of them should remove the error but it's recommended to link the libs against the correct library instead!).
  
-The Player executable should be in the folder bin\testgame\Player.exe. If you are not using the precompiled libraries, and you have dinamically linked Player, you will need to place the required .dll in the same folder Player.exe is. 
development/compiling/player/windows/visual-studio.txt · Last modified: 2022/12/28 16:19 by carstene1ns

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki