NHDaly / ApplicationBuilder.jl

[deprecated] Compile, bundle, and release julia software
MIT License
168 stars 15 forks source link

A lot of problems #56

Open gabrielfreire opened 5 years ago

gabrielfreire commented 5 years ago

Hello @NHDaly , thank you very much for this GREAT package, i am in love with Julialang

having said that 👍 .

I had a couple of problems in Windows 10 using Julia 1.1.0

there is nothing special about my Windows installation or Julia installation or environment in general.

I managed to sort this out by adding the following lines to the top of ApplicationBuilder.jl just below the Sys.isapple() check

@static if Sys.isapple()
    include("sign_mac_app.jl")
    include("mac_commandline_app.jl")
end

""" THIS """
@static if Sys.iswindows() 
    include("win-installer.jl") 
end

After being able to access the win_installer method, i had another error

UndefVarError: JULIA_HOME is not defined

I managed to fix that by changing these lines

function win_installer(builddir; name = "nothing",
                license = "$JULIA_HOME/../License.md")

to these lines

JULIA_HOME = get(ENV, "JULIA_HOME", "")
LICENSE_PATH = joinpath(abspath(JULIA_HOME, ".."), "License.md")

function win_installer(builddir; name = "nothing",
                license = LICENSE_PATH)

BTW, in Windows at least, "$JULIA_HOME/../License.md" this doesn't seem to resolve to a valid path so i also had to change the nsis_file path from

# this resolves to "$builddir/../$name.nsi" which doesn't exist anywhere
nsis_file = joinpath(builddir, "..", "$name.nsi") 

to

nsis_file = joinpath(abspath(builddir, ".."), "$name.nsi")

I'm not sure why you build your paths this way joinpath(builddir, "..", "$name.nsi") or "$JULIA_HOME/../License.md" because i'm new to Julia and arrived on Version 1.1.0 already, maybe that's the way it used to work before, i don't know.

This doesn't resolve to parent folder

joinpath(builddir, "..")

this does

abspath(builddir, "..")

After those fixes i made everything work and managed to build a Windows Executable Application with an Installer but let me know your thoughts about this, i will be making a Pull Request with the above changes because it definitely will crash on other Windows 10 users.

NHDaly commented 5 years ago

Wow, thanks so much for this detailed feedback!!!! <3 <3 <3

I'm sorry I haven't responded. I'll start looking at incorporating this over the next couple days. :) Thanks for the reports!

57 looks good, i'll get to it now. :)