• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Which Install Program?

NMG

Messages
78
Country
southafrica
I am wondering what install programs you guys use to deliver your creations with. For the past few years I have used Install Creator 2 (Commercial Version) which has served me well, but I am looking for something that will allow online activation.

A few years ago someone here rated Setup Factory from Indigo Rose very high and I have check it out, but at $395 USD, this is W-A-Y above my pay grade! I am fully aware that Install Programs are expensive, but for me $395 is excessive!

Install Creator is 45 EUR which is also on the expensive side, but I can justify spending that.

I would love to hear some ideas, please!

Regards,
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I use NSIS (NullSoft), which is Open Source and highly configurable using a simple scripting language. I haven't looked closely, but I do believe that you could set up for online activation if desired.
 

NMG

Messages
78
Country
southafrica
Bill,

Thanks for responding. I am aware of the NullSoft installer. I have used it a few times myself.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
I use NSIS (NullSoft), which is Open Source and highly configurable using a simple scripting language. I haven't looked closely, but I do believe that you could set up for online activation if desired.
Hello Bill!
I am currently looking into NSIS. But I'm having trouble setting up the installation paths. Ideally, I want the user to choose a platform and based on the selection crawl the registry for the proper installation path and pass it to the appropriate section. But since I can define InstallDir only outside of the section, I don't know how to manually set the path. Could you please be so kind and point me in the right direction?
Regards,
Vitus
 
Messages
1,098
You can define -- or change -- your install directory at any stage, really. Here's the help file on the subject:

$INSTDIR

The installation directory ($INSTDIR is modifiable using StrCpy, ReadRegStr, ReadINIStr, etc. - This could be used, for example, in the .onInit function to do a more advanced detection of install location).


My scripts normally read the registry for the simulator locations in the '.OnInit' function stage, which is performed first. So once I know which sims are installed, I can build a form to let the user choose which one to install to. So my $INSTDIR isn't really defined until this stage.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
My scripts normally read the registry for the simulator locations in the '.OnInit' function stage, which is performed first.
Check! That part I have figured out as well. My current problem is what comes next. I don't know what page I could use to make the user select the sim. At the moment I am using MUI_PAGE_COMPONENTS but that just looks weird and I'm having trouble following up from there.

The good news is that I got the installation process down, including silent installs for directX and the runtime libraries. :wizard:
 
Messages
1,098
I use the nsDialogs plug-in for this. As with a lot of NSIS plug-ins, it's a lot more powerful than intuitive...
I also use NSIS Dialog Designer to build my forms, then just(!) tweak them for nsDialogs.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
I use the nsDialogs plug-in for this. As with a lot of NSIS plug-ins, it's a lot more powerful than intuitive...
I also use NSIS Dialog Designer to build my forms, then just(!) tweak them for nsDialogs.
I followed your advice and got it to work. I setup a dialog with radiobuttons using the Dialog Designer, linked the "OnClick" Events with a function in my main script that switches the different Sections on/off. There are still a few loose ends but the main functionality is there.

Thank you for your time, it's much appreciated!
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Here is how I set up the sim choice menus:
Code:
Function nsDialogsPage
  ; custom font definitions
  CreateFont $hCtl_TestDesigner_Font1 "Microsoft Sans Serif" "11" "700"
  CreateFont $hCtl_TestDesigner_Font2 "Microsoft Sans Serif" "10" "400"

    nsDialogs::Create 1018
    Pop $Dialog

    ${If} $Dialog == error
        Abort
    ${EndIf}
    SetCtlColors $Dialog 0x000000 0x99B4D1

    ${NSD_CreateGroupBox} 5u 0u 96.5% 80u "1) Choose Simulator Version!"
    Pop $GroupBox1
        SendMessage $GroupBox1 ${WM_SETFONT} $hCtl_TestDesigner_Font1 0
        SetCtlColors $GroupBox1 0x000000 0x99B4D1

    ${NSD_CreateRadioButton} 10u 16u 60% 10u "&FSX (Stand-Alone)"
    Pop $RadioButton1
    ${NSD_SetState} $RadioButton1 ${BST_CHECKED}
        ${NSD_AddStyle} $RadioButton1 ${WS_GROUP}
        SendMessage $RadioButton1 ${WM_SETFONT} $hCtl_TestDesigner_Font2 0

    ${NSD_CreateRadioButton} 10u 25u 60% 10u "&FSX:SE with FSX installed"
    Pop $RadioButton2
        SendMessage $RadioButton2 ${WM_SETFONT} $hCtl_TestDesigner_Font2 0

    ${NSD_CreateRadioButton} 10u 35u 60% 10u "&FSX:SE (Stand-Alone) "
    Pop $RadioButton3
        SendMessage $RadioButton3 ${WM_SETFONT} $hCtl_TestDesigner_Font2 0

    ${NSD_CreateRadioButton} 10u 44u 60% 10u "&Prepar3D v2.x"
    Pop $RadioButton4
        SendMessage $RadioButton4 ${WM_SETFONT} $hCtl_TestDesigner_Font2 0

        ${NSD_CreateRadioButton} 10u 53u 60% 10u "&Prepar3D v3.x"
    Pop $RadioButton5
        SendMessage $RadioButton5 ${WM_SETFONT} $hCtl_TestDesigner_Font2 0

        nsDialogs::Show

