Author Topic: Proposed Rules and suggestions for using PCH properly under Windows  (Read 26199 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #15 on: June 01, 2014, 05:38:18 pm »
Doing a git reset --hard and will redo the last two changes to https://github.com/stahta01/codeblocks_sf_tims/tree/scriptedwizard

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #16 on: June 01, 2014, 05:40:51 pm »
Why? I've been planning to commit them in a minute.
(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 stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #17 on: June 01, 2014, 06:14:41 pm »
Why? I've been planning to commit them in a minute.

I am trying to figure out how to use Git and making mistakes after mistakes; if you still can apply the two commits of mine please do so.

I am trying reset/rebase my local repo to yours to get rid of the Git Merges.

Tim S.

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #18 on: June 01, 2014, 06:16:58 pm »
Please ignore any push/pull requests from me in the last hour or so.

Note: I thought I was pulling/pushing from my github repo; but, I think it might have been yours.

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #19 on: June 02, 2014, 10:35:23 am »
In svn then...
(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 stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #20 on: June 03, 2014, 05:20:21 pm »
In svn then...

Thank you.

Can you verify that I used rebase in a correct manner for https://github.com/stahta01/codeblocks_sf_tims/tree/scriptedwizard

The single new commit is NOT yet tested enough for it to be applied upstream.

Thank you again for putting up with my learning curve on git.

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #21 on: June 03, 2014, 08:13:31 pm »
Your rebase seems fine to me.
(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 stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #22 on: June 04, 2014, 07:44:10 pm »
Your rebase seems fine to me.

Thank you for checking.

One of the things I did to fix/avoid PCH issues was updated wxFormBuilder files to version 3.0.57 (Apr 16 2008).
I hope this will be good; I think most users of wxFormBuilder likely using at least the prior stable release which is 3.0.57.

NOTE: I am still testing the wxWidgets Wizard changes; so, hold off on applying these changes.

If you wish to test the areas of changes are.
PCH file (wx_pch.h) use in Wizard (Misc. Settings: Create and use precompiled Header)
Preferred GUI Builder NONE and wxFormBuilder code changes (No changes to wxSmith project code)
Fixed Bug in CB Project creation when Misc. Settings: "Create and use precompiled Header" and "Create Empty Project" both checked.

Tim S.



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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #23 on: June 04, 2014, 10:40:33 pm »
Just undone my last 2 to 4 commits; not sure how but my Line-feeds got changed.
I hope I did not break the rebase work.

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #24 on: June 05, 2014, 07:44:23 pm »
Pushed my local changes to https://github.com/stahta01/codeblocks_sf_tims/tree/scriptedwizard

I tested them under Windows 32-bit using wxWidgets 2.8 and they tested well.

The only things changed are wxWidgets templates so rebuilding the ScriptedWizard Plugin is likely NOT needed.

The list of things changed are the same.

PCH file (wx_pch.h) use in Wizard (Misc. Settings: Create and use precompiled Header)
Preferred GUI Builder NONE and wxFormBuilder code changes (No changes to wxSmith GUI Builder code)
Fixed Bug in CB Project creation when Misc. Settings: "Create and use precompiled Header" and "Create Empty Project" both checked.

The most important fix from a PCH build view is moving wx/wx.h from the main.h to app.cpp/main.cpp changes.
The upgrading of the wxFormBuilder to version 3.0 is the other important PCH build change.

Please verify the wxWidget wizard runs and results in projects that build without error on Linux.
Then, I would hope these changes are able to be commited to SVN trunk.

Thank you, again.

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #25 on: June 16, 2014, 11:03:08 pm »
I added patch to the CB Plugin Wizard that needs tested in my scriptedwizard branch before it is applied to SVN trunk.
It should be enough just to verify that the CB Plugin Wizard results in code that compilers and links under Linux.

Thank you

Tim S.

Pushed my local changes to https://github.com/stahta01/codeblocks_sf_tims/tree/scriptedwizard

I tested them under Windows 32-bit using wxWidgets 2.8 and they tested well.

The only things changed are wxWidgets templates so rebuilding the ScriptedWizard Plugin is likely NOT needed.

The list of things changed are the same.

PCH file (wx_pch.h) use in Wizard (Misc. Settings: Create and use precompiled Header)
Preferred GUI Builder NONE and wxFormBuilder code changes (No changes to wxSmith GUI Builder code)
Fixed Bug in CB Project creation when Misc. Settings: "Create and use precompiled Header" and "Create Empty Project" both checked.

The most important fix from a PCH build view is moving wx/wx.h from the main.h to app.cpp/main.cpp changes.
The upgrading of the wxFormBuilder to version 3.0 is the other important PCH build change.

Please verify the wxWidget wizard runs and results in projects that build without error on Linux.
Then, I would hope these changes are able to be commited to SVN trunk.

Thank you, again.

Tim S.

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #26 on: June 16, 2014, 11:11:30 pm »
Created another branch to do other changes/patches https://github.com/stahta01/codeblocks_sf_tims/tree/for_upstream

I committed a change/patch to add PCH building back to CB under wxWidgets 3.0 Windows 32 bit (also added it to work under wxWidgets 2.8 Windows 32 bit).
The Contrib plugins I added it to is wxSmith Aui. plugin; please test to verify it works under Linux.

Please re-build just the wxSmith Aui. plugin for both wxWidgets 2.8 and 3.0 to verify that the build time is reduced by the patch under Linux.

Under Windows, the build time is reduced by 20 to 60 percent of what it is without the patch.

The patch is safe to be applied to trunk if there is no build issues under Linux.
But, if it does NOT speed up the Linux build it is NOT likely worth applying to SVN trunk.

If it works (speeds up the Linux Build); I plan to work on the wxSmith Plugin next.

Tim S.


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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #27 on: June 17, 2014, 02:18:27 am »
Can you add an upper limit to the version check?
This way newer compilers will fail and they can be added to the check.
Otherwise it is quite possible that the wxpch won't be used for newer compilers forever until someone digs into this again and stumbles upon this check.
(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 stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #28 on: June 17, 2014, 02:26:57 am »
Can you add an upper limit to the version check?
This way newer compilers will fail and they can be added to the check.
Otherwise it is quite possible that the wxpch won't be used for newer compilers forever until someone digs into this again and stumbles upon this check.

What version number do you wish me to think works? 4.9 or what?

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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Proposed Rules and suggestions for using PCH properly under Windows
« Reply #29 on: June 17, 2014, 02:32:37 am »
Can you add an upper limit to the version check?
This way newer compilers will fail and they can be added to the check.
Otherwise it is quite possible that the wxpch won't be used for newer compilers forever until someone digs into this again and stumbles upon this check.

What version number do you wish me to think works? 4.9 or what?

Tim S.


I will change it to a range of GCC versions stopping at either 4.9.0 or 4.9.1 for now.
Will also start at 4.7.2 (the web implies it might have started with that version.)

Will post when I get it done.

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