예제 #1
0
 def _AddVersionResource(self, fileName):
     try:
         from win32verstamp import stamp
     except:
         print("*** WARNING *** unable to create version resource")
         print("install pywin32 extensions first")
         return
     versionInfo = VersionInfo(self.metadata.version,
             comments = self.metadata.long_description,
             description = self.metadata.description,
             company = self.metadata.author,
             product = self.metadata.name)
     stamp(fileName, versionInfo)
예제 #2
0
 def _AddVersionResource(self, exe):
     warning_msg = "*** WARNING *** unable to create version resource"
     try:
         from win32verstamp import stamp
     except:
         print(warning_msg)
         print("install pywin32 extensions first")
         return
     if not self.metadata.version:
         print(warning_msg)
         print("version must be specified")
         return
     fileName = exe.targetName
     versionInfo = VersionInfo(self.metadata.version,
                               comments=self.metadata.long_description,
                               description=self.metadata.description,
                               company=self.metadata.author,
                               product=self.metadata.name,
                               copyright=exe.copyright,
                               trademarks=exe.trademarks)
     stamp(fileName, versionInfo)
예제 #3
0
]

get_version = lambda: "%s-win32" % (_get_version(), )

# Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will
# not bitch about non-numeric version
RE_NUMBER = re.compile(r'v?([0-9]+).*')
extract_number = lambda x : RE_NUMBER.match(x).group(1) if \
  RE_NUMBER.match(x) else "0"
win32version = lambda x: ".".join(
    [extract_number(i) for i in x.split(".")[0:4]])
Freezer._AddVersionResource = lambda self, filename : \
 stamp(filename, VersionInfo(
   win32version(self.metadata.version),
   comments = self.metadata.long_description,
   description = self.metadata.description,
   company = self.metadata.author,
   product = self.metadata.name
))

setup(name="Syncthing GTK",
      author="Kozec",
      version=get_version(),
      description="Windows port of Syncthing GTK",
      options=dict(build_exe=dict(compressed=False,
                                  includes=["gi"],
                                  packages=["gi"],
                                  include_files=include_files), ),
      executables=executables)

if 'build' in sys.argv:
예제 #4
0
]


get_version = lambda : "%s-win32" % (_get_version(),)

# Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will
# not bitch about non-numeric version
RE_NUMBER = re.compile(r'v?([0-9]+).*')
extract_number = lambda x : RE_NUMBER.match(x).group(1) if \
		RE_NUMBER.match(x) else "0"
win32version = lambda x : ".".join([ extract_number(i) for i in x.split(".") ])
Freezer._AddVersionResource = lambda self, filename : \
	stamp(filename, VersionInfo(
			win32version(self.metadata.version),
			comments = self.metadata.long_description,
			description = self.metadata.description,
			company = self.metadata.author,
			product = self.metadata.name
	))

