diff options
author | Holger Schroeder <holger.schroeder.ext@basyskom.de> | 2010-03-03 10:02:44 +0100 |
---|---|---|
committer | Holger Schroeder <holger.schroeder.ext@basyskom.de> | 2010-03-03 11:47:47 +0100 |
commit | fff25fe7de5d681fdcd414e6f5da45ba6c6d2c6f (patch) | |
tree | 6431b47cbe4f133aff5959eaff14cec8ce32e2c6 /configure-win32.pl | |
parent | 870d206b07c7c88744a38160ad7e301e3ecc61b6 (diff) |
Changes: add qmake variable for duigen executable, add configure-win32.pl
RevBy: Armin Berres
Details: On windows the duigen executable will be in
duigen/debug/duigen.exe instead of duigen/duigen. So we need a
variable in the qmake .pro files to refer to the executable.
And for that to work we need the DUI_BUILD_TREE variable in
the build directory in the .qmake.cache file. For that i added
the configure-win32.pl file. we do have a dependency on perl
anyway, so i chose to code it in perl.
Diffstat (limited to 'configure-win32.pl')
-rw-r--r-- | configure-win32.pl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/configure-win32.pl b/configure-win32.pl new file mode 100644 index 00000000..be98852c --- /dev/null +++ b/configure-win32.pl @@ -0,0 +1,38 @@ +#!/bin/env perl
+
+use Cwd;
+use File::Basename;
+use File::Path;
+
+$inpath = Cwd::abs_path(dirname($0));
+$outpath = Cwd::getcwd;
+
+print "inpath : $inpath\n";
+print "outpath: $outpath\n";
+
+open( CACHE, ">$outpath/.qmake.cache" );
+print CACHE "DUI_BUILD_TREE = \$\$quote($outpath)\n";
+close( CACHE );
+
+$specpath = "$outpath/mkspecs/features";
+
+if ( ! -d "$specpath" )
+{
+ mkpath( "$specpath" )
+}
+
+open( INF, "<$inpath/mkspecs/features/dui_defines.prf.in" );
+open( OUTF, ">$specpath/dui_defines.prf" );
+
+while ( <INF> )
+{
+ chomp;
+ my $line = $_;
+
+ # do variable substitution here if needed
+
+ print OUTF "$line\n";
+}
+
+close( INF );
+close( OUTF );
|