Explorar el Código

指定生成目录

zhangjq hace 6 años
padre
commit
b37e58ebdd
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      client/engineclient.go

+ 7 - 1
client/engineclient.go

@@ -100,7 +100,7 @@ func (c *EngineClient) GenerateCurrentProject() {
 		path+"sqlconfig")
 }
 
-func (c *EngineClient) Generate(xmlfile string) {
+func (c *EngineClient) GenerateToPath(xmlfile string,dest_path string)  {
 	var result ResponeResult
 	server := "http://qianqiusoft.com:6166"
 	if c.ServerUrl != "" {
@@ -124,7 +124,9 @@ func (c *EngineClient) Generate(xmlfile string) {
 			path := result.Data[i].Name
 			//fmt.Println(path)
 			path = path[len(c.ProjectName)+1:]
+			path = dest_path + path
 			fmt.Println(path)
+
 			ft := result.Data[i].Type
 			if result.Data[i].Type == "main" {
 			} else if ft == "config" || ft == "ci" {
@@ -159,6 +161,10 @@ func (c *EngineClient) Generate(xmlfile string) {
 	}
 }
 
+func (c *EngineClient) Generate(xmlfile string) {
+	c.GenerateToPath(xmlfile, "")
+}
+
 /**
  * @brief: merge xml
  * @param: none