;-------------------------------- ;Include ;-------------------------------- !include nsDialogs.nsh !include "Sections.nsh" !include MUI2.nsh ;-------------------------------- ;Basic Data ;-------------------------------- Name "Tweaked Chocolate" OutFile "Tweaked Chocolate Customizer.exe" InstallDir "$appdata\.minecraft\resourcepacks\" RequestExecutionLevel user ;-------------------------------- ;Design Data ;-------------------------------- ComponentText "Choose the texture options that you want to install. \ Hover over an option to see a sample of how it will look in-game." "" "Select your texture options:" BrandingText "Version 0.01" ;--------------- ;Modern UI Design Data !define MUI_ICON "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\favicon.ico" !define MUI_HEADERIMAGE !define MUI_COMPONENTSPAGE_CHECKBITMAP "C:\Program Files (x86)\NSIS\Contrib\Graphics\Checks\simple-round.bmp" !define MUI_COMPONENTSPAGE_NODESC ;-------------------------------- ;Pages ;-------------------------------- !insertmacro MUI_PAGE_COMPONENTS page directory page instfiles ;-------------------------------- ;Files ;-------------------------------- Section "Base" SectionIn RO CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\colormap\" CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\entity\" CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\gui\" CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\items\" CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\mob\" CreateDirectory "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\models\" SetOutPath "$INSTDIR\Tweaked Chocolate\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\pack.mcmeta" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\pack.png" SectionEnd ;-------------------------------- ;Configuration ;-------------------------------- SectionGroup "Minecraft Textures" ;--------------- ;Blocks SectionGroup "Blocks" ; SectionGroup "Natural - Terrain" ; SectionGroupEnd ; SectionGroup "Natural - Flora" ; SectionGroupEnd SectionGroup "Crafted - Building" SectionGroup "Wood" sec8_id Section /o "Planks - Seams" sec4_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Seams\assets\minecraft\textures\blocks\planks_birch.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Seams\assets\minecraft\textures\blocks\planks_jungle.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Seams\assets\minecraft\textures\blocks\planks_oak.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Seams\assets\minecraft\textures\blocks\planks_spruce.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Seams\assets\minecraft\textures\blocks\planks_acacia.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Seams\assets\minecraft\textures\blocks\planks_big_oak.png" SectionEnd Section /o "Planks - Smooth" sec5_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Smooth\assets\minecraft\textures\blocks\planks_birch.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Smooth\assets\minecraft\textures\blocks\planks_jungle.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Smooth\assets\minecraft\textures\blocks\planks_oak.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Smooth\assets\minecraft\textures\blocks\planks_spruce.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Smooth\assets\minecraft\textures\blocks\planks_acacia.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Wood\Wood\Smooth\assets\minecraft\textures\blocks\planks_big_oak.png" SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\entity\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\1.6.2.0\Minecraft Textures\Blocks\Wood\Wood\Smooth Wood\assets\minecraft\textures\entity\boat.png" SectionEnd SectionGroupEnd SectionGroup "Bricks" Section /o "Clay Brick - Large" sec1_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Bricks\Clay Brick\Big Brick\assets\minecraft\textures\blocks\brick.png" SectionEnd Section /o "Nether Brick - Large" sec2_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Bricks\Nether Brick\Big Brick [Recommended]\assets\minecraft\textures\blocks\nether_brick.png" SectionEnd Section /o "Stone Brick - Small" sec3_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Bricks\Stone Brick\Small Brick\assets\minecraft\textures\blocks\stonebrick.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Bricks\Stone Brick\Small Brick\assets\minecraft\textures\blocks\stonebrick_cracked.png" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Bricks\Stone Brick\Small Brick\assets\minecraft\textures\blocks\stonebrick_mossy.png" SectionEnd SectionGroupEnd SectionGroup "Glass" Section /o "Glass - Clear" sec6_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Glass\Clear\assets\minecraft\textures\blocks\glass.png" SectionEnd Section /o "Glass - Borderless" sec7_id SetOutPath "$INSTDIR\Tweaked Chocolate\assets\minecraft\textures\blocks\" File "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Minecraft Textures\Blocks\Building\Glass\No Border\textures\blocks\glass.png" SectionEnd SectionGroupEnd SectionGroupEnd ; SectionGroup "Crafted - Functional" ; SectionGroupEnd ; SectionGroup "Crafted - Decoration" ; SectionGroupEnd SectionGroupEnd ;--------------- ;Items ; SectionGroup "Items" ; SectionGroup "Tools" ; SectionGroup "Pickaxes" ; SectionGroupEnd ; SectionGroup "Axes" ; SectionGroupEnd ; SectionGroup "Shovels" ; SectionGroupEnd ; SectionGroup "Weaponry" ; SectionGroupEnd ; SectionGroup "Other" ; SectionGroupEnd ; SectionGroupEnd ; SectionGroup "Armor" ; SectionGroupEnd ; SectionGroup "Processed Ores" ; SectionGroupEnd ; SectionGroup "Supplies" ; SectionGroupEnd ; SectionGroup "Food" ; SectionGroupEnd ; SectionGroup "Misc" ; SectionGroupEnd ; SectionGroupEnd ;--------------- ;Entities ; SectionGroup "Entities" ; SectionGroupEnd SectionGroupEnd ;--------------- ;MCPatcher Support ;--------------- ;Mod Support ;--------------- ;Retro Textures ;-------------------------------- ;Functions ;-------------------------------- #This function displays an image of the component that is currently being hovered over. #If a component isn't being hovered over or the image isn't found for a component, the default image will be displayed. #It uses the branding image for display purposes. Function .onMouseOverSection SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\unknown.bmp" FindWindow $R0 "#32770" "" $HWNDPARENT GetDlgItem $R0 $R0 1043 StrCmp $0 ${sec1_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\brickRender.bmp" StrCmp $0 ${sec2_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\netherBrickRender.bmp" StrCmp $0 ${sec3_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\stoneBrickRender.bmp" StrCmp $0 ${sec4_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\woodRender.bmp" StrCmp $0 ${sec5_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\smoothWoodRender.bmp" StrCmp $0 ${sec6_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\smoothGlassRender.bmp" StrCmp $0 ${sec7_id} "" +2 SetBrandingImage "C:\Users\Joseph\Texture Packs\Tweaked Chocolate\Installer\Block Renders\borderlessGlassRender.bmp" FunctionEnd #For radio groups #Not my code !macro RadioGroupOrNone_SelChange gid sidf sidl Push $0 Push $1 Push $2 Push $3 Var /GLOBAL RGON_${gid}_SID StrCpy $2 0 ${For} $1 ${sidf} ${sidl} ${If} ${SectionIsSelected} $1 IntOp $2 $2 + 1 ${EndIf} ${Next} ${IfThen} $2 U< 2 ${|} StrCpy $RGON_${gid}_SID 0 ${|} StrCpy $2 0 StrCpy $3 0 ${For} $1 ${sidf} ${sidl} ${If} ${SectionIsSelected} $1 ${If} $RGON_${gid}_SID = $1 SectionGetFlags $1 $0 IntOp $0 $0 & ${SECTION_OFF} SectionSetFlags $1 $0 ${Else} IntOp $2 $2 + 1 StrCpy $3 $1 ${EndIf} ${EndIf} ${Next} StrCpy $RGON_${gid}_SID $3 ${If} $2 U> 1 SectionGetFlags ${gid} $0 IntOp $0 $0 & ${SECTION_OFF} SectionSetFlags ${gid} $0 StrCpy $RGON_${gid}_SID 0 ${EndIf} Pop $3 Pop $2 Pop $1 Pop $0 !macroend Function .onSelChange !insertmacro RadioGroupOrNone_SelChange ${sec8_id} ${sec4_id} ${sec5_id} FunctionEnd