Skip to content

Commit

Permalink
haxe compiletest
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens-G committed Dec 19, 2024
1 parent 26dc3df commit e7e718a
Show file tree
Hide file tree
Showing 4 changed files with 414 additions and 0 deletions.
73 changes: 73 additions & 0 deletions lib/haxe/codegen/CodegenTest.hxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
<project version="2">
<!-- Output SWF options -->
<output>
<movie outputType="Application" />
<movie input="" />
<movie path="bin\TestOutput.js" />
<movie fps="0" />
<movie width="0" />
<movie height="0" />
<movie version="0" />
<movie minorVersion="0" />
<movie platform="JavaScript" />
<movie background="#FFFFFF" />
</output>
<!-- Other classes to be compiled into your SWF -->
<classpaths>
<class path="src" />
</classpaths>
<!-- Build options -->
<build>
<option directives="" />
<option flashStrict="False" />
<option noInlineOnDebug="False" />
<option mainClass="Main" />
<option enabledebug="False" />
<option additional="" />
</build>
<!-- haxelib libraries -->
<haxelib>
<library name="thrift" />
</haxelib>
<!-- Class files to compile (other referenced classes will automatically be included) -->
<compileTargets>
<compile path="src\Main.hx" />
</compileTargets>
<!-- Paths to exclude from the Project Explorer tree -->
<hiddenPaths>
<hidden path="obj" />
</hiddenPaths>
<!-- Executed before build -->
<preBuildCommand />
<!-- Executed after build -->
<postBuildCommand alwaysRun="False" />
<!-- Other project options -->
<options>
<option showHiddenPaths="False" />
<option testMovie="Webserver" />
<option testMovieCommand="bin/index.html" />
</options>
<!-- Plugin storage -->
<storage />
</project>
15 changes: 15 additions & 0 deletions lib/haxe/codegen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Prerequisites
----------------------------------------------
- a suitable dcc32.exe must be reachable via normal search path
- the Thrift compiler thrift.exe is searched in this order
- under the `compiler` subdir, where debug is preferred over release
- otherwise via normal search path

How to use the test case:
----------------------------------------------
- run the POSH script
- if any error messages occur, that's a bad sign
- there may be known but unfixed issues, these are listed accordingly


*EOF*
40 changes: 40 additions & 0 deletions lib/haxe/codegen/html5.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

# integrate files to classpath
-cp src
-cp gen-haxe

# this class wil be used as entry point for your app.
-main Main

# libs
-lib uuid
-lib thrift

# add debug information
-debug

# forced compile of all source files
--macro include('thrift', true)

# script output
-js bin/html5/Output.js

# eof
Loading

0 comments on commit e7e718a

Please sign in to comment.