Exemplo n.º 1
0
    def add_file(self, source, directory, **attributes):
        # We override to add special handling for binary files

        if ((source.endswith(".so") or source.endswith(".dylib"))
                and source.startswith(self.jhbuild_install_dir)):

            relative_path = source[len(self.jhbuild_install_dir) + 1:]

            # We find a correspoding binary for each arch and join them
            # together with the lipo command

            fat_tmp = join(self.tempdir, basename(source))
            lipo_command = ['lipo', '-create', '-output', fat_tmp]

            for arch, install_dir in self.arches.iteritems():
                arch_source = join(install_dir, relative_path)
                arch_tmp = join(self.tempdir, arch + '-' + basename(source))
                shutil.copy(arch_source, arch_tmp)

                # Before running lipo on the library, rewrite dependency
                # paths in it to be relative to the executable
                self.repoint_libraries(arch_tmp, install_dir)

                lipo_command.extend(('-arch', arch, arch_tmp))

            check_call(lipo_command)

            Builder.add_file(self, fat_tmp, directory, **attributes)
        else:
            Builder.add_file(self, source, directory, **attributes)
Exemplo n.º 2
0
    def add_file(self, source, directory, **attributes):
        # We override to add special handling for binary files

        if ((source.endswith(".so") or source.endswith(".dylib")) and
            source.startswith(self.jhbuild_install_dir)):

            relative_path = source[len(self.jhbuild_install_dir) + 1:]

            # We find a correspoding binary for each arch and join them
            # together with the lipo command

            fat_tmp = join(self.tempdir, basename(source))
            lipo_command = ['lipo', '-create', '-output', fat_tmp]

            for arch, install_dir in self.arches.iteritems():
                arch_source = join(install_dir, relative_path)
                arch_tmp = join(self.tempdir, arch + '-' + basename(source))
                shutil.copy(arch_source, arch_tmp)

                # Before running lipo on the library, rewrite dependency
                # paths in it to be relative to the executable
                self.repoint_libraries(arch_tmp, install_dir)

                lipo_command.extend(('-arch', arch, arch_tmp))

            check_call(lipo_command)

            Builder.add_file(self, fat_tmp, directory, **attributes)
        else:
            Builder.add_file(self, source, directory, **attributes)
Exemplo n.º 3
0
    def __init__(self, output, topdir):
        Builder.__init__(self, topdir)

        self.output = output
        self.feature_components = {}
        self.directory_ids = {}
        self.generated = None
        self.manifest = []
Exemplo n.º 4
0
    def __init__(self, output, topdir):
        Builder.__init__(self, topdir)

        self.output = output
        self.feature_components = {}
        self.directory_ids = {}
        self.generated = None
        self.manifest = []
Exemplo n.º 5
0
    def __init__(self, output, topdir, output_type, arches):
        Builder.__init__(self, topdir, treesubdir='Reinteract.app')

        self.output = output
        self.output_type = output_type
        self.manifest = []

        self.arches = arches

        self.jhbuild_source_dir = os.path.normpath(os.environ['JHBUILD_SOURCE'])
        self.jhbuild_install_dir = os.path.normpath(os.environ['JHBUILD_PREFIX'])
Exemplo n.º 6
0
    def __init__(self, output, topdir, output_type, arches):
        Builder.__init__(self, topdir, treesubdir='Reinteract.app')

        self.output = output
        self.output_type = output_type
        self.manifest = []

        self.arches = arches

        self.jhbuild_source_dir = os.path.normpath(
            os.environ['JHBUILD_SOURCE'])
        self.jhbuild_install_dir = os.path.normpath(
            os.environ['JHBUILD_PREFIX'])
Exemplo n.º 7
0
#id
#package_name
#dev_id
#size
#file

import common.data as data
import common.random_generator as random_generator
import random
from common.builder import Builder
from random import choice

builder = Builder('\"Packages\"', 5)

for i in range(1, 401):
    print(builder.build([i, 'com.' + choice(data.usernames) + '.pac', random.randint(1, 5), random.randint(1, 10000), 'file.apk']))
#id
#username
#first_name
#last_name
#email
#phone_number
import common.data as data
import common.random_generator as random_generator
from common.builder import Builder
from random import choice

builder = Builder('\"Developers\"', 6)

for i in range(1, 6):
    print(
        builder.build([
            i,
            choice(data.usernames),
            choice(data.first_names),
            choice(data.last_names),
            choice(data.emails),
            random_generator.random_date()
        ]))
import common.data as data
import common.random_generator as random_generator
import random
from common.builder import Builder
from random import choice

builder = Builder('\"Genres\"', 2)

genres = [
    "Action-Adventure", "Metroidvania", "Stealth-Based Game",
    "Survival Sandbox", "Survival Horror", "Platform Game",
    "Cinematic Platform Game", "Elimination Platformer", "Puzzle Platformer",
    "Run-and-Gun", "Beat em Up", "Hack and Slash", "Stylish Action",
    "Fighting Game", "Mascot Fighter", "Platform Fighter", "FPS",
    "Hero Shooter"
]

for i in range(1, 19):
    print(builder.build([i, genres[i - 1]]))
#id
#username
#first_name
#last_name
#email
#phone_number
import common.data as data
import common.random_generator as random_generator
from common.builder import Builder
from random import choice

builder = Builder('\"Users\"', 6)

for i in range(1, 6):
    print(
        builder.build([
            i,
            choice(data.usernames),
            choice(data.first_names),
            choice(data.last_names),
            choice(data.emails),
            random_generator.random_phone_number()
        ]))
Exemplo n.º 11
0
import common.data as data
import common.random_generator as random_generator
import random
from common.builder import Builder
from random import choice

builder = Builder('\"Reviews\"', 6)

for i in range(1, 401):
    print(
        builder.build([
            i,
            random_generator.random_date(), 'This is a review',
            random.randint(1, 5),
            random.randint(1, 20),
            random.randint(1, 5)
        ]))
import common.data as data
import common.random_generator as random_generator
import random
from common.builder import Builder
from random import choice

builder = Builder('\"Games\"', 4)

game_names = [
    "Clash Of Titans", "Clash Of Clans", "Clash Of Gods", "Clash Of Angels",
    "Clash Of Cities", "Clash On Titans", "Clash On Clans", "Clash On Gods",
    "Clash On Angels", "Clash On Cities", "Clash Into Titans",
    "Clash Into Clans", "Clash Into Gods", "Clash Into Angels",
    "Clash Into Cities", "Clash From Titans", "Clash From Clans",
    "Clash From Gods", "Clash From Angels", "Clash From Cities",
    "War Of Titans", "War Of Clans", "War Of Gods", "War Of Angels",
    "War Of Cities", "War On Titans", "War On Clans", "War On Gods",
    "War On Angels", "War On Cities", "War Into Titans", "War Into Clans",
    "War Into Gods", "War Into Angels", "War Into Cities", "War From Titans",
    "War From Clans", "War From Gods", "War From Angels", "War From Cities",
    "Fight Of Titans", "Fight Of Clans", "Fight Of Gods", "Fight Of Angels",
    "Fight Of Cities", "Fight On Titans", "Fight On Clans", "Fight On Gods",
    "Fight On Angels", "Fight On Cities", "Fight Into Titans",
    "Fight Into Clans", "Fight Into Gods", "Fight Into Angels",
    "Fight Into Cities", "Fight From Titans", "Fight From Clans",
    "Fight From Gods", "Fight From Angels", "Fight From Cities",
    "Attack Of Titans", "Attack Of Clans", "Attack Of Gods",
    "Attack Of Angels", "Attack Of Cities", "Attack On Titans",
    "Attack On Clans", "Attack On Gods", "Attack On Angels",
    "Attack On Cities", "Attack Into Titans", "Attack Into Clans",
    "Attack Into Gods", "Attack Into Angels", "Attack Into Cities",