setup(
	name = "Syncthing GTK",
	author = "Kozec",
	version = get_version(),
	description = "Windows port of Sycnthing GTK",
	options = dict(
		build_exe = dict(
			compressed = False,
			includes = ["gi"],
			packages = ["gi"],
			include_files = include_files
예제 #5
0
            os.makedirs(dst_dir)
        except:
            pass
        shutil.copy(full_path, dst_dir)

# Add version information to exe files.
for script in script_list:
    script_exe = os.path.splitext(os.path.basename(script))[0] + ".exe"
    # Don't add to dev build versions.
    if not re.search('[a-zA-Z_-]', build_version):
        versionInfo = VersionInfo(build_version,
                                  description="Deluge Bittorrent Client",
                                  company="Deluge Team",
                                  product="Deluge",
                                  copyright="Deluge Team")
        stamp(os.path.join(build_dir, script_exe), versionInfo)

# Copy version info to file for nsis script.
with open('VERSION.tmp', 'w') as ver_file:
    ver_file.write("build_version = \"%s\"" % build_version)

# Create the install and uninstall file list for NSIS.
filedir_list = []
for root, dirnames, filenames in os.walk(build_dir):
    dirnames.sort()
    filenames.sort()
    filedir_list.append((root[len(build_dir):], filenames))

with open('install_files.nsh', 'w') as f:
    f.write('; Files to install\n')
    for dirname, files in filedir_list:
예제 #6
0
            os.makedirs(dst_dir)
        except OSError:
            pass
        shutil.copy(full_path, dst_dir)

# Add version information to exe files.
for script in script_list:
    script_exe = os.path.splitext(os.path.basename(script))[0] + '.exe'
    # Don't add to dev build versions.
    if not re.search('[a-zA-Z_-]', build_version):
        versionInfo = VersionInfo(build_version,
                                  description='Deluge Bittorrent Client',
                                  company='Deluge Team',
                                  product='Deluge',
                                  _copyright='Deluge Team')
        stamp(os.path.join(build_dir, script_exe), versionInfo)

# Copy version info to file for nsis script.
with open('VERSION.tmp', 'w') as ver_file:
    ver_file.write('build_version = "%s"' % build_version)

# Create the install and uninstall file list for NSIS.
filedir_list = []
for root, dirnames, filenames in os.walk(build_dir):
    dirnames.sort()
    filenames.sort()
    filedir_list.append((root[len(build_dir):], filenames))

with open('install_files.nsh', 'w') as f:
    f.write('; Files to install\n')
    for dirname, files in filedir_list:
예제 #7
0
get_version = lambda: "%s-win32" % (_get_version(), )

# Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will
# not bitch about non-numeric version
RE_NUMBER = re.compile(r'v?([0-9]+).*')
extract_number = lambda x : RE_NUMBER.match(x).group(1) if \
  RE_NUMBER.match(x) else "0"
win32version = lambda x: ".".join(
    [extract_number(i) for i in x.split(".")[0:4]])
Freezer._AddVersionResource = lambda self, exe : \
 stamp(exe.targetName, VersionInfo(
    win32version(self.metadata.version),
    comments = self.metadata.long_description,
    description = self.metadata.description,
    company = self.metadata.author,
    product = self.metadata.name,
                copyright = exe.copyright,
                trademarks = exe.trademarks
))

setup(name="Syncthing GTK",
      author="Kozec",
      version=get_version(),
      description="Windows port of Syncthing GTK",
      options=dict(build_exe=dict(includes=["gi"],
                                  packages=["gi", "bcrypt", "cffi"],
                                  include_files=include_files), ),
      executables=executables)

if 'build' in sys.argv:
예제 #8
0
    ),
]


get_version = lambda: "%s-win32" % (_get_version(),)

# Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will
# not bitch about non-numeric version
RE_NUMBER = re.compile(r"v?([0-9]+).*")
extract_number = lambda x: RE_NUMBER.match(x).group(1) if RE_NUMBER.match(x) else "0"
win32version = lambda x: ".".join([extract_number(i) for i in x.split(".")[0:4]])
Freezer._AddVersionResource = lambda self, filename: stamp(
    filename,
    VersionInfo(
        win32version(self.metadata.version),
        comments=self.metadata.long_description,
        description=self.metadata.description,
        company=self.metadata.author,
        product=self.metadata.name,
    ),
)

setup(
    name="Syncthing GTK",
    author="Kozec",
    version=get_version(),
    description="Windows port of Syncthing GTK",
    options=dict(build_exe=dict(compressed=False, includes=["gi"], packages=["gi"], include_files=include_files)),
    executables=executables,
)

if "build" in sys.argv:
예제 #9
0

get_version = lambda : "%s-win32" % (_get_version(),)

# Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will
# not bitch about non-numeric version
RE_NUMBER = re.compile(r'v?([0-9]+).*')
extract_number = lambda x : RE_NUMBER.match(x).group(1) if \
		RE_NUMBER.match(x) else "0"
win32version = lambda x : ".".join([ extract_number(i) for i in x.split(".")[0:4] ])
Freezer._AddVersionResource = lambda self, exe : \
	stamp(exe.targetName, VersionInfo(
		win32version(self.metadata.version),
		comments = self.metadata.long_description,
		description = self.metadata.description,
		company = self.metadata.author,
		product = self.metadata.name,
		copyright = exe.copyright,
		trademarks = exe.trademarks
	))

setup(
	name = "Syncthing GTK",
	author = "Kozec",
	version = get_version(),
	description = "Windows port of Syncthing GTK",
	options = dict(
		build_exe = dict(
			includes = [ "gi" ],
			packages = [ "gi", "bcrypt", "cffi" ],
			include_files = include_files