PDA

View Full Version : Clarion 3rd party howto



Unregistered
11-12-2007, 04:18 PM
I am a 3rd party developer interested in replacing my existing Wise installation scripts. I have installed the evaluation version of the developer edition 6.6.

My existing (Wise Installation System 9.01) scripts follow a pretty standard pattern:

1. Detect all installed Clarion versions (using a program that is installed first to the temp folder)
2. If exactly one Clarion version is detected, choose that. If no supported version installed, terminate with a message. If multiple supported versions are installed, prompt user to select a version
3. Put the root folder path of chosen version into a variable, put the libsrc folder path into another variable, put the 3rd party folder path into another variable.
4. Prompt the user with a default path for storing my product files, with the option to change it using a standard windows filedialog.
5. install all files in appropriate folders
6. register templates
7. update registry keys
8. Finish

On installation of Setupbuilder, I responded yes to enabling Clarion features. However, after a couple of hours scratching my head, I am still stuck on step 1. A quick tutorial of how to accomplish the above would be helpful. Surely I am not the pioneer?

linder
11-13-2007, 12:48 AM
Hello,

You only have to add the "Clarion Environment Detection" dialog, select the supported Clarion versions and you are done ;)

See attached screenshots. Does this help?

Friedrich

Unregistered
11-14-2007, 01:53 PM
Hello,

You only have to add the "Clarion Environment Detection" dialog, select the supported Clarion versions and you are done ;)

See attached screenshots. Does this help?

Friedrich

That did help, Friedrich. Actually, I had figured it out by the time I got your response. I found it strange that the main dialog loop is under "Setup Appearance", but whatever. As an acquaintance used to say about an IBM operating system, "I view it as a cow. It is what it is. I don't question why the number of teats on a cow are what they are". :-)

A slightly different problem:
Until the full Clarion 7 appears with appgen, developers must use Clarion6 (or earlier) for app generation before building a project in Clarion 7. Therefore, my script will install into either C6 or C5.5, but then automatically install classes into Clarion 7 root\accessory\libsrc\win if Clarion 7 is present.

I assume that "If Clarion" works for any version of Clarion installed, not just those enabled in the "Clarion Environment Detection" dialog?

According to the doc, the IF Clarion script statement returns the full path to the executable including the exe name. What I expected to get is the root path. I have no idea when I ever would need the executable during an installation, but...it appears some string manipulation is required to get the root path from what is returned. Actually, the following seemed easier than manipulating the value returned by If Clarion:
If System does have Clarion 7.0 Then
Set Variable %CLARION7ROOT% to FUNCTION:Get Registry("root") from "HKEY_LOCAL_MACHINE\Software\SoftVelocity\Clarion7"
Set Variable %CLARION7CLASSES% to "%CLARION7ROOT%\accessory\libsrc\win"
End

It appears I will be placing an order. SetupBuilder will take some getting used to, but the scripting language appears to be able to do everything I could do with Wise scripting, and the Clarion-specific functions are much easier than what I have been doing.

Unregistered
11-14-2007, 04:29 PM
Hello,

You only have to add the "Clarion Environment Detection" dialog, select the supported Clarion versions and you are done ;)
Friedrich

Well, not quite done. :-(

I can't seem to figure out how to make a dialog depend on the outcome of another dialog. Specifically, I want to construct a default path using "Clarion Environment Detection" dialog. The user selects a version, and the dialog is supposed to fill a variable. Subsequently, the user is prompted with "Select Installation Folder". I want to present a default folder path that is constructed partly from the variable returned from "Clarion Environment Detection".

I tried this:
Define Wizard Dialog "#2" (Clarion Environment Detection) (%CLARIONROOT%)
Set Variable %PRODUCTFOLDER% to "%CLARIONROOT%\3RDPARTY\[PRODUCTNAME]"
Define Wizard Dialog "INSTALLATION FOLDER" (Select Install Folder) (%PRODUCTFOLDER%)

When tested, the last prompt displays the path:
\3RDPARTY\default product name

I changed it to:
Define Wizard Dialog "#2" (Clarion Environment Detection) (%PRODUCTFOLDER%)
Set Variable %PRODUCTFOLDER% to "\3RDPARTY\[PRODUCTNAME]" [Append Value]
Define Wizard Dialog "INSTALLATION FOLDER" (Select Install Folder) (%PRODUCTFOLDER%)

When tested, the last prompt now displays the path:
C:\Clarion

The script can't seem to make up its mind when to use what value. What am I missing, or this kind of install not possible?

linder
11-16-2007, 03:22 AM
Hello,

Sorry for my late reply. For whatever unknown reason I did not see your reply when I logged into the system :( Very strange... Seems to be caused by the latest vBulletin update applied on Wednesday.

Yes, "If Clarion" works for any version of Clarion installed, not just those enabled in the "Clarion Environment Detection" dialog.

You can also use the use "Handle String Function (Extract Full Folder)" script function :)

If System does have Clarion 7.0 Then
Set Variable %CLARION7ROOT% to FUNCTION:Extract Full Folder(%_SB_TMP%)
Set Variable %CLARION7CLASSES% to "%CLARION7ROOT%\accessory\libsrc\win"
End

But your solution does also work!

Friedrich

linder
11-16-2007, 03:31 AM
Hello,

Is the above pseudo quote or your "real" code? You have to do the manipulation in the "Wizard Loop". If you are interested, I can send you a demo script. Just send your email address to support (at) lindersoft (dot) com.

Friedrich