Creating installers when packaging a Levure application

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Creating installers when packaging a Levure application

Post by trevordevore » Mon Jun 26, 2017 3:49 pm

If you attended my session on Levure at LiveCode Global Jam you may have heard me mention that installers couldn’t be automated yet. Well, now they can. Levure 0.9.2 was pushed out today and it adds some features to “helpers” that allow the creation of installers during the packaging process.

I’ve created helpers for DropDMG on macOS and Inno Setup on Windows.

Follow the links below for more information.

Levure wiki:
https://github.com/trevordevore/levure/wiki

Link to wiki page with screencast and links to the GitHub repos for DropDMG and Inno Setup helpers Github:
https://github.com/trevordevore/levure/ ... Installers

Learn more about what Helpers are in Levure:
https://github.com/trevordevore/levure/wiki/helpers
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

bhall2001
Posts: 107
Joined: Thu Oct 30, 2014 3:54 pm
Location: Manchester, NH

Re: Creating installers when packaging a Levure application

Post by bhall2001 » Tue Nov 21, 2017 12:34 am

I can't get the Inno Setup .iss file to build and was wondering what might be the most common things you've run into that could make the .iss file not be created.I'm not trying to compile the .iss just generate it.

I'm on a Mac (10.13.1) with LC 8.1.7 Biz. The drop DMG side is working great.

I've reverted back to trying to get the .iss file for the sample app to build following the screencast to the T but no luck. I'm sure I'm missing something simple but I can't figure it out for the life of me.

Thanks in advance for any suggestions,
Bob

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Tue Nov 21, 2017 4:18 am

Without knowing what steps you’ve taken it is hard to say. Did you add an entry to the copy files not section?

https://github.com/trevordevore/levureh ... es-section
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

bhall2001
Posts: 107
Joined: Thu Oct 30, 2014 3:54 pm
Location: Manchester, NH

Re: Creating installers when packaging a Levure application

Post by bhall2001 » Tue Nov 21, 2017 1:36 pm

Got it figured out -- kind of...

I forgot to put a "-" before "filename" in the copy files section. Once I did that I could see things were starting to work.

However, to get the inno setup to create the .iss file, I found the path to the "template" .iss file needs to be in "../build files" (the root contains app, build files, builds and levure directories).

I was following the screencast and did what I saw there. The template MyApp.iss is at "./helpers/inno_setup/samples" and the copy files section reflects this directory. This doesn't work on my system.

When I do this, I end up with the file "builds/beta/0.0.1-1/helpers/inno_setup/samples/MyApp.iss that is incomplete (everything is filled in except the files and dir sections which are blank).

I'd like to raise my hand to either correct the documentation saying the template must be in the "build files" directory or update the script so the template can be anywhere and the resulting .iss file ends up in the correct builds directory.

I've attached a screen shot of the directory structure I ended up with when using ./helpers/inno_setup/samples/MyApp.iss in the copy files section.

Bob
Attachments
Screen Shot 2017-11-21 at 7.33.36 AM.png
Resulting dirs when using path in screencast

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Tue Nov 21, 2017 2:15 pm

It looks like the copy files section isn't set up correctly. Based on where the .iss file is ending up and the fact that it isn't being filled in it looks as though it isn't being processed by the inno_setup helper. Two things -

1) Are you using the latest version of the Levure framework? You can check the top of the levure.livecodescript file.
2) Can you attach your app.yml file so I can take a look?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

bhall2001
Posts: 107
Joined: Thu Oct 30, 2014 3:54 pm
Location: Manchester, NH

Re: Creating installers when packaging a Levure application

Post by bhall2001 » Wed Nov 22, 2017 1:25 am

0.9.4 is the version in levure.livecodescript.

I did some more troubleshooting and here's what I came up with:

For my setup, I have the same MyApp.iss file in both locations (using sample app with framework in fresh install from repo). I was able to get things working when I use the following:
...
android:
inno setup:
- filename: ../build files/MyApp.iss
...

What isn't working (resulting in the prior screenshot) is:
...
android:
inno setup:
- filename: ./helpers/inno_setup/samples/MyApp.iss
...

