pascalscript - Inno Setup Set Uninstallable directive based on custom checkbox value -


i want know, how use uninstallable directive, when don't have tasks or components:

[setup] uninstallable:not if iscomponentselected ('comp1 comp2') 

i don't have tasks or components created. created checkboxes "portable" option, want add uninstallable option, when 1 checked:

[code]  var   component: twizardpage;   portable,installer: tnewradiobutton;  copmp: tlabel;   function install: boolean;  begin    result := installer.checked;  end;   function portab: boolean;  begin    result := portable.checked;  end;   procedure initializewizard();  begin   component :=    createcustompage(      wpselectdir, 'component selection',      'which types , components install?');   comppanel := tpanel.create(wizardform);   comppanel   begin     parent := component.surface;     left := scalex(0);     top := scaley(0);     width := scalex(417);     height := scaley(100);     bevelouter := bvnone;    end;   copmp := tlabel.create(wizardform);    copmp    begin     parent := comppanel;     caption := 'type , components:';     left := scalex(0);     top := scaley(5);     width := scalex(150);     height := scaley(13);   end;   portable := tnewradiobutton.create(wizardform);   portable   begin     parent := comppanel;     left := scalex(5);     top := scaley(25);     width := scalex(200);     height := scaley(17);     caption := 'unpacking';     onclick:=@copmpclick;   end;   installer :=  tnewradiobutton.create(wizardform);   installer   begin     parent := comppanel;     left := scalex(5);     top := scaley(45);     width := scalex(200);     height := scaley(17);     caption := 'install';     onclick:=@copmpclick;     checked:=true;   end; 

just implement custom function:

function isuninstallable: boolean; begin   result := installer.checked; end; 

and use in uninstallable directive:

[setup] uninstallable=isuninstallable 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -