[
http://jira.codehaus.org/browse/MOJO-1647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257405#action_257405
]
Clément Igonet commented on MOJO-1647:
--------------------------------------
package org.codehaus.mojo.natives.bcc;
/*
* The MIT License
*
* Copyright (c) 2004, The Codehaus
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to
do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import java.io.File;
import org.codehaus.mojo.natives.NativeBuildException;
import org.codehaus.mojo.natives.compiler.AbstractResourceCompiler;
import org.codehaus.mojo.natives.compiler.ResourceCompilerConfiguration;
import org.codehaus.mojo.natives.util.EnvUtil;
import org.codehaus.plexus.util.cli.Commandline;
public class BCCResourceCompiler
extends AbstractResourceCompiler
{
protected Commandline getCommandLine( ResourceCompilerConfiguration config,
File source )
throws NativeBuildException
{
Commandline cl = new Commandline();
EnvUtil.setupCommandlineEnv( cl, config.getEnvFactory() );
if ( config.getWorkingDirectory() != null )
{
cl.setWorkingDirectory( config.getWorkingDirectory().getPath() );
}
if ( config.getExecutable() == null ||
config.getExecutable().trim().length() == 0 )
{
config.setExecutable ( "brcc32.exe" );
}
cl.setExecutable(config.getExecutable().trim());
cl.addArguments( config.getOptions() );
for ( int i = 0; i < config.getIncludePaths().length; ++i )
{
String includePath = config.getIncludePaths()[i].getPath();
cl.createArg().setValue( "-i" );
cl.createArg().setValue( includePath );
}
for ( int i = 0; i < config.getSystemIncludePaths().length; ++i )
{
String includePath = config.getSystemIncludePaths()[i].getPath();
cl.createArg().setValue( "-i" );
cl.createArg().setValue( includePath );
}
cl.createArg().setValue( "-fo" );
cl.createArg().setValue( config.getOutputFile( source ).getPath() );
cl.createArg().setValue( source.getPath() );
return cl;
}
}
> native-maven-plugin - bcc compilerProvider not fully implemented
> ----------------------------------------------------------------
>
> Key: MOJO-1647
> URL: http://jira.codehaus.org/browse/MOJO-1647
> Project: Mojo
> Issue Type: Bug
> Components: native
> Environment: Windows XP - Java 1.6 - Maven 2.0 - Borland C++ Builder
> Reporter: Clément Igonet
>
> When compileProvder is defined as "bcc", the resource compiler used is rc.exe
> Whereas, it exists brcc32(.exe) compiler for Borland with specific way to
> define options.
> brcc32 -help is pretty clear:
> {code}
> Borland Resource Compiler Version 5.40
> Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
> Syntax: brcc32 [options ...] filename
> options marked with a '*' are on by default
> @<filename> Take instructions from command file
> -r (ignored for compatibility)
> -16 Build 16-bit Windows compatible .res file
> -32 * Build 32-bit Windows compatible .res file
> -fofilename Set output filename
> -v Verbose
> -ipath Set include path
> -dname[=string] Define #define
> -x Ignore INCLUDE environment variable
> -m Enable multi-byte character support
> -cdddd set default code page to nnnn
> -lxxxx set default language to xxxx
> -31 Provided for downward compatibility (build 16-bit .res file)
> -w32 Provided for downward compatibility (build 16-bit .res file)
> -? or -h Display this message
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email