NSIS Wiki:Sandbox: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
(29 intermediate revisions by 15 users not shown)
Line 1: Line 1:
http://forums.relicnews.com/member.php?u=171545 buy viagra,
This is where test stuff should be posted, if you don't know how things appear, or want to test if something works which can't be seen by just previewing the page.
http://www.l2guru.com/forum/member.php?u=56414 buy viagra,
 
http://www.offspring.com/forums/member.php?u=24022 buy viagra,
Right now, there is nothing being done to this page regularly to delete contents. Maybe a bot or the server will be used for the task, but nothing is sure.
http://forums.epicgames.com/member.php?u=1355785 buy viagra,
 
http://www.gigposters.com/forums/members/negigas.html buy viagra,
Keep the page content below this note.
http://www.konaworld.com/owners_area/index.php?showuser=10209 buy viagra,
 
http://www.rc411.com/forum/member.php?u=35600 buy viagra,
<hr />
http://www.planetphotoshop.com/forum/member.php?u=9085 buy viagra,
<!-- keep the note above intact and put the page content right below -->
http://www.hostmonsterforum.com/member.php?u=9301 buy viagra,
 
http://www.scam.com/member.php?u=120751 buy viagra,
This is only a test.
http://www.kinofilm.org.uk/bulletin-board/member.php?u=397 buy viagra,
 
http://forum.openx.org/index.php?showuser=26391 buy viagra,
test captcha
http://www.hairmaxforum.com/forum/member.php?u=16395 buy viagra,
 
http://forums.sixapart.com/index.php?showuser=56220 buy viagra,
 
http://www.automotiveforums.com/vbulletin/member.php?u=606241 buy viagra,
The quick brown fox jumps over the lazy dog.
http://workgroups.mchtraining.net/member.php?u=5726 buy viagra,
 
http://www.kapanlagi.com/clubbing/member.php?u=40011 buy viagra,
<span id="anchor_name"></span>
http://jollyroger.com/greatbooksforums/member.php?u=25995 buy viagra,
== Some long complicated title that no one would want to refer to directly ==
http://www.consoleheroes.com/forums/member.php?u=1337 buy viagra,
 
http://forums.devilmaycry.org/member.php?u=22406 buy viagra,
LIBRARY SYSTEM OF THE FISHER VALLEY
http://www.spurstalk.com/forums/member.php?u=15733 buy viagra,
kjnb/'/l,m'l'lk
 
<code>
!include "MUI2.nsh"  # change this to !include MUI.nsh to see how the code works successfully for MUI1
 
; Local bitmap path.
!define BITMAP_FILE res.bmp
 
; --------------------------------------------------------------------------------------------------
; Installer Settings
; --------------------------------------------------------------------------------------------------
Name "Background Bitmap"
OutFile "bgbitmap.exe"
ShowInstDetails show
; !define MUI_HEADERIMAGE #  this is responsible for the big window
; !define MUI_UI_HEADERIMAGE ".\dimm_beta_img.exe" # modded exe
; --------------------------------------------------------------------------------------------------
; Modern UI Settings
; --------------------------------------------------------------------------------------------------
!define MUI_COMPONENTSPAGE_NODESC
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_CUSTOMFUNCTION_GUIINIT MyGUIInit
 
; --------------------------------------------------------------------------------------------------
; Definitions
; --------------------------------------------------------------------------------------------------
!ifndef LR_LOADFROMFILE
    !define LR_LOADFROMFILE    0x0010
!endif
!ifndef LR_CREATEDIBSECTION
    !define LR_CREATEDIBSECTION 0x2000
!endif
!ifndef IMAGE_BITMAP
    !define IMAGE_BITMAP        0
!endif
!ifndef SS_BITMAP
    !define SS_BITMAP          0x0000000E
!endif
!ifndef WS_CHILD
    !define WS_CHILD            0x40000000
!endif
!ifndef WS_VISIBLE
    !define WS_VISIBLE          0x10000000
!endif
!define HWND_TOP            0
!define SWP_NOSIZE          0x0001
!define SWP_NOMOVE          0x0002
!define IDC_BITMAP          1500
!define stRECT "(i, i, i, i) i"
Var hBitmap
 
; --------------------------------------------------------------------------------------------------
; Pages
; --------------------------------------------------------------------------------------------------
!define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePageShow
!insertmacro MUI_PAGE_WELCOME
 
