Author Topic: Innosetup: Looping through all versions and verticals and languages ...  (Read 33009 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
I saw some Innosetup postings here, maybe somebody can help...

Using Innosetup I (want to) query the registry to find the installed versions of AutoCAD. The problem (for me, not for a Pascal expert) is the great number of possible versions:

- a lot of basic version (e.g. 2007 - 2014)
- a lot of languages
- a lot of verticals ....

Who has the perfect idea (better: the perfect solution :-D) handle this complexity ?

a) IS searches and displays all installed versions
b) User selects the versions he needs (IS Components?)
c-1) IS installs to all existing languages of all selected components..
c-2) IS installs to all selected  languages of all selected components.. (Maybe a little bit crazy idea and not necessary ..)

Thanks and regards
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #1 on: August 07, 2013, 10:11:55 AM »
What do you want to install? If you have your own application you can install it in the plugin directory. In your package xml you can do the stuff for the different versions.

This will only work from 2012 versions I guess. I don't know much about Pascal, I've spent a few hours searching for this too, but finally I gave up and wrote my own registry tool (exe) which can be start by IS. In that tool I do a search for the installed versions and create new registry keys.

That I only use for the BricsCAD software, for AutoCAD I moved to the plugin system.

The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

Peter2

  • Swamp Rat
  • Posts: 650
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #2 on: August 07, 2013, 10:26:26 AM »
What do you want to install? ...
Actually one VLX, compiled from Lisp.
But I use also OpenDCL and Doslib and LspLoader, and this is why I'm experimenting with "Loader" and "LoadCTRLS", which are placed in

"HKCU\Software\Autodesk\AutoCAD\R19.1\ACAD-D001:407\Applications\MyAPP"

where all red entries can be different.

...If you have your own application you can install it in the plugin directory. ....
Where? What? How?
As said above I'm try to use the autoload-feature via LOADER.

...In your package xml you can do the stuff for the different versions. This will only work from 2012 versions I guess. .....
Right. But I have to consider it also for (at least) 2011.

.......and wrote my own registry tool (exe) which can be start by IS. In that tool I do a search for the installed versions and create new registry keys.....
I hoped to avoid this.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #3 on: August 07, 2013, 10:42:02 AM »
"HKCU\Software\Autodesk\AutoCAD\R19.1\ACAD-D001:407\Applications\MyAPP"

where all red entries can be different.

The red entries can be determined using the vlax-product-key function.

Peter2

  • Swamp Rat
  • Posts: 650
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #4 on: August 07, 2013, 10:54:10 AM »
...The red entries can be determined using the vlax-product-key function.
Inside the installation with Innosetup?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #5 on: August 07, 2013, 11:00:14 AM »
In my opinion, the best solution is to simply iterate every supported version of AutoCAD and automatically install your autoload key in every flavor and language of those supported versions. I have written UI for selecting specific instances to install to, but it's very complicated and almost never useful (95% of end users have only one installed version of AutoCAD, and 99% of the remaining users want the app on all of their installations.)

Peter2

  • Swamp Rat
  • Posts: 650
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #6 on: August 07, 2013, 11:03:22 AM »
... to simply iterate every supported version of AutoCAD and automatically install your autoload key in every flavor and language of those supported versions. ...
Do you have an example for this iteration in Pascal / Innosetup?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #7 on: August 07, 2013, 11:19:49 AM »
Do you have an example for this iteration in Pascal / Innosetup?

No, sorry. I'm somewhat familiar with InnoSetup, but I've never used it myself.

BlackBox

  • King Gator
  • Posts: 3770
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #8 on: August 07, 2013, 03:55:59 PM »
"HKCU\Software\Autodesk\AutoCAD\R19.1\ACAD-D001:407\Applications\MyAPP"

where all red entries can be different.

The red entries can be determined using the vlax-product-key function.

As I understand it, newer products (2013+) use vlax-User-Product-Key... More info at the bottom of this post.

Accessing the product key was changed in .NET API as well, as shown here.

Cheers
"How we think determines what we do, and what we do determines what we get."

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #9 on: August 07, 2013, 04:51:15 PM »
Thanks for the info BB, I need to get with the times  :-)

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #10 on: August 07, 2013, 05:20:16 PM »
Stupid question time: is this installation set-up intended for internal distribution (ie. known application targets) or external distribution (ie. sharing with the world)?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Peter2

  • Swamp Rat
  • Posts: 650
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #11 on: August 07, 2013, 05:36:27 PM »
Stupid question time: is this installation set-up intended for internal distribution (ie. known application targets) or external distribution (ie. sharing with the world)?
No, no - stupid questions are my speciality  :-D

At first step, I know the testers and their configs, but later on, I hope the entire world (or a part of it) will use it.
« Last Edit: August 07, 2013, 05:53:57 PM by Peter2 »
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #12 on: August 08, 2013, 01:46:58 AM »
There's quite a few examples of doing this on StackOverflow. IMO Pascal's not a hard language to understand, it's just a lot more verbose than Lisp. Actually I found it a lot easier to understand than C/C++ (about similar to VB/C#).

Some differences from Pascal over Lisp: All local variables has to be declared between the header and the body of the function in a var section, you also need to specify the type (as this is a static typed language). It is possible to send arguments by reference in Pascal, simialr like quoting an argument in Lisp - only in Pascal you define the function that way instead of modifying the call statement.

Here's a few samples after doing a google:
The official InnoSetup's Pascal Script does have help on the functions which might be of use. Scroll down to the Registry Functions section on this page: http://www.jrsoftware.org/ishelp/index.php?topic=scriptfunctions


You might find the RegGetSubkeyNames function of use. Note the use of the var prefix for the Names argument. That means it's a by-reference argument. So your function needs to have a local variable of type TArrayOfString and add this is the argument in that position. If the RegGetSubkeyNames returns true then your local variable will contain the names.


So the principle is this: You'll look for subkeys under HKLU\Software\Autodesk\AutoCAD\. That would list all installed versions. Under each of those, there might be subkeys as well (e.g. Vanilla / C3D / Mech / ACA / etc. all have their own codes in here). Then under the Profiles of that folder, you might have several profiles which the user might have saved. Thus you'd probably have to do a nested iteration for the different levels.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #13 on: August 08, 2013, 02:07:16 AM »
Another alternative way of going about it through IS's built-in Pascal Script would be to use IS in conjunction with AcadInst. Here's a good tut on how to use them: http://www.afralisp.net/archive/lisp/install1.htm

Just note, the free version of AcadInst forces you to use their built-in dialogs, it's like an add-ware app. If you pay for it you can get rid of these.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Peter2

  • Swamp Rat
  • Posts: 650
Re: Innosetup: Looping through all versions and verticals and languages ...
« Reply #14 on: August 08, 2013, 01:43:46 PM »
...Just note, the free version of AcadInst forces you to use their built-in dialogs, it's like an add-ware app. If you pay for it you can get rid of these.
Hi irneb

which version of AcadInstall are you talking about? Byron has suspended his development (I have some products of Cadwerx), and the version which can be found in the web is rather old. And I don't know a current version to purchase. And the Afra-Lisp site talks of version 2004.

Peter
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23