PDA

View Full Version : Clarion 3rd-party only / Clarion 9.x/10.x ConfigDir support



NewsArchive
02-20-2015, 11:28 AM
Clarion 10 3rd-party developers:

SetupBuilder 8.5.4700 provides built-in Clarion 10 Enterprise and
Professional Edition support now.

There is a new experimental method to support "ConfigDir" in Clarion 10, 9.1
and 9.0. When you set the built-in %_SB_CONFIGDIR% runtime variable then
the installer will use the specified folder during the template registration
process. You have several different options to specify the value of
%_SB_CONFIGDIR%. You can display a standard or custom dialog and let the
user select the location of the configuration directory, or you can read it
from your own configuration file, etc.

Or you can add a command line option (that's what we are doing in the LSZip
setup). For example: setup.exe /configdir "c:\yada"

I have uploaded a ready-to-use "command line" include script for
SetupBuilder 8.5.4700 to handle this.

http://www.lindersoft.com/projects/ClarionConfigDir.zip

Friedrich

NewsArchive
02-23-2015, 02:52 AM
Friedrich,

> I have uploaded a ready-to-use "command line" include script for
> SetupBuilder 8.5.4700 to handle this.

I'm adding the attached option dialog as well as folder selection but
wanted to ask if I needed to check for ClarionProperties.xml in path
provided or if you're already doing that internally before using the
%_SB_CONFIGDIR% variable.

So, should I or are you?!<g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
02-23-2015, 02:52 AM
Hi Lee,

Only the path is allowed in %_SB_CONFIGDIR%. It does not check if the path
provided is valid (does exist) or contains a file name.

As far as I understand it, only the path is allowed when using -ConfigDir?

Friedrich

NewsArchive
02-23-2015, 08:06 AM
Hi Friedrich,

> As far as I understand it, only the path is allowed when using -ConfigDir?
When used on the Clarion shortcut icon the ConfigDir switch can be
empty ie you can have this as your Target

C:\CW11529\bin\Clarion.exe /ConfigDir

and the settings will default to a \Settings folder below
%ClarionRoot%\bin

But from my testing of ClarionCL and 'empty' -ConfigDir switch is not
allowed with ClarionCL .

You always need a full path ie ClarionCL doesn't see an empty
-ConfirDir switch and fill in the default location using the executing
..NET location.

Graham

NewsArchive
02-23-2015, 08:07 AM
Hi Graham,

And what about -ClarionCL "" ? Do you know if this is allowed?

Thanks,
Friedrich

NewsArchive
02-23-2015, 08:07 AM
> And what about -ClarionCL "" ? Do you know if this is allowed?
I wouldn't have thought so - each parameter needs to be preceded by a
switch to let the program argument code sort things out properly.

The code looks for - or / followed by ConfigDir (non case sensitive
comparison)
Code _is_ there to set the default to executing location plus Settings
- but in my (limited) testing it doesn't appear to work ATM.
Making the path absolute is belt & braces option :-)

I thought you had a 'hot line' phone link to SoftVelocity?
Don't tell me it isn't so and you can't pickup the big red phone and
say 'Let me speak to the President' <vbg>

Graham

NewsArchive
02-23-2015, 08:08 AM
I re-read my own previous message and the question did not make sense at
all. It's either too much coffee or not enough <g>

Of course, we need a fully qualified path to set the location of the
configuration directory. No (configuration) file name allowed.

Friedrich

NewsArchive
02-23-2015, 11:43 AM
Friedrich,

> Only the path is allowed in %_SB_CONFIGDIR%. It does not check if the path
> provided is valid (does exist) or contains a file name.

The filename is just to validate that the path entered is the correct
path. In other words if ClarionProperties.xml doesn't exist there then
the path provided by the developer is incorrect.

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
02-24-2015, 03:23 AM
Friedrich,

> The filename is just to validate that the path entered is the correct
> path. In other words if ClarionProperties.xml doesn't exist there then
> the path provided by the developer is incorrect.

Here's what I've found...

Assuming "/ConfigDir=C:\Test"

If Clarion is run and not registered "C:\Test\10.0\MenuShorcuts.xml"
is created.

If Clarion is run and registered "C:\Test\10.0\ClarionProperties.xml"
is created.

So in my installs I'm going to validate that ClarionProperties.xml
exists before accepting a path for /ConfigDir as correct. And if the
developer can't figure it out I'll display one of these images and
move on!<g>

Lee White

NewsArchive
02-24-2015, 03:23 AM
Hi Lee,

If you are using the "Detect Clarion Environment" dialog then the
%_SB_RETURN% return value is the selected Clarion version. For example:
Clarion 10.

In the "Detect Clarion Environment" dialog or the "If Clarion..." Statement
the variable %_SB_RETURNEX% returns the "1" if the Clarion 7 (and later) IDE
is "initialized". This function can be used to avoid the "error CLCE007:
This version of Clarion is not registered" GPF in the Clarion 7 (and later)
environment. In other words, if this value is "1" then
ClarionProperties.xml exists and the product is validated (no GPF during the
template registration). That's what I am using in the LSZip install image
to avoid the template registration GPF.

Friedrich