Author Topic: Patch to CB Plugin Wizard.  (Read 26852 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Patch to CB Plugin Wizard.
« on: May 09, 2017, 03:58:47 am »
I have created a patch for the CB Plugin Wizard.

Quote
* Plugins Wizard: Added target variables:

WX_CFG
WX_COMPILER
WX_SUFFIX
WX_VERSION

Also, fixed build errors when using wxWidgets 3.0.
NOTE: The user still has to rename the path "devel" to "devel30".

Edit: Removed the part that asks which wxWidgets version (it defaults to 28).

Tim S.
« Last Edit: May 09, 2017, 04:02:09 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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch to CB Plugin Wizard.
« Reply #1 on: May 09, 2017, 09:23:31 am »
(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: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #2 on: May 09, 2017, 11:07:06 am »
Have you seen this patch: https://sourceforge.net/p/codeblocks/tickets/481/ ?

Not before I wrote the above patch. It seems to be a much larger and complex patch.

Edit1: I will see which of the below options from that patch will be able to be added to my patch.
I currently consider "5) Add target "to_codeblocks" to make the plugin debuggable" to be big enough for a separate patch.

Quote
bluehazzard - 2017-02-27
Ok, so i reworked the script future:
1) Remove wx2.6 support
2) Add support for wx3.0 and wx3.1, make wx2.8 default
3) Changes for the windows build:
3.1) remove -ansi compiler option
3.2) add -std=gnu++11 compiler option
4) Changes for unix:
4.1) add option to choose system default wx-config parameters
4.2) add --version command line parameter for the different versions of wx
5) Add target "to_codeblocks" to make the plugin debuggable (see the discussion top)
6) Move all target common compiler/linker settings to the project
7) Use platform independent squirrel scripting to copy files

Tim S.
« Last Edit: May 09, 2017, 11:19:48 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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch to CB Plugin Wizard.
« Reply #3 on: May 09, 2017, 12:20:45 pm »
Have you seen this patch: https://sourceforge.net/p/codeblocks/tickets/481/ ?
any comments on this? especially the linux problems?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #4 on: May 09, 2017, 05:21:19 pm »
Quote
bluehazzard - 2017-02-27
Ok, so i reworked the script future:
1) Remove wx2.6 support
2) Add support for wx3.0 and wx3.1, make wx2.8 default
3) Changes for the windows build:
3.1) remove -ansi compiler option
3.2) add -std=gnu++11 compiler option
4) Changes for unix:
4.1) add option to choose system default wx-config parameters
4.2) add --version command line parameter for the different versions of wx
5) Add target "to_codeblocks" to make the plugin debuggable (see the discussion top)
6) Move all target common compiler/linker settings to the project
7) Use platform independent squirrel scripting to copy files

I did NOT see the "-ansi" option I will check and see if it is there to be removed.
I like the Linux options in step 4.2; will try adding this first.
I also like Step 6 move "Move all target common compiler/linker settings to the project".

After I do those will look at the other features.

