Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:19:25+00:00 2026-06-02T02:19:25+00:00

I’m using NSIS to create prepared game servers. First I need the user to

  • 0

I’m using NSIS to create prepared game servers.

First I need the user to select the type of server (Public/Zombie/other gamemodes)

Then they will be shown list of plugins, with pictures and a description for each plugin.

Something like this:

Public plugins will be other.

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:19:26+00:00Added an answer on June 2, 2026 at 2:19 am

    It was not really clear to me if you wanted normal sections as well, having two component pages complicates things a bit but I assumed that is what you want so this example does that:

    outfile "$%temp%\sotest.exe"
    RequestExecutionLevel user
    !include MUI2.nsh
    !include nsDialogs.nsh
    !define MUI_COMPONENTSPAGE_NODESC
    !define MUI_CUSTOMFUNCTION_GUIINIT onguiinit
    !insertmacro MUI_PAGE_WELCOME
    !define MUI_PAGE_CUSTOMFUNCTION_PRE pagecbcmpnorm
    !insertmacro MUI_PAGE_COMPONENTS
    !define MUI_PAGE_CUSTOMFUNCTION_PRE pagecbcmpplugin
    !define MUI_PAGE_CUSTOMFUNCTION_SHOW pagecbcmppluginshow
    !define MUI_PAGE_CUSTOMFUNCTION_LEAVE pagecbcmppluginleave
    !insertmacro MUI_PAGE_COMPONENTS 
    !insertmacro MUI_PAGE_INSTFILES
    !insertmacro MUI_LANGUAGE "English"
    
    Section "Program Files (Required)" NSEC_BASE
    SectionIn RO
    SectionEnd
    
    Section "Help" NSEC_HELP
    SectionEnd
    
    Section "Zombie base" PSEC_BASE
    SectionIn RO
    SectionEnd
    
    Section "Super Gun" PSEC_SGUN
    SectionEnd
    
    Section "Zombie Invade" PSEC_INVADE
    SectionEnd
    
    Function onguiinit
    InitPluginsDir
    StrCpy $0 0
    ClearErrors
    loop:
        SectionGetFlags $0 $1
        IfErrors done
        SectionGetText $0 $1
        WriteIniStr "$pluginsdir\cmpnt.ini" "S" $0 $1
        IntOp $0 $0 + 1
        goto loop
    done:
    ;Init dummy plugin descriptions and images
    WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${PSEC_BASE}:txt" "Blah Blah"
    WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${PSEC_SGUN}:txt" "Bang!"
    WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${PSEC_INVADE}:txt" "Charge!!!"
    File "/oname=$pluginsdir\cmpnt_p${PSEC_BASE}.bmp" "${NSISDIR}\contrib\Graphics\Header\nsis.bmp"
    File "/oname=$pluginsdir\cmpnt_p${PSEC_SGUN}.bmp" "${NSISDIR}\contrib\Graphics\Header\orange-uninstall.bmp"
    File "/oname=$pluginsdir\cmpnt_p${PSEC_INVADE}.bmp" "${NSISDIR}\contrib\Graphics\Header\win.bmp"
    FunctionEnd
    
    
    !define FIRSTPLUGINSECIDX ${PSEC_BASE}
    !define /math LASTPLUGINSECIDX ${PSEC_INVADE} + 1
    
    Function ToggleSections
    StrCpy $0 0
    ClearErrors
    loop:
        SectionGetFlags $0 $1
        IfErrors done
        SectionSetText $0 ""
        IntOp $0 $0 + 1
        goto loop
    done:
    Pop $0
    Pop $2
    loopset:
        ReadIniStr $1 "$pluginsdir\cmpnt.ini" "S" $0
        SectionSetText $0 $1
        IntOp $0 $0 + 1
        IntCmp $0 $2 0 loopset
    FunctionEnd
    
    
    Function pagecbcmpnorm
    Push ${FIRSTPLUGINSECIDX}
    Push 0
    call ToggleSections
    FunctionEnd
    
    Function pagecbcmpplugin
    Push ${LASTPLUGINSECIDX}
    Push ${FIRSTPLUGINSECIDX}
    call ToggleSections
    FunctionEnd
    
    !define ID_TOP 0x3FF
    !define ID_TXT 0x3FE
    !define ID_IMG 0x3EE
    !define ID_LST 0x408
    Function pagecbcmppluginshow
    FindWindow $R0 "#32770" "" $HWNDPARENT
    GetDlgItem $2 $R0 ${ID_TOP}
    ShowWindow $2 0
    
    System::Call '*(i,i,i,i)i.r1'
    System::Call 'user32::GetClientRect(i $R0,ir1)'
    System::Call '*$1(i,i,i.r8,i.r7)'
    System::Free $1
    
    IntOp $8 $8 - 16 ;margin
    GetDlgItem $2 $R0 ${ID_LST}
    IntOp $6 $8 / 2
    System::Call 'user32::SetWindowPos(i$2,i0,i0,i0,ir6,ir7,i0x14)'
    
    IntOp $6 $6 + 8 ;half of margin
    GetDlgItem $2 $R0 ${ID_IMG}
    ${NSD_AddStyle} $2 ${SS_BITMAP}
    IntOp $7 $7 - 38
    System::Call 'user32::SetWindowPos(i$2,i0,ir6,i0,ir6,ir7,i0x14)'
    
    GetDlgItem $2 $R0 ${ID_TXT}
    IntOp $7 $7 + 8
    System::Call 'user32::SetWindowPos(i$2,i0,ir6,ir7,ir6,i 50,i0x14)'
    
    StrCpy $9 0 ;make sure bitmap variable is null
    StrCpy $0 ${FIRSTPLUGINSECIDX}
    call .onMouseOverSection ;force update
    FunctionEnd
    
    Function pagecbcmppluginleave
    ${NSD_FreeBitmap} $9
    StrCpy $9 0
    FunctionEnd
    
    Function .onMouseOverSection
    ReadIniStr $1 "$pluginsdir\cmpnt.ini" "PData" "$0:txt"
    FindWindow $R0 "#32770" "" $HWNDPARENT
    GetDlgItem $2 $R0 ${ID_TXT}
    SendMessage $2 ${WM_SETTEXT} 0 "STR:$1"
    GetDlgItem $2 $R0 ${ID_IMG}
    call pagecbcmppluginleave
    ${NSD_SetBitmap} $2 "$pluginsdir\cmpnt_p$0.bmp" $9
    FunctionEnd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.