Old 10th May 2007, 02:33   #1
eastwest
Junior Member
 
Join Date: May 2007
Posts: 3
Question CAb installation

Hi,

I have created an installer for PocketPC. The exe will install from a cab file or more( depends on user selection) using ActiveSync. Right now, it will call the Ceappmgr.exe more than once if user selected more than one components.

My question, is it possible to just call the Ceappmgr just once and then it will install based on the user selection?

Can this function be called just once?

Function InstallCAB

ExecWait '"$1" "$0"'

FunctionEnd


Thank you.
eastwest is offline   Reply With Quote
Old 10th May 2007, 09:41   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You could call it in a dummy section which is after all other sections.

code:
Section -InstallCAB
ExecWait '"$1" "$0"'
SectionEnd



The - makes it hidden.

Stu
Afrow UK is offline   Reply With Quote
Old 21st May 2007, 09:15   #3
eastwest
Junior Member
 
Join Date: May 2007
Posts: 3
Hi Stu,

Thanks for the reply. I just got back to work on nsis project(before this need to handle other project).

I've tried your suggestion by making the InstallCab hidden. But I didn't see any difference?? I also include both InstallCab section and function in the script, but that still doesn't change anything.

BTW, why do you change it to Section?

Just FYI, my setup include 3 diff cab file. Each one need to be selected if the user want to install it. So, currently, it's calling the ceappmgr 3 times if all cabb file selected during the installation.
eastwest is offline   Reply With Quote
Old 21st May 2007, 09:21   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Oh I see what you mean now.
If Ceappmgr allows multiple cab files to be passed on the parameter you could build a string in each section and then execute it in the last.

E.g.
code:

Var CAB1
Var CAB2
Var CAB3

Section 1
StrCpy $CAB1 ' "whatever1.cab"'
SectionEnd

Section 2
StrCpy $CAB2 ' "whatever2.cab"'
SectionEnd

Section 3
StrCpy $CAB3 ' "whatever3.cab"'
SectionEnd

Section -InstallCAB
ExecWait '"Ceappmgr"$CAB1$CAB2$CAB3'
SectionEnd



Stu
Afrow UK is offline   Reply With Quote
Old 5th June 2007, 03:18   #5
eastwest
Junior Member
 
Join Date: May 2007
Posts: 3
Hi, I've tried your code but it doesn't work because CeAppMgr does not allow more than 1 parameters. So I changed it to below:

code:

Section -InstallCAB
;ExecWait '"Ceappmgr" "$CAB1"'
;ExecWait '"Ceappmgr" "$CAB2"'
;ExecWait '"Ceappmgr" "$CAB3"'
SectionEnd



BTW, one more question. How do I include a specific .ini file(that will install a diff cab file) based on component selection? For example,

Case:
There are 3 (A,B,C) components in components page.
If user select
a)just A, installer will use a.ini file.
b)just B, installer will use b.ini file.
c)A and B, installer will use AB.ini file
.....and so on until ABC.ini file.

Is it possible to do it? Where do I put the checking conditions for the case above? .onSelChange or in the sections?

Thank you.
eastwest is offline   Reply With Quote
Old 5th June 2007, 18:48   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can check the select state of sections in sections yes. Use the SectionFlagIsSet macro in Sections.nsh (many examples of this on this forum) or use ${SectionIsSelected} with LogicLib.nsh

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump