Exemplo n.º 1
0
 def prepare(self):
     if "version" in self.settings:
         version = self.settings["version"]
         download(self.url % (version), self.zipfile)
         unzip(self.zipfile, 'temp')
         cp('temp/variant-%s/' % (version),
            'temp/')  # TODO: mv would be cleaner
     else:
         git_clone(self.repo, 'master', 'temp')
Exemplo n.º 2
0
 def prepare(self):
     if "version" in self.settings:
         version = self.settings["version"]
         download(self.url % (version), self.zipfile)
         unzip(self.zipfile, 'temp')
         cp('temp/imgui-%s/' % (version), 'temp/') # TODO: mv would be cleaner
     else:
         git_clone(self.repo, 'master', 'temp')
     if "patch" in self.settings:
         with cd('temp/'):
             patch(self.settings["patch"])
Exemplo n.º 3
0
 def package(self):
     cp('src/include', 'include')
Exemplo n.º 4
0
 def package(self):
     cp('src/src', 'include') # TODO: just copy header files
     cp('build/lib/*', 'libs/')
     cp('build/src/Bullet3Common/*.a', 'libs/')
     cp('build/src/BulletSoftBody/*.a', 'libs/')
     cp('build/src/BulletDynamics/*.a', 'libs/')
     cp('build/src/BulletCollision/*.a', 'libs/')
     cp('build/src/LinearMath/*.a', 'libs/')
Exemplo n.º 5
0
 def package(self):
     cp('repo/src/include/*.h', 'include/')
     cp('repo/src/*.h', 'src/')
     cp('repo/src/*.c', 'src/')
     cp('repo/src/*.m', 'src/')
     cp('repo/*.h', 'include/')
     cp('repo/*.c', 'src/')
Exemplo n.º 6
0
 def package(self):
     cp('temp/include', 'include')
Exemplo n.º 7
0
 def package(self):
     src_path = 'src/LuaJIT-%s/src/' % self.version
     cp(src_path + '*.a', 'libs/')
     cp(src_path + '*.dll', 'libs/')
     cp(src_path + '*.h', 'include/')
Exemplo n.º 8
0
 def package(self):
     cp('build/include', 'include')
     cp('build/*.a', 'libs/')
     cp('build/*.lib', 'libs/')
Exemplo n.º 9
0
 def package(self):
     cp('temp/*.h', 'include/')
     cp('temp/*.cpp', 'src/')
Exemplo n.º 10
0
 def package(self):
     cp('repo/Recast/Include/*.h', 'include/')
     cp('repo/Detour/Include/*.h', 'include/')
     cp('repo/DetourCrowd/Include/*.h', 'include/')
     cp('repo/DetourTileCache/Include/*.h', 'include/')
     cp('repo/Recast/Source/*.cpp', 'src/')
     cp('repo/Detour/Source/*.cpp', 'src/')
     cp('repo/DetourCrowd/Source/*.cpp', 'src/')
     cp('repo/DetourTileCache/Source/*.cpp', 'src/')
Exemplo n.º 11
0
 def package(self):
     cp('src/src/*.h', 'include/luasocket/')
     cp('build/src/*.a', 'libs/')
     cp('build/src/unix/*.a', 'libs/')
     cp('build/src/*.lib', 'libs/')
Exemplo n.º 12
0
 def package(self):
     cp('src/glfw-%s/include' % self.version, 'include')
     cp('build/src/*.a', 'libs/')
     cp('build/src/*.lib', 'libs/')
     cp('build/src/*.pc', 'libs/pkgconfig/')
Exemplo n.º 13
0
 def package(self):
     cp('build/include', 'include')
     cp('build/*.a', 'libs/')
     cp('build/*.lib', 'libs/')
Exemplo n.º 14
0
 def package(self):
     cp('src/glm', 'include/')
     cp('temp/glm/glm', 'include/')
Exemplo n.º 15
0
args = parser.parse_args()

work_path = util.specPath(args.work_path)
res_path = util.specPath(args.res_path)

begin = args.begin.replace(".","_")
begin_folder = util.specPath(work_path + begin)
begin_dict = util.file2Dict(begin_folder + "fullList.pickle")

