fix Setup file extraction for TestDiskPhotoRec.script

This commit is contained in:
Homes32
2024-07-01 21:59:17 -05:00
parent 94bd9de287
commit 288918419e

View File

@@ -35,8 +35,8 @@ Author=Homes32
Level=5 Level=5
Selected=False Selected=False
Mandatory=False Mandatory=False
Version=1.0.1.0 Version=1.0.2.0
Date=2020-06-02 Date=2024-07-01
[Variables] [Variables]
%ProgramFolder%="TestDisk" %ProgramFolder%="TestDisk"
@@ -91,12 +91,16 @@ If,%cb_PinToStartMenu2%,Equal,True,PinShortcut,StartMenu,Auto,"%PEPrograms%\%Pro
// =============================================================================================================================== // ===============================================================================================================================
[ExtractProgram] [ExtractProgram]
Echo,"Extracting files..." Echo,"Extracting files..."
7z,"e -r -y #$q%ProgramsCache%\%ProgramFolder%\TestDisk-%SourceArch%.zip#$q testdisk-7.2-WIP\* -o#$q#1#$q"
If,Not,#r,Equal,0,Halt,"Error: Failed to extract [TestDisk-%SourceArch%.zip]. The error code returned was [#r]." Decompress,"%ProgramsCache%\%ProgramFolder%\TestDisk-%SourceArch%.zip","%ProjectTemp%\%ProgramFolder%"
7z,"e -r -y #$q%ProgramsCache%\%ProgramFolder%\TestDisk-%SourceArch%.zip#$q testdisk-7.2-WIP\63\* -o#$q#1\63#$q"
If,Not,#r,Equal,0,Halt,"Error: Failed to extract [TestDisk-%SourceArch%.zip]. The error code returned was [#r]." // TestDisk uses an annoying folder structure that changes with each version.
7z,"e -r -y #$q%ProgramsCache%\%ProgramFolder%\TestDisk-%SourceArch%.zip#$q testdisk-7.2-WIP\platforms\* -o#$q#1\platforms#$q" FileSearch,"%ProjectTemp%\%ProgramFolder%",%ProgramExe%
If,Not,#r,Equal,0,Halt,"Error: Failed to extract [TestDisk-%SourceArch%.zip]. The error code returned was [#r]." If,#r,Equal,"",Halt,"Failed to find [%ProgramExe%] in the setup file: The code returned was [#r]."
Else,List,Get,#r,1,%ProgramExePath%
StrFormat,DirPath,%ProgramExePath%,%ProgramExeDir%
FileCopy,"%ProgramExeDir%\*.*",#1
[#DownloadProgram#] [#DownloadProgram#]
// =============================================================================================================================== // ===============================================================================================================================