Exemplo n.º 1
0
// compile samples
func compile() {

	tdksamples := installdir + "/Samples/TDK_Samples/android_samples.sln"
	gwsamples := installdir + "/Samples/GameWorks_Samples/samples/build/vs2010android/AllSamples.sln"

	var wow string
	wow = ""
	if get_os() == 1 {
		wow = "\\WOW6432Node"
	} else {
		wow = ""
	}
	reg := "Software" + wow + "\\Microsoft\\VisualStudio\\"
	//fmt.Println(reg)
	vs := []float64{10.0, 11.0, 12.0}
	//var devenvcmd string
	for i := 0; i < 3; i++ {
		//fmt.Printf("VisualStudio Vesrion is :%s\n",vs[i])
		vspath := reg + strconv.FormatFloat(vs[i], 'f', 1, 64)
		installdir := hkey.Get_Hkey(vspath)
		verifypath := installdir + "devenv.com"
		//fmt.Println(installdir)
		//fmt.Println(verifypath)
		if Exists(verifypath) {
			//installdir := hkey.Get_Hkey(verifypath)
			//fmt.Println(installdir)
			os.Chdir(installdir)
			break
		}
	}
	if Exists(gwsamples) {
		fmt.Println("############## Compiling GameWorks_Samples ##############")
		os.Chdir(gwsamples)
		//fmt.Println(gwsamples)
		cmd := exec.Command("devenv.com", "/rebuild", "debug", gwsamples)
		Redirector(cmd)

	}
	if Exists(tdksamples) {
		fmt.Println("############## Compiling TDK_Samples ##############")
		os.Chdir(tdksamples)
		//fmt.Println(tdksamples)
		cmd := exec.Command("devenv.com", "/rebuild", "debug", tdksamples)
		Redirector(cmd)
	}
}
Exemplo n.º 2
0
//line C:\Users\amyl\Desktop\golang\windows\test\test.go:6
func main() {
	reg := "Software\\WOW6432Node\\Microsoft\\VisualStudio\\10.0"
	key := ""
	hkey.Get_Hkey(key, reg)
}