!insertmacro MUI_LANGUAGE English
 
; --------------------------------------------------------------------------------------------------
; Macros
; --------------------------------------------------------------------------------------------------
; Destroy a window.
!macro DestroyWindow HWND IDC
    GetDlgItem $R0 ${HWND} ${IDC}
    System::Call `user32::DestroyWindow(i R0)`
!macroend
 
; Give window transparent background.
!macro SetTransparent HWND IDC
    GetDlgItem $R0 ${HWND} ${IDC}
    SetCtlColors $R0 0x444444 transparent
!macroend
 
; Refresh window.
!macro RefreshWindow HWND IDC
    GetDlgItem $R0 ${HWND} ${IDC}
    ShowWindow $R0 ${SW_HIDE}
    ShowWindow $R0 ${SW_SHOW}
!macroend
 
; --------------------------------------------------------------------------------------------------
; Functions
; --------------------------------------------------------------------------------------------------
Function MyGUIInit
    ; Extract bitmap image.
    InitPluginsDir
    ReserveFile `${BITMAP_FILE}`
    File `/ONAME=$PLUGINSDIR\res.bmp` `${BITMAP_FILE}`
    ; Get the size of the window.
    System::Call `*${stRECT} .R0`
    System::Call `user32::GetClientRect(i $HWNDPARENT, i R0)`
    System::Call `*$R0${stRECT} (, , .R1, .R2)`
    System::Free $R0
    ; Create bitmap control.
    System::Call `kernel32::GetModuleHandle(i 0) i.R3`
    System::Call `user32::CreateWindowEx(i 0, t "STATIC", t "", i ${SS_BITMAP}|${WS_CHILD}|${WS_VISIBLE}, i 0, i 0, i R1, i R2, i $HWNDPARENT, i ${IDC_BITMAP}, i R3, i 0) i.R1`
    System::Call `user32::SetWindowPos(i R1, i ${HWND_TOP}, i 0, i 0, i 0, i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE})`
    ; Set the bitmap.
    System::Call `user32::LoadImage(i 0, t "$PLUGINSDIR\res.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) i.s`
    Pop $hBitmap
    SendMessage $R1 ${STM_SETIMAGE} ${IMAGE_BITMAP} $hBitmap
    ; Set transparent backgrounds.
    !insertmacro SetTransparent $HWNDPARENT 3
    !insertmacro SetTransparent $HWNDPARENT 1
    !insertmacro SetTransparent $HWNDPARENT 2
    !insertmacro SetTransparent $HWNDPARENT 1034
    !insertmacro SetTransparent $HWNDPARENT 1037
    !insertmacro SetTransparent $HWNDPARENT 1038
    !insertmacro SetTransparent $HWNDPARENT 1028
    !insertmacro SetTransparent $HWNDPARENT 1256
    ; !insertmacro SetTransparent $HWNDPARENT 1045
    !insertmacro SetTransparent $HWNDPARENT 1035
    ; Remove unwanted controls.
    !insertmacro DestroyWindow  $HWNDPARENT 1256
    !insertmacro DestroyWindow  $HWNDPARENT 1028
    ; !insertmacro DestroyWindow  $HWNDPARENT 1039
    !insertmacro DestroyWindow  $HWNDPARENT 1045    # dimm remove line from bottom
    ; !insertmacro DestroyWindow  $HWNDPARENT 1035
    ; !insertmacro DestroyWindow  $HWNDPARENT 1256
FunctionEnd
 
 
Function RefreshParentControls
    !insertmacro RefreshWindow  $HWNDPARENT 1037
    !insertmacro RefreshWindow  $HWNDPARENT 1038
FunctionEnd
 
Function WelcomePageShow
      # Sets background image
    System::Call `user32::LoadImage(i 0, t "$PLUGINSDIR\res.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) i.s`
    Pop $hBitmap
    ; SendMessage $bitmapWindow ${STM_SETIMAGE} ${IMAGE_BITMAP} $hBitmap
      # Start solution
    SetCtlColors $mui.WelcomePage ${CTRL_COLOUR} transparent
    SetCtlColors $mui.WelcomePage.text ${CTRL_COLOUR} transparent
    SetCtlColors $mui.WelcomePage.title 0x333333 transparent
    !insertmacro DestroyWindow  $HWNDPARENT 1037
    !insertmacro DestroyWindow  $HWNDPARENT 1038
    !insertmacro DestroyWindow  $HWNDPARENT 1036
    SetCtlColors $0 222425 transparent
    System::Call `user32::DestroyWindow(i $mui.WelcomePage.Image)`
 
    Call RefreshParentControls
