Author Topic: PATCH: CB, windows resource file  (Read 14112 times)

Offline White-Tiger

  • Multiple posting newcomer
  • *
  • Posts: 83
PATCH: CB, windows resource file
« on: February 26, 2014, 04:50:01 pm »
here are some changes to conform Microsoft guidelines (such as don't set "SpecialBuild" or "PrivateBuild" if not actually using the corresponding flag, but they are required when you do. CB never does)
Main annoyance being the text once Code::Blocks crashed on Windows...
  • “Cross-platform IDE built around wxWidgets, designed to be extensible and configurable.
    has stopped responding

this is just odd xD And this text is also used when you drag it to the start menu... no one wants that to be it's name... better is:
"Code::Blocks IDE"
or even just "CodeBlocks" (I actually don't know what happens when we use colons here... as they are not valid in file names... thus the shortcut won't work with them.... but I guess Windows just replaces them)
Windoze 8.1 x86_64 16GiB RAM, wxWidgets-2.8x (latest,trunk), MinGW-builds (latest, posix-threads)
Code::Blocks (x86 , latest , selection length patch , build option fixes/additions , toggle comments)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
Re: PATCH: CB, windows resource file
« Reply #1 on: February 26, 2014, 05:44:01 pm »
I suggest reading this.

http://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_%28Patch_Tracker%29

The code I use to create a patch is

Code
svn.exe diff --extensions --unified --extensions --ignore-eol-style > cb_trunk.patch

How your patch likely should look. Notice the "src/src/resources/".
Code
Index: src/src/resources/resources.rc
===================================================================
--- src/src/resources/resources.rc (revision 9661)
+++ src/src/resources/resources.rc (working copy)
@@ -92,7 +92,7 @@
   {
     BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual
     {
-      VALUE "Build",            "November 2013\0"
+      VALUE "Build",            "November 2013"
       VALUE "Comments",         "Licensed under GPL3.\0"
       VALUE "CompanyName",      "Code::Blocks Team\0"
       VALUE "Developer",        "Code::Blocks Team\0"

Tim S.
« Last Edit: February 26, 2014, 05:49:34 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 White-Tiger

  • Multiple posting newcomer
  • *
  • Posts: 83
Re: PATCH: CB, windows resource file
« Reply #2 on: February 26, 2014, 06:39:28 pm »
I know that I'm missing the paths.. not my fault xD Say that to TortoiseSVN...
Using a command is also just too much work and it doesn't justify the time it takes (since I have to exclude lots of files and only include specific files, also I'm checking every file to find out if it's part of the patch or not, so I'm using a GUI anyway). It's easy to just navigate to the right folder if someone wants to apply the patch.

I'm normally not one who likes to post patches... since posting patches is a lot of work and most of them will be denied anyway ;) I decided to post them only for the reason that my projects importer patch is so huge and took so much time, that I don't want it to be wasted just for me. Besides Code::Blocks is actually a nice IDE and being able to almost fully import MSVC projects might increase it's userbase. (and simplifies to port MSVC projects to GCC etc.)

I also know about the BerliOS patch tracker, but that one is just ugly, a forum is a better place in this case. And most of them are ignored anyway. And BerliOS might die any moment as happened in the past ;)
A forum allows BBCode ;)

btw. your command line includes "extensions" 2 times... and I don't need "ignore-eol-style" as my EOL is always the real one (LF / \n)
« Last Edit: February 26, 2014, 06:47:04 pm by White-Tiger »
Windoze 8.1 x86_64 16GiB RAM, wxWidgets-2.8x (latest,trunk), MinGW-builds (latest, posix-threads)
Code::Blocks (x86 , latest , selection length patch , build option fixes/additions , toggle comments)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: PATCH: CB, windows resource file
« Reply #3 on: February 26, 2014, 09:35:55 pm »
I know that I'm missing the paths.. not my fault xD Say that to TortoiseSVN...
Using a command is also just too much work and it doesn't justify the time it takes (since I have to exclude lots of files and only include specific files, also I'm checking every file to find out if it's part of the patch or not, so I'm using a GUI anyway). It's easy to just navigate to the right folder if someone wants to apply the patch.
Sounds like it is time for you to switch to git/git-svn:)

I also know about the BerliOS patch tracker, but that one is just ugly, a forum is a better place in this case. And most of them are ignored anyway. And BerliOS might die any moment as happened in the past ;)
A forum allows BBCode ;)
The best is github branches. Patches posted as attachments are fragile: if the forum server gets out-of-space -> random attachments are deleted.
« Last Edit: February 26, 2014, 09:37:49 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline White-Tiger

  • Multiple posting newcomer
  • *
  • Posts: 83
Re: PATCH: CB, windows resource file
« Reply #4 on: February 26, 2014, 10:45:37 pm »
[...]
I also know about the BerliOS patch tracker, but that one is just ugly, a forum is a better place in this case. And most of them are ignored anyway. And BerliOS might die any moment as happened in the past ;)
A forum allows BBCode ;)
The best is github branches. Patches posted as attachments are fragile: if the forum server gets out-of-space -> random attachments are deleted.
well... I don't know any official Code::Blocks github mirror or repository, do you? And I can always re upload them again :P Just not write the description all over again...

PS: would be nice to know any official github mirror as I'm thinking about releasing my custom build CB myself... in case my patches will be ignored :P (Probably Windows only though... GNU/Linux only on request... as that requires me to setup a build bot including stuff to create .debs)
PPS: even though I work with both Git and SVN.. I prefer SVN ;) Not only because it's easier to use and understand, but also because a lot of features from Git just collide with each other... it's hard to get used to it. The best would have been a merge the best of SVN and Git...
Tbh, new projects do indeed use Git... but not because I'm happy with it... it's just sometimes a little bit better... and those times SVN is better, aren't enough to use only SVN. But otherwise I prefer SVN.
(one reason to use Git for public projects is Github and the ability to fork and thus easily add patches, without the need to merge them back, but even that is way easier. Another is that a local Git is also a bit nicer...)
Windoze 8.1 x86_64 16GiB RAM, wxWidgets-2.8x (latest,trunk), MinGW-builds (latest, posix-threads)
Code::Blocks (x86 , latest , selection length patch , build option fixes/additions , toggle comments)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: PATCH: CB, windows resource file
« Reply #5 on: February 27, 2014, 12:59:48 am »
well... I don't know any official Code::Blocks github mirror or repository, do you? And I can always re upload them again :P Just not write the description all over again...
This https://github.com/obfuscated/codeblocks_sf is mine github repo, it is manually maintained, but relatively up-to-date. And it is my only checkout of the svn repo I'm using at the moment (I'm using it to commit to our svn).
You can fork it and base your patches on it. If you make the patches smaller the chance of some of them getting in is quite a lot higher.

p.s. svn is harder to use when you know both of them at a similar level  ::)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]