Esempio n. 1
0
 def _construct_web2board_executable(self):
     Packager._construct_web2board_executable(self)
     exe_res_path = join(self.installer_creation_executables_path, "res")
     log.info("copying res files...")
     shutil.copytree(self.src_res_path, exe_res_path)
     shutil.copytree(join(self.src_path, "Test"),
                     join(self.installer_creation_executables_path, "Test"))
Esempio n. 2
0
    def __init__(self):
        Packager.__init__(self)

        self.installer_path = self.installer_folder + os.sep + "darwin"
        self.installer_offline_path = self.installer_folder + os.sep + "darwinOffline"
        self.installer_creation_path = self.web2board_path + os.sep + "darwin_web2board_{}".format(
            self.version)
        self.installer_creation_dist_path = os.path.join(
            self.installer_creation_path, "dist")
        self.installerCreationAppPath = os.path.join(
            self.installer_creation_dist_path, 'web2boardLink.app')
        self.installer_creation_name = os.path.basename(
            self.installer_creation_path)
        self.installer_creation_executables_path = os.path.join(
            self.installer_creation_path, "executables")
        self.pkg_platform_path = os.path.join(self.pkg_path, "darwin")
        self.res_platform_path = os.path.join(self.res_path, "darwin")

        self.web2board_executable_name = "web2boardLink.app"
        self.web2board_spec_path = os.path.join(self.web2board_path,
                                                "web2board-mac.spec")

        self.pkgprojPath = os.path.join(self.installer_creation_path,
                                        "create-mpkg", "web2board",
                                        "web2board.pkgproj")
        self.installer_background_path = os.path.join(
            self.res_platform_path, "installer_background.jpg")
        self.licensePath = os.path.join(self.web2board_path, "LICENSE.txt")

        self.app_resources_path = os.path.join(self.installerCreationAppPath,
                                               "Contents", "MacOS", "res")
        self.info_plist_path = os.path.join(self.web2board_path, "info.plist")
        self.info_plist_path_dst = os.path.join(self.installerCreationAppPath,
                                                "Contents", "info.plist")
Esempio n. 3
0
 def _add_metadata_for_installer(self):
     Packager._add_metadata_for_installer(self)
     copytree(self.pkg_platform_path, self.installer_creation_path)
     shutil.copy2(
         self.icon_path, self.installer_creation_path + os.sep +
         os.path.basename(self.icon_path))
     self._add_bat_scrips_to_win_dist()
Esempio n. 4
0
    def __init__(self, architecture=Packager.ARCH_64):
        Packager.__init__(self)
        self.architecture = architecture
        self.installer_path = self.installer_folder + os.sep + "debian_{}".format(
            architecture)
        self.installer_offline_path = self.installer_folder + os.sep + "debian_{}Offline".format(
            architecture)

        self.installer_creation_path = join(
            self.web2board_path,
            "deb_web2board_{}_{}".format(architecture, self.version))
        self.installer_creation_name = os.path.basename(
            self.installer_creation_path)
        self.installer_creation_executables_path = join(
            self.installer_creation_path, "executables")
        self.installer_creation_dist_path = join(self.installer_creation_path,
                                                 "opt", "web2board")

        self.pkg_platform_path = join(self.pkg_path, "linux")
        self.res_platform_path = join(self.res_path, "linux")
        self.web2board_executable_name = "web2board"
        self.web2board_spec_path = join(self.web2board_path,
                                        "web2board-linux.spec")

        self.package_debian_metadata_path = join(self.installer_creation_path,
                                                 "DEBIAN")
        self.debian_metadata_path = join(self.pkg_platform_path, "debian")
        with open(self.packager_res_path + os.sep +
                  "Web2Board-template.desktop") as desktopFile:
            self.Web2BoardDesktopTemplate = desktopFile.read()
Esempio n. 5
0
 def _add_metadata_for_installer(self):
     Packager._add_metadata_for_installer(self)
     copytree(self.pkg_platform_path, self.installer_creation_path)
     shutil.copy2(self.installer_background_path,
                  self.installer_creation_dist_path)
     shutil.copy2(self.licensePath, self.installer_creation_dist_path)
     shutil.copyfile(self.info_plist_path, self.info_plist_path_dst)
Esempio n. 6
0
    def _add_metadata_for_installer(self):
        Packager._add_metadata_for_installer(self)
        copytree(self.debian_metadata_path, self.package_debian_metadata_path)
        with open(self.package_debian_metadata_path + os.sep + "control", "r") as controlFile:
            control_text = controlFile.read()
        with open(self.package_debian_metadata_path + os.sep + "control", "w") as controlFile:
            controlFile.write(control_text.format(version=self.version, architecture=self.architecture))

        os.chmod(self.debian_metadata_path + os.sep + "control", int("655", 8))
