TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: 57gmc on March 30, 2023, 04:29:30 PM

Title: Do you use an autoloader bundle to deploy lisp?
Post by: 57gmc on March 30, 2023, 04:29:30 PM
Recently I revisited the topic of autoloader technology. I've only used it for .NET dll's. But I forgot that is works for lisp files too. I was wondering how many use a bundle to deploy their lisp routines.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: JohnK on March 30, 2023, 05:05:44 PM
What's a bundle?
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: 57gmc on March 30, 2023, 05:20:26 PM
Its simply a folder with a bundle extension, e.g. MyPlugin.bundle. It includes, at a minimum, an xml and the plugin files. Autodesk came up with the Autoloader (https://adndevblog.typepad.com/autocad/2013/01/autodesk-autoloader-white-paper.html) system when they created the app store. Developers submit their bundle to Autodesk and the verify it and put it on the app store for easy installs. But you can create your own bundle for in-house use. It makes deployment easy. Just copy your bundle to one of the recognized folders and it gets autoloaded. The xml also has keys in it for customizing the deployment, e.g. demand loading. The plugin isn't loaded until one of your commands is requested.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: JohnK on March 30, 2023, 05:26:10 PM
Oh that sounds like a neat feature to play with! ...how is the XML file made/maintained (any automation there)?
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: JohnK on March 30, 2023, 05:41:36 PM
So that help document just told you the XML Scheme and then went on to examples (no automation)...then it goes on to talk about how someone tried to push examples/docs in a MS Word file?! What developer worth their salt would ever do ANYTHING in MS Word? lol
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: It's Alive! on March 30, 2023, 07:08:51 PM
It’s the coolest thing since sliced bread, no more infecting the registry!
pretty easy to create a MSI installer
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: 57gmc on March 30, 2023, 07:31:09 PM
Oh that sounds like a neat feature to play with! ...how is the XML file made/maintained (any automation there)?
No automation really required. It's typically not a very big file and they're the same from plugin to plugin. Just change a couple parameters to create a new plugin. If you publish a new version, you only have to update one xml tag.

But it sure does sound like a fun project to create a "bundle builder". There you go Daniel! Drop down lists for all the variables!
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: kdub_nz on March 30, 2023, 08:20:49 PM
Just flying past, so no links . .
I recall Owen played around with a Lisp AutoLoader.

Found it,
https://www.manusoft.com/resources/arxtips/demandloadvlx.html
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: kdub_nz on March 30, 2023, 08:30:35 PM
<< . . .

But it sure does sound like a fun project to create a "bundle builder". There you go Daniel! Drop down lists for all the variables!

Weird, I was thinking about that over NewYear !
I thought a database (SQLite) could be used to feed it.
Wouldn't (probably) need Acad.
Imagined it could be distributed on the App Store for a suitable renumeration.
Just need to make it as idiot proof as possible . . . and have 'good'  docs :)

. . but real life caught up with me.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: JohnK on March 30, 2023, 09:44:25 PM
Still on the sidebar (KISS attempt): I just made a C program to pack all the .lsp files in a directory--and subdirectories--into a single file. :)
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: BIGAL on March 30, 2023, 11:27:34 PM
For Jonh K

[/img]

You just need a sample bundle its all straight forward even in the XML easy to put your programs etc.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: BIGAL on March 30, 2023, 11:35:18 PM
A second option I use a zip file and a lisp to install software, you can unzip a file using lisp and save it to a known directory, So I have 3 sub directories in Zip also, the lisp continues sets paths, loads menus and so on.

Zip 85mb 196 files. Just drag the zip onto cad and select where you saved the zip.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: It's Alive! on March 31, 2023, 12:14:06 AM
It’s pretty easy to build a MSI installer in Visual Studio. No programming required, just added the source folder/files you want, and a target directory
Fill out the some fields in the (VS) properties panel. spend a half day learning it, then you can just whip them out easily 

A zip is cool but there’s no uninstall, also Inno setup is cool but .exe installers are out of fashion
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: 57gmc on March 31, 2023, 10:17:47 AM
Wouldn't (probably) need Acad.
Imagined it could be distributed on the App Store for a suitable renumeration.
Just need to make it as idiot proof as possible . . . and have 'good'  docs :)

. . but real life caught up with me.
'good' docs'. I was thinking it could have a help file similar to the white paper I linked to.
I was thinking a stand alone app too. But Daniel's comment about VS made me think that a VS plugin would be a good choice. And if you code lisp with VS Code, maybe you could port the app to that IDE as well.

♬ What's Life.. ♪ a magazine.. ♩♪ and I only got a nickel. -Gabriel and the Angels
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: 57gmc on March 31, 2023, 10:30:53 AM
Still on the sidebar (KISS attempt): I just made a C program to pack all the .lsp files in a directory--and subdirectories--into a single file. :)
Personally, I don't use them in-house. I developed a robust system that makes it easy for me. But they're great for sharing plugins. You don't have to explain how to install anything. Just tell them what folder to copy it to and it just works... file loading, menu loading, etc. It was developed for the app store. In a sense, it does KISS. More for the end user though. But it's not much work for the dev either. Daniel posted an arx a while back and in a few minutes I made a bundle for it.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: PKENEWELL on March 31, 2023, 11:19:16 AM
This has been discussed: http://www.theswamp.org/index.php?topic=49774.0

This is the technology that is used for making apps for the Autodesk store.
Title: Re: Do you use an autoloader bundle to deploy lisp?
Post by: BIGAL on April 01, 2023, 12:51:35 AM
Unzip a file using lisp

Code: [Select]
(setq filename (getfiled "Select the File \"CAD-TOOLS-OCT-25-2022\"" "" "ZIP" 16))
(startapp (strcat "powershell -command Expand-Archive -Path '" filename "' -DestinationPath 'C:/CAD-TOOLS' -FORCE")) ; unzip
(alert "programs unzipped to C:/CAD-TOOLS")

lisp to set paths and menu follows from here.