FunctionEnd

Function nsDialogsPageLeave

    ${NSD_GetState} $RadioButton1 $RadioButton1_State
        ${NSD_GetState} $RadioButton2 $RadioButton2_State
        ${NSD_GetState} $RadioButton3 $RadioButton3_State
        ${NSD_GetState} $RadioButton4 $RadioButton4_State
        ${NSD_GetState} $RadioButton5 $RadioButton5_State
        ${NSD_GetState} $Checkbox2 $Checkbox2_State

        ${If} $RadioButton1_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Microsoft\Microsoft Games\flight simulator\10.0" AppPath
    ${EndIf}

        ${If} $RadioButton2_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Microsoft\Microsoft Games\flight simulator - steam edition\10.0" AppPath
        ${EndIf}

        ${If} $RadioButton3_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Microsoft\Microsoft Games\flight simulator\10.0" AppPath
        ${EndIf}

        ${If} $RadioButton4_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Lockheed Martin\Prepar3D v2" AppPath
        ${EndIf}

        ${If} $RadioButton5_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Lockheed Martin\Prepar3D v3" AppPath
        ${EndIf}

FunctionEnd
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Thank you Bill!
For me it comes a bit late. I finished my script yesterday evening using Rob's solution above. I like the use of the little visual editor to place the controls on the window. My result of a few days of effort:
G75rXqo.jpg


The script grew to around 1500 lines, however since my plane is not quite finished yet, there are more files to grow the installer :rolleyes:

Thanks for your help Rob and Bill!
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
That looks quite nice. The only change I recommend is adding the option for FSX:SE (side-by-side) since there are folks who do in fact have both installed like I do. Of course my reason for having both is mostly because I need to test projects in all available sim versions, but some others just aren't quite ready to kick FSX:Box to the curb yet... :rotfl:

As for the uninstaller, I don't use the usual methods NSIS suggests (separate uninstaller), since I don't want every file installed to be uninstalled! Quite a few of the files Milviz installs are "common shared" among multiple projects (such as sound module, lighting modules, avionics modules, MVAMS, et cetera. Instead, I script only those folders and files to be removed while leaving those "common shared" files intact.

One of the most powerful features of the scripting language is the "/r" flag, making it trivial to remove an entire aircraft folder and all it's dependent sub-folders and contents in one fell swoop! :teacher:
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
I actually have provisions for FSX:SE plus the older versions of P3D in the installer. But they are disabled if the platform is not installed, hence the empty space between the options.

I use a similar method for my uninstall as well. If you install the Vega for FSX and P3Dv4 and only uninstall the FSX version, I make sure that the common resources (in this case just manuals, data files and links in the startmenu) stay intact.
 
Messages
1,098
That is looking great for a few days work! I'm not a coder, so I built my scripts over time, adding new features as I needed them. Now I have a monster which I don't understand...
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I actually have provisions for FSX:SE plus the older versions of P3D in the installer. But they are disabled if the platform is not installed, hence the empty space between the options.
After I posted, I noted the blank lines in the menu, and realized that you must have done precisely the same thing I did; if no Registry entry exists, don't display the option...

I've been trying to figure out how to dynamically place the available menu entries to eliminate the blank lines, but haven't come up with a method yet.

Ain't recursion (/r) wonderful though? :laughing:
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
I've been trying to figure out how to dynamically place the available menu entries to eliminate the blank lines, but haven't come up with a method yet.

Instead of shuffling the controls around, you could just rename them in order. It makes the "onClick"/"onChange" function a bit more complex, but it should be possible this way.
 
Messages
1,098
My not-installed entries still appear, but are greyed-out, and unselectable.

Ain't recursion (/r) wonderful though

Hmm, as installers get more complex, and the install location variable is probably built by the script, deleting *everything* is going to be risky -- there's always that chance of a support ticket saying "hey, I uninstalled your scenery, and now I've lost Aunt Gertie's favourite bolognaise recipe!":)
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Yeah, doing something along the lines of the old DOS command string: deltree C: *.* /y would be contra-indicated for sure!

No, careful use of the recursion command however does simplify the task considerably:
Code:
Section
;  PUT UNINSTALLER HERE!
${If} $Checkbox2_State == 1
  SetOutPath "$INSTDIR"
  SetOverwrite on

  SetOutPath "$INSTDIR\SimObjects\Airplanes"
  RMDir /r "$INSTDIR\SimObjects\Airplanes\Beech_Baron_B55 Milviz\*.*"
  RMDir /r "$INSTDIR\SimObjects\Airplanes\Beech_Baron_E55 Milviz\*.*"
${EndIf}
SectionEnd
 
Messages
154
Country
moldova
Hello guys!
I'm about to finish my first scenery project, and i think that would be nice to have an installer for it. I've tryed to make one with "Advanced Installer", but with no luck, as i don't know how to make it to instal some files in simulator root folder (effects for example), other files, in SODE directory (ProgramData) and finaly, scenery folder to Documents\Prepar3D v4 Add-ons.
I will higly apreciate if some of you will point me to some tutorials in order to achieve what i described above with NSIS. I hope that there is no need to be an programmer to do that. :)

Thank you in advance!!!

___
Mihai Armas
 
Top