Default installname

Topics: Archive - General
Mar 12, 2015 at 2:28 AM
Edited Mar 12, 2015 at 2:29 AM
Hi,

May I suggest it would be interesting to define a different installname?

Actually:
## Build the Installation Name
If ($appArch) {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appArch + '_' + $appLang + '_' + $appRevision
}
Else {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appLang + '_' + $appRevision
}
[string]$installName = $installName.Trim('_') -replace '[_]+','_'
So why not just at
If ($installname="") {

## Build the Installation Name
If ($appArch) {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appArch + '_' + $appLang + '_' + $appRevision
}
Else {
    [string]$installName = $appVendor + '_' + $appName + '_' + $appVersion + '_' + $appLang + '_' + $appRevision
}
[string]$installName = $installName.Trim('_') -replace '[_]+','_'
}
By doing so we would get more flexibility unless that variable should be made absolutely as it is actually but I found nothing.
Developer
Mar 12, 2015 at 7:12 AM
I don't see what the difference is between what you suggest and what we have. You only have to specify the variables you wish to for installname. If you don't specify a variable, then it gets removed from installname. So you can specify only $appName if you wish, call it whatever you want, and the rest of the variables get ignored.
Mar 12, 2015 at 10:14 AM
In your script, you don't test for Installname existence so there is no way to define it as PSADTK will create his own.
Developer
Mar 12, 2015 at 10:20 AM
Because $installName is built from these variables: $appVendor + '' + $appName + '' + $appVersion + '' + $appArch + '' + $appLang + '_' + $appRevision

These variables are defined in your Deploy-Application.ps1 file. Define whatever variables you want to see reflected in $installName.
Coordinator
Mar 12, 2015 at 10:31 AM
This is by design. One of the fundamental tenets of the toolkit is consistency. Dynamically generating the install name gives us a consistent convention across UI, log files, and better yet, developers. If someone else wrote a script on my team or in a different company, I can count on its logs not being named 't385a63.log'.

I don't see any reason we should change this.

Dan
Mar 12, 2015 at 5:02 PM
I totally agree with you. What I was meaning is why not letting developper choose a different value. If no values is define then by default impose yours. IMHO, the most important, as you said, is to be consistent from the beginning until the end. If a developper would like to $installname = Autodesk2015_v1 then this value is also consistent as it is use along the whole script.

In my organisation, the names and logs name have a different convention but the actual situation force me to reaffect the value of installname just to be sure I respect the organisation convention.

François