Esempio n. 7
0
 def _initPaths(self):
     Packager._initPaths(self)
     if self.versionPath is None:
         self.versionPath = self.srcPath + os.sep + "web2board_{}".format(self.version)
         self.folderVersionName = os.path.basename(self.versionPath)
         self.executablePath = os.path.join(self.versionPath, "usr", "lib", "python2.7", "dist-packages", "Scripts",
                                            "web2board")
         self.executableResPath = os.path.join(self.executablePath, "res")
         self.packageDebianPath = os.path.join(self.versionPath, "DEBIAN")
         self.debDistPath = os.path.join(self.srcPath, "deb_dist")
         with open(self.packagerResPath + os.sep + "Web2Board-template.desktop") as desktopFile:
             self.Web2BoardDesktopTemplate = desktopFile.read()
Esempio n. 8
0
 def __init__(self):
     Packager.__init__(self)
     self.installer_path = self.installer_folder + os.sep + "win32"
     self.installer_offline_path = self.installer_folder + os.sep + "win32Offline"
     self.installer_creation_path = self.web2board_path + os.sep + "win_web2board_{}".format(self.version)
     self.installer_creation_name = os.path.basename(self.installer_creation_path)
     self.installer_creation_dist_path = join(self.installer_creation_path, "dist")
     self.installer_creation_executables_path = join(self.installer_creation_path, "executables")
     self.pkg_platform_path = join(self.pkg_path, "win32")
     self.res_platform_path = join(self.res_path, "windows")
     self.web2board_executable_name = "web2board.exe"
     self.sconsExecutableName = "sconsScript.exe"
Esempio n. 9
0
    def _add_metadata_for_installer(self):
        Packager._add_metadata_for_installer(self)
        copytree(self.debian_metadata_path, self.package_debian_metadata_path)
        with open(self.package_debian_metadata_path + os.sep + "control",
                  "r") as controlFile:
            control_text = controlFile.read()
        with open(self.package_debian_metadata_path + os.sep + "control",
                  "w") as controlFile:
            controlFile.write(
                control_text.format(version=self.version,
                                    architecture=self.architecture))

        os.chmod(self.debian_metadata_path + os.sep + "control", int("655", 8))
Esempio n. 10
0
 def __init__(self):
     Packager.__init__(self)
     self.installer_path = self.installer_folder + os.sep + "win32"
     self.installer_offline_path = self.installer_folder + os.sep + "win32Offline"
     self.installer_creation_path = self.web2board_path + os.sep + "win_web2board_{}".format(
         self.version)
     self.installer_creation_name = os.path.basename(
         self.installer_creation_path)
     self.installer_creation_dist_path = join(self.installer_creation_path,
                                              "dist")
     self.installer_creation_executables_path = join(
         self.installer_creation_path, "executables")
     self.pkg_platform_path = join(self.pkg_path, "win32")
     self.res_platform_path = join(self.res_path, "windows")
     self.web2board_executable_name = "web2board.exe"
     self.sconsExecutableName = "sconsScript.exe"
Esempio n. 11
0
    def __init__(self, architecture=Packager.ARCH_64):
        Packager.__init__(self)
        self.architecture = architecture
        self.installer_path = self.installer_folder + os.sep + "debian_{}".format(architecture)
        self.installer_offline_path = self.installer_folder + os.sep + "debian_{}Offline".format(architecture)

        self.installer_creation_path = join(self.web2board_path,
                                            "deb_web2board_{}_{}".format(architecture, self.version))
        self.installer_creation_name = os.path.basename(self.installer_creation_path)
        self.installer_creation_executables_path = join(self.installer_creation_path, "executables")
        self.installer_creation_dist_path = join(self.installer_creation_path, "opt", "web2board")

        self.pkg_platform_path = join(self.pkg_path, "linux")
        self.res_platform_path = join(self.res_path, "linux")
        self.web2board_executable_name = "web2board"
        self.web2board_spec_path = join(self.web2board_path, "web2board-linux.spec")

        self.package_debian_metadata_path = join(self.installer_creation_path, "DEBIAN")
        self.debian_metadata_path = join(self.pkg_platform_path, "debian")
        with open(self.packager_res_path + os.sep + "Web2Board-template.desktop") as desktopFile:
            self.Web2BoardDesktopTemplate = desktopFile.read()
