|
when check new version,connecting server,I click cancel button,and after confirm,the UI can't be desoryed and the program looks like deadlock.
I don't know what reason makes that,please tell me,thanks!
|
|
|
|
|
Strange, can you send me the update file? And does this happen all the time?
|
|
|
|
|
When I run updater.exe in vc IDE,debug step by step,it always assert fail in CFileVersion::Open(LPCTSTR lpszModuleName) function.
(ASSERT(_tcslen(lpszModuleName) > 0))
|
|
|
|
|
Probably, the lpszModuleName is empty, so in debug mode it will assert. Check if you are correctly passing a valid (non-empty) parameter to the function.
Best regards,
|
|
|
|
|
|
CString CPath::ExtractFilePath(CString sPath, CString sSplitter )
{
int iPos;
for (int i = sPath.GetLength(); i > 0; i--)
{
iPos = sPath.Find(sSplitter, sPath.GetLength()-(sPath.GetLength()-i));
if (iPos != -1)
{
sPath.Delete(iPos, sPath.GetLength() - i);
return sPath;
}
}
return sPath;
}
Looking at the above code, I don't understand why you wrote sPath.GetLength()-(sPath.GetLength()-i) instead of just i.
And, I think the code below does the equivalent. This will be more efficient and readable code.
I am sure you have some reasons not using CString::ReverseFind method.
If so, please explain why. Maybe problems when searching MBCS/DBCS/SBCS string?
<code>CString CPath::ExtractFilePath(CString sPath, TCHAR tcSplitter )
{
int iPos;
iPos = sPath.ReverseFind(tcSplitter);
return (iPos != -1 ? sPath.Left(iPos) : sPath);
}</code>
haerim
-- modified at 23:18 Saturday 21st October, 2006
|
|
|
|
|
Thanks for this code suggestion!
Best regards,
|
|
|
|
|
CString CPath::ExtractFilePath(CString sPath, TCHAR tcSplitter )
{
CString sResult = _T("");
int iPos = sPath.ReverseFind(tcSplitter);
if (iPos > -1) {
sResult = sPath.Left(iPos + 1);
}
return sResult;
}
Is this more correct?
1) Previous function for (sPath = "/filetodownload") from (URL = "ftp://localhost/filetodownload")
will extract (sResult = "") but correct result is (sResult = "/")
2) Why if not found spliter you not return empty result (sResult = "") ?
Julian Popov
абвгдежзийклмнопрстуфхцчшщъьюя
|
|
|
|
|
Thanks for your suggestions.
This is the newest code in Updater:
<br />
CString CPath::ExtractFilePath(CString sPath, TCHAR tcSplitter )<br />
{<br />
int iPos;<br />
<br />
iPos = sPath.ReverseFind(tcSplitter);<br />
<br />
return (iPos != -1) ? sPath.Left(iPos + 1): _T("");<br />
}<br />
|
|
|
|
|
My updatefile UpdateInfo_Current.xml in the server shows
<GENERAL>
<VERSION>1.0.0.1</VERSION>
...
And, the settings.ini file in my pc shows
[APPLICATION]
version=1.0.0.0
And the Updater successfully updated from 1.0.0.0 to 1.0.0.1 changing the settings.ini file like
[APPLICATION]
version=1.0.0.1
However, when I run the Updater again, it keeps saying that new version 1.0.0.1 is available and repeats the update processes(downloading, copying, installing, ...).
Shouldn't the Updater stop updating no more than one time for new version?
haerim
-- modified at 18:27 Saturday 21st October, 2006
|
|
|
|
|
Make sure that CHECKSEPARATELY in <general> is set to false:
<general>
<version>1.0.0.1
<checkseparately>false
...
Best regards,
|
|
|
|
|
These few days, I've been trying to use the Updater for my sample application but always get "No New version ..." message. It is quite vague how to set things up for the first time.
I wish there are several good ste-by-step examples with illustrations.
Please explain in more detail for the following case:
1) I have compiled release version of my sample application called MyApp.exe.
2) MyApp.exe resides in folder "C:\Work\Sample" on my PC.
3) MyApp.exe needs many other files and modules. Let's call them A, B, C, and X, Y, Z.
3-1) A, B, C reside in the "C:\Work\Sample" on my PC.
3-2) X, Y, Z reside in the "C:\Work\Sample\Sub" on my PC.
4) I will use a server http://www.update.myserver with up_id/up_pwd as id and pwd.
4-1) Update_1.0.0.0 will be the server's folder name for the first time. MyApp.exe along with A, B, C will be saved under http://www.update.myserver/Update_1.0.0.0. And X,Y,Z will be saved under http://www.update.myserver/Update_1.0.0.0/Sub.
5) I would like to make the initial version "1.0.0.0".
6) I would name the update xml file "UpdateInfo_Current.xml"
Now please generate settings.ini and UpdateInfo_Current.xml.
Next, MyApp.exe and file X is modified, so I will call its version "1.0.0.1"
Again I would like to see how settings.ini and UpdateInfo_Current.xml have to be changed.
Thanks.
haerim
|
|
|
|
|
Hello,
The first update file (1.0.0.0) should be empty with only the version number in the general info. Then, Updater will be able to get the current update file, but since it contains the same version as on the client side, no updates will be downloaded/installed.
When you will release your second version (1.0.0.1), you can generate an update file using Updater Tool (you can download the tool from my website). Simply follow the wizard and compare the release folder of v1.0.0.0 with v1.0.0.1. Updater Tool will automatically see the differences between the two releases (files only, registry and ini changes will not be detected).
Now, you rename UpdateInfo_Current.xml to UpdateInfo_1.0.0.0.xml and you save the new generated file as UpdateInfo_Current.xml. Now, Updater will connect to the file (UpdateInfo_Current.xml) that is changed and it will notice that a new version is available.
If you want sequenced updating (see user guide for more details about this feature), you can let UpdateInfo_Current.xml point to the previous release.
One last thing: I see you are working with version numbers only. Make sure CheckSeparately (in general settings node of the update file) is disabled.
I hope this helps you out a bit. If not, just let me know!
Best regards,
|
|
|
|
|
I tried to compile v0.8.1.6 using VC++ SP6 with Platform SDK installed.
And I tried with following 3 types of compile Preprocess definitions:
_DEBUG,WIN32,_WINDOWS,_MBCS,ZLIB_WINAPI,UNICODE
_DEBUG,WIN32,_WINDOWS,_MBCS,ZLIB_WINAPI,UNICODE,_UNICODE
_DEBUG,WIN32,_WINDOWS,ZLIB_WINAPI,UNICODE,_UNICODE
But all setting gave me the C2002 error for the following BOLD typed line and below lines with _T('xOO') where OO is a hexadecimal number.
// some common character entities
XHTMLSTATIC_CHAR_ENTITIES CXHTMLStatic::m_aCharEntities[] =
{
{ _T("&"), 0, _T('&') }, // ampersand
{ _T("•"), 0, _T('\x95') }, // bullet NOT IN MS SANS SERIF <= Here is the error line
{ _T("©"), 0, _T('\xA9') }, // copyright
{ _T("€"), 0, _T('\x80') }, // euro sign
{ _T(">"), 0, _T('>') }, // greater than
{ _T("¿"), 0, _T('\xBF') }, // inverted question mark
{ _T("<"), 0, _T('<') }, // less than
{ _T(" "), 0, _T(' ') }, // nonbreaking space
{ _T("¶"), 0, _T('\xB6') }, // paragraph sign
{ _T("£"), 0, _T('\xA3') }, // pound sign
{ _T("""), 0, _T('"') }, // quotation mark
{ _T("®"), 0, _T('\xAE') }, // registered trademark
{ _T("™"), 0, _T('\x99') }, // trademark NOT IN MS SANS SERIF
{ NULL, 0, 0 } // MUST BE LAST
};
This is the only compile error I got.
How to fix and compile?
To make it compile first of all, I had to change the above lines as follows:
// some common character entities
XHTMLSTATIC_CHAR_ENTITIES CXHTMLStatic::m_aCharEntities[] =
{
{ _T("&"), 0, _T('&') }, // ampersand
{ _T("•"), 0, _T('*') }, // bullet NOT IN MS SANS SERIF
{ _T("©"), 0, _T('C') }, // copyright
{ _T("€"), 0, _T('e') }, // euro sign
{ _T(">"), 0, _T('>') }, // greater than
{ _T("¿"), 0, _T('?') }, // inverted question mark
{ _T("<"), 0, _T('<') }, // less than
{ _T(" "), 0, _T(' ') }, // nonbreaking space
{ _T("¶"), 0, _T('P') }, // paragraph sign
{ _T("£"), 0, _T('L') }, // pound sign
{ _T("""), 0, _T('"') }, // quotation mark
{ _T("®"), 0, _T('R') }, // registered trademark
{ _T("™"), 0, _T('T') }, // trademark NOT IN MS SANS SERIF
{ NULL, 0, 0 } // MUST BE LAST
};
As you see, all hexadecimal numbers are replaced with normal ascii characters.
Now, the compilation was ok, but I got a link error like this:
--------------------Configuration: Updater - Win32 Debug restore version--------------------
shell32.lib(shguid.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Please help me with this link error. I couldn't figure it out.
haerim
-- modified at 22:12 Friday 20th October, 2006
|
|
|
|
|
Hello,
May I assume you are using Updater on an asian computer? An asian person contacted me in the past about the same problem.
We couldn't find a solution since the struct XHTMLSTATIC_CHAR_ENTITIES consists of 3 TCHAR variables. If you are not using silent mode with custom notifications, you can safely remove the code (or change it so it will compile).
About the shguid.obj: are you using the february 2003 platform sdk? Make sure all the directories are on top and that you "Rebuild all".
Make sure you are not accidently compiling in restore version mode. Just compile in debug mode itself if you want to debug or test Updater.
Best regards,
|
|
|
|
|
Geert van Horrik wrote: May I assume you are using Updater on an asian computer? An asian person contacted me in the past about the same problem.".
We couldn't find a solution since the struct XHTMLSTATIC_CHAR_ENTITIES consists of 3 TCHAR variables. If you are not using silent mode with custom notifications, you can safely remove the code (or change it so it will compile).
=>The compile error was solved by replacing the second _T with TCHAR. I don't know why _T doesn't work but TCHAR works. If you can explain why please do so.
// some common character entities
XHTMLSTATIC_CHAR_ENTITIES CXHTMLStatic::m_aCharEntities[] =
{
{ _T("&"), 0, TCHAR('&') }, // ampersand
{ _T("•"), 0, TCHAR('\x95') }, // bullet NOT IN MS SANS SERIF
{ _T("•"), 0, TCHAR('*') }, // bullet NOT IN MS SANS SERIF
{ _T("©"), 0, TCHAR('\xA9') }, // copyright
{ _T("€"), 0, TCHAR('\x80') }, // euro sign
{ _T(">"), 0, TCHAR('>') }, // greater than
{ _T("¿"), 0, TCHAR('\xBF') }, // inverted question mark
{ _T("<"), 0, TCHAR('<') }, // less than
{ _T(" "), 0, TCHAR(' ') }, // nonbreaking space
{ _T("¶"), 0, TCHAR('\xB6') }, // paragraph sign
{ _T("£"), 0, TCHAR('\xA3') }, // pound sign
{ _T("""), 0, TCHAR('"') }, // quotation mark
{ _T("®"), 0, TCHAR('\xAE') }, // registered trademark
{ _T("™"), 0, TCHAR('\x99') }, // trademark NOT IN MS SANS SERIF
{ NULL, 0, 0 } // MUST BE LAST
};
Geert van Horrik wrote: About the shguid.obj: are you using the february 2003 platform sdk? Make sure all the directories are on top and that you "Rebuild all".
=> I had to put "C:\Program Files\Microsoft Visual Studio\VC98\LIB" on the top and then "C:\PROGRAM FILES\MICROSOFT PLATFORM SDK FOR WINDOWS XP SP2\LIB" below it to solve the link problem. Putting the Feb 2003 platform libaray on the top didn't work out.
Geert van Horrik wrote: Make sure you are not accidently compiling in restore version mode. Just compile in debug mode itself if you want to debug or test Updater.
=>Source project has several compile configuration settings.
Release
Release without compression
Beta release
Debug
Debug proxy settings
Debug restore version
Can you explain each one's features briefly?
haerim
-- modified at 19:06 Saturday 21st October, 2006
|
|
|
|
|
It is nice to hear that you fixed the problem by adding TCHAR in front of the characters. However, I have no explanation for it.
About the configuration settings:
Release => This mode is used when a final release is built
Release without compression => For fast release testing since the real release also compresses the executable
Beta release => Beta release for beta testers, same as release but shows a message that the user is working with a beta version
Debug => debug version
Debug proxy settings => debug version with -proxysettings parameter
Debug restore version => debug version with -restore parameter
Best regards,
|
|
|
|
|
Would it be possible to use this tool as an installer as well as an updater?
|
|
|
|
|
There are some people / companies using this software as installer too, but you can't let the user specify a path for the installation so I am not sure if it is wise to use it as an installer.
Best regards,
|
|
|
|
|
Hello,
I downloaded the updater today and tryed to start the examples. But it always gives the "updatefile.xml is corrupt" message...
Mik7
|
|
|
|
|
Did you download the example files from my website (http://www.gvhsoftware.org) or from codeproject?
There were some problems with the samples since I forgot to make them unicode.
You can make them unicode yourself by opening them with Updater Tool (newest version) and save them again. Then, the problem should be solved!
Best regards,
|
|
|
|
|
That's right, now it works.
But I have another question
I did a sample program which prints "this is a version 1" on the console and another version of the same program which prints "this is a version 2".
I deployed the second program on the server (with an appropriate updateinfo.xml) and with Updater I figured out to download it. So, it works.
But if I start the updater.exe one more time, it downloads the second version of my program anyway (it has not to do this, because it's already did this).
I suppose that I did not configured some parameter but I can't find which one...
Mik7
|
|
|
|
|
Do you have CheckSeparately enabled? Try to disable the option, that's the most common error in the update file.
|
|
|
|
|
You are right, ti was the problem.
Thank a lot!
Mik7
|
|
|
|
|
Hi, I have the same problem with the version from your website 0.8.1.6 ... open in Updater Tool and save did not solve it ...
thanks for any advice.
Tomfi
|
|
|
|
|