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

absolute path in workspace file while using linux

(1/2) > >>

jomeggs:
CB 5535, Vista
CB 5607, Debian Lenny

I'm using CB to write applications which are portable between Windows and Linux. So I've got one workspace file gathering all my projects. Every project has Build Targets for Windows and Linux. The projects are hosted on Windows below a directory named "C:\_workspaces".

Linux is running as Colinux on the same computer. The C:\_workspaces directory is mounted via cofs in /mnt/_workspaces. To simplify the path, I've created a symbolic link named /_workspaces. (Yes, I'm working as root - no security hints please...  :D )

Short form: C:\_workspaces in Windows == /_workspaces in Linux.

My problem is, that the workspace file contains relative paths for my projects while using Windows, but unfortunately absolute paths while using Linux. That means I've to write a separate workspace file for every OS  :cry:

To make the item more clear, here are the workspace files:

Windows workspace file

--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Default workspace">
<Project filename="_prj\libsmtp-0.8.5\libsmtp-0.8.5.cbp" active="1" />
<Project filename="_prj\ctools\ctools.cbp" />
<Project filename="_prj\htm_work\htm_work.cbp" />
<Project filename="_prj\htm_term\htm_term.cbp" />
<Project filename="_prj\smsrecvd\smsrecvd.cbp" />
<Project filename="_prj\zdbserv\zdbserv.cbp" />
</Workspace>
</CodeBlocks_workspace_file>

--- End code ---

Linux workspace file

--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Default workspace">
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/libsmtp-0.8.5/libsmtp-0.8.5.cbp" active="1" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/ctools/ctools.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/zdbserv/zdbserv.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/htm_work/htm_work.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/htm_term/htm_term.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/smsrecvd/smsrecvd.cbp" />
</Workspace>
</CodeBlocks_workspace_file>

--- End code ---

Could it be possible to change this behavior so that CB under Linux is writing relative paths too?

jomeggs:
Nobody who could help me with this item?

jomeggs:
Bump  :lol:

Nobody? Really? Oh please, could sombody help me here?

killerbot:
also on linux you have relative paths, look at your workspace : ../../.. and so on.

jomeggs:
Ahh! Thanks for your reply!

Yes, they ARE relative, you're right. But start of the path is ../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj instead of _prj.

That is my problem, I can't use the same workspace file in WINDOWS and LINUX this way.

Navigation

[0] Message Index

[#] Next page

Go to full version