PDA

View Full Version : Directive Help



NewsArchive
08-08-2008, 01:45 AM
My install uses the #zip and #ftp directives (post compile) to zip my
EXE and upload it to my FTP site. I've got the "Post Compile" switch
turned on for both of these. (Thanks for the pointer the other day.)
BTW, the script viewer shows "[Post-compile]" on the #zip line, but
not on the #ftp line.

I wanted to make my upload filename "unique", so I would like to use
the #getfileinfo directive to get the date and time of the install
EXE. However, that directive doesn't have a "Post Compile" switch. I
could use the date+time of the program's EXE, but that might not
change if I've recompiled only a DLL. Could you add this option?

When I tried this, I got an upload error. The Host File is:
"download/transwin/SetupTW3_[DATESTAMP]_[TIMESTAMP].zip".
[DATESTAMP] and [TIMESTAMP] are the compiler variables set by the two
#getfileinfo directives. a #msgbox shows the filename as
"download/transwin/SetupTW3_2008/08/06_15:22:18.zip". Note the
special characters within the date and time. Is there a string
handler directive equivalent to the "Handle String Function", so that
I can deformat these numbers.

BTW, I also considered using the "Get Atomic Clock" function, as it
supposedly returns yyyymmdd. Unfortunately, it's not a compiler
directive, and it doesn't include the time (according to the Help).

Also, after uploading the file, I need to send a message announcing
the new version. I'll need to connect to the FTP site manually, to
find out the actual name of the ZIP file. Could you add a compiler
directive that lets me set the windows clipboard (with a "Post
Compile" switch)? Then I can just paste it into the message.

Or is there a better way to do all this right now?

Mike Hanson
www.boxsoft.net

NewsArchive
08-08-2008, 01:46 AM
Mike,

Let me check a few thinks (to see what is already possible in SB6, what is
already in SB7) and play with it before giving an answer.

A few comments:

"Handle String Function" is already in SB7 and I'll see if we can port it
back to SB6.

"Get Atomic Clock" is an installer function and returns the current time in
the %_SB_RETURNEX% variable.

I can reproduce the #ftp directives missing "post compile". It will be
fixed in the next maintenance build, thank you!

I'll give it some thoughts now...

Friedrich

NewsArchive
08-08-2008, 01:47 AM
Thanks! I await your next response.

Mike Hanson
www.boxsoft.net

NewsArchive
08-10-2008, 07:08 AM
Mike,

> Thanks! I await your next response.

I have analyzed the source code and I think it would be a good idea to add
the "[Post-compile]" option to the:

#get file information...
#get ini...
#get registry...

compiler directives.

It will be available in SB6 when you are back from vacation ;-)

Friedrich

NewsArchive
08-10-2008, 07:08 AM
That will help, as I can get the date and time from the compiled
setup.exe. Of course, then I would need to handle the strings to
deformat those values, which I can't do (yet).

I suppose I could use #run to call a little Clarion exe, which would
write the deformated date+time to an INI, then use #getini (either pre
or post would do) to fetch that value for use in the upload filename.
That means I could actually do it now. <g>

Thanks.

Mike Hanson
www.boxsoft.net

NewsArchive
08-10-2008, 07:09 AM
Mike,

> That will help, as I can get the date and time from the compiled
> setup.exe. Of course, then I would need to handle the strings to
> deformat those values, which I can't do (yet).
>
> I suppose I could use #run to call a little Clarion exe, which would
> write the deformated date+time to an INI, then use #getini (either pre
> or post would do) to fetch that value for use in the upload filename.
> That means I could actually do it now. <g>

I wanted to impress you with a cool "helper tool" (which writes what we need
to an INI when called with #run). The tool works perfect, but then I
noticed that #getini also does not have such a "[Post-compile]" option. Bad
software design <g>. It will be fixed when you are back.

The #string handling will be part of SB7.

Have a great vacation!

Friedrich

NewsArchive
08-10-2008, 07:09 AM
>I wanted to impress you with a cool "helper tool" (which writes what we need
>to an INI when called with #run). The tool works perfect, but then I
>noticed that #getini also does not have such a "[Post-compile]" option. Bad
>software design <g>. It will be fixed when you are back.

Both the #run and #getini occur before the build, which is fine. It
sets the compiler variable for use in the post-compile upload. I've
just tested it, and it works fine.

>The #string handling will be part of SB7.

That'll be handy for the future.

>Have a great vacation!

Thanks!

Mike Hanson
www.boxsoft.net