2013-03-18 3 views
0

프로젝트의 설치 프로그램과 제거 프로그램을 만들기 위해 NSIS를 배우려고합니다. 자습서 섹션의 예제를 따르려고합니다.NSIS 오류 : 잘못된 스크립트 : OutFile 명령이 없었습니다

invalid script: never had OutFile command.

내가 상단에있는 OUTFILE 명령을 볼 수 있지만 그것이 왜 알아낼 수 없습니다 : I라는 오류를 얻고,

# define the name of the installer 
outfile "installer.exe" 

# define the directory to install to, the desktop in this case as specified 
# by the predefined $DESKTOP variable 
installDir $DESKTOP\Harshit\NSIS\Scripts 

# default section 
section 

# define the output path for this file 
setOutPath $DESKTOP\Harshit\NSIS\Files 

# define what to install and place it in the output path 
File test1.txt 

# define uninstaller name 
writeUninstaller $DESKTOP\Harshit\NSIS\Scripts\uninstaller.exe 

sectionEnd 

# create a section to define what the uninstaller does. 
# the section will always be named "Uninstall" 
section "Uninstall" 

# Always delete uninstaller first 
delete $DESKTOP\Harshit\NSIS\Scripts\uninstaller.exe 

# now delete installed file 
delete $DESKTOP\Harshit\NSIS\Scripts\Files\test1.txt 

sectionEnd 

그러나 - : 나는 다음과 같은 스크립트를 시도 작동 안함. 어떤 조언을 해주시겠습니까?

답변

4

하나의 .nsi 파일에서 작업하고 실제로 다른 .nsi 파일을 컴파일러에 전달하는 것처럼 간단 할 수 있습니까?

당신은 추가 할 수 있습니다 !error "Hello World" 또는 알 수있는 스크립트의 상단에 같은 간단한 것을 ...

편집 :

는 오류 메시지를 작성하기위한 출력 파일을 열 수없는 경우해야 "출력 파일을 열 수 없습니다"이며 OutFile과 관련이 없습니다.

stdin을 사용하여 스크립트를 전달하는 경우가 아니면 OutFile을 전혀 사용하지 않더라도 기본 이름으로 .nsi 파일 이름을 선택해야합니다.

makensis.exe에 전달한 정확한 매개 변수와 실제 스크립트 사본을 사용하여 보여 주실 수 있습니까?

+0

아니요. 다시 확인했습니다. 올바른 파일을 컴파일러에 전달하고 있습니다. 그러나 줄을 추가하면! error filename이 표시되고 같은 오류가 표시됩니다. 또한 모든 사용자가 폴더에 쓸 수 있도록 폴더의 사용 권한을 변경했습니다. – user1439090

관련 문제