Skip to content

Commit

Permalink
Add support to the new --scan-profiles option (GUI).
Browse files Browse the repository at this point in the history
This commit closes #2609.

Conflicts:
	NSIS/FusionInventory-Agent/Contrib/ModernUI2/Pages/MiscelaneousOptionsPage.nsh
	NSIS/FusionInventory-Agent/Contrib/ModernUI2/Pages/Templates/MiscelaneousOptionsPage.nsddef
	NSIS/FusionInventory-Agent/Contrib/ModernUI2/Pages/Templates/MiscelaneousOptionsPage.nsdinc
  • Loading branch information
tabad committed Aug 2, 2014
1 parent 21a5aff commit b14db9d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

/*
------------------------------------------------------------------------
This file was generated with the help of NSISDialogDesigner 1.1.2.0
This file was generated with the help of NSISDialogDesigner 1.2.0.0
http://coolsoft.altervista.org/nsisdialogdesigner
------------------------------------------------------------------------
*/
Expand All @@ -64,6 +64,7 @@ Var hCtl_MiscelaneousOptionsPage_GroupBox1
Var hCtl_MiscelaneousOptionsPage_CheckBox1
Var hCtl_MiscelaneousOptionsPage_CheckBox2
Var hCtl_MiscelaneousOptionsPage_CheckBox3
Var hCtl_MiscelaneousOptionsPage_CheckBox4
Var hCtl_MiscelaneousOptionsPage_Label1
Var hCtl_MiscelaneousOptionsPage_TextBox1

Expand All @@ -86,27 +87,31 @@ Function MiscelaneousOptionsPage_Create
!insertmacro MUI_HEADER_TEXT "$(MiscelaneousOptionsPage_Text)" "$(MiscelaneousOptionsPage_SubText)"

; === GroupBox1 (type: GroupBox) ===
${NSD_CreateGroupBox} 28u 18u 242u 92u "$(MiscelaneousOptionsPage_GroupBox1_Text)"
${NSD_CreateGroupBox} 28.3u 9.85u 242.89u 113.23u "$(MiscelaneousOptionsPage_GroupBox1_Text)"
Pop $hCtl_MiscelaneousOptionsPage_GroupBox1

; === CheckBox1 (type: Checkbox) ===
${NSD_CreateCheckbox} 39u 35u 218u 11u "$(MiscelaneousOptionsPage_CheckBox1_Text)"
${NSD_CreateCheckbox} 38.84u 25.85u 218.53u 12.31u "$(MiscelaneousOptionsPage_CheckBox1_Text)"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox1

; === CheckBox2 (type: Checkbox) ===
${NSD_CreateCheckbox} 39u 50u 218u 11u "$(MiscelaneousOptionsPage_CheckBox2_Text)"
${NSD_CreateCheckbox} 38.84u 41.85u 218.53u 12.31u "$(MiscelaneousOptionsPage_CheckBox2_Text)"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox2

; === CheckBox3 (type: Checkbox) ===
${NSD_CreateCheckbox} 39u 64u 218u 11u "$(MiscelaneousOptionsPage_CheckBox3_Text)"
${NSD_CreateCheckbox} 38.84u 57.85u 218.53u 12.31u "$(MiscelaneousOptionsPage_CheckBox3_Text)"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox3

; === CheckBox4 (type: Checkbox) ===
${NSD_CreateCheckbox} 38.84u 73.85u 218.53u 12.31u "$(MiscelaneousOptionsPage_CheckBox4_Text)"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox4

; === Label1 (type: Label) ===
${NSD_CreateLabel} 41u 79u 215u 8u "$(MiscelaneousOptionsPage_Label1_Text)"
${NSD_CreateLabel} 41.47u 88.62u 215.9u 9.23u "$(MiscelaneousOptionsPage_Label1_Text)"
Pop $hCtl_MiscelaneousOptionsPage_Label1

; === TextBox1 (type: Text) ===
${NSD_CreateText} 39u 88u 218u 11u ""
${NSD_CreateText} 38.84u 98.46u 218.53u 12.31u ""
Pop $hCtl_MiscelaneousOptionsPage_TextBox1

