Author Topic: Windows Installer scripts - Query full or customise and inconsistencies  (Read 1244 times)

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 153
I have been working on the NSIS installation script this week and have created a working ISS script as there are some things that work better with one than the other.

The ISS script does a full install and this morning I started working on the install type (minimum, standard, full and custom) and the custom component options and found that the existing installer has a bunch of what I think are inconsistencies in that it:
    1) Installs all of the scripts, wizards and templates
    2) Installs the lexers based on the components based on the user selection

This sounds okay until you look and there are languages/scripts that span both 1) scripts and/or wizards and/or templates and also 2) lexers , SO this bring's up the question why does the installer not include the scripts and/or wizards and/or templates when you select/deselect the lexer that they potentially relate to.

A good example is fortran as follows:

Always installed:
     compiler_pgifortran.xml
     compilerGNUFortran.cpp
     fortran wizard


NSIS Script:
            Section "Fortran"
                SectionIn 1 4
                SetOutPath $INSTDIR${CB_LEXERS}
                SetOverwrite on
                File ${CB_BASE}${CB_LEXERS}\lexer_f77.sample
                File ${CB_BASE}${CB_LEXERS}\lexer_f77.xml
                File ${CB_BASE}${CB_LEXERS}\lexer_fortran.sample
                File ${CB_BASE}${CB_LEXERS}\lexer_fortran.xml
                WriteRegStr HKCU "${REGKEY}\Components" "Fortran" 1
            SectionEnd

    Section "Fortran Project plugin" SEC_FORTRANPROJECT
        SectionIn 1
        SetOutPath $INSTDIR${CB_SHARE_CB}
        SetOverwrite on
        File ${CB_BASE}${CB_SHARE_CB}\FortranProject.zip
        SetOutPath $INSTDIR${CB_PLUGINS}
        File ${CB_BASE}${CB_PLUGINS}\FortranProject.dll
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject
        File ${CB_BASE}${CB_IMAGES}\fortranproject\*.dem
        File ${CB_BASE}${CB_IMAGES}\fortranproject\*.f90
        File ${CB_BASE}${CB_IMAGES}\fortranproject\*.py
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\16x16
        File ${CB_BASE}${CB_IMAGES}\fortranproject\16x16\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\20x20
        File ${CB_BASE}${CB_IMAGES}\fortranproject\20x20\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\24x24
        File ${CB_BASE}${CB_IMAGES}\fortranproject\24x24\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\28x28
        File ${CB_BASE}${CB_IMAGES}\fortranproject\28x28\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\32x32
        File ${CB_BASE}${CB_IMAGES}\fortranproject\32x32\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\40x40
        File ${CB_BASE}${CB_IMAGES}\fortranproject\40x40\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\48x48
        File ${CB_BASE}${CB_IMAGES}\fortranproject\48x48\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\56x56
        File ${CB_BASE}${CB_IMAGES}\fortranproject\56x56\*.png
        SetOutPath $INSTDIR${CB_IMAGES}\fortranproject\64x64
        File ${CB_BASE}${CB_IMAGES}\fortranproject\64x64\*.png
        WriteRegStr HKCU "${REGKEY}\Components" "Fortran Project plugin" 1
    SectionEnd


If you get this far then this brings up the following questions:
a) Does anyone use the component selection?
b) Does anyone use the minimum, standard or full selection?
c) To make the installer a great deal simpler and easier to maintain/understand/read is it okay to remove the selection and component options and always do a full install?

NOTE: Full does not include MingW in the context of this post /thread.