Author Topic: Patches to compile and link C::B against wxWidgets 2.8.0  (Read 87751 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #45 on: December 18, 2006, 09:25:22 pm »
Hello all you wx 2.7.x and 2.8.x folks.

I am going to apply patches (one at a time) to get it to build for wx, only if they meet the following conditions (if those are acceptable conditions) :
1) all wx 2.7.x patches should be considered not existing [2.7.x are development series, not official release series]
 -> so please adjust all your patches for 2.8 and remove all references to 2.7.x, I'd prefer not to look at any 2.7 patch at berlios and like to close it without looking at it. I'd prefer not tp spend time on them and then in the end find out that a little thing might have changed in the official 2.8
2) as a result of 1), I'd like to see all ifdef constructs referring to 2.7.x removed, I think we should not ifdef polute our code on unofficial versions, and certainly not versions we won't support, don't take this as an insult, I am very thankful for all the hard work, but in the end all that research will pay back in the "official 2.8 patches" ;-)

I understand the above info and will change all the 2.7.x values to 2.8.0; and I will redo all the 2.7 patches as 2.8 patches. Therefore you can close the 2.7 ones from me. And, afb patches 1630 and 1627.
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1630&group_id=5358
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1627&group_id=5358

3) all patches should describe what they are doing :
 a) how comes it does not work without the patch (so what did 2.8 break) [== the why]
 b) a little explanation how wx 2.8 now does it
 c) whatever information you can give to make our life easier to understand and apply the patches without doing the research ourself from scratch

I will add explanations to the patches.

4) OPEN QUESTION : I guess most linux distros are now already somewhere in the 2.6.x line [x can still be 1 or 2 or 3 !!!], can we kick out 2.4.x specific things ?

The values WXWIN_COMPATIBILITY_2_4 is actually a 2.6 item, so it can NOT be removed. But, WXWIN_COMPATIBILITY_2_2 can be if it exists somewhere.

5) unfortunately we can't use anything yet of the new functionalities of wx 2.8 since probably it will take 6 months to 1 year until the major linux distros come with a newer version [some example : I think they have new about boxes or so ...]

I understand this.

Let me stress one thing : many many thanks to all of you who already sorted things out on what happened with wx ;-) , now it's just a little documentation step and cleaning.

Thanks for the thank you.

Tim S
« Last Edit: December 19, 2006, 11:52:45 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #46 on: December 19, 2006, 01:00:32 pm »
I am finished with the 2.8 changes and added reasons etc. If you want more info just ask.

Could you start on Patch #1732; it is causing a lot of work because the file has line ending issues so it is hard to do the diffs on it.

Thanks, Tim S