FunctionEnd
    ; BrandingText ""
 
; Free loaded resources.
Function .onGUIEnd
    ; Destroy the bitmap.
    System::Call `gdi32::DeleteObject(i s)` $hBitmap
FunctionEnd
 
; --------------------------------------------------------------------------------------------------
; Dummy section
; --------------------------------------------------------------------------------------------------
Section "Dummy Section"
SectionEnd
 
</code>
 
==CSS==
 
<code>O01lI</code><hr>
<code style="font-family: monospace;">O01lI</code><hr>
<code style="font-family: monospace,monospace;">O01lI</code><hr>
<code style="font-family: monospace,serif;">O01lI</code><hr>
<pre>O01lI</pre><hr>
<pre style="font-family: monospace;">O01lI</pre><hr>
<pre style="font-family: monospace,monospace;">O01lI</pre><hr>
<pre style="font-family: monospace,serif;">O01lI</pre><hr>

Latest revision as of 17:15, 15 April 2023

This is where test stuff should be posted, if you don't know how things appear, or want to test if something works which can't be seen by just previewing the page.

Right now, there is nothing being done to this page regularly to delete contents. Maybe a bot or the server will be used for the task, but nothing is sure.

Keep the page content below this note.


This is only a test.

test captcha


The quick brown fox jumps over the lazy dog.

Some long complicated title that no one would want to refer to directly

LIBRARY SYSTEM OF THE FISHER VALLEY kjnb/'/l,m'l'lk

!include "MUI2.nsh" # change this to !include MUI.nsh to see how the code works successfully for MUI1


Local bitmap path.

!define BITMAP_FILE res.bmp

--------------------------------------------------------------------------------------------------
Installer Settings
--------------------------------------------------------------------------------------------------

Name "Background Bitmap" OutFile "bgbitmap.exe" ShowInstDetails show

!define MUI_HEADERIMAGE # this is responsible for the big window
!define MUI_UI_HEADERIMAGE ".\dimm_beta_img.exe" # modded exe
--------------------------------------------------------------------------------------------------
Modern UI Settings
--------------------------------------------------------------------------------------------------

!define MUI_COMPONENTSPAGE_NODESC !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_CUSTOMFUNCTION_GUIINIT MyGUIInit

--------------------------------------------------------------------------------------------------
Definitions
--------------------------------------------------------------------------------------------------

!ifndef LR_LOADFROMFILE

   !define LR_LOADFROMFILE     0x0010

!endif !ifndef LR_CREATEDIBSECTION

   !define LR_CREATEDIBSECTION 0x2000

!endif !ifndef IMAGE_BITMAP

   !define IMAGE_BITMAP        0

!endif !ifndef SS_BITMAP

   !define SS_BITMAP           0x0000000E

!endif !ifndef WS_CHILD

   !define WS_CHILD            0x40000000

!endif !ifndef WS_VISIBLE

   !define WS_VISIBLE          0x10000000

!endif !define HWND_TOP 0 !define SWP_NOSIZE 0x0001 !define SWP_NOMOVE 0x0002 !define IDC_BITMAP 1500 !define stRECT "(i, i, i, i) i" Var hBitmap

--------------------------------------------------------------------------------------------------
Pages
--------------------------------------------------------------------------------------------------

!define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePageShow !insertmacro MUI_PAGE_WELCOME

!insertmacro MUI_LANGUAGE English

--------------------------------------------------------------------------------------------------
Macros
--------------------------------------------------------------------------------------------------
Destroy a window.

!macro DestroyWindow HWND IDC

   GetDlgItem $R0 ${HWND} ${IDC}
   System::Call `user32::DestroyWindow(i R0)`

!macroend

Give window transparent background.

!macro SetTransparent HWND IDC

   GetDlgItem $R0 ${HWND} ${IDC}
   SetCtlColors $R0 0x444444 transparent

!macroend

Refresh window.

!macro RefreshWindow HWND IDC

   GetDlgItem $R0 ${HWND} ${IDC}
   ShowWindow $R0 ${SW_HIDE}
   ShowWindow $R0 ${SW_SHOW}