end = args.end.replace(".","_")
end_folder = util.specPath(work_path + end)
end_dict = util.file2Dict(end_folder + "fullList.pickle")

target_folder = util.specPath(work_path + begin + "-" + end)

util.rmdir(target_folder)
util.mkdir(target_folder)
keys = end_dict.keys() 
keys.sort()
for key in keys:
	if begin_dict.get(key) != None:
		if begin_dict[key] != end_dict[key]:
			util.cp(res_path+key,target_folder+key)
	else:
		util.cp(res_path+key,target_folder+key)
		
zip_name = work_path+ begin + "-" + end + ".zip"
os.system("7z a -tzip "+ zip_name + " " + target_folder+"*")


Exemplo n.º 16
0
def manage(conf, args):
  '''
  Move a file to the base directory and leave a link pointing to its new
  location in its place.
  '''
  # bail if the file is already a link
  if os.path.islink(args.path):
    raise ValueError('Unable to manage ' + color.cyan(args.path) +
        " since it's already a link!")

  # make sure the path is a descendant of the destination directory
  if not util.is_descendant(args.path, conf['destination']):
    raise ValueError("Unable to manage files that aren't descendants of " +
        'the destination directory (' + color.cyan(conf['destination']) + ')')

  # mark files that aren't direct descendants of the root as such
  unrooted = os.path.dirname(args.path) != conf['destination']

  # get the path of the file if it will be copied into the repo directory
  dest_path = os.path.join(constants.REPO_DIR, os.path.basename(args.path))

  # rename the file as appropriate to to its original name
  dest_path, config_file_path = config.configify_file_name(dest_path)

  # give unrooted files a config file path so they'll go to the correct place
  if unrooted and config_file_path is None:
    config_file_path = util.toggle_hidden(dest_path, True)

  # bail if the file is already managed and we're not overwriting
  dest_exists = os.path.exists(dest_path)
  config_exists = (config_file_path is not None and
      os.path.exists(config_file_path))
  if (dest_exists or config_exists) and not args.force:
    raise ValueError("Can't manage " + color.cyan(args.path) +
        " since it already appears to be managed (use --force to override)")

  # create a file config if necessary
  # replace any existing dest file with a copy of the new one
  util.rm(dest_path, force=True)
  util.cp(args.path, dest_path, recursive=True)

  # replace any existing config file with our new one
  if config_file_path is not None:
    util.rm(config_file_path, force=True)

    # build a config for this file
    file_config = config.normalize_file_config({
      'paths': [args.path],
    }, conf['destination'])

    # create a config file from our config dict
    with open(config_file_path, 'w') as f:
      json.dump(file_config, f, indent=2)

  # create a link to the new location, overwriting the old file
  util.symlink(args.path, dest_path, overwrite=True)

  print(color.cyan(args.path), 'copied and linked')

  # add and commit the file to the repo if --save is specified
  if args.save:
    files = [color.cyan(os.path.basename(dest_path))]
    if config_file_path:
      files.append(color.cyan(os.path.basename(config_file_path)))
    files = files.join(' and ')

    print('Adding', files, 'to the repository...')

    # move us to the current repo directory so all git commands start there
    os.chdir(constants.REPO_DIR)

    # alert the user if we have uncommitted changes (git exits non-0 in this case)
    if git.diff(exit_code=True, quiet=True, _ok_code=(0, 1)).exit_code != 0:
      raise ValueError('The repository has uncommitted changes - the '
        'newly-managed file will have to be added to the repo manually.')

    # add the new files to the staging area
    git.add(dest_path)
    if config_file_path is not None:
      git.add(config_file_path)

    print('Successfully added', files, 'to the repository')
    print('Committing changes...')

    # commit the file to the repository
    commit_message = 'Manage %s' % os.path.basename(args.path)
    git.commit(m=commit_message, quiet=True)

    print('Commit successful!')
    print('Pushing committed changes...')

    # pull any changes down from upstream, then push our new addition
    git.pull(rebase=True, quiet=True)
    git.push(quiet=True)

    print('Push successful!')
Exemplo n.º 17
0
 def package(self):
     cp('src/*.h', 'include/')
Exemplo n.º 18
0
 def package(self):
     cp('src/C-11', 'include/')