Author Topic: Dev-C++ DevPak updater/installer plugin  (Read 9335 times)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Dev-C++ DevPak updater/installer plugin
« on: January 18, 2006, 06:59:58 pm »
Hello,

I have tried to compile the ContribPlugins.workspace. Compiling the Dev-C++ DevPak updater/installer plugin I get some warnings about deprecated functions:

Quote
-------------- Build: default in Dev-C++ DevPak updater/installer (wx2.6) ---------------
Compiling: cbnetwork.cpp
Compiling: conf.cpp
conf.cpp: In function `UpdateRec* ReadConf(const IniParser&, int*, const wxString&, const wxString&)':
conf.cpp:78: warning: `GetHostName' is deprecated (declared at C:/Programme/CB_16jan2006_rev1775_win32/wx/include/wx/url.h:75)
conf.cpp:80: warning: `GetProtocolName' is deprecated (declared at C:/Programme/CB_16jan2006_rev1775_win32/wx/include/wx/url.h:74)
conf.cpp:80: warning: `GetHostName' is deprecated (declared at C:/Programme/CB_16jan2006_rev1775_win32/wx/include/wx/url.h:75)
conf.cpp:81: warning: `GetHostName' is deprecated (declared at C:/Programme/CB_16jan2006_rev1775_win32/wx/include/wx/url.h:75)
conf.cpp:83: warning: `GetHostName' is deprecated (declared at C:/Programme/CB_16jan2006_rev1775_win32/wx/include/wx/url.h:75)
Compiling: crc32.cpp
Compiling: devpakinstaller.cpp
Compiling: devpakupdater.cpp
Compiling: mytar.cpp
Compiling: updatedlg.cpp
Compiling: cbiniparser.cpp
Linking dynamic library: ..\..\..\devel\share\CodeBlocks\plugins\devpakupdater.dll

Should these functions not be replaced?

Another question is how to correctly set zip.exe. I have put its directory in the system path (environmental variable= and it is found (I have checked). Anyway, I still get

Quote
Running target post-build steps
zip ..\..\..\devel\share\CodeBlocks\devpakupdater.zip *.xrc
Execution of 'zip ..\..\..\devel\share\CodeBlocks\devpakupdater.zip *.xrc' in 'C:\Programme\SVN\CodeBlocks\src\plugins\contrib\devpak_plugin' failed.

Is there an easy way to set it?

Michael

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Dev-C++ DevPak updater/installer plugin
« Reply #1 on: January 18, 2006, 07:06:26 pm »
Should these functions not be replaced?
Now that C::B only can be compiled with wx2.6, and not wx2.4 or previous versions, yes, I guess so.

Is there an easy way to set it?
Are you sure you have the correct zip.exe?
Open a console and type zip. It should give the version (Info-ZIP 2.31 or so).

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Dev-C++ DevPak updater/installer plugin
« Reply #2 on: January 18, 2006, 07:12:54 pm »
Is there an easy way to set it?
Are you sure you have the correct zip.exe?
Open a console and type zip. It should give the version (Info-ZIP 2.31 or so).

I think so. If I type zip in a console I get:

Quote
C:\>zip
Copyright (C) 1990-2005 Info-ZIP
Type 'zip "-L"' for software license.
Zip 2.31 (March 8th 2005). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  [email protected]   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -!   use privileges (if granted) to obtain all aspects of WinNT security
  -R   PKZIP recursion (see manual)
  -$   include volume label         -S   include system and hidden files
  -e   encrypt                      -n   don't compress these suffixes

As a quick&dirty solution, I have copied zip.exe in each plugin directory. It works now, but it is for sure not the best solution :(.

Michael

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Dev-C++ DevPak updater/installer plugin
« Reply #3 on: January 18, 2006, 07:15:10 pm »
i get
Code: [Select]
zip ..\..\..\devel\share\CodeBlocks\devpakupdater.zip *.xrc
updating: update.xrc (deflated 83%)

but i remember, that there are existing several different "zip.exe"
with this one it works ftp://ftp.info-zip.org/pub/infozip/WIN32/zip231xN.zip

[edit]
nevermind - you have already this version zip 2.31  :D

another idea - there are several zip.exe's in some packages called unix-utils for win32 or similar name
are you sure, that at runtime there can not be executed another zip.exe ??? maybe from your mingw\bin directory ??
 
« Last Edit: January 18, 2006, 07:18:35 pm by tiwag »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Dev-C++ DevPak updater/installer plugin
« Reply #4 on: January 18, 2006, 07:38:00 pm »
another idea - there are several zip.exe's in some packages called unix-utils for win32 or similar name
are you sure, that at runtime there can not be executed another zip.exe ??? maybe from your mingw\bin directory ??

I am quite sure. I have recently installed MinGW 5 (ad described in the C::B wiki), but I have no zip in the bin directory.

If I delete the path to zip.exe in the environmental variable Path and type zip in the console, I get an error. Anway, even if I put the zip path in the Path, I still get zip failed with C::B. I have to put the zip.exe in the plugin directory to make it works.

In order to compile C::B I had to put the absolute path in the update.bat.

Michael

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Dev-C++ DevPak updater/installer plugin
« Reply #5 on: January 18, 2006, 08:38:13 pm »
Wait, you are running update.bat doing a double clic on it, right?
(Not being called from a script or another dir, etc)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Dev-C++ DevPak updater/installer plugin
« Reply #6 on: January 18, 2006, 08:44:14 pm »
Wait, you are running update.bat doing a double clic on it, right?
(Not being called from a script or another dir, etc)

Yes, exactly. ASAIK only wxsmith plugin run update.bat as post-build step.

Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Dev-C++ DevPak updater/installer plugin
« Reply #7 on: January 19, 2006, 03:23:32 pm »
Should these functions not be replaced?
Now that C::B only can be compiled with wx2.6, and not wx2.4 or previous versions, yes, I guess so.

I have created and posted a patch to sourceforge that replaces the deprecated functions with new ones (from wxURI). See here too.

Michael