How to port a package to OAH build?

Asked by Shixin Zeng

I tried the OAH build, and it looks fantastic, but there are some projects that still haven't ported to OAH build (e.g. gstreamer), so I'm wondering if there are any documentation on how to port it myself?

Question information

Language:
English Edit question
Status:
Answered
For:
OAH Build Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Shixin Zeng (szeng) said :
#2

I spent some days on OAH, and got some knowledge, I'm writing down them here in case it helps others.
OAH build contains a series custom build rules to process gtk+ build tasks:
DoIn Generate Tool for "*.in" files;
Pkg-Config Tool to run "pkg-config" command to get the build dependencies
GObject marshal generator to run "glib-marshal"
GObject Enum generator
Header File Installation Tool to copy the header files into the proper directories.

Basic steps:
1. create a directory hierarchy $(top_srcdir)/win32/oah
2. create a new solution and a new empty project for your package (this will create a directory named after your project to hold the project files, which doesn't conform to the other oah directory structures, so you gotta move them out and change the solution file)
3. right click on the project and choose "Custom build rules", then "OAH build tools"
4. right click on the project and choose "properties"
   4.1 Configurations->General,
  Inherited Project Property Sheets": put in "$(OAH_INSTALLED_PATH)\vsprops\oah-$(PlatformName)-$(ConfigurationName).vsprops;
$(OAH_INSTALLED_PATH)\vsprops\oah-PC.vsprops" and your own inherited project sheets, if there are any.
   4.2 DoInGenerator tools: the *.in files should be added to resource file list, put in your substitutions.
   4.3 Pkg-Config Tool: pkg-config dependencies, there are two ways to specify pkg-config dependencies: put in a separate file with a file extension "oahdeps", or as the parameter of additional dependencies
   ...
5. add source files
6. add resource files, such as *.in, *.oahdeps

7. build and tweak

Revision history for this message
Haakon Sporsheim (ieei) said :
#3

Good sum up by Shixin!

Some additional information:
When editing properties in step 4; You should first select All Configurations and all platforms, since most of what you are changing will be similar for all configuration (Debug, Release) on all platforms (Win32, x64).

oah-PC.vsprops usage:
When using this property sheet, you must manually open your .vcproj file and edit RootNamespace. RootNamespace must be identical to the name of either the .oahdeps or .pc, depending on whats being used.

Revision history for this message
Shixin Zeng (szeng) said :
#4

Thanks for your tips.

Another question regarding to Pkg-Config Tool, if I only specify the dependency as the parameter to "additional dependencies" and not provide *.oahdeps, it seems that pkg-config doesn't run at all. Any idea?

Revision history for this message
Haakon Sporsheim (ieei) said :
#5

Yes, you are correct! Visual Studio or VCBuild is built around input files and output files, so yes, until we find a way to create a custom build tool that does not depend on an input file, you will need to add an empty .oahdeps file to your project.

Can you help with this problem?

Provide an answer of your own, or ask Shixin Zeng for more information if necessary.

To post a message you must log in.