假如不想编译可以在http://jenkins.buildacloud.org/job/cloudstack-master-hyperv-agent/下载,别人编译好的。
后面选择http://cygwin.mirrors.hoobly.com
然后把step1里面提到的软件lib都加入。
然后安装
1 Mono for Windows is available as a Windows Installer file
2 GTK# for .NET
按照 http://www.mono-project.com/docs/getting-started/install/windows/
说明来测试mono运行情况
然后配置cygwin环境使用mono,注意mono目录符合linux规范
(注意/cygdrive/c 是官网
中的用来连接windows分区的设置)
设置一个.bashrc来配置cygwin环境
1. Open the cygwin shell.
2. Exit the cygwin shell.
3. Go to the newly created /home/usr, and edit .bashrc, adding these lines to the end:
PATH=.:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Mono-1.2.2.1/bin
PKG_CONFIG_PATH=.:/lib/pkgconfig:/cygdrive/c/Mono-1.2.2.1/lib/pkgconfig
LD_LIBRARY_PATH=.:/usr/local/lib:/usr/lib:/lib:/cygdrive/c/Mono-1.2.2.1/lib
export PATH PKG_CONFIG_PATH LD_LIBRARY_PATH
(参考网站http://shana.worldofcoding.com/en/mono_cygwin_tutorial.html)
http://www.apache.org/dyn/closer.cgi/cloudstack/releases/4.4.2/apache-cloudstack-4.4.2-src.tar.bz2
下载cloudstack官方源码4.4.2
放在c盘解压
修改编译脚本buildagent.sh
去掉
wget http://nuget.org/nuget.exe
mv nuget.exe ./DotNet/ServerResource/.nuget/NuGet.exe
因为网络下载不了,一直报错
去掉后
https://api.nuget.org/downloads/nuget.exe
手动下载,把nuget.exe放在对应目录,删除nuget的其编译文件,只有nuget.exe。
这时编译会出错,因为官方漏了很多依赖的包
参考问题邮件列表
中说到这个问题
然后中间提到可以下载这些依赖的网址
http://jenkins.buildacloud.org/job/cloudstack-master-hyperv-agent/
cloudstack-master-812-hypervagent.zip文件
按照邮件说建立对应目录
但是后面xunit.1.9.2包又是不全的
所以再去https://xunit.codeplex.com/releases/view/110961
下载xunit至对应目录,全部文件放在对应文件夹中
全文完结,可以编译,已经配置了完全文件的压缩包。
生成文件