2009-10-21 1 views
1

NSIS 설치 프로그램이 있습니다. 추가 파일을 다운로드해야하는 경우를 제외하고는 완전히 침묵하고 싶습니다. SilentInstall을 사용하여 완전히 자동으로 만들 수는 있지만 다운로드 다운로드 대화 상자를 표시 할 수 없습니다 (InetLoad :: load를 사용하고 있습니다).NSIS에서 필요로 할 때까지 모든 창을 숨기는 방법

NSIS에게 내가 말할 때까지 어떤 창도 표시하지 말라고 말하고 싶습니다. 내가 생각할 수있는 최선은 HideWindow입니다. 유감스럽게도 그것은 NSIS가 창을 표시하고 그 창을 숨김으로써 깜박임을 유발하는 것처럼 보입니다.

깜박 거리는 창을 방지하려면 어떻게해야합니까?

예제 코드 :이 그 일의 해킹 방법입니다

 
Name "Flicker test" 
OutFile "flickertest.exe" 

AutoCloseWindow true 

Section 
    HideWindow 
SectionEnd 

답변

1

: (모드 업데이트가있는 경우 숨기기 디렉토리 페이지) MUI2에 대한

!include "${NSISDIR}\Examples\System\System.nsh" 

Name "No Flicker test" 
OutFile "noflickertest.exe" 

AutoCloseWindow true 

Function .onGUIInit 
    ; move window off screen 
    System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b ($HWNDPARENT, 0, -10000, -10000, 0, 0, ${SWP_NOOWNERZORDER}|${SWP_NOSIZE})" 
FunctionEnd 

Section -main 
    HideWindow 
SectionEnd 
1

You can use skipping pages 예 :

!define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre 
!insertmacro MUI_PAGE_DIRECTORY 

Function dirPre 
    StrCmp $Mode "update" +1 +2 
    abort 
FunctionEnd 
0
OutFile "example.exe" 

SilentInstall silent 

RequestExecutionLevel user<br> 
ReserveFile test.exe 

Section ""<br> 
&emsp;InitPluginsDir<br> 
&emsp;File /oname=$PLUGINSDIR\test.exe test.exe<br> 
&emsp;ExecWait "$PLUGINSDIR\test.exe"<br> 
SectionEnd