; OnBack Function
Expand Down Expand Up @@ -143,6 +148,14 @@ Function MiscelaneousOptionsPage_Create
${NSD_Uncheck} $hCtl_MiscelaneousOptionsPage_CheckBox3
${EndIf}

; Set CheckBox4 Check
${ReadINIOption} $R1 "$R0" "${IO_SCAN-PROFILES}"
${If} "$R1" != "0"
${NSD_Check} $hCtl_MiscelaneousOptionsPage_CheckBox4
${Else}
${NSD_Uncheck} $hCtl_MiscelaneousOptionsPage_CheckBox4
${EndIf}

; Set TextBox1 Text
${ReadINIOption} $R1 "$R0" "${IO_TAG}"
${NSD_SetText} $hCtl_MiscelaneousOptionsPage_TextBox1 "$R1"
Expand Down Expand Up @@ -189,6 +202,14 @@ Function MiscelaneousOptionsPage_Leave
${WriteINIOption} "$R0" "${IO_SCAN-HOMEDIRS}" "0"
${EndIf}

; Save CheckBox4 Check
${NSD_GetState} $hCtl_MiscelaneousOptionsPage_CheckBox4 $R2
${If} $R2 = ${BST_CHECKED}
${WriteINIOption} "$R0" "${IO_SCAN-PROFILES}" "1"
${Else}
${WriteINIOption} "$R0" "${IO_SCAN-PROFILES}" "0"
${EndIf}

; Save TextBox1 Text
${NSD_GetText} $hCtl_MiscelaneousOptionsPage_TextBox1 $R2
${Trim} "$R2" $R2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ LangString MiscelaneousOptionsPage_CheckBox3_Text ${LANG_ENGLISH} "Scan home dir
LangString MiscelaneousOptionsPage_CheckBox3_Text ${LANG_FRENCH} "Rechercher les machines virtuelles dans les dossiers personnels"
LangString MiscelaneousOptionsPage_CheckBox3_Text ${LANG_SPANISH} "Buscar máquinas virtuales en el directorio personal"

; MiscelaneousOptionsPage_CheckBox4_Text
LangString MiscelaneousOptionsPage_CheckBox4_Text ${LANG_ENGLISH} "Scan user profiles for software"
LangString MiscelaneousOptionsPage_CheckBox4_Text ${LANG_FRENCH} "Recherche de logiciels dans les profils utilisateurs"
LangString MiscelaneousOptionsPage_CheckBox4_Text ${LANG_SPANISH} "Buscar software en perfiles de usuario"

; MiscelaneousOptionsPage_Label1_Text
LangString MiscelaneousOptionsPage_Label1_Text ${LANG_ENGLISH} "Tag"
LangString MiscelaneousOptionsPage_Label1_Text ${LANG_FRENCH} "Tag"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was created by NSISDialogDesigner 1.1.2.0
This file was created by NSISDialogDesigner 1.2.0.0
http://coolsoft.altervista.org/nsisdialogdesigner
Do not edit manually!
-->
<Dialog Name="MiscelaneousOptionsPage" Title="Dialog title..." Subtitle="Dialog subtitle..." Style="none" ExStyle="none">
<GroupBox Name="GroupBox1" Location="43, 32" Size="369, 164" Text="Miscelaneous options" TabIndex="0" Style="none" ExStyle="none">
<CheckBox Name="CheckBox1" Location="16, 30" Size="332, 20" Text="Create Start Menu for all users" TabIndex="0" Style="none" ExStyle="none" />
<CheckBox Name="CheckBox2" Location="16, 56" Size="332, 20" Text="Launch an inventory immediately after of installation" TabIndex="1" Style="none" ExStyle="none" />
<CheckBox Name="CheckBox3" Location="16, 82" Size="332, 20" Text="Scan home directory for virtual machines" TabIndex="2" Style="none" ExStyle="none" />
<Label Name="Label1" Location="20, 108" Size="328, 15" Text="Tag" TabIndex="3" Style="none" ExStyle="none" />
<TextBox Name="TextBox1" Location="16, 124" Size="332, 20" TabIndex="4" Style="none" ExStyle="none" />
<GroupBox Name="GroupBox1" Location="43, 16" Size="369, 184" Text="Miscelaneous options" TabIndex="0" Style="none" ExStyle="none">
<CheckBox Name="CheckBox1" Location="16, 26" Size="332, 20" Text="Create Start Menu for all users" TabIndex="0" Style="none" ExStyle="none" />
<CheckBox Name="CheckBox2" Location="16, 52" Size="332, 20" Text="Launch an inventory immediately after of installation" TabIndex="1" Style="none" ExStyle="none" />
<CheckBox Name="CheckBox3" Location="16, 78" Size="332, 20" Text="Scan home directory for virtual machines" TabIndex="2" Style="none" ExStyle="none" />
<CheckBox Name="CheckBox4" Location="16, 104" Size="332, 20" Text="Scan user profiles for software" TabIndex="3" Style="none" ExStyle="none" />
<Label Name="Label1" Location="20, 128" Size="328, 15" Text="Tag" TabIndex="4" Style="none" ExStyle="none" />
<TextBox Name="TextBox1" Location="16, 144" Size="332, 20" TabIndex="5" Style="none" ExStyle="none" />
</GroupBox>
</Dialog>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; ========================================================
; This file was generated by NSISDialogDesigner 1.1.2.0
; This file was generated by NSISDialogDesigner 1.2.0.0
; http://coolsoft.altervista.org/nsisdialogdesigner
; ========================================================

