User forums > General (but related to Code::Blocks)

codeblocks cbp projects for wx samples

<< < (4/5) > >>

AndrewCot:
Good work. 

Sounds like the find/replace on CBP files could be similar to what I needed and I had to create a quick simple app for my find replace as the project options manager plugin did not do what I wanted. Attached is the source and project file for my find replace app. The app changes the windows path delimiter \ to unix / for certain lines in the project files as it then makes the files similar. You may not be able to use the app for all of the required changes, but for some you will be able modify it for what you want.
I have also used Agent ransack to search the CBP files and then open them in Notepad++ using the context menu option in the Agent Ransack file list context menu, then within Notepad++I can then perform a find replace on all of the openned files.


What is the messagebox that is shown?

ollydbg:

--- Quote from: AndrewCot on September 17, 2022, 02:15:38 am ---What is the messagebox that is shown?

--- End quote ---

See the screen shot as attachment.

I guess the executing working dir is wrong.

ollydbg:

--- Quote from: AndrewCot on September 17, 2022, 02:15:38 am ---Good work. 

Sounds like the find/replace on CBP files could be similar to what I needed and I had to create a quick simple app for my find replace as the project options manager plugin did not do what I wanted. Attached is the source and project file for my find replace app. The app changes the windows path delimiter \ to unix / for certain lines in the project files as it then makes the files similar. You may not be able to use the app for all of the required changes, but for some you will be able modify it for what you want.
I have also used Agent ransack to search the CBP files and then open them in Notepad++ using the context menu option in the Agent Ransack file list context menu, then within Notepad++I can then perform a find replace on all of the openned files.


--- End quote ---

I now using find/replace tool in Notepad++ to tweak all the cbp files, and it looks the result cbp works correctly.
I can open the samples.workspace file, and active a single cbp project, and build that project.
I have push all my changes to my git repo now.

asmwarrior/cb_projects_for_wxWidgets: Code::Blocks projects for building wxWidgets sample code

BTW: where is your Attached file? I guess your forgot it.  :)

AndrewCot:
Attach file.

ollydbg:

--- Quote from: ollydbg on September 17, 2022, 03:08:57 am ---
--- Quote from: AndrewCot on September 17, 2022, 02:15:38 am ---What is the messagebox that is shown?

--- End quote ---

See the screen shot as attachment.

I guess the executing working dir is wrong.

--- End quote ---

About this issue, currently, there are two folders setting, for example, the caret.cbp file has such content:


--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="caret" />
<Option execution_dir="../minimal" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="win_gcc">
<Option output="bin/$(TARGET_NAME)/$(PROJECT_NAME)" prefix_auto="1" extension_auto="1" />
<Option working_dir="../../caret" />
<Option object_output=".objs/$(TARGET_NAME)" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-O2" />
<Add option="`$(#WX_CONFIG) --cflags`" />
</Compiler>
<Linker>
<Add option="-s" />
<Add option="`$(#WX_CONFIG) --libs base,core,adv`" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="win_gcc;" />
</VirtualTargets>
<Unit filename="caret.cpp" />
<Extensions />
</Project>
</CodeBlocks_project_file>

--- End code ---

What do you think about the correct value of "execution_dir" and "working_dir"?

The current dir where the cbp file locates? So, the value could be "../caret"?  or just "./" ?

EDIT

I choose the later one, I just use the notepad++'s search/replace feature

search this(with regex enabled)


--- Code: ---working_dir="(.*)"

--- End code ---
and replace by this:

--- Code: ---working_dir="./"

--- End code ---

I have pushed my changes to my repo.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version