what does work is (note -- this references the same file as above)
...
android:
inno setup:
- filename: ../app/helpers/inno_setup/samples/MyApp.iss
...

Looks like I have a relative path reference error? As you can see I installed the helper in the app helpers and not the framework helpers directory if that matters.

I've attached 2 app.yml's but I don't think they will help as I can see it's a relative path issue. Am I not referencing the file correctly in the one that isn't working?

Thanks in advance again for looking at this. LOVE THE LEVURE FRAMEWORK!!!!!

Bob
Attachments
app.yml-path-question.zip
(1.86 KiB) Downloaded 232 times

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Wed Nov 22, 2017 4:45 pm

Thanks for the details. I believe I have found the problem. The inno_setup helper should always be outputting the .iss file to the root build folder (e.g. 0.1.1). I always use a particular folder structure in my apps that didn't reveal this bug. Can you do the following to confirm?

1. Replace inno_setup helper with latest from https://github.com/trevordevore/levurehelper-inno_setup

2. Update the ./packager/packager.livecodescript in the levure folder with the script from the following url:

https://raw.githubusercontent.com/trevo ... codescript

You should then be able to reference the MyApp.iss sample file in your app.yml and it should work. If it does then I will update the main levure repo with the update.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Thu Nov 30, 2017 4:38 pm

@bhall2001 Have you had a chance to test the updates yet?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Wed Feb 14, 2018 5:40 pm

Version 0.9.5 of Levure has been released which includes the fix for the Inno Setup helper.

https://github.com/trevordevore/levure/releases
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

martyknapp
Posts: 52
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: Creating installers when packaging a Levure application

Post by martyknapp » Thu Nov 08, 2018 4:41 am

When configuring the app.yml file for DropDMG, what is the "path" key for?


# app.yml

dropDMG:
format: bzip2
layout name: My App Layout
license name: My App License
path: /usr/bin/local/dropdmg

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Thu Nov 08, 2018 5:21 am

That path to the dropdmg command line tool. The default is /usr/local/bin/dropdmg so as long as it is installed in the default location you don't have to set it in app.yml.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

martyknapp
Posts: 52
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: Creating installers when packaging a Levure application

Post by martyknapp » Sat Nov 10, 2018 4:53 am

Regarding the use of DropDMG, on my disk image I want to include 2 additional folders - one that contains instructions and another that contains some graphic files. I've set up the layout with these two folders. The DropDMG instructions say that the contents for these additional items need to be in the "source folder" but as the disk image is built with the commandLine tool I'm not sure which is considered the source folder. I tried the app folder, build folder, the build profile folder - none of which worked. Has anyone done this successfully?

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Creating installers when packaging a Levure application

Post by trevordevore » Fri Nov 16, 2018 2:02 am

With a slight modification to the dropDMG helper the macos folder in the output can be used as the source folder. To test, update the contents of the dropDMG_packager.livecodescript file (use a text editor) with the contents of the file at the following url:

https://raw.githubusercontent.com/trevo ... codescript

After updating that file you will need to update your app.yml file so that it copies your instructions and graphic files into the folder alongside your actual application. This way DropDMG can find everything in one place. I think you will want to use the approach described here:

https://github.com/trevordevore/levure/ ... g-packaged

Since you want to put the files into the macOS folder you might do something like this:

Code: Select all

build profiles:
  all profiles:
    copy files:
      package folder:
        - filename: ../build files/instructions.rtf
          destination: macos
        - filename: ../build files/graphic file.jpg
          destination: macos
 
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

martyknapp
Posts: 52
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: Creating installers when packaging a Levure application

Post by martyknapp » Sun Nov 18, 2018 11:06 pm

Thanks Trevor, I'll give that a try.

martyknapp
Posts: 52
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: Creating installers when packaging a Levure application

Post by martyknapp » Tue Nov 20, 2018 1:37 am

Seems to work great. One question - where does it pick up the the name for the mounted disk image? With the above it's set to "macos."

Post Reply

Return to “Talking LiveCode”