181 def PlugGenerate_C(self, buildpath, locations, logger): |
181 def PlugGenerate_C(self, buildpath, locations, logger): |
182 progname = "SVGUI_%s"%"_".join(map(str, self.GetCurrentLocation())) |
182 progname = "SVGUI_%s"%"_".join(map(str, self.GetCurrentLocation())) |
183 |
183 |
184 doc = SVGDocument(self.GetSVGFilePath()) |
184 doc = SVGDocument(self.GetSVGFilePath()) |
185 root_element = doc.GetRootElement() |
185 root_element = doc.GetRootElement() |
186 window_size = (int(root_element.GetAttribute("width")), |
186 window_size = (int(float(root_element.GetAttribute("width"))), |
187 int(root_element.GetAttribute("height"))) |
187 int(float(root_element.GetAttribute("height")))) |
|
188 |
|
189 ## svgfilepath = self.GetSVGFilePath() |
|
190 ## xmlfilepath = self.GetFilePath() |
|
191 ## shutil.copy(svgfilepath, buildpath) |
|
192 ## shutil.copy(xmlfilepath, buildpath) |
188 |
193 |
189 generator = _SVGUICGenerator(self.GetElementsByType(), self.GetSVGFilePath(), self.GetFilePath(), self.GetCurrentLocation()) |
194 generator = _SVGUICGenerator(self.GetElementsByType(), self.GetSVGFilePath(), self.GetFilePath(), self.GetCurrentLocation()) |
190 generator.GenerateProgram(window_size, buildpath, progname) |
195 generator.GenerateProgram(window_size, buildpath, progname) |
191 Gen_C_file = os.path.join(buildpath, progname+".cpp" ) |
196 Gen_C_file = os.path.join(buildpath, progname+".cpp" ) |
192 |
197 |