def _create_msi(self, config_path): sources = os.path.join(self.output_dir, "%s.wsx" % self._package_name()) msi = MSI(self.config, self.package, self.packagedeps, config_path, self.store) msi.write(sources) wixobjs = [os.path.join(self.output_dir, "%s.wixobj" % self._package_name())] #FIXME: Don't use our custom UI yet #wixobjs.append(os.path.join(self.output_dir, "ui.wixobj")) if self._with_wine: wixobjs = [to_winepath(x) for x in wixobjs] sources = to_winepath(sources) candle = Candle(self.wix_prefix, self._with_wine) candle.compile(sources, self.output_dir) light = Light(self.wix_prefix, self._with_wine, "%s %s" % (self.UI_EXT, self.UTIL_EXT)) path = light.compile(wixobjs, self._package_name(), self.output_dir) # Clean up if not self.keep_temp: os.remove(sources) os.remove(config_path) for p in wixobjs: os.remove(p) os.remove(p.replace('.wixobj', '.wixpdb')) return path
def _create_msi(self, config_path): sources = [os.path.join(self.output_dir, "%s.wxs" % self._package_name())] msi = MSI(self.config, self.package, self.packagedeps, config_path, self.store) if self.wix_wine_prefix: msi.prefix = self.wix_wine_prefix msi.write(sources[0]) wixobjs = [os.path.join(self.output_dir, "%s.wixobj" % self._package_name())] if self.package.wix_use_fragment: wixobjs.extend(self.merge_modules[self.package.package_mode]) for x in ['utils']: wixobjs.append(os.path.join(self.output_dir, "%s.wixobj" % x)) sources.append(os.path.join(os.path.abspath(self.config.data_dir), 'wix/%s.wxs' % x)) if self._with_wine: final_wixobjs = [to_winepath(x) for x in wixobjs] final_sources = [to_winepath(x) for x in sources] else: final_wixobjs = wixobjs final_sources = sources candle = Candle(self.wix_prefix, self._with_wine, "%s %s" % (self.UI_EXT, self.UTIL_EXT)) candle.compile(' '.join(final_sources), self.output_dir) light = Light(self.wix_prefix, self._with_wine, "%s %s" % (self.UI_EXT, self.UTIL_EXT)) path = light.compile(final_wixobjs, self._package_name(), self.output_dir) # Clean up if not self.keep_temp: os.remove(sources[0]) for f in wixobjs: os.remove(f) try: os.remove(f.replace('.wixobj', '.wixpdb')) except: pass os.remove(config_path) for t in self.packager_tmpdirs: try: shutil.rmtree(t) except: pass return path
def _create_msi(self, config_path): sources = [ os.path.join(self.output_dir, "%s.wxs" % self._package_name()) ] msi = MSI(self.config, self.package, self.packagedeps, config_path, self.store) if self.wix_wine_prefix: msi.prefix = self.wix_wine_prefix msi.write(sources[0]) wixobjs = [ os.path.join(self.output_dir, "%s.wixobj" % self._package_name()) ] if self.package.wix_use_fragment: wixobjs.extend(self.merge_modules[self.package.package_mode]) for x in ['utils']: wixobjs.append(os.path.join(self.output_dir, "%s.wixobj" % x)) sources.append( os.path.join(os.path.abspath(self.config.data_dir), 'wix/%s.wxs' % x)) if self._with_wine: final_wixobjs = [to_winepath(x) for x in wixobjs] final_sources = [to_winepath(x) for x in sources] else: final_wixobjs = wixobjs final_sources = sources candle = Candle(self.wix_prefix, self._with_wine, "%s %s" % (self.UI_EXT, self.UTIL_EXT)) candle.compile(' '.join(final_sources), self.output_dir) light = Light(self.wix_prefix, self._with_wine, "%s %s" % (self.UI_EXT, self.UTIL_EXT)) path = light.compile(final_wixobjs, self._package_name(), self.output_dir) # Clean up if not self.keep_temp: os.remove(sources[0]) for f in wixobjs: os.remove(f) try: os.remove(f.replace('.wixobj', '.wixpdb')) except: pass os.remove(config_path) return path
def _create_msi(self, config_path): sources = [os.path.join(self.output_dir, "%s.wxs" % self._package_name())] msi = MSI(self.config, self.package, self.packagedeps, config_path, self.store) msi.write(sources[0]) wixobjs = [os.path.join(self.output_dir, "%s.wixobj" % self._package_name())] for x in ['utils']: wixobjs.append(os.path.join(self.output_dir, "%s.wixobj" % x)) sources.append(os.path.join(os.path.abspath(self.config.data_dir), 'wix/%s.wxs' % x)) if self._with_wine: wixobjs = [to_winepath(x) for x in wixobjs] sources = [to_winepath(x) for x in sources] candle = Candle(self.wix_prefix, self._with_wine) candle.compile(' '.join(sources), self.output_dir) light = Light(self.wix_prefix, self._with_wine, "%s %s" % (self.UI_EXT, self.UTIL_EXT)) path = light.compile(wixobjs, self._package_name(), self.output_dir) # Clean up if not self.keep_temp: os.remove(sources[0]) for f in wixobjs: os.remove(f) try: os.remove(f.replace('.wixobj', '.wixpdb')) except: pass os.remove(config_path) return path