Welcome Guest.   Make a donation to an author on the site April 24, 2014, 01:04:50 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 3 4 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DcuHelper.exe v1.10 (7/12/11) - Update checking for your apps (dcupdater compat)  (Read 42094 times)
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: August 16, 2007, 08:40:26 PM »

latest version of the dcuhelper.exe utillity.

So if you want to add update checking support to your program, you can do so by creating a .dcupdate file in your program directory, and distributing this dcuhelper.exe program with your program.  When you or the user wishes to check for updates, you simply execute this utility (e.g. ShellExecute) and it will:
  • Locate the DcUpdater installed on the user's computer and invoke it for your program (and any plugins your program might have).
  • OR if the DcUpdater tool is not installed, it will do a quick update check and let them know if a new version is available, and bring them to the web page where they can download and install it if so.

Size: 117k (could be compressed if you like to make it even smaller).
Download Latest: http://www.donationcoder....r/downloads/dcuhelper.zip

The dcuhelper.exe tool can also be used to "register" your program with DcUpdater so that it will appear in the default list of installed programs known by DcUpdater which can be checked for updates.

Version info:
  • v1.10.01 - July 12, 2011 - if launched as a hidden window (common in old versions of dcuhelper) the new dialog would not display; thanks worstje
  • v1.09.01 - July 2, 2011 - now bypasses cache explicitly when checking for version update -- could cause old files on some pcs; thanks wortje
  • v1.08.01 - Mar 23, 2011 - completely new dialog with buttons to open web pages shown when update detected; support for showing whats new
  • v1.07.01 - Jan 5, 2011 - improved the -u unregister parameter; added icon to dcuhelper to improve message boxes (thanks Worstje)
  • v1.06.01 - Jan 4, 2011 - added overide and redirect options in versioninfo file (see readme)
  • v1.05.01 - October 8, 2010 - added better help
  • v1.04.01 - Decmeber 30, 2009 - added new built-in quick web version checking into dcuhelper itself; see http://www.donationcoder....=9607.msg189826#msg189826 for more info
  • v1.03.01 - August 1, 2008 - added -t commandline option; fixed bug in opening dcupdater page; improved dialog on updater not installed; if no commandline options are passed it will try to load .dcupdate file in current dir and check for updates
  • v1.02.02 - September 8, 2007 - added a few more easier exported funcs.
  • v1.02.01 - September 8, 2007 - added dll exports, improved help; opens program webpage if updater not installed; added version info to usage display (invoke with no arguments).
  • v1.01.01 - August 16, 2007 - first public release
« Last Edit: September 15, 2011, 05:03:04 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: August 16, 2007, 08:41:48 PM »

This is early release without much documentation, so you'll surely need some initial help from me getting everything to work, so don't hesitate to ask.
Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: August 16, 2007, 08:54:18 PM »

I need to say a bit more about using DcUpdater to add update checking support to your programs/downloads:

  • There are a lot of other update checking tools (commercial + free) -- hey we should start a thread in dev corner listing all the ones we can find.
  • Most of them either compile into your program, or are a dll you load into your code and invoke.
  • Some are standalone executables that your program can launch.

The DcUpdater tool is most similar to #3, in that it is a standalone update checking executable, which does not have to be compiled into your code.

However where it differs from other such tools is that the full update checker tool is not really meant to be included with each individual program that uses it.

Instead, the intention is for the DcUpdater tool to be installed like any other application on a users computer, and provide a centralized update checking system for many programs.

That is, the user installs DcUpdater to their system, and other programs can "invoke it" to check for updates.  You can see this at work in my software -- so far 8 of my programs know how to invoke the DcUpdater tool to check for updates.



The tiny 100k dcuhelper.exe tool is not the updater itself(!)  It's a helper utility meant to be packaged in your program, whose only job is to find and communicate with the main big DcUpdater tool installed on the user's computer, OR help the user to download and install it if it's not already (if they want to).



What this means to you as a developer, is that your users will have to go through an extra step if this is the yours is the first program they have installed that uses the DcUpdater tool and they haven't installed it yet.  They may find this confusing and irritating.

So probably you want to go find yourself an update checking solution that is self-contained and you probably don't want to use DcUpdater.

However, if you do want to use it, i'm here to help.  It may be a good match for you if one or more of the following is true:
  • You are a programmer who hangs out at DonationCoder.
  • You have a bunch of tools, each of which needs update support.
  • You use plugins or other user-written content and want an easy way to check for updates for lots of independent items.
  • You like the idea of not bloating up each program with its own update checking code.
« Last Edit: August 16, 2007, 09:03:03 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: August 16, 2007, 08:56:14 PM »

ps. you can use dcupdater and dcuhelper to add update support to pure data/file packages that contain no executable component at all -- just provide a shortcut that invokes the dcuhelper.exe tool.
Logged
justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: August 17, 2007, 04:28:51 AM »

Oh wow just in time!
I was considering writing your dcupdater invoke code as Autohotkey code to include, but this even easier smiley

