1 2 3 4 5 6 7 8 9 10 11 12 |
//=========================================================================== //● 설치가 된적이 없거나 Uninstall되어 있는 상태에서 실행 할 때 flow // OnFirstUIBefore ==> OnMoveData ==> OnFirstUIAfter // //● Uninstall 시 flow //OnMaintUIBefore ==> OnMoveData ==> OnMaintUIAfter // //● 설치가 되어 있는 상태에서 Update(==Repair) 시 flow //OnUpdateUIBefore ==> OnMoveData ==> OnUpdateUIAfter //=========================================================================== |
//● 설치가 된적이 없거나 Uninstall되어 있는 상태에서 실행 할 때 flow
// OnFirstUIBefore ==> OnMoveData ==> OnFirstUIAfter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
// Included header files ---------------------------------------------------- #include "ifx.h" //--------------------------------------------------------------------------- // OnFirstUIBefore // // First Install UI Sequence - Before Move Data // // The OnFirstUIBefore event is called by OnShowUI when the setup is // running in first install mode. By default this event displays UI allowing // the end user to specify installation parameters. // // Note: This event will not be called automatically in a // program...endprogram style setup. //--------------------------------------------------------------------------- function OnFirstUIBefore() number nResult; number nLevel; number nvSize, nSetupType; number nId; string szTitle, szMsg; string szOpt1, szOpt2, szLicenseFile; string szName, szCompany; string szTargetPath; string svDir; string szFeatures, szTargetdir; string szId; BOOL bLicenseAccepted; begin nSetupType = COMPLETE; if ( ALLUSERS ) then TARGETDIR = PROGRAMFILES ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME; else TARGETDIR = FOLDER_APPDATA ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME; endif; // Customize the default TARGETDIR for multi-instance application. // TODO: If you want something different customize the code below. /*if( MAINT_OPTION = MAINT_OPTION_MULTI_INSTANCE && MULTI_INSTANCE_COUNT > 0) then // Start with the current multi-instance count plus one. nId = MULTI_INSTANCE_COUNT + 1; // Find a unique TARGETDIR. while( ExistsDir( TARGETDIR ) = EXISTS ) // Convert to string. NumToStr( szId, nId ); // Update IFX_MULTI_INSTANCE_SUFFIX IFX_MULTI_INSTANCE_SUFFIX = "_" + szId; // Update TARGETDIR TARGETDIR = TARGETDIR + IFX_MULTI_INSTANCE_SUFFIX; // Update nId nId = nId + 1; endwhile; endif;*/ svDir = TARGETDIR; szName = ""; szCompany = ""; bLicenseAccepted = FALSE; |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// Beginning of UI Sequence Dlg_Start: nResult = 0; Dlg_SdWelcome: szTitle = "설치 하기 "; szMsg = "메시지 입니다."; //{{IS_SCRIPT_TAG(Dlg_SdWelcome) nResult = SdWelcome( szTitle, szMsg ); //}}IS_SCRIPT_TAG(Dlg_SdWelcome) if (nResult = BACK) goto Dlg_Start; |
1 2 3 4 5 6 7 8 9 10 |
Dlg_SdRegisterUser: szMsg = "사용자 등록"; szTitle = "사용자 등록 하세요"; //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser) nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany ); //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser) //if (nResult = BACK) goto Dlg_SdLicense2; if (nResult = BACK) goto Dlg_SdWelcome; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Dlg_SetupType2: szTitle = "사용자 정의 설치 Dlg_SetupType2"; szMsg = "사용자 정의 설치 Dlg_SetupType2"; //{{IS_SCRIPT_TAG(Dlg_SetupType2) nResult = SetupType2( szTitle, szMsg, "", nSetupType, 0 ); //}}IS_SCRIPT_TAG(Dlg_SetupType2) if (nResult = BACK) then goto Dlg_SdRegisterUser; else nSetupType = nResult; if (nSetupType != CUSTOM) then szTargetPath = TARGETDIR; nvSize = 0; FeatureCompareSizeRequired( MEDIA, szTargetPath, nvSize ); if (nvSize != 0) then MessageBox( szSdStr_NotEnoughSpace, WARNING ); goto Dlg_SetupType2; endif; endif; endif; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Dlg_SdFeatureTree: if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2; szTitle = "사용자 설치 Dlg_SdFeatureTree"; szMsg = "사용자 설치 Dlg_SdFeatureTree"; szTargetdir = TARGETDIR; szFeatures = ""; nLevel = 2; if (nSetupType = CUSTOM) then //{{IS_SCRIPT_TAG(Dlg_SdFeatureTree) nResult = SdFeatureTree( szTitle, szMsg, szTargetdir, szFeatures, nLevel ); //}}IS_SCRIPT_TAG(Dlg_SdFeatureTree) if (nResult = BACK) goto Dlg_SdAskDestPath2; endif; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Dlg_ObjDialogs: nResult = ShowObjWizardPages( nResult ); if (nResult = BACK) goto Dlg_SdFeatureTree; Dlg_SdStartCopy2: szTitle = "Dlg_SdStartCopy2"; szMsg = "Dlg_SdStartCopy2"; //{{IS_SCRIPT_TAG(Dlg_SdStartCopy2) nResult = SdStartCopy2( szTitle, szMsg ); //}}IS_SCRIPT_TAG(Dlg_SdStartCopy2) if (nResult = BACK) goto Dlg_ObjDialogs; return 0; |
//● Uninstall 시 flow
//OnMaintUIBefore ==> OnMoveData ==> OnMaintUIAfter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
//--------------------------------------------------------------------------- // OnMaintUIBefore // // Maintenance UI Sequence - Before Move Data // // The OnMaintUIBefore event is called by OnShowUI when the setup is // running in maintenance mode. By default this event displays UI that // allows the end user to add or remove features, repair currently // installed features or uninstall the application. // // Note: This event will not be called automatically in a // program...endprogram style setup. //--------------------------------------------------------------------------- function OnMaintUIBefore() number nResult, nType, nMediaFlags; string szTitle, szMsg, szIgnore; begin // nType defaults to MODIFY. nType = MODIFY; // Beginning of UI Sequence Dlg_Start: // Show Standard Maintenance Dialog Disable( BACKBUTTON ); nType = SdWelcomeMaint( szTitle, szMsg, nType ); Enable( BACKBUTTON ); nResult = NEXT; // Show Uninstall Confirmation Dialog if ( nType = REMOVEALL ) then nResult = MessageBox( SdLoadString( IFX_MAINTUI_MSG ), MB_YESNO ); if (nResult != IDYES ) then goto Dlg_Start; endif; endif; Dlg_SdFeatureTree: if ( nType = MODIFY ) then szTitle = ""; szMsg = SdLoadString( SD_STR_COMPONENT_MAINT_MSG ); nResult = SdFeatureTree( szTitle, szMsg, TARGETDIR, "", -1 ); if ( nResult = BACK ) goto Dlg_Start; endif; Dlg_ObjDialogs: nResult = ShowObjWizardPages( nResult ); if ( ( nResult = BACK ) && ( nType != MODIFY ) ) goto Dlg_Start; if ( ( nResult = BACK ) && ( nType = MODIFY ) ) goto Dlg_SdFeatureTree; switch(nType) case REMOVEALL: // Ensure that all previously installed features are removed // for media that supports updating. MediaGetData( MEDIA, MEDIA_FIELD_MEDIA_FLAGS, nMediaFlags, szIgnore ); if( nMediaFlags & MEDIA_FLAG_UPDATEMODE_SUPPORTED ) then FeatureRemoveAllInMediaAndLog(); else FeatureRemoveAllInMedia(); endif; case REPAIR: // Changed for DevStudio 9, Disk1 files are now always updated when installed // so when running from ADDREMOVE we need to prevent these files from being // updated since this will result in files being updated that are locked by the setup. // Updating these files when running from ADDREMOVE should not be needed since updates // are not run directly from Add/Remove. if( ADDREMOVE ) then // Reinstall all previously installed features, except // disk1 features. FeatureUpdate( "" ); else // Reinstall all previously installed features. FeatureReinstall(); endif; endswitch; end; |