Author Topic: build bot in the github, I see one nice project  (Read 55713 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
build bot in the github, I see one nice project
« on: August 16, 2024, 03:20:16 pm »

i686-codeblocks-builds

This project looks nice, I see it use github action to build the codeblocks 32 bit version.

I'm asking the author could tried 64bit version also, see here: Hi, this project is nice, can you create a windows 64 bit codeblocks builds? Issue #1 zxunge/i686-codeblocks-builds
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: 7699
    • My Best Post
Re: build bot in the github, I see one nice project
« Reply #1 on: August 16, 2024, 05:30:45 pm »
The github user is not likely to change to 64 bit because MSys2 already has two 64 bit packages UCRT64 and CLANG64 environments https://www.msys2.org/docs/environments/ and their package builds for the MINGW64 environment.

I would suggest forking the repo; I am doing that right now to see if it is easy to change to what I want which is building MINGW64 and maybe MINGW32.

Edit: You do realize the built code is for use under MSys2 MINGW32, correct?

Tim S.
« Last Edit: August 16, 2024, 05:37:41 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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #2 on: August 17, 2024, 03:25:54 am »
Hi, Tim, thanks for the reply and your work.

i686-codeblocks-builds/.github/workflows/main.yml at main zxunge/i686-codeblocks-builds

When I looked at this file, I see this uses msys2 environment, and also it use the 32 bit gcc compiler. So, I think this project support MSys2 MINGW32, am I correct?
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 Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #3 on: August 17, 2024, 06:59:56 am »
But there's still one problem. Using a build script in msys2 can't really build a complete codeblocks. wxSmith related plugins, which are considered the best plugins in CB, always give us errors:
Code
wxsarraystringeditordlg.cpp: In member function 'virtual const wxEventTable* wxsArrayStringEditorDlg::GetEventTable() const':
wxsarraystringeditordlg.cpp:39:19: error: definition of static data member 'wxsArrayStringEditorDlg::sm_eventTable' of dllimport'd class
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw32/include/wx-3.2/wx/event.h:4371:24: note: in definition of macro 'wxBEGIN_EVENT_TABLE'
 4371 |     const wxEventTable theClass::sm_eventTable = \
      |                        ^~~~~~~~
wxsarraystringeditordlg.cpp:39:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      | ^~~~~~~~~~~~~~~~~
wxsarraystringeditordlg.cpp: In member function 'virtual wxEventHashTable& wxsArrayStringEditorDlg::GetEventHashTable() const':
wxsarraystringeditordlg.cpp:39:19: error: definition of static data member 'wxsArrayStringEditorDlg::sm_eventHashTable' of dllimport'd class
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw32/include/wx-3.2/wx/event.h:4375:22: note: in definition of macro 'wxBEGIN_EVENT_TABLE'
 4375 |     wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
      |                      ^~~~~~~~
wxsarraystringeditordlg.cpp:39:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      | ^~~~~~~~~~~~~~~~~
wxsarraystringeditordlg.cpp: In constructor 'wxsArrayStringEditorDlg::wxsArrayStringEditorDlg(wxWindow*, wxArrayString&, wxWindowID)':
wxsarraystringeditordlg.cpp:34:12: error: definition of static data member 'wxsArrayStringEditorDlg::ID_TEXTCTRL1' of dllimport'd class
   34 | const long wxsArrayStringEditorDlg::ID_TEXTCTRL1 = wxNewId();
      |            ^~~~~~~~~~~~~~~~~~~~~~~
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #4 on: August 17, 2024, 09:49:54 am »
Hi, thanks.

That's why you disable the wxSmith related option for building C::B

Code
./configure --disable-pch --with-contrib-plugins=all,-wxsmith,-wxsmithaui,-wxsmithcontrib,-Valgrind --prefix=/opt/codeblocks

I see it in:

https://github.com/zxunge/i686-codeblocks-builds/blob/main/.ci/build.sh
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #5 on: August 17, 2024, 10:24:42 am »
The build error message looks like there are some wx related headers are missing when building the translation unit. I don't have much experience on the "configure/make" build system, hope some guys can help.

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 Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #6 on: August 17, 2024, 12:30:21 pm »
I see in the wxWidgets Forums a similar error: CodeBlocks compilation (it uses wxWidgets), but It's old and didn't have any reply.
This one is old, too: wxPDFDocument - Which files to add to a project.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #7 on: August 17, 2024, 01:06:13 pm »
Maybe this post is related:

patch for the autotools build to work with Msys2/MinGW32

I know that one dev in github/msys2 who supports builds C::B for the clang or ucrt ports, but he is not interested in supporting the MinGW64 port.  :(
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: 7699
    • My Best Post
Re: build bot in the github, I see one nice project
« Reply #8 on: August 17, 2024, 01:23:26 pm »
But there's still one problem. Using a build script in msys2 can't really build a complete codeblocks. wxSmith related plugins, which are considered the best plugins in CB, always give us errors:
Code
wxsarraystringeditordlg.cpp: In member function 'virtual const wxEventTable* wxsArrayStringEditorDlg::GetEventTable() const':
wxsarraystringeditordlg.cpp:39:19: error: definition of static data member 'wxsArrayStringEditorDlg::sm_eventTable' of dllimport'd class
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw32/include/wx-3.2/wx/event.h:4371:24: note: in definition of macro 'wxBEGIN_EVENT_TABLE'
 4371 |     const wxEventTable theClass::sm_eventTable = \
      |                        ^~~~~~~~
wxsarraystringeditordlg.cpp:39:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      | ^~~~~~~~~~~~~~~~~
wxsarraystringeditordlg.cpp: In member function 'virtual wxEventHashTable& wxsArrayStringEditorDlg::GetEventHashTable() const':
wxsarraystringeditordlg.cpp:39:19: error: definition of static data member 'wxsArrayStringEditorDlg::sm_eventHashTable' of dllimport'd class
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw32/include/wx-3.2/wx/event.h:4375:22: note: in definition of macro 'wxBEGIN_EVENT_TABLE'
 4375 |     wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
      |                      ^~~~~~~~
wxsarraystringeditordlg.cpp:39:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
   39 | BEGIN_EVENT_TABLE(wxsArrayStringEditorDlg,wxScrollingDialog)
      | ^~~~~~~~~~~~~~~~~
wxsarraystringeditordlg.cpp: In constructor 'wxsArrayStringEditorDlg::wxsArrayStringEditorDlg(wxWindow*, wxArrayString&, wxWindowID)':
wxsarraystringeditordlg.cpp:34:12: error: definition of static data member 'wxsArrayStringEditorDlg::ID_TEXTCTRL1' of dllimport'd class
   34 | const long wxsArrayStringEditorDlg::ID_TEXTCTRL1 = wxNewId();
      |            ^~~~~~~~~~~~~~~~~~~~~~~

There is an MSys2 Mingw PR that fixes the building wxSmith; they fixed it in a way I do not like; but, it appears to compile with the Msys2 MINGW CI server.

Tim S.
« Last Edit: August 17, 2024, 02:47:47 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 Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #9 on: August 18, 2024, 05:50:48 am »
Release updated: with a complete codeblocks of both 32bit and 64bit version.
« Last Edit: August 18, 2024, 05:55:23 am by Grit Clef »
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #10 on: August 18, 2024, 10:50:17 am »
Release updated: with a complete codeblocks of both 32bit and 64bit version.

Nice work!!!

Now, the new site is:

https://github.com/zxunge/x86-codeblocks-builds
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #11 on: August 19, 2024, 07:30:42 am »
I have forked the project, and enabled the github action, and I manually start a build action runner for the 64bit C::B.

See here:

https://github.com/asmwarrior/x86-codeblocks-builds/actions/runs/10446493022

It looks like the build is successful. When I download the result file, in github, it is called Artifacts, named "codeblocks64.zip"

I download the zip file, and extract it in my computer, it looks like the structure is like "Linux file system", here is the structure:

Code
# tree
.
├── bin
│   ├── cb_console_runner.exe
│   ├── cb_share_config.exe
│   ├── codeblocks.exe
│   ├── libcodeblocks-0.dll
│   ├── libwxchartctrl-0.dll
│   ├── libwxcustombutton-0.dll
│   ├── libwxflatnotebook-0.dll
│   ├── libwximagepanel-0.dll
│   ├── libwxkwic-0.dll
│   ├── libwxled-0.dll
│   ├── libwxmathplot-0.dll
│   ├── libwxsmithlib.dll
│   └── libwxspeedbutton-0.dll
├── include
│   ├── codeblocks
│   │   ├── annoyingdialog.h
│   │   ├── autodetectcompilers.h
│   │   ├── backgroundthread.h
│   │   ├── base64.h
│   │   ├── blockallocated.h
│   │   ├── cbart_provider.h
│   │   ├── cbauibook.h
│   │   ├── cbcolourmanager.h
│   │   ├── cbdebugger_interfaces.h
...

I think we need a tool named "copy dependency", I mean we need a tool to copy all the dependency dlls to the bin folder.

This tool could be used: brechtsanders/pedeps: Cross-platform C library to read data from PE/PE+ files (the format of Windows .exe and .dll files)

Another issue is that we don't need the "include" folders.

Also, I think the file structure could be like "Windows" system? I mean there is a share folder in the same folder of the codeblocks.exe.



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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #12 on: August 19, 2024, 09:59:40 am »
[History for mingw-w64-codeblocks - msys2/MINGW-packages](https://github.com/msys2/MINGW-packages/commits/master/mingw-w64-codeblocks)

I just looked at the change log for the msys2's codeblocks code changes, they have just enabled the wxSmith 3 days ago.

Also, they have another commit to move the dll files.
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 Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #13 on: August 19, 2024, 12:10:36 pm »
I'm working on making a Windows-style build; i.e. build cb using cb through cmdline
It may be not needed to copy those dependencies; users can install those packages through pacman.
« Last Edit: August 19, 2024, 12:53:42 pm by Grit Clef »
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #14 on: August 19, 2024, 12:23:09 pm »
I'm working on making a Windows-style build; i.e. build cb using cb through cmdline.

I'm not sure whether the codeblocks.exe could run in pure "command line mode". Hopefully it could.
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.