0
배포 패키지에 InstallShield 2013을 사용하고 단일 설치 파일에 두 가지 설치 유형 (두 개의 응용 프로그램)을 추가하고 싶습니다. 즉, 사용자는 installShield에서 설치 파일을 실행할 때 설치할 응용 프로그램을 선택할 수 있어야합니다. 내 설정 파일에서installscript의 단일 설치 파일에 두 가지 설치 유형을 추가하는 방법
배경
콘솔 및 뷰어와 같은 두 개의 응용 프로그램이 있습니다. 사용자가 원하는 응용 프로그램을 선택할 수 있지만 선택한 응용 프로그램에 대한 추가 설치가 작동하지 않습니다. 도움이 필요하다!
여기 내 코드입니다.
function OnFirstUIBefore()
NUMBER nResult, nType;
STRING szTitle, szMsg, svResult, szCaption;
NUMBER nSetupType, nvSize, nUser, nReserved;
STRING szQuestion, svName, svCompany, szFile, szLicense;
STRING szLicenseFile,szReserved, svSetupType;
LIST list, listStartCopy;
BOOL bCustom, bCopy, bDontCopy;
begin
MessageBox("OnFirstUIBefore()",0);
SHELL_OBJECT_FOLDER = @PRODUCT_NAME;
nSetupType = CUSTOM;
bCopy = FALSE ;
bDontCopy = TRUE ;
bCustom = TRUE;
szLicense = SUPPORTDIR^ "AbcTerms.rtf";
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
Dlg_SdLicense:
nResult = SdLicense2Rtf ("","" , "", szLicense , FALSE);
if(nResult = BACK) goto Dlg_SdWelcome;
Dlg_SdCustomerInformation:
nResult = SdCustomerInformation(szTitle, svName, svCompany, nUser);
if (nResult = BACK) goto Dlg_SdLicense;
Dlg_SetupType:
szTitle = "Please select installation type";
szMsg = "";
szReserved = "";
svSetupType = "Viewer";
nReserved = 0;
nResult = SdSetupTypeEx(szTitle, szMsg, szReserved, svSetupType, nReserved);
INSTALLTYPE = svSetupType; //"Console";//
if(svSetupType == "Console") then
MsiSetProperty(ISMSI_HANDLE, "DOCUSTOMEACTION" , 'copy');
MsiSetProperty(ISMSI_HANDLE, "INSTALLMODE" , "ConsoleV3");//"1:3"
else
MsiSetProperty(ISMSI_HANDLE, "INSTALLMODE" , "ViewerV3"); //"1:2"
endif;
MsiSetProperty(ISMSI_HANDLE, "SOURCEPATH" , SourceDir);
if (nResult = BACK) goto Dlg_SdCustomerInformation;
Dlg_SdAskDestPath:
nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0);
if (nResult = BACK) goto Dlg_SetupType;
Enable(STATUSEX);
return 0; end;
편집 코드
function OnFirstUIBefore()
NUMBER nResult, nType;
STRING szTitle, szMsg, svResult, szCaption;
NUMBER nSetupType, nvSize, nUser, nReserved;
STRING szQuestion, svName, svCompany, szFile, szLicense;
STRING szLicenseFile,szReserved, svSetupType;
LIST list, listStartCopy;
BOOL bCustom, bCopy, bDontCopy;
begin
MessageBox("OnFirstUIBefore()",0);
SHELL_OBJECT_FOLDER = @PRODUCT_NAME;
nSetupType = CUSTOM;
bCopy = FALSE ;
bDontCopy = TRUE ;
bCustom = TRUE;
szLicense = SUPPORTDIR^ "AbcTerms.rtf";
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
Dlg_SdLicense:
nResult = SdLicense2Rtf ("","" , "", szLicense , FALSE);
if(nResult = BACK) goto Dlg_SdWelcome;
Dlg_SdCustomerInformation:
nResult = SdCustomerInformation(szTitle, svName, svCompany, nUser);
if (nResult = BACK) goto Dlg_SdLicense;
Dlg_SetupType:
szTitle = "Please select installation type";
szMsg = "";
szReserved = "";
svSetupType = "Viewer";
nReserved = 0;
nResult = SdSetupTypeEx(szTitle, szMsg, szReserved, svSetupType, nReserved);
INSTALLTYPE = svSetupType; //"Console";//
MsiSetProperty(ISMSI_HANDLE, "DOCUSTOMEACTION" , 'copy');
if(svSetupType == "Console") then
MsiSetProperty(ISMSI_HANDLE, "INSTALLMODE" , "ConsoleV3");//"1:3"
else
MsiSetProperty(ISMSI_HANDLE, "INSTALLMODE" , "ViewerV3"); //"1:2"
endif;
MsiSetProperty(ISMSI_HANDLE, "SOURCEPATH" , SourceDir);
if (nResult = BACK) goto Dlg_SdCustomerInformation;
Dlg_SdAskDestPath:
nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0);
if (nResult = BACK) goto Dlg_SetupType;
Enable(STATUSEX);
return 0; end;
원하는 것을 알고 싶다면 몇 가지 질문이 있습니다. 프로젝트 유형이 InstallScript MSI인지, 맞습니까? InstallShield 프로젝트의 결과로 기대 하시겠습니까? msi 패키지 또는 InstallShield Setup.exe? 당신의 두 패키지는 무엇입니까? msi 파일? – LucasF
이것은 InstallShield Setup.exe 프로젝트입니다. InstallScript part even을 포함합니다. 뷰어 및 콘솔에는 두 가지 설치 디자인이 있습니다. 사용자는 예상되는 응용 프로그램 (설치 디자인)을 선택할 수 있어야하며 설치 프로세스가이를 준수해야합니다. – Senavirathna
@LucasF, 수정 된 코드가 정상적으로 작동합니다. – Senavirathna