Install guide for windows 10 (might work for others)

未关闭
#15 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
领域
cli, documentation

调研方向

Start with the installation steps and FAQ in the issue body, then review the linked tibia-maps project and verify the Node.js, Python, GTK, npm, and Windows paths described. Done means a Windows 10 user can follow the guide and run tibia-maps without the documented canvas errors.

由索引模型根据 Issue 内容生成。

描述

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

npm config set msvs_version 2017 --global
npm install -g canvas
npm install -g tibia-maps

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:

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.

主要语言
JavaScript
星标
17
派生
8
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tibiamaps/tibia-maps-script 的其他 Issue

查看 tibiamaps/tibia-maps-script 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。