Tim S.
« Last Edit: May 09, 2017, 05:23:40 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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch to CB Plugin Wizard.
« Reply #5 on: May 09, 2017, 09:27:13 pm »
@bluehazzard: I'll try to find time to test it and if it is fine I'll push it.
@stahta01: I'd rather do the same. Test the patch in the ticket and report any problems with it.
(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: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #6 on: May 10, 2017, 02:13:48 am »
@bluehazzard: I'll try to find time to test it and if it is fine I'll push it.
@stahta01: I'd rather do the same. Test the patch in the ticket and report any problems with it.

I have downloaded patch #4; still need to do the testing.

Edit: Decided to test on Linux, first.

Tim S.
« Last Edit: May 10, 2017, 02:27:12 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: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #7 on: May 10, 2017, 02:48:44 am »
Is this still valid to use under Linux?

Code
`pkg-config --cflags codeblocks`

Because it is NOT working for me.

Edit: Doing the bootstrap/configure/make/make install route to see if it works that way.
Edit2: The reason is the only codeblocks.pc files on my computer was from old testing done that way.
Edit3: After doing the configure/make and setting PKG_CONFIG_PATH to the correct location I can now build using the wizard.
I have NOT figured out how to debug/run the plugin; but, that could easily be user error on my part; I do NOT debug/run Code::Blocks plugins very much.

Tim S.
« Last Edit: May 10, 2017, 05:17:04 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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch to CB Plugin Wizard.
« Reply #8 on: May 10, 2017, 11:26:55 am »
Code
`pkg-config --cflags codeblocks`

Because it is NOT working for me.
So pkg-config works for you? I do not use it on linux so i could not test it.

Quote
I have NOT figured out how to debug/run the plugin; but, that could easily be user error on my part; I do NOT debug/run Code::Blocks plugins very much.
As i said in the ticket here i have problems and need help. What are the symptoms you are getting?

Quote
3) If i set Project->Set program's argument->Host application to $(#cb)/devel30/codeblocks the debugger does not find the host application (the log shows a empty host application). If i replace $(#cb)/devel30/codeblocks with /absolute/path/to/codeblocks it works. Can someone on a linux system test this?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #9 on: May 10, 2017, 06:09:30 pm »
When trying to run the wizard created plugin.

Code

-------------- Build: to_codeblocks in test43 (compiler: gcc6)---------------

Target is up to date.
Running target post-build steps
zip -j9 test43.zip manifest.xml
updating: manifest.xml (deflated 52%)
Nothing to be done (all items are up-to-date).


-------------- Run: to_codeblocks in test43 (compiler: gcc6)---------------

Checking for existence: /home/stahta01/devel/open_source_code/version_control/codeblocks_https_metadata-git/src/devel30/share/codeblocks/plugins/libtest43.so
Executing: /home/stahta01/devel/open_source_code/version_control/codeblocks_https_metadata-git/src/devel30/codeblocks --debug-log --multiple-instance --no-splash-screen --verbose -p debug (in /home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test43/.)
Process terminated with status -1 (0 minute(s), 0 second(s))
 

-------------- Run: default in test43 (compiler: gcc6)---------------

Checking for existence: /home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test43/libtest43.so
Executing: /home/stahta01/devel/open_source_code/version_control/codeblocks_https_metadata-git/src/devel30/codeblocks  (in /home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test43/.)
Process terminated with status -1 (0 minute(s), 0 second(s))
 

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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch to CB Plugin Wizard.
« Reply #10 on: May 10, 2017, 11:19:29 pm »
Thank you for the report.
What happens if you start the debugger?


Quote
(in /home/stahta01/devel/open_source_code/no_version_control/CB_wizard_testing/test43/.)
i think this is the problem. The base path should be
Quote
/home/stahta01/devel/open_source_code/version_control/codeblocks_https_metadata-git/src/devel30/codeblocks
so codeblocks does not find its libraries...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #11 on: May 11, 2017, 01:06:22 am »
Thank you for the report.
What happens if you start the debugger?

The build log window flashes and that is the only thing I can see that happens.
It looks like it was cleared and the the text re-displayed; but, I have never really used the debugger under Linux so might just be an debugger configuration error.

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 stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #12 on: May 13, 2017, 02:08:45 am »
I am thinking using the below command in the wizard is a bad idea, does anyone agree?
Code
`pkg-config --cflags codeblocks`

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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch to CB Plugin Wizard.
« Reply #13 on: May 13, 2017, 06:06:48 pm »
Why do you think it is bad idea?
(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: 7582
    • My Best Post
Re: Patch to CB Plugin Wizard.
« Reply #14 on: May 13, 2017, 07:40:56 pm »
Why do you think it is bad idea?

1. The CB Projects does not use that method.
2. That method is broken in the Debian installed CB
3. The only way to get it to work is to self build Code::Blocks using configure/make

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