Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installsheild unexpected end of source


2 replies to this topic

anjalai

anjalai
  • Members
  • 15 posts

Posted 22 October 2003 - 21:16

Hi,
anybody knows , how to define an user defined function and call the function from somewhere.
I tried to define a function and use it one event handler ONBegin() , the comipler complains that there is an invalid end statemement
.I am used to IS 5.X and hence I could place the functions anywhere in the main program and compile it, but now IS 6.X has many event handlers and functions and I tried to define the function in the event handler it is giving compile errors.
Any help is appreciated.
Thanks
A

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 23 October 2003 - 00:47

I'm assuming you're doing all this in setup.rul right?

In which case, just have a function declaration at the top in between your header inclusions and script inclusions, and later on have your function definition. Here's a quick example that you can look off of as a comparison:

CODE
// Include header files

#include "ifx.h" //DO NOT REMOVE



////////////////////// string defines ////////////////////////////
#define INSTALL_KEY_BASE  INSTALL_KEY_BASE_5x
#define INSTALL_KEY    INSTALL_KEY_5x

//////////////////// installation declarations ///////////////////

   // your DLL function prototypes
   // NONE


   // your script function prototypes
   prototype Program();
   prototype InstallInfo_Components(BOOL);


   // your global variables
   STRING svSerial;

// Include script files

#include "project.rul"
#include "Common.rul"
#include "Entivity.rul"
#include "LiveBased.rul"
#include "Live.rul"



program
   Program(); // THIS IS TO SIMPLY TO SPEED UP ACCESS TO THIS SECTION OF CODE
endprogram

function Program()
begin
     end;

function InstallInfo_Components(bSave)
begin
   LiveInstallInfo(bSave);
end;

Hope it helps, but if not, please post a copy of your of your code and the exact compile error, so we can tell you how to properly fix it.

Edited by Taco Bell, 23 October 2003 - 00:47.

user posted image

anjalai

anjalai
  • Members
  • 15 posts

Posted 30 October 2003 - 20:20

Thanks Taco.