Commit 7cdf05b81302327c92fb5140a3d46541bedb3695

Authored by Artsiom Trubchyk
1 parent 4f0cdaed

Add transcc_java executables and a gulp task to build Java version of transcc

1 1 /bin/*
  2 +!/bin/transcc_java
  3 +!/bin/transcc_java.bat
2 4 !/bin/*.txt
3 5 /bin/*.develop.*.txt
4 6
... ...
  1 +#!/bin/bash
  2 +
  3 +export MONKEY_APP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  4 +export MONKEY_APP_PATH=${BASH_SOURCE[0]}
  5 +
  6 +java -jar "$MONKEY_APP_DIR/transcc_java.jar" $@
... ...
  1 +@echo off
  2 +
  3 +set PATH=%PATH%;C:\Program Files (x86)\Java\jre8\bin
  4 +set PATH=%PATH%;C:\Program Files\Java\jre8\bin
  5 +set PATH=%PATH%;C:\Program Files (x86)\Java\jre7\bin
  6 +set PATH=%PATH%;C:\Program Files\Java\jre7\bin
  7 +set PATH=%PATH%;C:\Program Files (x86)\Java\jre6\bin
  8 +set PATH=%PATH%;C:\Program Files\Java\jre6\bin
  9 +
  10 +set MONKEY_APP_DIR=%~dp0
  11 +set MONKEY_APP_PATH=%~0
  12 +
  13 +java -jar "%MONKEY_APP_DIR%\transcc_java.jar" %*
... ...
... ... @@ -114,7 +114,7 @@ var buildQtProject = function(projectName, projectDestName) {
114 114 }
115 115 };
116 116
117   -var buildMonkeyProject = function(projectName, projectDestName, target) {
  117 +var buildMonkeyProject = function(projectName, projectDestName, target, extraTransArgs) {
118 118 var src = './src/' + projectName;
119 119 var buildDir = path.resolve(src, '.build');
120 120
... ... @@ -128,6 +128,10 @@ var buildMonkeyProject = function(projectName, projectDestName, target) {
128 128 transArgs = environment.transcc.args.concat(['-target=' + target]);
129 129 }
130 130
  131 + if (extraTransArgs) {
  132 + transArgs = transArgs.concat(extraTransArgs);
  133 + }
  134 +
131 135 return function(callback) {
132 136 if (fs.existsSync(buildDir)) {
133 137 wrench.rmdirSyncRecursive(buildDir);
... ... @@ -156,7 +160,9 @@ var buildMonkeyProject = function(projectName, projectDestName, target) {
156 160
157 161 var tmp = path.resolve(src, '.build/cpptool', origin);
158 162
159   - if (!fs.existsSync(tmp)) {
  163 + if (target == 'Java_Tool') {
  164 + tmp = path.resolve(src, '.build/javatool', 'main.jar');
  165 + } else if (!fs.existsSync(tmp)) {
160 166 tmp = path.resolve(src, '.build/glfw');
161 167
162 168 if (fs.existsSync(tmp)) {
... ... @@ -365,6 +371,7 @@ gulp.task('dist', environment.options.build === 'clean' ? ['default'] : [], func
365 371 });
366 372
367 373 gulp.task('transcc', buildMonkeyProject('transcc', 'transcc_' + host));
  374 +gulp.task('transcc_java', buildMonkeyProject('transcc', 'transcc_java.jar', 'Java_Tool', ['+JAVATOOL_STRING_PARSE_STYLE=cpp']));
368 375 gulp.task('makedocs', environment.options.build === 'clean' ? ['transcc'] : [], buildMonkeyProject('makedocs', 'makedocs_' + host));
369 376 gulp.task('mungo', environment.options.build === 'clean' ? ['transcc'] : [], buildMonkeyProject('mungo', '../mungo', 'Desktop_Game'));
370 377 gulp.task('mserver', buildQtProject('mserver', 'mserver_' + host));
... ...
1   -Subproject commit cd33ac01d10dbfd3924630f6e151c857886bb7e1
  1 +Subproject commit 0e486eed0c50c2fad7f46dabc9872cf0b558f20f
... ...