Skip to content

Commit

Permalink
Merge f28bd2a into 4ef1dc2
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Aug 14, 2018
2 parents 4ef1dc2 + f28bd2a commit 1d44a1d
Show file tree
Hide file tree
Showing 19 changed files with 435 additions and 481 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -15,7 +15,7 @@ There is both a native julia interface, in the `BuildApp` module, and a command-

To compile and bundle your julia program into a distributable app, use `BuildApp.build_app_bundle`:
```julia
julia> using ApplicationBuilder; using BuildApp
julia> using ApplicationBuilder
help?> build_app_bundle()
# 1 method for generic function "build_app_bundle":
build_app_bundle(juliaprog_main; appname, builddir, resources, libraries, verbose, bundle_identifier, app_version, icns_file, certificate, entitlements_file)
Expand Down
4 changes: 2 additions & 2 deletions build_app.jl
@@ -1,4 +1,4 @@
using ArgParse, ApplicationBuilder; using BuildApp
using ArgParse, ApplicationBuilder

const julia_v07 = VERSION > v"0.7-"

Expand Down Expand Up @@ -89,4 +89,4 @@ else
filter!((k, v) -> v (nothing, false), parsed_args)
end

BuildApp.build_app_bundle(juliaprog_main; parsed_args...)
ApplicationBuilder.build_app_bundle(juliaprog_main; parsed_args...)
5 changes: 0 additions & 5 deletions examples/blink.jl
Expand Up @@ -14,7 +14,6 @@
# examples/blink.jl "HelloBlink"

using Blink
using ApplicationBuilder

# In order to distribute this Application, we've copied all its dependencies
# into the .app bundle via the -R and -L build flags.
Expand Down Expand Up @@ -84,10 +83,6 @@ function helloFromBlink()
end

Base.@ccallable function julia_main(args::Vector{String})::Cint
# Note that we must call this function in order for Blink to find the
# resources we've copied into the Application bundle.
ApplicationBuilder.App.change_dir_if_bundle()

# Apparently starting Electron too quickly means the OS doesn't get a
# chance to find the name of the application...
sleep(2)
Expand Down
4 changes: 2 additions & 2 deletions examples/commandline_hello.jl
@@ -1,10 +1,10 @@
# A super-simple command line program that just prints hello.
# Build this with the `commandline_app=true` flag in `BuildApp.build_app_bundle`.
# Build this with the `commandline_app=true` flag in `ApplicationBuilder.build_app_bundle`.

Base.@ccallable function julia_main(ARGS::Vector{String})::Cint
println("Hi what's your name?")
name = readline()
println("Oh hi, $name\! It's a pleasure to meet you.")
println("Oh hi, $name. It's a pleasure to meet you.")
println("By the way, here's the current working directory:\n'$(pwd())'")

println("\nGoodbye! (Press enter to exit)")
Expand Down
4 changes: 0 additions & 4 deletions examples/hello.jl
@@ -1,9 +1,5 @@
using ApplicationBuilder

# Create a temporary .html file, and open it to share the greetings.
Base.@ccallable function julia_main(ARGS::Vector{String})::Cint
ApplicationBuilder.App.change_dir_if_bundle()

tmpdir = mktempdir()
filename = joinpath(tmpdir, "hello.html")
open(filename, "w") do io
Expand Down
4 changes: 0 additions & 4 deletions examples/libui.jl
@@ -1,5 +1,3 @@
using ApplicationBuilder

using Libui


Expand Down Expand Up @@ -173,8 +171,6 @@ end


Base.@ccallable function julia_main(ARGS::Vector{String})::Cint
ApplicationBuilder.App.change_dir_if_bundle()

global progressbar = uiNewProgressBar()
global spinbox = uiNewSpinbox(0, 100)
global slider = uiNewSlider(0, 100)
Expand Down
5 changes: 2 additions & 3 deletions examples/sdl.jl
Expand Up @@ -6,11 +6,11 @@
# test/build_examples/sdl.jl
# https://github.com/NHDaly/ApplicationBuilder.jl/tree/master/test/build_examples/sdl.jl

using ApplicationBuilder

using SimpleDirectMediaLayer
SDL2 = SimpleDirectMediaLayer

using Compat.Pkg

fontFile = joinpath(Pkg.dir("SimpleDirectMediaLayer"),
"assets","fonts","FiraCode","ttf","FiraCode-Regular.ttf")

Expand Down Expand Up @@ -80,7 +80,6 @@ function helloFromSDL()
end

Base.@ccallable function julia_main(args::Vector{String})::Cint
ApplicationBuilder.App.change_dir_if_bundle()
helloFromSDL()
return 0
end
Expand Down

0 comments on commit 1d44a1d

Please sign in to comment.