[ Patch #1732 ] keybinder plugin patches for wxWidgets 2.8 Submitted By: stahta01 based on afb work.
   https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1732&group_id=5358
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #47 on: December 19, 2006, 03:48:42 pm »
I am finished with the 2.8 changes and added reasons etc. If you want more info just ask.

Could you start on Patch #1732; it is causing a lot of work because the file has line ending issues so it is hard to do the diffs on it.

Thanks, Tim S

[ Patch #1732 ] keybinder plugin patches for wxWidgets 2.8 Submitted By: stahta01 based on afb work.
   https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1732&group_id=5358

I would rather not make any 2.7.x or 2.8.x changes to keyBinder until CB supports it, and certainly not until RC3 is out.

pecan

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #48 on: December 19, 2006, 04:24:58 pm »
I would rather not make any 2.7.x or 2.8.x changes to keyBinder until CB supports it, and certainly not until RC3 is out.

pecan


Could you then fix the line ending issues with this file then. I have to convert from DOS to Mac line ending and then from Mac to DOS line endings to get good diffs on this file. File: src/plugins/contrib/keybinder/keybinder.cpp

Thanks for the good work on Code::Blocks, and waiting till RC3 is out is fine with me; and you only need to fix the line ending issue the next time you update the file.

Tim S
« Last Edit: December 19, 2006, 05:03:52 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #49 on: December 19, 2006, 04:57:01 pm »
Could you then fix the line ending issues with this file then. I have to convert from DOS to Mac line ending and then from Mac to DOS line endings to get good diffs on this file. File: src/plugins/contrib/keybinder/keybinder.cpp

Tim S

I don't understand. Do you mean that I should change keyBinder to Mac line endings? What about the Linux and Windows users?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #50 on: December 19, 2006, 05:04:57 pm »
Could you then fix the line ending issues with this file then. I have to convert from DOS to Mac line ending and then from Mac to DOS line endings to get good diffs on this file. File: src/plugins/contrib/keybinder/keybinder.cpp

Tim S

I don't understand. Do you mean that I should change keyBinder to Mac line endings? What about the Linux and Windows users?


The file has two types of line endings in it; it makes doing diffs in Windows very hard to do.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #51 on: December 19, 2006, 05:07:09 pm »

The file has two types of line endings in it; it makes doing diffs in Windows very hard to do.
Tim S

Oh, I'll take a look. Thanks
« Last Edit: December 19, 2006, 05:10:37 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #52 on: December 19, 2006, 06:29:43 pm »
Can anyone suggest a windows program to convert *.h *.cpp files like:
"unix2dos *.h" ?

As seen below, I can't seem to find a program that works.
thanks

Code
C:\Usr\Proj\cbKeyBinder\RC3>unix2dos -h
unix2dos 2.2 Copyright (c) 1994-1995 Benjamin Lin. (1995.03.31)
Usage: unix2dos [-hkqV] [-o file ...] [-c convmode] [-n infile outfile ..
 -h --help        give this help
 -k --keepdate    keep output file date
 -q --quiet       quiet mode, suppress all warnings
                  always on in stdin->stdout mode
 -V --version     display version number
 -c --convmode    conversion mode
 convmode         ASCII, 7bit, ISO, default to ASCII
 -o --oldfile     write to old file
 file ...         files to convert in old file mode
 -n --newfile     write to new file
 infile           original file in new file mode
 outfile          output file in new file mode

C:\Usr\Proj\cbKeyBinder\RC3>unix2dos -o cbkeybinder.h
unix2dos: converting file cbkeybinder.h to DOS format ...
unix2dos: can not write to output file
unix2dos: problems converting file cbkeybinder.h

C:\Usr\Proj\cbKeyBinder\RC3>unix2dos cbkeybinder.h
unix2dos: converting file cbkeybinder.h to DOS format ...
unix2dos: can not write to output file
unix2dos: problems converting file cbkeybinder.h

C:\Usr\Proj\cbKeyBinder\RC3>unix2dos cbkeybinder.h cbkeybinder.h2
unix2dos: converting file cbkeybinder.h to DOS format ...
unix2dos: can not write to output file
unix2dos: problems converting file cbkeybinder.h

C:\Usr\Proj\cbKeyBinder\RC3>unix2dos -n cbkeybinder.h cbkeybinder.h2
unix2dos: converting file cbkeybinder.h to file cbkeybinder.h2 in DOS for

unix2dos: can not write to output file
unix2dos: problems converting file cbkeybinder.h to file cbkeybinder.h2
« Last Edit: December 19, 2006, 06:31:14 pm by Pecan »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #53 on: December 19, 2006, 07:22:43 pm »
I tried to use unix2dos and dos2unix and failed.

I am doing it with UltraEdit; They have a 30 day trial. http://www.ultraedit.com/
http://www.ultraedit.com/index.php?name=Downloads&d_op=getit&lid=1

While it is good doing one file, it is NOT a good solution for many files at once.

Tim S

I do this on the bad file to fix it.
"File" -> "Conversions" -> "DOS to Mac"
"File" -> "Conversions" -> "Unix/Mac to DOS"

Edit: Looking for the SED script I used 3 or 4 months ago, could NOT find it. I ended up using Ultra-edit because it worked better for me.
« Last Edit: December 19, 2006, 07:46:32 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #54 on: December 19, 2006, 08:05:00 pm »
This gives me the best result on the file keybinder.cpp

dos2unix *.cpp
unix2dos --convmode Mac *.cpp
unix2dos *.cpp

Edit: I am going to keep trying the results are NOT great looking


Tim S

« Last Edit: December 19, 2006, 08:08:50 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #55 on: December 19, 2006, 08:19:45 pm »
I seem to be having lots of luck with this

http://www.gammon.com.au/downloads/dlutilities.htm
Download utilities


It allows use of wildcards, like: *.h and *.cpp
Code
unix2dos Version 1.01 (Gammon Software Solutions) 13-Mar-98
Processing wildcard "*.h"
cbkeybinder.h
debugging.h
keybinder.h
keybinderdef.h
menuutils.h
5 files converted.
2542 total lines converted.
0 errors.
0 warnings.

C:\Usr\Proj\cbKeyBinder\RC3>E:\User\Downloads\_Pending\Unix2Dos\unix2dos.exe *.c
pp
unix2dos Version 1.01 (Gammon Software Solutions) 13-Mar-98
Processing wildcard "*.cpp"
cbkeybinder.cpp
keybinder.cpp
menuutils.cpp
3 files converted.
4251 total lines converted.
0 errors.
0 warnings.

It also contains the a source code link.

Code
Converting text files to/from Unix/Dos/Mac

    * http://www.gammon.com.au/files/pennmush/unix2dos.zip - 19K - program to convert unix text files to DOS format
    * http://www.gammon.com.au/files/pennmush/dos2unix.zip - 19K - program to convert DOS text files to Unix format
    * http://www.gammon.com.au/files/pennmush/mac2unix.zip - 19K - program to convert Macintosh text files to Unix format
    * http://www.gammon.com.au/files/pennmush/unix2mac.zip - 19K - program to convert Unix text files to Macintosh format
    * http://www.gammon.com.au/files/pennmush/unix2dos.c - 7K - source code used to compile above 4 conversion programs
« Last Edit: December 19, 2006, 08:23:54 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #56 on: December 19, 2006, 10:22:43 pm »
Quote from: stahta01 link=topic=4495.msg37214#msg37214
The file has two types of line endings in it; it makes doing diffs in Windows very hard to do.

Tim S

See if svn 3399 fixed the line ending situation in keyBinder.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #57 on: December 19, 2006, 10:39:29 pm »
Quote from: stahta01 link=topic=4495.msg37214#msg37214
The file has two types of line endings in it; it makes doing diffs in Windows very hard to do.

Tim S

See if svn 3399 fixed the line ending situation in keyBinder.


No, look at this method void wxKeyConfigPanel::OnProfileEditing(wxCommandEvent &) around line 2289.
It still has Mac line Endings there.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #58 on: December 19, 2006, 10:53:19 pm »
Quote from: stahta01 link=topic=4495.msg37214#msg37214
The file has two types of line endings in it; it makes doing diffs in Windows very hard to do.

Tim S

See if svn 3399 fixed the line ending situation in keyBinder.


No, look at this method void wxKeyConfigPanel::OnProfileEditing(wxCommandEvent &) around line 2289.
It still has Mac line Endings there.

Tim S

Well.. I'm sorry. I've done all I know how to do. I've run all those files through unix2dos and it says it converted them. I'm stumped..

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #59 on: December 19, 2006, 10:59:52 pm »
I edited the source you liked to in order to make an dos2mac command

I then ran the below commands and it looks to fix the problem.

dos2mac *.cpp
mac2unix *.cpp
unix2dos *.cpp

svn propset eol-style native *.cpp

Tim S

Uploaded the changed source to http://www.savefile.com/projects/1039215
pick DOS2UNIX.zip
« Last Edit: December 19, 2006, 11:07:32 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org