!macroend

--------------------------------------------------------------------------------------------------
Functions
--------------------------------------------------------------------------------------------------

Function MyGUIInit

   ; Extract bitmap image.
   InitPluginsDir
   ReserveFile `${BITMAP_FILE}`
   File `/ONAME=$PLUGINSDIR\res.bmp` `${BITMAP_FILE}`
   ; Get the size of the window.
   System::Call `*${stRECT} .R0`
   System::Call `user32::GetClientRect(i $HWNDPARENT, i R0)`
   System::Call `*$R0${stRECT} (, , .R1, .R2)`
   System::Free $R0
   ; Create bitmap control.
   System::Call `kernel32::GetModuleHandle(i 0) i.R3`
   System::Call `user32::CreateWindowEx(i 0, t "STATIC", t "", i ${SS_BITMAP}|${WS_CHILD}|${WS_VISIBLE}, i 0, i 0, i R1, i R2, i $HWNDPARENT, i ${IDC_BITMAP}, i R3, i 0) i.R1`
   System::Call `user32::SetWindowPos(i R1, i ${HWND_TOP}, i 0, i 0, i 0, i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE})`
   ; Set the bitmap.
   System::Call `user32::LoadImage(i 0, t "$PLUGINSDIR\res.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) i.s`
   Pop $hBitmap
   SendMessage $R1 ${STM_SETIMAGE} ${IMAGE_BITMAP} $hBitmap
   ; Set transparent backgrounds.
   !insertmacro SetTransparent $HWNDPARENT 3
   !insertmacro SetTransparent $HWNDPARENT 1
   !insertmacro SetTransparent $HWNDPARENT 2
   !insertmacro SetTransparent $HWNDPARENT 1034
   !insertmacro SetTransparent $HWNDPARENT 1037
   !insertmacro SetTransparent $HWNDPARENT 1038
   !insertmacro SetTransparent $HWNDPARENT 1028
   !insertmacro SetTransparent $HWNDPARENT 1256
   ; !insertmacro SetTransparent $HWNDPARENT 1045
   !insertmacro SetTransparent $HWNDPARENT 1035
   ; Remove unwanted controls.
   !insertmacro DestroyWindow  $HWNDPARENT 1256
   !insertmacro DestroyWindow  $HWNDPARENT 1028
   ; !insertmacro DestroyWindow  $HWNDPARENT 1039 
   !insertmacro DestroyWindow  $HWNDPARENT 1045     # dimm remove line from bottom
   ; !insertmacro DestroyWindow  $HWNDPARENT 1035
   ; !insertmacro DestroyWindow  $HWNDPARENT 1256

FunctionEnd


Function RefreshParentControls

   !insertmacro RefreshWindow  $HWNDPARENT 1037
   !insertmacro RefreshWindow  $HWNDPARENT 1038

FunctionEnd

Function WelcomePageShow

     # Sets background image
   System::Call `user32::LoadImage(i 0, t "$PLUGINSDIR\res.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) i.s`
   Pop $hBitmap
   ; SendMessage $bitmapWindow ${STM_SETIMAGE} ${IMAGE_BITMAP} $hBitmap
      # Start solution
   SetCtlColors $mui.WelcomePage ${CTRL_COLOUR} transparent
   SetCtlColors $mui.WelcomePage.text ${CTRL_COLOUR} transparent
   SetCtlColors $mui.WelcomePage.title 0x333333 transparent
   !insertmacro DestroyWindow  $HWNDPARENT 1037
   !insertmacro DestroyWindow  $HWNDPARENT 1038
   !insertmacro DestroyWindow  $HWNDPARENT 1036 
   SetCtlColors $0 222425 transparent
   System::Call `user32::DestroyWindow(i $mui.WelcomePage.Image)`
   Call RefreshParentControls

FunctionEnd

   ; BrandingText ""
Free loaded resources.

Function .onGUIEnd

   ; Destroy the bitmap.
   System::Call `gdi32::DeleteObject(i s)` $hBitmap

FunctionEnd

--------------------------------------------------------------------------------------------------
Dummy section
--------------------------------------------------------------------------------------------------

Section "Dummy Section" SectionEnd

CSS

O01lI


O01lI


O01lI


O01lI


O01lI

O01lI

O01lI

O01lI