and by the way mouser i've started creating that document we talked about comparing various updater programs during lunch hours. I hope to have it finished next week.
« Last Edit: August 17, 2007, 04:31:28 AM by justice » Logged

justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: August 17, 2007, 05:05:13 AM »

What happens:
I have the dcuhelper.exe in a subfolder "dcuhelper" inside my program installation folder (d:\scripts\PutAside01).
I also made svd-putaside.dcupdate in the program folder.

My program runs the command if it hasn't been run before:
[copy or print]
d:\scripts\PutAside01\dcuhelper\dcuhelper.exe -r "PutAside" "d:\scripts\PutAside01"

a commandline window flashes up with no text in it, and my program is not recognised by dcupdater.
If I run svd-putaside.dcupdate then dcupdater comes up for my program only (not for the other installed programs).

What i was expecting:
I was expecting that by running the dcuhelper program it would add my program to the list of all the other programs recognised by dcupdater. if this was not the case then I thought the first time I would run my .dcupdate it would also register it.

I don't fully understand what "program_labelname" should be, should this correspond with the filename part of my dcupdate file, should it correspond to the local -> label  value or can it be anything (if so what's the use?)


Logged

mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: August 17, 2007, 10:08:53 AM »


Quote
I don't fully understand what "program_labelname" should be, should this correspond with the filename part of my dcupdate file, should it correspond to the local -> label  value or can it be anything (if so what's the use?)

yeah sorry i should have explained what that was used for.. it's just used to name the file that is created in, for example:
[copy or print]
C:\Documents and Settings\All Users\Application Data\DonationCoder\DcUpdater\RedirectFiles\PROGRAM_LABEL.dcupdateredirect

so the answer is it doesn't really matter what you pass, as long as it's unique to other programs.


getting back to your comment about running it with -r:
Quote
a commandline window flashes up with no text in it, and my program is not recognised by dcupdater.

the -r says to create that file above, it does nothing else.  That file just allows DcUpdater to find your program when DcUpdater is run independently (like from Start Menu), rather than being launched from within your program.  You should call ShellExecte with the SW_HIDE parameter so that the user doesnt see the blank window pop up.

You can make the -r call every time your program starts, or just once, OR you can use the -ri commandline parameter mode with dcuhelper to create that file each time you invoke it to check for updates.

To actually call the updater to check for updates from your program you use the -i or -ri commandlie options for dcuhelper.

Does that clarify things a bit?
Logged
justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: August 17, 2007, 10:34:00 AM »

Ah right it now checks for updates. Many thanks.

I'll look at it again on the monday.
Logged

mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: August 17, 2007, 10:41:00 AM »

After the -r call, launching DcUpdater by itself should list your program in the complete list of all known stuff that can be updated.  If it doesn't, check to see if the file "C:\Documents and Settings\All Users\Application Data\DonationCoder\DcUpdater\RedirectFiles\PROGRAM_LABEL.dcupdateredirect" is being created, and if the contents of that file point to the directory of your program.
Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: August 19, 2007, 12:16:08 PM »

An example of suggested way to invoke update check from your program using dcuhelper.exe, from a C++ program:

ShellExecute(NULL,"open",dcufullpath,comlineargs,NULL,SW_HIDE);

where:
  • dcufullpath is the full path to the dcuhelper.exe you installed with your program, e.g.: C:\Program Files\ProcessTamer\dcuhelper.exe
  • comlineargs is: -ri ProcessTamer "C:\Program Files\ProcessTamer" "Warning" -show

Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: August 19, 2007, 01:08:14 PM »

ps.
If you use Inno Setup, here is a line you can add to your [Run] section which will use the dcuhelper.exe to automatically register your newly installed program with the updater so the updater itself will know how to check for updates to your program, even before the first use of your program:

Filename: {app}\dcuhelper.exe; WorkingDir: {app}; Description: Create Update Check Helper File..; Flags: nowait runhidden; Parameters: "-r PROGRAM_LABEL ""{app}"""

Basically this just invoked the dcuhelper to create the file described above, silently at end of install (user is not prompted).  Note that this doesnt invoke an update check and doesn't require the updater tool to be installed on the user's computer.  It just creates the dcupdateredirect file so that the dcupdater tool can find it if/when it's installed.
« Last Edit: August 19, 2007, 01:46:35 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: August 19, 2007, 01:36:56 PM »

Another fun tip for Inno Setup users:

What if you want to add a "Check for Updates" item to the start menu group of your program?

Just add this one line to your inno script, in the Icons section:
  • Name: {group}Check for updates; Filename: {app}\dcuhelper.exe; WorkingDir: {app}; Parameters: "-ri PROGRAM_LABEL ""{app}"" ATTENTION -show"; IconFilename: {app}\YOUR_MAIN_PROGRAM.exe; Flags: runminimized

(you can leave off the IconFilename if you dont want to give the shortcut the icon of your main program).

When the user chooses the "Check for Updates" item from the start menu group, dcuhelper.exe will find and invoke the DcUpdater tool or show user how to install it if it isn't installed yet.

NOTE: this gives you a complete way to add update checking to your program without modifying the actual program at all.  you could even use this technique to add update checking to a package you make (which could contain multiple updatable components), consisting of programs you didn't compile yourself.
« Last Edit: August 19, 2007, 01:46:54 PM by mouser » Logged
justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: August 20, 2007, 02:53:42 AM »

After the -r call, launching DcUpdater by itself should list your program in the complete list of all known stuff that can be updated.  If it doesn't, check to see if the file "C:\Documents and Settings\All Users\Application Data\DonationCoder\DcUpdater\RedirectFiles\PROGRAM_LABEL.dcupdateredirect" is being created, and if the contents of that file point to the directory of your program.
There is no C:\Documents and Settings\All Users\Application Data\DonationCoder on my XP system.
I've reinstalled 1.21.01 but after running dcupdate it still hasn't appeared.
Logged

mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: August 20, 2007, 03:28:41 AM »

justice, rather than try to do tech support here let's talk in irc channel or via email and then we can post the solution here.
Logged
justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: August 20, 2007, 04:50:17 AM »

Right the issue is now solved with both a bugfix in dcuhelper and code changes in my code. PutAside is now the first third-party app to support DcUpdater  Thmbsup

For AutoHotkey coders feel free to use the following subroutine:
[copy or print]
Gosub,EnableAutoUpdate

EnableAutoUpdate:
; Register with DcUpdater and check for updates.
; When no updates are found nothing is displayed.
; make sure the dcuhelper.exe is in a subdirectory called 'dcuhelper' of this script's location.
cmdParams = -ri    ;r = register app, i = check for updates
uniqueID = yourprogramidhere   ;anything allowed
dcuHelperDir = %A_ScriptDir%\dcuhelper
IfExist, %dcuHelperDir%\dcuhelper.exe
{
OutputDebug, %A_Now%: %dcuHelperDir%\dcuhelper.exe %cmdParams% "%uniqueID%" "%A_ScriptDir%" . -shownew -nothingexit
Run, %dcuHelperDir%\dcuhelper.exe %cmdParams% "%uniqueID%" "%A_ScriptDir%" . -shownew -nothingexit,,Hide
}
return
« Last Edit: August 20, 2007, 08:42:16 AM by justice » Logged

mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: August 20, 2007, 04:54:39 AM »

very nice! thanks for sharing that justice  thumbs up
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: August 20, 2007, 05:07:38 AM »

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. ; make sure the dcuhelper.exe is in a subdirectory called 'dcuhelper' of this script's location
If i change the "dcuHelperDir" to %A_ScriptDir%, it won't work? dcuhelper can't be in the script's dir?

Thanks for "outputdebug", i didn't know that existed! cheesy
Logged

mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: August 20, 2007, 05:10:04 AM »

it doesnt have to be in a subdirectory, i think he was only saying that if his script code specifies its in the subdirectory, then it has to be.  you can put it wherever you want as long as you call it properly.
Logged
justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: August 20, 2007, 05:16:54 AM »

Like mouser said. My reasoning is that I like to put files that the user doesn't have to know about out of the way so they don't accidentily click on it.
Logged

lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: August 20, 2007, 07:22:34 AM »

this is fantastic! thanks mouser & justice.. Thmbsup just a small request: put a downloadable file as well.. smiley
Logged

justice
Supporting Member
**
Posts: 1,885



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: August 20, 2007, 08:58:17 AM »

Lanux128, I created a small AHK application that you can use to check for updates for itself.
http://www.amasan.co.uk/downloads/dummy/
Logged

lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: August 20, 2007, 11:56:30 AM »

thanks Justice, i'm hoping to add DCU support very soon.. Thmbsup
Logged

ak_
Supporting Member
**
Posts: 223


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: September 04, 2007, 01:35:42 PM »

Hmmm, i just tried to add DCu support to my program Subdude, but i can't get it to work.

First, isn't it possible to add a "Copy" method which simply overwrites an .exe file ?

Then, i tried the unzip method and tried to check for updates. From subDude itself, it told me that the program needed update only once. The other times, nothing. When i run dcupdater, it tells me that subdude need udpates, the download works then it does nothing. If i click "UPDATE NOW" again, it downloads the file again, and so on. The zip never gets unzipped.
Logged

mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: September 04, 2007, 02:18:52 PM »

send me your .dcupdate file and ill check it and see if i can spot what's wrong (mouser@donationcoder.com).

Quote
First, isn't it possible to add a "Copy" method which simply overwrites an .exe file ?

yes i should add such a thing i suppose.
Logged
mouser
First Author
Administrator
*****
Posts: 32,699



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: September 04, 2007, 05:21:46 PM »

Two people have had a problem because they are specifying:
<UpdateMethod>Unzip</UpdateMethod>

DcUpdater treats this field in a case-sensitive way so it needs to be
<UpdateMethod>unzip</UpdateMethod>

I think i shall change it to be case-insensitive and add an error if a non-recognized method is specified.
Logged
Pages: [1] 2 3 4 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.069s | Server load: 0.07 ]