PDA

View Full Version : Check if file exists at compile time



NewsArchive
03-31-2009, 02:17 AM
Hi Friedrich,

In a web update I would like to include some exes only when needed. Problem
is that I also have code to embed vista manifest and code sign which throws
an fatal compiler error if the file doesn't exist. Basically what I need
is:

#if FileExist(C:\Products\MyProduct Web\Latest\Programs\MyExe')
#embed UAC manifest
#code-sign application
#endif

That way I can place any one of 5 exes into the production folder and
compile it without errors. I can't seem to find a way to do this. Any
ideas?

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
03-31-2009, 02:19 AM
STOP STOP STOP!
Don't give him any more stuff to add for the next month! LOL... (although
that could be a useful compiler directive).

I just tried a quick test with the #getfileinfo directive. It returns -1
when the file isn't found (pic).
Maybe you could use that?

Jane

NewsArchive
03-31-2009, 02:20 AM
Hi Jane,

> Don't give him any more stuff to add for the next month! LOL... (although
> that could be a useful compiler directive).

No problem, it was just a question not a request<g>

> I just tried a quick test with the #getfileinfo directive. It returns -1
> when the file isn't found (pic).
> Maybe you could use that?

I'll look into it. I just commented the ones I don't need out for now, but
it would be cool to be able to do a quick check, particularly for webupdate
where I'm basically using *.* for files in this particular install.

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
04-01-2009, 01:23 AM
Hi Arnór,

> #if FileExist(C:\Products\MyProduct Web\Latest\Programs\MyExe')
> #embed UAC manifest
> #code-sign application
> #endif

Added to SB7 :) See attached screenshot.

Thank you for your suggestion.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-01-2009, 01:24 AM
Hi Friedrich,

> Added to SB7 :) See attached screenshot.
>
> Thank you for your suggestion.

Awsome! I knew you could do it!

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
04-01-2009, 03:25 AM
Hi Arnór,

> #if FileExist(C:\Products\MyProduct Web\Latest\Programs\MyExe')
> #embed UAC manifest
> #code-sign application
> #endif

Added to SB7 :) See attached screenshot.

Thank you for your suggestion.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-01-2009, 03:25 AM
Hmm, NNTP server always timed-out during the post process. Now the message
appears six times. Sorry for that.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-01-2009, 03:26 AM
> Hmm, NNTP server always timed-out during the post process. Now the message
> appears six times. Sorry for that.

SV needs to feed the squirrel that powers this cage some Red Bull<g>

:-)

Charles

--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
04-01-2009, 03:28 AM
I thought you developed a stutter <g>.

--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm

NewsArchive
04-01-2009, 03:28 AM
You can say that again<g>

Jeff Slarve