Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

build bot in the github, I see one nice project

<< < (9/26) > >>

ollydbg:

--- Quote from: Grit Clef on September 01, 2024, 05:54:08 am ---No, it didn't work.

--- End quote ---

Sadly to see.

Can you use some dependency tool(such as this one: brechtsanders/pedeps: Cross-platform C library to read data from PE/PE+ files (the format of Windows .exe and .dll files)) to copy all the dll/exe files to a single folder(for example to a common bin folder) when using the configure/make steps.

I think this is the easiest way to achieve a working github working binary package release.

Thanks.

ollydbg:
Some improvements about the github build bot.

1, I think we need to build a "CbLauncher.exe" in the "bin" folder(the codeblocks.exe is in the the same bin folder), currently the configure-make method in the build bot does not generate this file. I mean by running this exe file, C::B is running in portable mode, all the configure settings were created in "bin/AppData" folder, so it won't pollute other C::B settings. For my test, I just copy a "CbLauncher.exe" from other windows build packages, and it works.

2, when I download the "Artifacts" file from the github action (for example, in my own github action here: https://github.com/asmwarrior/x86-codeblocks-builds/actions/runs/10538520726), I need to set the PATH variable to adding my local msys2/mingw64/bin path


--- Code: ---set PATH=<your_local_msys2_mingw64_bin_path>;%PATH%
--- End code ---

by setting this, when code::blocks runs, it will find the gcc's dlls, wx's dlls, and exchnl's dlls. (suppose you install them by the pacman command)

Here is the list of dlls of the codeblocks.exe by using brechtsanders/pedeps: Cross-platform C library to read data from PE/PE+ files (the format of Windows .exe and .dll files)'s listpedeps commands:


--- Code: ---listpedeps.exe -s codeblocks.exe
[codeblocks.exe]
architecture: x86_64
machine name: AMD AMD64 (x64)
subsystem:    Windows GUI
DLL:          no
stripped:     no
file version: 0.0
minimum Windows version: 5.2
IMPORTS
libcodeblocks-0.dll
COMCTL32.dll
exchndl.dll
libgcc_s_seh-1.dll
KERNEL32.dll
msvcrt.dll
SHELL32.dll
libstdc++-6.dll
USER32.dll
wxbase32u_gcc_custom.dll
wxmsw32u_aui_gcc_custom.dll
wxmsw32u_core_gcc_custom.dll
wxmsw32u_html_gcc_custom.dll
wxmsw32u_propgrid_gcc_custom.dll
wxmsw32u_xrc_gcc_custom.dll
--- End code ---

So, you can see that you need to copy those dlls from the msys2 mingw64's bin folder, so that you can distribute a full package:



--- Code: ---exchndl.dll


libgcc_s_seh-1.dll
libstdc++-6.dll


wxbase32u_gcc_custom.dll
wxmsw32u_aui_gcc_custom.dll
wxmsw32u_core_gcc_custom.dll
wxmsw32u_html_gcc_custom.dll
wxmsw32u_propgrid_gcc_custom.dll
wxmsw32u_xrc_gcc_custom.dl
--- End code ---

To copy those dlls from the msys2's bin folder, you have to use another tool named "copypedeps.exe" from "brechtsanders/pedeps".

The commands are something like below:


--- Code: ---copypedeps.exe -r -n -v ./codeblocks.exe ./
--- End code ---

The options can be explained by the "-h" help command.


--- Code: ---copypedeps.exe -h
Usage: copypedeps [-h|-?] [-r] srcfile [...] dstfolder
Parameters:
  -h -?         display command line help
  -r            recursively copy dependancies
  -n            don't overwrite existing files
  -d            dry run: don't actually copy, just display copy actions
  -q            quiet mode, only show errors
  -v            verbose mode (display copy actions)
Description:
Copies .exe and .dll files and all their dependancies to the destination folder.
Version: 0.1.14 (library version: 0.1.14)
--- End code ---

So, can you add the extra steps like below:

1, build the CBLauncher.exe
2, use pacman to install the drmingw for the exchndl.dll and related dlls. See here: mingw-w64-x86_64-drmingw
3, use the pedeps to copy all the necessary dlls to the bin folder.

Any ideas?


EDIT:

mingw-w64-x86_64-drmingw is already installed in the current github action code.

EDIT2:

The spell checker plugin is not loaded correctly, so maybe my local msys2 does not have hunspell package installed.

ollydbg:
For you information:

I have create a github test project to use pedeps to copy the dlls of a hello.exe file, see here:  asmwarrior/test-github-action0

I haven't used the github action script before, so it takes one hour to tweak the script.

Finally, a artifact zip file is created with several dependency dlls.


--- Code: ---$ ls
hello.exe*  libgcc_s_seh-1.dll*  libstdc++-6.dll*  libwinpthread-1.dll*

--- End code ---

The exe file is built from the compiler gcc, and the dlls are copied from the msys2's PATH by using the latest pedeps tool.

ollydbg:
I have added one commit to my fork, I try to enable the pedeps tool to copy the necessary dlls.

try to use the pedeps tool to copy the dlls to the output folder

And I'm starting the github action now, let's see whether it works or not one hour later.  :)

ollydbg:
Some good news:

It looks the built artifact (zip file) has many dlls which are the dependencies of codeblocks.exe.

When I run the C::B, I see some warnings(see image shot below), it looks like only the dlls for the codeblocks.exe get copied, but some dlls for plugins are missing.

So, I need to loop all the plugin dll files?

Where should I copy those dependency dlls for the plugins. Because for plugin dlls, they are located in the folder:


--- Code: ---codeblocks64-zip-folder\lib\codeblocks\plugins\
--- End code ---

While the codeblocks.exe is located in


--- Code: ---codeblocks64-zip-folder\bin\codeblocks\
--- End code ---

One issue still remains, how to build the "CBLauncher.exe"?



EDIT:

The plugin dll's dependency dll issue is solved, see this result:
main64 asmwarrior/x86-codeblocks-builds@691cc2b
with my commit:
copy the plugin dll's dependency dll to the bin folder




Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version