https://github.com/HearthSim/Hearthstone-Deck-Tracker
https://github.com/HearthSim/HearthDb
https://github.com/HearthSim/HearthMirror
很久没有看源代码,发现作者的解决方案里包含的另外2个项目已经独立成单独的repository了
1.首先clone主项目;
2.在主项目内分别直接clone另外2个项目
3.打开解决方案,正常加载项目就可以编译了
HearthDb项目的BuildEvents中,需要直接在环境变量中配置git
直接通过命令 clone了一个版本库
if exist $(ProjectDir)hsdata (
git -C $(ProjectDir)hsdata fetch
git -C $(ProjectDir)hsdata reset --hard origin/master
) else (
git clone --depth=1 https://github.com/HearthSim/hsdata.git $(ProjectDir)hsdata
)
if "$(ConfigurationName)" == "Release" (
powershell -ExecutionPolicy Unrestricted -file $(ProjectDir)verify.ps1 $(ProjectDir)
)
xcopy /Y "$(ProjectDir)hsdataCardDefs.xml" "$(ProjectDir)CardDefs.xml*"
关于如何配置git的环境变量,
- Right-Click on My Computer.
- Click on Advanced System Settings.
- Click on Environment Variables.
- Then, under System Variables, look for the path variable and click edit.
- Add the path to git's bin and cmd at the end of the string like this: ;C:Program FilesGitingit.exe;C:Program FilesGitcmd.
2019-06-08更新
1.
git clone --depth=1 https://github.com/HearthSim/Hearthstone-Deck-Tracker.git
2.
使用powershell运行repository的根目录下的bootstrap.ps1
3.
打开Hearthstone Deck Tracker.sln,然后build
注意事项
PreBuild.ps1会自动同步github的其他依赖repository,并且自动reset --hard。所以,如果自己修改了HearthDb需要关闭git同步
[switch]$skipGitSync = $true,