Expand All @@ -9,6 +9,7 @@ Var hCtl_MiscelaneousOptionsPage_GroupBox1
Var hCtl_MiscelaneousOptionsPage_CheckBox1
Var hCtl_MiscelaneousOptionsPage_CheckBox2
Var hCtl_MiscelaneousOptionsPage_CheckBox3
Var hCtl_MiscelaneousOptionsPage_CheckBox4
Var hCtl_MiscelaneousOptionsPage_Label1
Var hCtl_MiscelaneousOptionsPage_TextBox1

Expand All @@ -25,27 +26,31 @@ Function fnc_MiscelaneousOptionsPage_Create
!insertmacro MUI_HEADER_TEXT "Dialog title..." "Dialog subtitle..."

; === GroupBox1 (type: GroupBox) ===
${NSD_CreateGroupBox} 28u 18u 242u 92u "Miscelaneous options"
${NSD_CreateGroupBox} 28.3u 9.85u 242.89u 113.23u "Miscelaneous options"
Pop $hCtl_MiscelaneousOptionsPage_GroupBox1

; === CheckBox1 (type: Checkbox) ===
${NSD_CreateCheckbox} 39u 35u 218u 11u "Create Start Menu for all users"
${NSD_CreateCheckbox} 38.84u 25.85u 218.53u 12.31u "Create Start Menu for all users"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox1

; === CheckBox2 (type: Checkbox) ===
${NSD_CreateCheckbox} 39u 50u 218u 11u "Launch an inventory immediately after of installation"
${NSD_CreateCheckbox} 38.84u 41.85u 218.53u 12.31u "Launch an inventory immediately after of installation"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox2

; === CheckBox3 (type: Checkbox) ===
${NSD_CreateCheckbox} 39u 64u 218u 11u "Scan home directory for virtual machines"
${NSD_CreateCheckbox} 38.84u 57.85u 218.53u 12.31u "Scan home directory for virtual machines"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox3

; === CheckBox4 (type: Checkbox) ===
${NSD_CreateCheckbox} 38.84u 73.85u 218.53u 12.31u "Scan user profiles for software"
Pop $hCtl_MiscelaneousOptionsPage_CheckBox4

; === Label1 (type: Label) ===
${NSD_CreateLabel} 41u 79u 215u 8u "Tag"
${NSD_CreateLabel} 41.47u 88.62u 215.9u 9.23u "Tag"
Pop $hCtl_MiscelaneousOptionsPage_Label1

; === TextBox1 (type: Text) ===
${NSD_CreateText} 39u 88u 218u 11u ""
${NSD_CreateText} 38.84u 98.46u 218.53u 12.31u ""
Pop $hCtl_MiscelaneousOptionsPage_TextBox1

FunctionEnd
Expand Down

0 comments on commit b14db9d

Please sign in to comment.