diff --git a/examples/commandline_hello.jl b/examples/commandline_hello.jl new file mode 100644 index 0000000..e5d4d02 --- /dev/null +++ b/examples/commandline_hello.jl @@ -0,0 +1,8 @@ +# A super-simple command line program that just prints hello. +# Build this with the `commandline_app=true` flag in `BuildApp.build_app_bundle`. + +Base.@ccallable function julia_main(ARGS::Vector{String})::Cint + println("Oh hi, World!") + println("Current working directory: $(pwd())") + return 0 +end diff --git a/test/build_examples/commandline_hello.jl b/test/build_examples/commandline_hello.jl new file mode 100644 index 0000000..eb1e5aa --- /dev/null +++ b/test/build_examples/commandline_hello.jl @@ -0,0 +1,7 @@ +using ApplicationBuilder; using BuildApp + +# Allow this file to be called either as a standalone file to build the above +# example, or from runtests.jl using a provided builddir. +isdefined(:builddir) || (builddir=nothing) # nothing == default builddir. + +build_app_bundle(examples_hello, commandline_app=true, builddir=builddir)