편집 : 이전 버전에서는 일부 Windows 버전에서는 잘 작동하지 않는 것으로 나타났습니다. 파일을 자동으로 덮어 쓰지 않고 대화 상자 창을 표시 할 수 있습니다. Google에 쉽습니다. CopyHere ignores options.
새로운 방법 :
새로운 방법은 7zip standalone console version를 사용합니다. 그것은 하나의 7za.exe
이므로 DLL이 필요하지 않습니다.
#include <idp.iss>
; Languages section
; Includes for Mitrich plugin's additional languages
; #include <idplang\Russian.iss>
[Files]
Source: "7za.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall;
[Run]
Filename: {tmp}\7za.exe; Parameters: "x ""{tmp}\example.zip"" -o""{app}\"" * -r -aoa"; Flags: runhidden runascurrentuser;
[Code]
procedure InitializeWizard;
begin
idpAddFile('https://example.comt/example.zip', ExpandConstant('{tmp}\example.zip'));
{ Download after "Ready" wizard page }
idpDownloadAfter(wpReady);
end;
설치가를 시작하기 전에, 압축 해제를 다운로드 (라이센스 계약으로, 예를 들어) 파일을 사용하려면, 난 단지 일반적인 지침 제공 할 수 있습니다 :
- 는 환영 페이지 사용을
[Setup]
: DisableWelcomePage=no
.
idpDownloadAfter(wpWelcome);
을 사용하십시오. 이제 "Welcome"페이지 바로 다음에 다운로드됩니다.
- 라이선스 페이지가 나타나려면
[Setup]
: LicenseFile=license.txt
에 빈 라이센스 파일이 필요합니다. 또는 비어 있지는 않지만 "라이센스 계약로드 중 ..."텍스트를 사용하십시오.
procedure CurPageChanged()
을 구현합니다. 현재 페이지가 wpLicense
인 경우 Exec()
함수를 호출하여 7zip을 시작하고 종료 될 때까지 기다리는 기능을 호출합니다. 지금은 [Run]
섹션에 7zip이 없습니다. 그렇다면 LoadStringFromFile()
함수를 사용하여 압축을 푼 파일에서 사용권 계약을 얻습니다. 그런 다음 UI에 입력하십시오. 아마도 WizardForm.LicenseMemo.RTFText = ...
이 작동 할 것입니다. 어쨌든 UI에 액세스 할 수 있습니다. 텍스트를 설정하는 데 문제가 있으면 여기에서 별도의 질문을하십시오.
된 버그 방법 :
등가, 청소기 방법 unzipper.dll
하지 않고는 described here입니다.편도 또는 다른, 그것은 버그를 사용 CopyHere Windows 기능.
#include <idp.iss>
; Languages section
; Includes for Mitrich plugin's additional languages
; #include <idplang\Russian.iss>
[Files]
Source: "unzipper.dll"; Flags: dontcopy
[Code]
procedure InitializeWizard;
begin
idpAddFile('https://example.comt/example.zip', ExpandConstant('{tmp}\example.zip'));
{ Download after "Ready" wizard page }
idpDownloadAfter(wpReady);
end;
procedure unzip(src, target: AnsiString);
external '[email protected]:unzipper.dll stdcall delayload';
procedure ExtractMe(src, target : AnsiString);
begin
unzip(ExpandConstant(src), ExpandConstant(target));
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
{ Extract when "Finishing installation" setup step is being performed. }
{ Extraction crashes if the output dir does not exist. }
{ If so, create it first: }
{ CreateDir(ExpandConstant(...)); }
ExtractMe('{tmp}\example.zip', '{app}\');
end;
end;
당신은 아마 대신 wpReady
및 ssPostInstall
의 다른 것들을 시도 할 수 있습니다. 내 작은 우편 들어,이 잘 작동합니다.
당신이 가진 것을 보여주십시오. 게시물을 편집하고 Inno Setup 스크립트의 관련 부분을 추가하고 사용하는 플러그인을 알려주십시오. –
월요일에 그렇게해야 할 것입니다. 왜냐하면 그 전에 저와 PC를 가지고 있지 않기 때문입니다. 추출을위한 플러그인이 없으며 인터넷을 통해 다운로드 할 수 있습니다. –