Esempio n. 12
0
    def __init__(self):
        Packager.__init__(self)

        self.installer_path = self.installer_folder + os.sep + "darwin"
        self.installer_offline_path = self.installer_folder + os.sep + "darwinOffline"
        self.installer_creation_path = self.web2board_path + os.sep + "darwin_web2board_{}".format(self.version)
        self.installer_creation_dist_path = os.path.join(self.installer_creation_path, "dist")
        self.installerCreationAppPath = os.path.join(self.installer_creation_dist_path, 'web2boardLink.app')
        self.installer_creation_name = os.path.basename(self.installer_creation_path)
        self.installer_creation_executables_path = os.path.join(self.installer_creation_path, "executables")
        self.pkg_platform_path = os.path.join(self.pkg_path, "darwin")
        self.res_platform_path = os.path.join(self.res_path, "darwin")

        self.web2board_executable_name = "web2boardLink.app"
        self.web2board_spec_path = os.path.join(self.web2board_path, "web2board-mac.spec")

        self.pkgprojPath = os.path.join(self.installer_creation_path, "create-mpkg", "web2board", "web2board.pkgproj")
        self.installer_background_path = os.path.join(self.res_platform_path, "installer_background.jpg")
        self.licensePath = os.path.join(self.web2board_path, "LICENSE.txt")

        self.app_resources_path = os.path.join(self.installerCreationAppPath, "Contents", "MacOS", "res")
        self.info_plist_path = os.path.join(self.web2board_path, "info.plist")
        self.info_plist_path_dst = os.path.join(self.installerCreationAppPath, "Contents", "info.plist")
Esempio n. 13
0
 def _construct_web2board_executable(self):
     Packager._construct_web2board_executable(self)
     exe_res_path = join(self.installer_creation_executables_path, "res")
     log.info("copying res files...")
     shutil.copytree(self.src_res_path, exe_res_path)
     shutil.copytree(join(self.src_path, "Test"), join(self.installer_creation_executables_path, "Test"))
Esempio n. 14
0
from libs.Version import Version

print os.getcwd()
sys.path.append(os.getcwd())

from libs.Packagers.Packager import Packager
from libs.LoggingUtils import init_logging

architectureInt = 64
offline = "offline" in sys.argv
if "32" in sys.argv:
    architectureInt = int(sys.argv[1])


subprocess.call(["python", modulePath + os.sep + "ConstructRes.py"])
Version.read_version_values()
Config.read_config_file()


architecture = Packager.ARCH_32 if architectureInt == 32 else Packager.ARCH_64
packager = Packager.construct_current_platform_packager(architecture=architecture)
packager.prepare_res_folder_for_executable()

log = init_logging(__name__)
log.info("packaging for architecture: {}".format(architecture))
if offline:
    log.info("packaging for OFFLINE")
    packager.create_package_for_offline()
else:
    log.info("packaging")
    packager.create_package()
Esempio n. 15
0
 def _make_main_dirs(self):
     Packager._make_main_dirs(self)
Esempio n. 16
0
 def _make_main_dirs(self):
     Packager._make_main_dirs(self)
Esempio n. 17
0
 def _add_metadata_for_installer(self):
     Packager._add_metadata_for_installer(self)
     copytree(self.pkg_platform_path, self.installer_creation_path)
     shutil.copy2(self.icon_path, self.installer_creation_path + os.sep + os.path.basename(self.icon_path))
     self._add_bat_scrips_to_win_dist()
Esempio n. 18
0
from libs.Config import Config
from libs.Version import Version

print os.getcwd()
sys.path.append(os.getcwd())

from libs.Packagers.Packager import Packager
from libs.LoggingUtils import init_logging

architectureInt = 64
offline = "offline" in sys.argv
if "32" in sys.argv:
    architectureInt = int(sys.argv[1])

subprocess.call(["python", modulePath + os.sep + "ConstructRes.py"])
Version.read_version_values()
Config.read_config_file()

architecture = Packager.ARCH_32 if architectureInt == 32 else Packager.ARCH_64
packager = Packager.construct_current_platform_packager(
    architecture=architecture)
packager.prepare_res_folder_for_executable()

log = init_logging(__name__)
log.info("packaging for architecture: {}".format(architecture))
if offline:
    log.info("packaging for OFFLINE")
    packager.create_package_for_offline()
else:
    log.info("packaging")
    packager.create_package()
Esempio n. 19
0
 def _add_metadata_for_installer(self):
     Packager._add_metadata_for_installer(self)
     copytree(self.pkg_platform_path, self.installer_creation_path)
     shutil.copy2(self.installer_background_path, self.installer_creation_dist_path)
     shutil.copy2(self.licensePath, self.installer_creation_dist_path)
     shutil.copyfile(self.info_plist_path, self.info_plist_path_dst)
Esempio n. 20
0
 def __init__(self):
     Packager.__init__(self)