Author Topic: "Autoloader" for Runtime  (Read 9271 times)

Peter2

  • Sr. Member
  • ****
  • Posts: 475
"Autoloader" for Runtime
« on: May 17, 2015, 12:42:11 PM »
There is no discussion here about "Autoloader", so I want to ask if it will work: "Autoloader" for runtime?

Who has experience? Good ones or bad ones?

(I know that the best way is the "installation", but the admin of the client only accepts Autoloader-bundles and has locked all setups.)
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2070
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: "Autoloader" for Runtime
« Reply #1 on: May 18, 2015, 09:46:19 PM »
Hi, there was a discussion in the past about loading the arx manually - but not with .bundles. As far as I know, using apps from Autodesk Exchange need to start installers, too.

How do you store your files without setup? Just copy? Then copy the arx-files and the runtime.res of the desired language along with your lsp-files.
Make sure that you arxload the correct arx file manually depending of the loaded AutoCAD-release.

I made something like this in the past:

Code: (autolisp) [Select]
(defun load_opendcl (/ strArx )
  (or (and dcl-project-load (= (type dcl-project-load) 'EXRXSUBR))
      (and (setq strARX (findfile (strcat "OpenDCL" (if (not (= (getenv "PROCESSOR_ARCHITECTURE") "x86")) ".x64." ".") (substr (getvar "ACADVER") 1 2) ".arx")))
   (arxload strARX (strcat "\nIch konnte die Datei " strFile " nicht laden!\n"))
   (and dcl-project-load (= (type dcl-project-load) 'EXRXSUBR))))
); load_opendcl

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #2 on: May 19, 2015, 09:42:04 AM »
... As far as I know, using apps from Autodesk Exchange need to start installers, too....
Yes, they have an installer, but I'm not sure what it really does. I suppose - and I saw it with a "handcrafted" CMD in a big system - that the main Installer-function is the extraction of the .bundle from the installer and a simple copy to the folder. More complex feature (registry, environment...) should be done with the .bundle-features.

This is what I tried: to use a package with vlx+arx+... inside a bundle, without additional lisp-configurations or loads. The first trial failed: it only activated the VLX, the ARX are ignored.

Any hints are appreciated.
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #3 on: June 09, 2015, 11:56:02 PM »
I'm still fiddling about this topic ...

Why?
The "Autoloader" offers a way to "install" something (incl. command-registration, env.-variables ...) without an "Installer". Some companies have locked all setups and installers to their (AutoCAD-)Users.

Of course the Autoloader (from Autodesk app-store) itself comes with an installer, but this is a simple "copy from source to c:\" and could be replaced with a manual copy.

The code to register Opendcl:
Code: (autolisp) [Select]
<Components Description="OpenDCL für R20 x64 (2015-2016)">
<RuntimeRequirements OS="Win64" SeriesMin="R20.0" SeriesMax="R20.1"/>
<ComponentEntry AppName="OpenDCL.x64.20.arx" Version="8.0.0.14" ModuleName="./Program/OpenDCL.x64.20.arx" AppDescription="OpenDCL - Runtime für Dialogfenster" LoadOnAppearance="False" LoadOnAutoCADStartup="False" LoadOnCommandInvocation="True">
<Commands GroupName="PEGL_BASETOOLS">
<Command Local="OpenDCL" Global="OpenDCL"/>
</Commands>

It would work, but if OpenDCL is already installed (which can not be determined by this solution) I get a double-registration: see attachment.

The next idea - to make the muddle perfect - is to use a renamed ARX: OpenDCL_X.arx loads with command "OpenDCL_X"
Code: (autolisp) [Select]
<Components Description="OpenDCL_X für R20 x64 (2015-2016)">
<RuntimeRequirements OS="Win64" SeriesMin="R20.0" SeriesMax="R20.1"/>
<ComponentEntry AppName="OpenDCL_X.x64.20.arx" Version="8.0.0.14" ModuleName="./Program/OpenDCL_X.x64.20.arx" AppDescription="OpenDCL_X - Runtime für Dialogfenster" LoadOnAppearance="False" LoadOnAutoCADStartup="False" LoadOnCommandInvocation="True">
<Commands GroupName="PEGL_BASETOOLS">
<Command Local="OpenDCL_X" Global="OpenDCL_X"/>
</Commands>

Result:
My lisp would always use the "_X" version, no matter if the full version is installed or not. If my lisp is "deinstalled" (removed), also the "_X" version will be removed.

Question:
Genius or insanity?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3059
    • Outside The Box
Re: "Autoloader" for Runtime
« Reply #4 on: June 10, 2015, 11:42:15 AM »
I highly recommend against loading a renamed OpenDCL ARX module for a non-internal plugin application, as it defines shared functions that may be used by other applications as well. If your application presumes to control that module, soon others will do the same (because maybe they need a more recent version, for example), and an arms race will ensue.

I see this kind of discussion often, but I still don't understand really why there is so much resistance to using the installer. Can you identify a problem that restricted user privileges creates when installing normally? Maybe it would be more useful to address such problems in the installer rather than trying to duplicate its work manually.

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #5 on: June 10, 2015, 02:18:41 PM »
Hi Owen

it is not my personal passion to avoid the installer. I mentioned the problem some time ago - there are companies where the CAD-department is small and depends absolutely on the IT-department (Mordac). They need an Admin to run a MSI or Innosetup, and sometimes it takes two weeks to talk to the IT which started to discuss "What is it? Do we need it? Is it clean? It is a lot of work because we don't have ..." and after 4 weeks nothing is done. So I'm looking for a way - smooth and clear. But I don't want to create something wrong.
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3059
    • Outside The Box
Re: "Autoloader" for Runtime
« Reply #6 on: June 12, 2015, 08:47:03 PM »
I wonder if modifying the runtime MSI file to support Single Package Authoring would solve this problem with permissions. It seems to be available only in Windows 7 and later. Alternatively, maybe a special .mst file could be produced to transform the existing MSI into one that installs runtime files to user folders.

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #7 on: June 13, 2015, 01:25:33 AM »
I've never made a MSI/MS*, so I'm sorry that I can not contribute to this special question.
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #8 on: June 21, 2015, 03:09:28 PM »
I played around and tried to make an "OpenDCL.bundle" for AutoCAD 2012-2016 (not for Mac, not for ZWcad and Bricscad and of course not for Acad < 2012).

I deinstalled OpenDCL - Runtime and Studio and made a quick test with the bundle in %appdata%, and it was "loaded on demand" in 2012 - 2016 and I got the German messages ("DEU")

Find attached the "PackageContents.xml" in the current draft; maybe someone want to check and test it in his environment and language. If it works, maybe this could be an additional option to offer the software to users.

BTW - "language": The subfolder "ESM" contains the Spanish files, but Spanish is "ESP". What is ESM?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #9 on: July 03, 2015, 10:11:20 AM »
...Find attached the "PackageContents.xml" in the current draft; maybe someone want to check and test it ...
No remarks? No comments?

BTW - "language": The subfolder "ESM" contains the Spanish files, but Spanish is "ESP". What is ESM?
Bump up..
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3059
    • Outside The Box
Re: "Autoloader" for Runtime
« Reply #10 on: July 04, 2015, 02:20:41 AM »
ESM = Spanish (Mexico), which I suppose is similar bot not the same as ESP.

Peter2

  • Sr. Member
  • ****
  • Posts: 475
Re: "Autoloader" for Runtime
« Reply #11 on: July 07, 2015, 12:05:13 AM »
But "Autoloader" only supports ESP. It is possible to load ESM-folder under ESP-definition, but that's (very little) inconsistent.
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10