Author Topic: Manual fork of Code::Blocks to improve MSys2 support  (Read 7154 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Manual fork of Code::Blocks to improve MSys2 support
« on: September 14, 2019, 09:51:42 pm »
https://github.com/stahta01/code_adapt_IDE

I am working on a manual fork of Code::Blocks to improve MSys2 support.
Once I get it to work half-way decent, I plan to submit patches to sf.net C::B project.

Later on I plan to change the branding info and do feature changes.

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: Manual fork of Code::Blocks to improve MSys2 support
« Reply #1 on: September 15, 2019, 10:36:03 am »
What is the benefit of Msys2?
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #2 on: September 15, 2019, 12:26:56 pm »
What is the benefit of Msys2?
In one of my project, I use gcc compiler and other libraries(such as OpenCV, wxWidgets and other libraries) supplied by Msys2. I think the good thing is that I can easily install many libraries I needed, and it save me a lot of time to build those libraries myself. For example, if I need to build the OpenCV libraries myself, it may take 2 hours or more in my PC.

I think we can configure a portable C::B and Msys2, and those files can move from one folder to another without any re-configuration. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #3 on: September 15, 2019, 10:03:07 pm »
What is the benefit of Msys2?
It makes development on windows like on linux. The benefit is HUGE....

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #4 on: September 15, 2019, 11:18:42 pm »
What do you mean by HUGE?
To develop for Windows you have to target win32 API or whatever is modern now.
How Msys2 helps with that? If you don't want to target Windows native APIs, but won't to target some posix thing, why don't you develop on the posix thing (linux, *bsd, macOS, etc)?

If you don't target the native APIs your application would be usability disaster...
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #5 on: September 16, 2019, 12:53:06 am »
What do you mean by HUGE?
To develop for Windows you have to target win32 API or whatever is modern now.
How Msys2 helps with that? If you don't want to target Windows native APIs, but won't to target some posix thing, why don't you develop on the posix thing (linux, *bsd, macOS, etc)?

If you don't target the native APIs your application would be usability disaster...
Msys2 supplies three build systems. One is the posix like compiler suite. The other two are the native compiler suites for either 64bit and 32bit. Most people use the later ones and the native libraries.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #6 on: September 16, 2019, 08:41:16 am »
msys2 gives you a packet manager, and a unified installation structure on windows like on linux. But without using some quirky binary layer like cygwin.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #7 on: September 16, 2019, 07:51:47 pm »
But can I build an app which doesn't depend on msys2 and I can ship it to people?
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #8 on: September 17, 2019, 02:27:47 am »
But can I build an app which doesn't depend on msys2 and I can ship it to people?
Yes, you can. This is what I do for my project. You just ues the native gcc compiler and libraries supplied by msys2.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #9 on: September 17, 2019, 03:21:53 am »
I see no reason for the C::B team to supply a separate zip for msys2.
I do plan on providing a couple of zips myself.

The main things I wish to submit patches to C::B for is making the back ticks use the sh.exe when the IDE is ran from under the MSys environment. This will allow many things to work better.
I also plan to have the configuration save differently when running in the MSys environment.

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 WinterMute

  • Multiple posting newcomer
  • *
  • Posts: 25
    • devkitPro
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #10 on: October 02, 2019, 12:18:24 am »

The main things I wish to submit patches to C::B for is making the back ticks use the sh.exe when the IDE is ran from under the MSys environment.


What are you referring to here? I use C::B in tandem with msys2 quite regularly and all I do is have the build system use msys2 make rather than mingw32-make and everything works fine. I wish people wouldn't use mingw32-make, it's rubbish and misbehaves when sh.exe is in the path.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Manual fork of Code::Blocks to improve MSys2 support
« Reply #11 on: October 06, 2019, 10:58:52 pm »
I also plan to have the configuration save differently when running in the MSys environment.
An elaboration about this topic would be needed. Why do you need a separate config? How are users going to specify that they want to use this separate config file (probably a command line option)?
(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: Manual fork of Code::Blocks to improve MSys2 support
« Reply #12 on: October 06, 2019, 11:45:45 pm »
I also plan to have the configuration save differently when running in the MSys environment.
An elaboration about this topic would be needed. Why do you need a separate config? How are users going to specify that they want to use this separate config file (probably a command line option)?

When they start the IDE from an MSys2 mingw prompt it uses and saves to under the MSys2 folders.
And, few features are only enabled when running from an MSys2 mingw prompt.

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