*I made a link to my personal Dropbox https://www.dropbox.com/s/xjd99fhnv428xmj/.vsconfig?dl=0 where you can the .vsconfig file to directly setup Visual studio 2017 with the absolut minimum requiered stuff to save you people some space and time.
You load it during the regular setup (if you do this you can ignore step 4 it does it for you)
6: Set system path for GTK+ by going to "Control Panel\System and Security\System" then "Advanced System Settings" then "Environment Variables" then under System variables find the one called Path and click Edit... then Add ";C:\GTK\bin\" to the end without the ""
7: open CMD in administrator mode and write the following commands:
change the first command to whatever version of visual studio your using
canvas install fail is most likely due to wrong version of GTK either 64bit or 32bit depending on what you had first.. try the other.
-------------------------------------
Error 2:
Converting maps doesn't work:
E:\PATH\ver2>tibia-maps --from-maps=./Automap --output-dir=./data
module.js:440
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified module could not be found.
\?\C:\Users\USERNAME\AppData\Roaming\npm\node_modules\tibia-maps\node_modules\canvas\build\Release\canvas.node
at Error (native)
at Object.Module._extensions..node (module.js:440:18)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\Users\USERNAME\AppData\Roaming\npm\node_modules\tibia-maps\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
Error 2 Fix:
Go to C:\GTK\bin\ and copy ALL .dll files and place them in: C:\Users\USERNAME\AppData\Roaming\npm\node_modules\tibia-maps\node_modules\canvas\build\Release\. Now it should work.
2019-03-02; Updated and make sure it works had issues with 32bit for some reason so edit it for 64bit
Install guide for tibia map script converter by Mathias. https://github.com/tibiamaps/tibia-maps-script 1: Install node.js v10.x.x LTS 64-bit version https://nodejs.org/en/
2: Install Python 2.x.x 32-bit version https://www.python.org/downloads/ Make sure you add Python to your Path during the install
3: Install Microsoft Visual Studio 2015 or higher i recommend 2017
Important: During the install make sure to select custom and make sure that your installing stuff related to C++
2017: https://www.visualstudio.com/downloads/
*I made a link to my personal Dropbox https://www.dropbox.com/s/xjd99fhnv428xmj/.vsconfig?dl=0 where you can the .vsconfig file to directly setup Visual studio 2017 with the absolut minimum requiered stuff to save you people some space and time. You load it during the regular setup (if you do this you can ignore step 4 it does it for you)
4: Install Windows 10 SDK https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
5: Download GTK+ and extract it on C:\ so it looks like C:\GTK(around 8 folders one of em should be named bin) http://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip If you need 32bit version/info it can be found on link below https://github.com/Automattic/node-canvas/wiki/Installation%3A-Windows
6: Set system path for GTK+ by going to "Control Panel\System and Security\System" then "Advanced System Settings" then "Environment Variables" then under System variables find the one called Path and click Edit... then Add ";C:\GTK\bin\" to the end without the ""
7: open CMD in administrator mode and write the following commands: change the first command to whatever version of visual studio your using
DONE. Enjoy!
FAQ:
Error 1:
Canvas fails to install.
Error 1 Fix:
canvas install fail is most likely due to wrong version of GTK either 64bit or 32bit depending on what you had first.. try the other.
-------------------------------------
Error 2:
Converting maps doesn't work:
Error 2 Fix:
Go to
C:\GTK\bin\
and copy ALL.dll
files and place them in:C:\Users\USERNAME\AppData\Roaming\npm\node_modules\tibia-maps\node_modules\canvas\build\Release\
. Now it should work.