def _CreateOutputDir(self): """Windows templates also include the nanny.""" build_helpers.MakeBuildDirectory(context=self.context) output_dir = build_helpers.BuildWithPyInstaller(context=self.context) # Get any dll's that pyinstaller forgot: for module in _EnumMissingModules(): logging.info("Copying additional dll %s.", module) shutil.copy(module, output_dir) self.BuildNanny(output_dir) # Generate a prod and a debug version of nanny executable. shutil.copy(os.path.join(output_dir, "GRRservice.exe"), os.path.join(output_dir, "dbg_GRRservice.exe")) with io.open(os.path.join(output_dir, "GRRservice.exe"), "rb+") as fd: build_helpers.SetPeSubsystem(fd, console=False) with io.open(os.path.join(output_dir, "dbg_GRRservice.exe"), "rb+") as fd: build_helpers.SetPeSubsystem(fd, console=True) # Generate a prod and a debug version of client executable. shutil.copy(os.path.join(output_dir, "grr-client.exe"), os.path.join(output_dir, "dbg_grr-client.exe")) with io.open(os.path.join(output_dir, "grr-client.exe"), "rb+") as fd: build_helpers.SetPeSubsystem(fd, console=False) with io.open(os.path.join(output_dir, "dbg_grr-client.exe"), "rb+") as fd: build_helpers.SetPeSubsystem(fd, console=True) self.CopyBundledFleetspeak(output_dir) return output_dir
def MakeExecutableTemplate(self, output_file): build_helpers.MakeBuildDirectory(context=self.context) build_helpers.CleanDirectory(self.package_dir) output_dir = build_helpers.BuildWithPyInstaller(context=self.context) _StripLibraries(output_dir) _CopyCommonRpmFiles(self.package_dir, output_dir) _CopyFleetspeakRpmFiles(self.package_dir, context=self.context) _CopyNonFleetspeakRpmFiles(self.package_dir) _CopyBundledFleetspeakFiles(self.fleetspeak_install_dir, self.package_dir) _MakeZip(self.package_dir, output_file)
def MakeExecutableTemplate(self, output_file): build_helpers.MakeBuildDirectory(context=self.context) build_helpers.CleanDirectory(self.package_dir) output_dir = build_helpers.BuildWithPyInstaller(context=self.context) _StripLibraries(output_dir) if self.fleetspeak_enabled: _CopyFleetspeakDpkgFiles(self.package_dir, context=self.context) else: _CopyNonFleetspeakDpkgFiles(output_dir, self.package_dir) _MakeZip(self.package_dir, output_file)
def MakeExecutableTemplate(self, output_path): """Create the executable template.""" build_helpers.MakeBuildDirectory(context=self.context) build_helpers.BuildWithPyInstaller(context=self.context) self._SetBuildVars() build_helpers.CleanDirectory(self.universal_root) self._BuildInstallerPkg(fleetspeak_enabled=False, fleetspeak_bundled=False) self._ExtractInstallerPkg("legacy") self._BuildInstallerPkg(fleetspeak_enabled=True, fleetspeak_bundled=False) self._ExtractInstallerPkg("fleetspeak-enabled") self._BuildInstallerPkg(fleetspeak_enabled=True, fleetspeak_bundled=True) self._ExtractInstallerPkg("fleetspeak-bundled") self._WriteBuildYaml() self._MakeZip(output_path)