示例#1
0
def testmain():
	strCurrentVersion = ZViewer.getCurrentVersionFromNSIS()
	if strCurrentVersion == "Unknown":
		print("[FAILED] Cannot get current version from NSIS")
		return 1
	str7ZipPath = r"C:\Program Files\7-Zip\7z.exe" 
	if True == os.path.isfile(str7ZipPath):
		print("Founded 7z")
	else:
		print("[FAILED] There is no 7zip : " + str7ZipPath)
		return 1

	files = [ "dbghelp.dll", "language", "_Zviewer.png", "FreeImage.dll", "FreeImagePlus.dll", "License.txt", "LoadError.png", "ReadMe.txt", "ZViewer.exe", "ZViewerAgent.dll", "ZViewerIcons.dll"]

	for file in files:
		if False == os.path.isfile(file) and False == os.path.isdir(file):
			print("[FAILED] Cannot find : " + file)
			return 1

	strCmd = "\"" + str7ZipPath + "\" a ZViewerPortable" + strCurrentVersion + ".zip "
	for file in files:
		strCmd = strCmd + file + " "

	print(strCmd)
	os.system(strCmd)
示例#2
0
def archiveDebugDatas():
	strCurrentVersion = ZViewer.getCurrentVersionFromNSIS()
	if strCurrentVersion == "Unknown":
		print("[FAILED] Cannot get current version from NSIS")
		return 1
	str7ZipPath = r"C:\Program Files\7-Zip\7z.exe" 
	if True == os.path.isfile(str7ZipPath):
		print("Founded 7z")
	else:
		print("[FAILED] There is no 7zip : " + str7ZipPath)
		return 1

	files = [ "ZViewer.exe", "ZViewer.pdb" ]

	for file in files:
		if False == os.path.isfile(file) and False == os.path.isdir(file):
			print("[FAILED] Cannot find : " + file)
			return 1

	# log current dir
	strPathLogFile = "path.txt"
	f = open(strPathLogFile, "w")
	f.write(os.path.abspath("ZViewer.exe"))
	f.close()

	strCmd = "\"" + str7ZipPath + "\" a ZViewerDebugInfo" + strCurrentVersion + ".zip "
	for file in files:
		strCmd = strCmd + file + " "
	strCmd = strCmd + strPathLogFile

	print(strCmd)
	os.system(strCmd)
	os.unlink(strPathLogFile)
示例#3
0
def archiveDebugDatas():
    strCurrentVersion = ZViewer.getCurrentVersionFromNSIS()
    if strCurrentVersion == "Unknown":
        print("[FAILED] Cannot get current version from NSIS")
        return 1
    str7ZipPath = r"C:\Program Files\7-Zip\7z.exe"
    if True == os.path.isfile(str7ZipPath):
        print("Founded 7z")
    else:
        print("[FAILED] There is no 7zip : " + str7ZipPath)
        return 1

    files = ["ZViewer.exe", "ZViewer.pdb"]

    for file in files:
        if False == os.path.isfile(file) and False == os.path.isdir(file):
            print("[FAILED] Cannot find : " + file)
            return 1

    # log current dir
    strPathLogFile = "path.txt"
    f = open(strPathLogFile, "w")
    f.write(os.path.abspath("ZViewer.exe"))
    f.close()

    strCmd = "\"" + str7ZipPath + "\" a ZViewerDebugInfo" + strCurrentVersion + ".zip "
    for file in files:
        strCmd = strCmd + file + " "
    strCmd = strCmd + strPathLogFile

    print(strCmd)
    os.system(strCmd)
    os.unlink(strPathLogFile)
示例#4
0
def prepare():

	if False == os.path.isdir(strFinalDes):
		os.mkdir(strFinalDes)

	strVer = ZViewer.getCurrentVersionFromNSIS()
	files = [ "ZViewerPortable" + strVer + ".zip",
				"ZViewerSetup" + strVer + ".exe",
				"ZViewerDebugInfo" + strVer + ".zip" ]

	for file in files:
		if False == os.path.isfile(file):
			print("[FAILED] Cannot find file : " + file)
			return False

	for file in files:
		if False == shutil.move(file, strFinalDes + "\\" + file):
			print("[FAILED] Cannot move file : " + file)
			return False
示例#5
0
def prepare():

    if False == os.path.isdir(strFinalDes):
        os.mkdir(strFinalDes)

    strVer = ZViewer.getCurrentVersionFromNSIS()
    files = [
        "ZViewerPortable" + strVer + ".zip", "ZViewerSetup" + strVer + ".exe",
        "ZViewerDebugInfo" + strVer + ".zip"
    ]

    for file in files:
        if False == os.path.isfile(file):
            print("[FAILED] Cannot find file : " + file)
            return False

    for file in files:
        if False == shutil.move(file, strFinalDes + "\\" + file):
            print("[FAILED] Cannot move file : " + file)
            return False