From 4b451a42a3d056cbdbee6e8e4ec7d2907da0c4f4 Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Wed, 7 Feb 2018 19:22:34 +0300 Subject: [PATCH] IDEA-185688 Groovy association item is not displayed correctly --- build/conf/nsis/idea.nsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/build/conf/nsis/idea.nsi b/build/conf/nsis/idea.nsi index ee89bc5d8cea..f1ac1b251d68 100644 --- a/build/conf/nsis/idea.nsi +++ b/build/conf/nsis/idea.nsi @@ -357,12 +357,35 @@ custom_pre_actions: SetRegView 32 StrCmp "${ASSOCIATION}" "NoAssociation" skip_association StrCpy $R0 ${INSTALL_OPTION_ELEMENTS} + ; start position for association checkboxes + StrCpy $R1 0 + ; space between checkboxes + StrCpy $R3 5 + ; space for one symbol + StrCpy $R5 4 push "${ASSOCIATION}" loop: + ; get an association from list of associations call SplitStr Pop $0 StrCmp $0 "" done + ; get length of an association text + StrLen $R4 $0 + IntOp $R4 $R4 * $R5 + IntOp $R4 $R4 + 20 + ; increase field number IntOp $R0 $R0 + 1 + StrCmp $R1 0 first_association 0 + ; calculate start position for next checkbox of an association using end of previous one. + IntOp $R1 $R1 + $R3 + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field $R0" "Left" "$R1" + Goto calculate_shift +first_association: + !insertmacro INSTALLOPTIONS_READ $R2 "Desktop.ini" "Field $R0" "Left" + StrCpy $R1 $R2 +calculate_shift: + IntOp $R1 $R1 + $R4 + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field $R0" "Right" "$R1" !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field $R0" "Text" "$0" goto loop skip_association: