PDA

View Full Version : Register templates in the old Clarion IDE



NewsArchive
05-10-2012, 12:22 AM
Hi Friedrich,

When testing installs for Clarion 6 one after the other I realized that SB
does not seem to check if the IDE is running before it registers. I have a
bit of a bastard install that includes another install that I'm
testing/experimenting with. They _both_ register a template. I do have a
check in my standard include file that checks if any of the old Clarion IDE
is running (well, C4 through C6) and pops up a message. Like any good user
I completely ignored it and trashed my registry file<bg> I modified my
check code so that it now loops until the IDE has been closed before it
attempts to register. It's a bit of a mute point now with the old IDE
fading away and all that, but I wondered why SB doesn't simply check if the
IDE is running before running it again to register the templates? Just
curious:)

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
05-10-2012, 12:23 AM
Hi Arnor,


I'm sure you meant to say moot point, rather than mute point...

Ben E. Brady

--
Ben E. Brady via Samsung Skyrocket

NewsArchive
05-10-2012, 12:24 AM
Hi Arnór,

> but I wondered why SB doesn't simply check if the IDE is running
> before running it again to register the templates?

You can do this without any problem (and you already did this five years ago
<g>)

http://www.lindersoft.com/forums/showthread.php?p=11647#post11647
http://www.lindersoft.com/forums/showthread.php?p=26140

And you even had a procedure to detect active C4, C5, and C55 IDE instances
;-)

Friedrich

NewsArchive
05-11-2012, 12:39 AM
Hi Ben,

> I'm sure you meant to say moot point, rather than mute point...

Yes! Sometimes my fingers are a bit dyslexic;) In this case it kind of
comes out to the same thing<g>

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
05-11-2012, 12:39 AM
I'm sure you mean that he meant to type it<g>

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
This post may self-destruct at any moment

NewsArchive
05-11-2012, 12:40 AM
Hi Friedrich,

>> but I wondered why SB doesn't simply check if the IDE is running
>> before running it again to register the templates?
>
> You can do this without any problem (and you already did this five years ago
> <g>)

Please re-read my message. I detect the running instances. But the
question is why doesn't SB USE the running instance instead of INSISTING on
running a new instance and thereby trashing the registry?

Best regards,


--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
05-11-2012, 12:40 AM
Arnór,

> Please re-read my message. I detect the running instances. But the
> question is why doesn't SB USE the running instance instead of INSISTING
> on running a new instance and thereby trashing the registry?

Well, because the installer cannot check if a 16-bit application is running
;-)

You can use the workaround that I posted five years ago to try to detect a
running Clarion instance and then warn the user or abort the installation
(recommended).

BTW, the C60SRV.EXE method does not always work correctly because there can
be several C60SRV.EXE active (e.g. if the C6 IDE crashed). Then the C6 IDE
is not active but C60SRV.EXE is still there.

Friedrich

NewsArchive
05-11-2012, 12:41 AM
To sum it up: you can't detect a 16-bit (Clarion IDE) instance from a 32-bit
application. So to be on the safe side, try to detect C60SRV.EXE. But this
does not mean that C6 is running. If C60SRV.EXE is there (or the equivalent
for C4, C5, C55) then warn the user and terminate the installer so the user
can close the Clarion IDE or (if the IDE is not active) "kill" C60SRV.EXE.

Friedrich

NewsArchive
05-11-2012, 12:42 AM
Hi Friedrich,

> And you even had a procedure to detect active C4, C5, and C55 IDE instances

In BA I enumerate the running processes to detect if the IDE is running
before I start compiling, and if it isn't running I start it. If the IDE is
running, I just keep going. That's kind of what I was wondering why SB
didn't do that.

This is what I'm currently using to register templates in an SBI file:

If %IT_REGISTER_TEMPLATES% Equals "1" on Position "1" Then
If %IT_NEW_IDE% Does Not Equal "1" Then
Loop
Set Variable %IT_CLARION4_RUNNING% to FUNCTION:Detect Active
Application("C4SRVX.EXE") [File Name]
Set Variable %IT_CLARION5_RUNNING% to FUNCTION:Detect Active
Application("C5SRVX.EXE") [File Name]
Set Variable %IT_CLARION55_RUNNING% to FUNCTION:Detect Active
Application("C55SRVX.EXE") [File Name]
Set Variable %IT_CLARION60_RUNNING% to FUNCTION:Detect Active
Application("C60SRVX.EXE") [File Name]
Set Variable %IT_CLARION_RUNNING% to "1"
If %IT_CLARION4_RUNNING% Equals "603" Then
If %IT_CLARION5_RUNNING% Equals "603" Then
If %IT_CLARION55_RUNNING% Equals "603" Then
If %IT_CLARION60_RUNNING% Equals "603" Then
! No clarion versions running
Set Variable %IT_CLARION_RUNNING% to "0"
End
End
End
End
If %IT_CLARION_RUNNING% Equals "1" Then
Display Message Box "Please make sure that the Clarion IDE is
NOT runni..." -- "Registering Clarion templates"
Cycle Loop
Else
Break Loop
End
End
End
Register all pending Clarion Templates
Else
Display Message Box "You selected not to register the templates during
...." -- "Register Templates"
End

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
05-11-2012, 12:42 AM
Hi Arnór,

> In BA I enumerate the running processes to detect if the IDE is
> running before I start compiling, and if it isn't running I start
> it. If the IDE is running, I just keep going. That's kind of
> what I was wondering why SB didn't do that.

IIRC, the main problem was that there is no bullet proof way to detect a
running Clarion 1.x - 6.x IDE instance. So we came up with the detect
active CxSRVX.EXE application method many years ago. It can help to detect
IDE instances, but there is no guarantee.

And the Clarion template registration example demonstrates how to (try to)
detect an active Clarion IDE and terminate the install (or terminate the
Clarion IDE).

There were quite a few discussions with many Clarion 3rd-party folks in
2001-2003 and the current template registration model is what most
requested. Yes, if I had a DeLorean to get back I would choose another
(better) template registration method for C2.x - C6.x. But now it's too
late <g>.

Friedrich