Skip to content

Commit

Permalink
Better idea: just depend on 0compile 0.25 :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
talex5 committed Nov 26, 2011
1 parent 97a9e47 commit 83bc180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
17 changes: 1 addition & 16 deletions hello-ceylon.xml
Expand Up @@ -11,7 +11,7 @@

<feed-for interface='http://0install.net/tests/hello-ceylon.xml'/>

<implementation arch="*-src" id="." version="0.1-pre" compile:min-version='0.24'>
<implementation arch="*-src" id="." version="0.1-pre" compile:min-version='0.25'>
<command name='compile' shell-command='$SRCDIR/src/build.sh'>
<compile:implementation arch='*-*'>
<environment name='CLASSPATH' insert='helloworld.car'/>
Expand All @@ -23,24 +23,9 @@

</command>

<!-- Nice way, but requires 0install >= 1.4 -->
<requires interface='http://repo.roscidus.com/ceylon/compiler'>
<executable-in-var name='CEYLONC'/>
</requires>

<!-- Works with older versions (e.g. 1.0) -->
<environment insert="compiler.jar" name="JAVA_CP"/>
<requires interface="http://repo.roscidus.com/ceylon/spec">
<environment insert="com.redhat.ceylon.typechecker.jar" name="JAVA_CP"/>
</requires>
<environment insert="antlrworks.jar" name="JAVA_CP"/>
<requires interface="http://repo.roscidus.com/ceylon/runtime">
<environment insert="ceylon.language.car" name="COMPILE_CP"/>
</requires>
<environment name='CEYLON_HOME' insert='.' mode='replace'/>
<requires interface="http://repo.roscidus.com/java/openjdk-6-jre">
<environment name='JRE_BIN' insert='bin/'/>
</requires>

</implementation>
</interface>
8 changes: 2 additions & 6 deletions src/build.sh
Expand Up @@ -4,12 +4,8 @@ if [ "$SRCDIR" = "" ]; then
exit 1
fi

# This is cleaner, but requires 0install >= 1.4
#"$CEYLONC" -src "$SRCDIR/src" -out "$BUILDDIR" "$SRCDIR/src/helloworld.ceylon"

# Ugly way that works with older versions:
"$JRE_BIN"java -enableassertions -Xbootclasspath/p:$JAVA_CP com.redhat.ceylon.compiler.Main -classpath $COMPILE_CP \
-src "$SRCDIR/src" -out "$BUILDDIR" "$SRCDIR/src/helloworld.ceylon"
# Compile
"$CEYLONC" -src "$SRCDIR/src" -out "$BUILDDIR" "$SRCDIR/src/helloworld.ceylon"

# Copy result to DISTDIR
cp "$BUILDDIR/unversioned/default_module-unversioned.car" "$DISTDIR/helloworld.car"

0 comments on commit 83bc180

Please sign in to comment.