Geckozone

Liberté d'extension

Aller au contenu

Icône KMES Source du Script principal de KMES 2.10 Retour à la liste des fichiers

  Pour une lecture plus confortable, cachez le volet de navigation à gauche.

! Attention : En raison de problèmes causés par la syntaxe wiki, les double " (chaînes vides) ont été remplacés par '' (double ') dans cette page.

          Page suivante >>>

 

; Script generated by the HM NIS Edit Script Wizard, and manually modified.
; This script is a multi-language dialog setup for K-Meleon extensions

; Now use internal compressor instead of upx
SetCompressor /SOLID lzma
SetDatablockOptimize on
ShowInstDetails show
AutoCloseWindow false
SetOverwrite on


The script settings

; K-Meleon Extension Setup version
; 2.1 is the generic setup version
; The last number is the version of this particular extension
; The first version will be 2.1.0, 2.1.1, 2.1.2, ... 2.1.9
; So, it will be possible to make 9 updates of the extension

!define SETUP_VERSION "2.1.0"

; We can use Modern UI 2.00 (the classical UI we use with K-Meleon) or the new UltraModern UI
; Uncomment your choice. If no choice, MUI 2.00 will be use
; Don't forget too that the setup size, is seriously increased when using ultraModern UI
; for example, for siber skin, the size is respectively 194.461 bytes and 365.361 bytes.
; The only advantage of ultraModerne UI is the greater bmp preview size.

;!define _ultraMUI

; Uncomment the allowed K-Meleon version for this extension
; In case where allowed version doesn't include 1.6, don't forget to
; comment EQUATE_VERSION define line, just above


!define ALLOWED_VERSION "1.1-1.5-1.6"
;!define ALLOWED_VERSION "1.1-1.5"
;!define ALLOWED_VERSION "1.1"
;!define ALLOWED_VERSION "1.5"
;!define ALLOWED_VERSION "1.6"


; Allows to join 1.5 and 1.6 version to avoid having too much identical kml files in setup
;!define EQUATE_VERSION "1.5-1.6"

; HM NIS Edit Wizard helper defines

!define PRODUCT_NAME "K-Meleon"
!define STRING_BETA ''
!define PRODUCT_PUBLISHER "${PRODUCT_NAME} Team"
!define PRODUCT_WEB_SITE "http : // kmeleon.sourceforge.net/"

Var /Global _KMeleonVersion
Var /Global _KMShortVersion
Var /Global _LaunchMessage
Var /Global _LaunchMessageSaved
Var /Global _Unsetup
Var /Global _WinVer
Var /Global _Suffix
Var /Global _RunIt

;--------------------------------
; Don't forget to change Extension_Name by the real name
; Same thing with the nsi name (setup with the real name)
;--------------------------------

!define PRODUCT_EXTENSION "ExtensionName"
!define EXTENSION_VERSION "9.9.9"
!define LONG_EXTENSION_VERSION "9.9.9.0"
!define ORIGINAL_NAME "${PRODUCT_EXTENSION}"
!define ORIGINAL_CREATOR "original creator"
!define ORIGINAL_WEBSITE "http : // original.creator/"
!define ORIGINAL_MODIFIED "Yes"

; These define was used by KMESmanager. No need, now to use it
; But you can use it to avoid K-Meleon be launched at the end of the setup
; !define DONT_RUN_K-MELEON "Yes"

!define EXTENSION_BUILDER "${PRODUCT_PUBLISHER}"
!define SPECIAL_BUILD "Adapted from Mozilla ${ORIGINAL-NAME} extension to run on K-Meleon."
; if len(PRODUCT_EXTENSION) > 13 : ${LINE} = '', else ${LINE}="$\n"
!define LINE ''
; if _Language_Add, PRODUCT_FOLDER = 'xx-YY' corresponding
!define PRODUCT_FOLDER "${PRODUCT_EXTENSION}"
!define LANG_CODE "9999"
!define PRODUCT_LOCALE "${PRODUCT_EXTENSION}.kml"
; Old presentation method allows to open all the type you can imagine: pdf, image, powerpoint, doc
; due to setup work on extensions.ini, it's not possible to use html file.
!define PRODUCT_PRESENTATION "${PRODUCT_EXTENSION}.png"
; New presentation method can only handle bmp file which have size lower than 435 x 235
!ifdef _ultraMUI
     !define PRODUCT_PREVIEW "u${PRODUCT_EXTENSION}.bmp"
!else
     !define PRODUCT_PREVIEW "${PRODUCT_EXTENSION}.bmp"
!endif

;--------------------------------
; Define the Type of extension. PRODUCT_TYPE can be:

; X for Extension
; S for skins
; L for Localization

; if personnalized logo comment the next line
!define _NoCustom

!ifdef _NoCustom
; Uncomment the choosen type
     !define PRODUCT_TYPE "X"
     !define PRODUCT_TYPE "S"
     !define PRODUCT_TYPE "L"

     !ifdef _ultraMUI
          !define UMUI_LEFTIMAGE_BMP "..\Left${PRODUCT_TYPE}.bmp"
     !endif
!endif


;--------------------------------
; Define the Sub-Type of extension. PRODUCT_SUBTYPE can be:
; This subtype will be use by KMESmanager to dispatch extensions in the K-Meleon submenus

; Uncomment the choosen subtype

;!define PRODUCT_SUBTYPE "&Browsing"
;!define PRODUCT_SUBTYPE "&Security"
;!define PRODUCT_SUBTYPE "&Entertainments"
;!define PRODUCT_SUBTYPE "&Downloaders"
;!define PRODUCT_SUBTYPE "Too&ls"
;!define PRODUCT_SUBTYPE "S&kins"
;!define PRODUCT_SUBTYPE "&Miscellaneous"

;--------------------------------
; Define if Win Version is needed,
; After, in the sections, the variable $_WinVer will be avalaible for test
; values returned are: w9x, NT, 2000, XP, 2003
; uncomment if needed

!define Win_Version

;--------------------------------
; Define if Km Version is needed,
; uncomment if needed

!define _KmVersion

;--------------------------------
; You can now choose between two presentation modes.

; The old method for a presentation of the extension (image, text, doc, ...)
; in external programs. If presentation aren't image, choose old method

; The new methode has been written by desga2. It allows to have bmp (only)
; picture displayed. The format can't be changed (for now), and the size too
; The advantage is the fact that presentation is embedded in setup and is nicer.
; If presentation files aren't bmp, or size is bigger than 435 x 235, choose old
; method, else choose new method.

; uncomment the method you want to use, if needed

; !define _Old_Presentation
; !define _New_Presentation

; If you choose _New_Presentation, You must choose the presentation message
; uncomment the presentation

;!define _Skin_Message
;!define _Menu_Message
;!define _Box_Message

;--------------------------------
; Sections needed (folders)
; uncomment what is needed

; something is updated or added in main folder
;!define _Main
; something is updated or added in chrome folder
;!define _Chrome
; something is updated or added in components folder
;!define _Components
; something is updated or added in defaults\Autoconfig folder
;!define _Defaults_Autoconfig
; something else than i10n is updated or added in defaults\Pref folder
;!define _Defaults_Pref
; i10n is updated in defaults\Pref folder
;!define _Defaults_Pref_i10n
; something else Bookmarks or Search is updated or added in defaults\Profile folder
;!define _Defaults_Profile
; Bookmarks.html is updated in defaults\Profile folder
;!define _Defaults_Profile_Bookmarks
; Search.xml is updated in defaults\Profile folder
;!define _Defaults_Profile_Search
; something is updated or added in defaults\Profile\chrome folder
;!define _Defaults_Profile_Chrome
; something is updated or added in defaults\Profile\macros folder
;!define _Defaults_Profile_Macros
; something is updated or added in defaults\settings folder
;!define _Defaults_Settings
; something is updated or added in defaults\wallet folder
;!define _Defaults_Wallet
; something is updated or added in kplugins folder
;!define _Kplugins
; utils.dll kplugin is used
;!define _utils_Kplugin
; kmplus.dll kplugin is used
;!define _kmplus_Kplugin
; something is updated or added in macros folder
;!define _Macros_Macros
; something is updated or added in plugins folder
;!define _Plugins
; something is updated or added in res folder
;!define _Res
; something is updated or added in skins folder
;!define _Skins
; skin to install is a large skin
;!define _LargeSkin
; something is updated or added in tools folder
;!define _Tools
; something is updated or added in luamacros folder
;!define _Luamacros
; files are added to locale
;!define _Locales_Up
; New language is added
;!define _Language_Add


; Auto-conditional defines (depends on previous defines)
; nothing to modify, it's automatic

!ifdef _Defaults_profile
     !ifdef _Defaults_profile_Bookmarks
          !undef _Defaults_profile_Bookmarks
     !endif
     !ifdef _Defaults_profile_Search
          !undef _Defaults_profile_Search
     !endif
!endif

!ifdef _Defaults_Profile_Search
     !define _Defaults_Profile
!else
     !ifdef _Defaults_Profile_Bookmarks
          !define _Defaults_Profile
     !else
          !ifdef _Defaults_Profile_Macros
               !define _Defaults_Profile
          !else
               !ifdef _Defaults_Profile_Chrome
                    !define _Defaults_Profile
               !endif
          !endif
     !endif
!endif

!ifdef _Defaults_pref
     !ifdef _Defaults_pref_i10n
          !undef _Defaults_pref_i10n
     !endif
!else
     !ifdef _Defaults_pref_i10n
          !define _Defaults_pref
     !endif
!endif
;-------
!ifdef _Defaults_Autoconfig
     !define _Defaults
!else
     !ifdef _Defaults_Pref
          !define _Defaults
     !else
          !ifdef _Defaults_Profile
               !define _Defaults
          !else
               !ifdef _Defaults_Settings
                    !define _Defaults
                !else
                    !ifdef _Defaults_Wallet
                         !define _Defaults
                    !endif
               !endif
          !endif
     !endif
!endif
;-------
!ifdef _Macros_Macros
     !define _Macros
!endif
;-------
!ifndef _Kplugins
     !ifdef _utils_Kplugin
          !define _Kplugins
     !else
          !ifdef _kmplus_Kplugin
               !define _Kplugins
          !else
               !ifdef _Luamacros
                    !define _Kplugins
               !endif
          !endif
     !endif
!endif
;-------
!ifdef _Language_Add
     !define _Localize
!endif

!ifdef _Language_Add
     !define PRE_KMM "lang_"
!else
     !define PRE_KMM ''
!endif
;-------
!ifdef _Locales_Up
     !ifndef _Localize
          !define _Localize
     !endif
     !ifndef _StrStr
          !define _StrStr
     !endif
!endif
;-------
!ifdef _Old_Presentation
     !ifndef _Presentation
          !define _Presentation
     !endif
!endif
;-------
!ifdef _New_Presentation
     !ifndef _Presentation
          !define _Presentation
     !endif
!endif
;-------
!ifdef _KmVersion
     !ifndef _StrStr
          !define _StrStr
     !endif
!endif


; Needed if locale update is needed
; If you want to add a new language, add it in Optional_Langs
; and add it also in the Function Localize between es-ES and Others

!ifdef _Locales_Up
     !define Default_Langs "fr-FRde-DEes-ES"
     !define Optional_Langs ''
!else
     !define Default_Langs "en-US"
     !define Optional_Langs ''
!endif


;Include Modern UI

!ifdef _ultraMUI
     !include "${NSISDIR}\Contrib\UltraModernUI\UMUI.nsh"
!else
     !include "MUI.nsh"
     !include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!endif
!include "Sections.nsh"


;Include file functions

; !include "FileFunc.nsh"


;Version tab in properties

VIProductVersion ${LONG_EXTENSION_VERSION}

VIAddVersionKey ProductName "${PRODUCT_NAME} ${ALLOWED_VERSION} Extension System"
VIAddVersionKey Comments "${SPECIAL_BUILD}"
VIAddVersionKey CompanyName "${PRODUCT_NAME} Team"
VIAddVersionKey LegalCopyright "${PRODUCT_NAME} Team"
VIAddVersionKey FileDescription "${PRODUCT_EXTENSION} ${EXTENSION_VERSION} for ${PRODUCT_NAME}"
VIAddVersionKey FileVersion "${SETUP_VERSION}"
VIAddVersionKey ProductVersion "${EXTENSION_VERSION}"
VIAddVersionKey InternalName "${PRODUCT_NAME} ${ALLOWED_VERSION}"
VIAddVersionKey LegalTrademarks "${PRODUCT_WEB_SITE}"
VIAddVersionKey OriginalFileName "K-Ext(${ALLOWED_VERSION})_${PRODUCT_EXTENSION}(${LONG_EXTENSION_VERSION}).exe"
VIAddVersionKey Translation "${Default_Langs}${Optional_Langs}"
VIAddVersionKey SetupVersion "${SETUP_VERSION}"


; MUI Settings

!define MUI_AbortWARNING
!define MUI_AbortWARNING_TEXT "$(AbortInsWarn)"
!ifdef _NoCustom
     !define MUI_ICON "..\install_${PRODUCT_TYPE}.ico"
     !define MUI_UNICON "..\uninstall_${PRODUCT_TYPE}.ico"
!else
     !define MUI_ICON "..\install_X.ico"
     !define MUI_UNICON "..\uninstall_X.ico"
!endif
!define MUI_CHECKBITMAP "${NSISDIR}\Contrib\Icons\modern.bmp"
!define MUI_COMPONENTSPAGE_SMALLDESC


; Language Selection Dialog Settings

!ifdef _ultraMUI
     !define UMUI_LANGDLL_REGISTRY_ROOT HKLM
     !define UMUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"

; if the next line is uncommented, lang choice can be made manually
     !define UMUI_LANGDLL_ALWAYSSHOW
     !define UMUI_UNLANGDLL_ALWAYSSHOW
!else
     !define MUI_LANGDLL_REGISTRY_ROOT HKLM
     !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"

; if the next line is uncommented, lang choice can be made manually
     !define MUI_LANGDLL_ALWAYSSHOW
     !define MUI_UNLANGDLL_ALWAYSSHOW
!endif


; Welcome page

!ifdef _NoCustom
     !define MUI_WELCOMEFINISHPAGE_BITMAP "..\${PRODUCT_NAME}_${PRODUCT_TYPE}.bmp"
     !define MUI_UNWELCOMEFINISHPAGE_BITMAP "..\${PRODUCT_NAME}_${PRODUCT_TYPE}.bmp"
!else
     !define MUI_WELCOMEFINISHPAGE_BITMAP "${PRODUCT_NAME}_${PRODUCT_EXTENSION}.bmp"
     !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${PRODUCT_NAME}_${PRODUCT_EXTENSION}.bmp"
!endif
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_WELCOMEPAGE_TEXT "$(MUI_WELCOMEPAGE_TEXT)"
!insertmacro MUI_PAGE_WELCOME


; Presentation page

!ifdef _Presentation
     !ifdef _Old_Presentation
          !define MUI_CUSTOMFUNCTION_GUIINIT Presentation
     !endif
     !ifdef _New_Presentation
          ; Reserve files for solid compression, installer start more faster
          !ifdef _ultraMUI
               !execute '"..\cp.exe" upreview.ini preview.ini'
          !else
               !execute '"..\cp.exe" npreview.ini preview.ini'
          !endif
          ReserveFile "preview.ini"
          ReserveFile "${PRODUCT_PREVIEW}"
          ReserveFile "preview.cmd"
          !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
          ; Custom page declaration for presentation
          Page custom Preview_Page
     !endif
!endif


; License page

!insertmacro MUI_PAGE_LICENSE $(myLicenseData)


; Components page

!define MUI_COMPONENTSPAGE_TEXT_TOP "$(MUI_COMPONENTSPAGE_TEXT_TOP)"
!insertmacro MUI_PAGE_COMPONENTS


; Directory page

!define MUI_DIRECTORYPAGE_TEXT_TOP "$(MUI_DIRECTORYPAGE_TEXT_TOP)"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
!insertmacro MUI_PAGE_DIRECTORY


; Instfiles page

!insertmacro MUI_PAGE_INSTFILES


; Finish page

!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN_TEXT $_LaunchMessage
!ifdef DONT_RUN_K-MELEON
     !define MUI_FINISHPAGE_RUN ''
!else
     !define MUI_FINISHPAGE_RUN $_RunIt
!endif
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!define MUI_UNINSTPAGE
!insertmacro MUI_UNPAGE_INSTFILES


; Language files

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Spanish"


; License data

LicenseLangString myLicenseData ${LANG_ENGLISH} "..\englishLicense.txt"
LicenseLangString myLicenseData ${LANG_FRENCH} "..\frenchLicense.txt"
LicenseLangString myLicenseData ${LANG_GERMAN} "..\germanLicense.txt"
LicenseLangString myLicenseData ${LANG_SPANISH} "..\spanishLicense.txt"

LicenseData $(myLicenseData)


; Languages messages

!include ..\englishMessages.nlf
!include ..\frenchMessages.nlf
!include ..\germanMessages.nlf
!include ..\spanishMessages.nlf


;Localized Presentation file name

!ifdef _Old_Presentation
     LangString PRESENTATION ${LANG_FRENCH} "French_${PRODUCT_PRESENTATION}"
     LangString PRESENTATION ${LANG_GERMAN} "German_${PRODUCT_PRESENTATION}"
     LangString PRESENTATION ${LANG_ENGLISH} "English_${PRODUCT_PRESENTATION}"
     LangString PRESENTATION ${LANG_SPANISH} "Spanish_${PRODUCT_PRESENTATION}"
!endif


;Language file treatment message

!ifdef _Locales_Up
     LangString AddedFile ${LANG_ENGLISH} "File added to $1"
     LangString AddedFile ${LANG_FRENCH} "Fichier ajouté à $1"
     LangString AddedFile ${LANG_GERMAN} "Datei hinzugefügt zu $1"
     LangString AddedFile ${LANG_SPANISH} "Archivo añadido a $1"
!endif


; Localized Macro explanation
;
; Must be adapted to the extension ...

!ifdef _Macros
     LangString DESC_SecMacros_Macros ${LANG_ENGLISH} "This macro adds ..."
     LangString DESC_SecMacros_Macros ${LANG_FRENCH} "Cette macro permet ..."
     LangString DESC_SecMacros_Macros ${LANG_GERMAN} "This macro adds ..."
     LangString DESC_SecMacros_Macros ${LANG_SPANISH} "This macro adds ..."
!endif


;MUI parameters

;Name and file
Name "${PRODUCT_EXTENSION} (${EXTENSION_VERSION})"
Caption "${PRODUCT_NAME} Extension Setup : ${PRODUCT_EXTENSION} (${LONG_EXTENSION_VERSION})"
OutFile "K-Ext(${ALLOWED_VERSION})_${PRODUCT_EXTENSION}(${LONG_EXTENSION_VERSION}).exe"

;Default installation folder
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}\"

;Get installation folder from registry if available
InstallDirRegKey HKEY_CURRENT_USER "Software\${PRODUCT_NAME}\General" "InstallDir"

ShowInstDetails show
ShowUnInstDetails show

BrandingText /TRIMRIGHT "${PRODUCT_NAME} Extension Setup : ${PRODUCT_EXTENSION} ${EXTENSION_VERSION}"


; Macros

!macro GET_PROFILES_LOCATION
     Push $R1
     Push $R2
     IfFileExists "$INSTDIR\profile.ini" 0 AppDataProfile
     ReadINIStr $R1 "$INSTDIR\profile.ini" "Profile" "path"
     ReadINIStr $R2 "$INSTDIR\profile.ini" "Profile" "isrelative"
     StrCmp $R1 '' 0 +2 ; If path empty
     StrCpy $R1 "Profiles" ; Copy default folder name
     StrCmp $R2 "1" 0 +2 ; If path is relative
     StrCpy $R0 "$INSTDIR\$R1" ; add the install dir to the path
     Goto +2 ; else
     StrCpy $R0 $R1 ; use the path only

     Goto End_proflocation

     AppDataProfile:
     StrCpy $R0 "$APPDATA\K-Meleon"

     End_proflocation:
     Pop $R2
     Pop $R1

!macroend


;main section

!ifdef _Main
     Section "K-Meleon" SecMain
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR"
          ; I have added the switch /r which allows to have files in subfolders.
          ; This to avoid a new Section creation. Example for extension folder where no
          ; extension have to copy files, except KMESmanager. As I want to make its
          ; install and uninstall with common KMES 2.1.0 setup version, I have modified
          ; this line. As result, It shall be used if needed for all other new folder not
          ; treated natively in KMES 2.1.0
          File /r .\main\*.*

          ; Create uninstaller
           $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          strcpy $_unSetup 1

     SectionEnd
!endif


;chrome section

!ifdef _Chrome
     Section "Chrome" SecChrome
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\chrome"
          File .\Chrome\*.*

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecChrome
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          strcpy $_unSetup 1

          un_SecChrome:

     SectionEnd
!endif


;components section

!ifdef _Components
     Section "Components" SecComponents
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\Components"
          File .\Components\*.*

          ; Deleting> files
          Delete "$INSTDIR\components\compreg.dat"
          Delete "$INSTDIR\components\xpti.dat"

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecComponents
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          strcpy $_unSetup 1

          un_SecComponents:

     SectionEnd
!endif


;defaults section

!ifdef _Defaults
     SubSection /e "Defaults" SecDefaults

          !ifdef _Defaults_Autoconfig
               Section "Pref" SecDefaults_Autoconfig
                    SectionIn RO

                    SetOutPath "$INSTDIR\defaults\autoconfig"
                    File .\defaults\autoconfig\*.*

                    ; if uninstaller hasn't yet been created or updated, create it
                    StrCmp $_unSetup 1 un_SecDefaults_Autoconfig
                    WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                    strcpy $_unSetup 1

                    un_SecDefaults_Autoconfig:

               SectionEnd
          !endif

          !ifdef _Defaults_Pref
               SubSection /e "Pref" SecDefaults_Pref
                    !ifdef _Defaults_Pref_i10n
                         Section "i10n.js" SecDefaults_Pref_i10n

                              SetOutPath "$INSTDIR\defaults\pref"
                              File .\defaults\pref\i10n.js

                              ; if uninstaller hasn't yet been created or updated, create it
                              StrCmp $_unSetup 1 un_SecDefaults_Pref_i10n
                              WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                              strcpy $_unSetup 1

                              un_SecDefaults_Pref_i10n:

                         SectionEnd
                    !else
                         Section "Prefs" SecDefaults_Pref_All
                              SectionIn RO

                              SetOutPath "$INSTDIR\defaults\pref"
                              File .\defaults\pref\*.*

                              ; if uninstaller hasn't yet been created or updated, create it
                              StrCmp $_unSetup 1 un_SecDefaults_Pref_All
                              WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                              strcpy $_unSetup 1

                              un_SecDefaults_Pref_All:

                         SectionEnd
                    !endif

               SubSectionEnd
          !endif

          !ifdef _Defaults_Profile
               SubSection /e "Profile" SecDefaults_Profile
                    !ifdef _Defaults_Profile_Bookmarks
                         Section "bookmarks.html" SecDefaults_Profile_Bookmarks

                              SetOutPath "$INSTDIR\defaults\profile"
                              File .\defaults\profile\bookmarks.html

                              ; if uninstaller hasn't yet been created or updated, create it
                              StrCmp $_unSetup 1 un_SecDefaults_Profile
                              WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                              strcpy $_unSetup 1

                              un_SecDefaults_Profile:

                         SectionEnd
                    !endif
                    !ifdef _Defaults_Profile_Search
                         Section "search.xml" SecDefaults_Profile_Search

                              SetOutPath "$INSTDIR\defaults\profile"
                              File .\defaults\profile\search.xml

                              ; if uninstaller hasn't yet been created or updated, create it
                              StrCmp $_unSetup 1 un_SecDefaults_Profile_Search
                              WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                              strcpy $_unSetup 1

                              un_SecDefaults_Profile_Search:

                         SectionEnd
                    !endif
                    !ifndef _Defaults_Profile_Bookmarks
                         Section "Profiles" SecDefaults_Profile_All
                                   SectionIn RO

                                   SetOutPath "$INSTDIRdefaults\profile"
                                   File .\defaults\profile\*.*

                                   ; if uninstaller hasn't yet been created or updated, create it
                                   StrCmp $_unSetup 1 un_SecDefaults_Profile_All
                                   WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                                   strcpy $_unSetup 1

                                   un_SecDefaults_Profile_All:

                              SectionEnd
                         !endif
                    !endif
               SubSectionEnd
          !endif

          !ifdef _Defaults_Settings
               Section "Pref" SecDefaults_Settings
                    SectionIn RO

                    SetOutPath ""$INSTDIR\defaults\settings"
                    File .\defaults\settings\*.*

                    ; if uninstaller hasn't yet been created or updated, create it
                    StrCmp $_unSetup 1 un_SecDefaults_Settings
                    WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                    strcpy $_unSetup 1

                    un_SecDefaults_Settings:

               SectionEnd
          !endif

          !ifdef _Defaults_Wallet
               Section "Pref" SecDefaults_Wallet
                    SectionIn RO

                    SetOutPath "$INSTDIR\defaults\wallet"
                    File .\defaults\wallet\*.*

                    ; if uninstaller hasn't yet been created or updated, create it
                    StrCmp $_unSetup 1 un_SecDefaults_Wallet
                    WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
                    strcpy $_unSetup 1

                    un_SecDefaults_Wallet:

               SectionEnd
          !endif

     SubSectionEnd
!endif


;kplugins section

!ifdef _Kplugins
     Section "kPlugins" SecKplugins
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\kplugins"
          File .\kplugins\*.*

          !ifdef _utils_Kplugin
               ReadINIStr $R1 $INSTDIR\Extensions\kplugins.ini "utils.dll" "Liste"
               Push $R1
               push ${PRODUCT_EXTENSION}
               call StrStr
               pop $R0
               strCmp $R0 '' 0 ok_utils
               ReadINIStr $R0 $INSTDIR\Extensions\kplugins.ini "utils.dll" "Extensions"
               IntOp $R0 $R0 + 1
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "utils.dll" "Extensions" $R0
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "utils.dll" "Liste" "$R1${PRODUCT_EXTENSION}|"
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "utils.dll" "Mark" "end_of_utils.dll"
               ok_utils:
          !endif

          !ifdef _kmplus_Kplugin
               ReadINIStr $R1 $INSTDIR\Extensions\kplugins.ini "kmplus.dll" "Liste"
               Push $R1
               push ${PRODUCT_EXTENSION}
               call StrStr
               pop $R0
               strCmp $R0 '' 0 ok_kmplus
               ReadINIStr $R0 $INSTDIR\Extensions\kplugins.ini "kmplus.dll" "Extensions"
               IntOp $R0 $R0 + 1
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "kmplus.dll" "Extensions" $R0
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "kmplus.dll" "Liste" "$R1${PRODUCT_EXTENSION}|"
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "kmplus.dll" "Mark" "end_of_kmplus.dll"
               ok_kmplus:
          !endif

          !ifdef _Luamacros
               ReadINIStr $R1 $INSTDIR\Extensions\kplugins.ini "luamacro.dll" "Liste"
               Push $R1
               push ${PRODUCT_EXTENSION}
               call StrStr
               pop $R0
               strCmp $R0 '' 0 ok_luamacros
               ReadINIStr $R0 $INSTDIR\Extensions\kplugins.ini "luamacro.dll" "Extensions"
               IntOp $R0 $R0 + 1
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "luamacro.dll" "Extensions" $R0
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "luamacro.dll" "Liste" "$R1${PRODUCT_EXTENSION}|"
               WriteINIStr $INSTDIR\Extensions\kplugins.ini "luamacro.dll" "Mark" "end_of_luamacro.dll"
               ok_luamacros:
          !endif

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecKplugins
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          strcpy $_unSetup 1

          un_SecKplugins:

     SectionEnd
!endif


;macros section

!ifdef _Macros
     SubSection /e "Macros" SecMacros

          Section "${PRE_KMM}${PRODUCT_FOLDER}.kmm" SecMacros_Macros
               SectionIn RO

               ; Copying files
               SetOutPath "$INSTDIR\macros"
               File .\macros\*.*

               ; if uninstaller hasn't yet been created or updated, create it
               StrCmp $_unSetup 1 un_SecMacros
               WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
               StrCpy $_unSetup 1

               un_SecMacros:

          SectionEnd

     SubSectionEnd
!endif


;plugins section

!ifdef _Plugins
     Section "Plugins" SecPlugins
          SectionIn RO

               ; Copying files
               SetOutPath "$INSTDIR\plugins"
               File /r .\plugins\*.*

               ; if uninstaller hasn't yet been created or updated, create it
               StrCmp $_unSetup 1 un_SecPlugins
               WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
               StrCpy $_unSetup 1

               un_SecPlugins:

          SectionEnd
!endif


;res section

!ifdef _Res
     Section "Res" SecRes
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\res"
          File /r .\res\*.*

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecRes
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          StrCpy $_unSetup 1

          un_SecRes:

     SectionEnd
!endif


;skins section

!ifdef _Skins
     Section "Skins" SecSkins
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\skins\${PRODUCT_EXTENSION}"
          File /nonfatal .\skins\common\*.*

          StrCmp $_KMShortVersion "1.1" 0 skin1.5
          File /nonfatal .\skins\1.1\*.*
          goto Large_Skin
          skin1.5:
          StrCmp $_KMShortVersion "1.5" 0 skin1.6
          File /nonfatal .\skins\1.5\*.*
          goto Large_Skin
          skin1.6:
          StrCmp $_KMShortVersion "1.6" 0 Large_Skin
          File /nonfatal .\skins\1.6\*.*
          Large_Skin:

          !ifdef _LargeSkin
               readIniStr $5 $INSTDIR\skins\skins.ini large Phoenity(Large)
               StrCmp $5 "1" ReadIni 0
               StrCpy $5 $(large_created)
               writeIniStr $INSTDIR\skins\skins.ini large Phoenity(Large) "1"
               goto LVerified

               ReadIni:
               StrCpy $5 $(large_updated)
               readIniStr $3 $INSTDIR\skins\skins.ini large "${PRODUCT_EXTENSION}"
               StrCmp $3 "1" okIni LVerified

               LVerified:
               writeIniStr $INSTDIR\skins\skins.ini large "${PRODUCT_EXTENSION}" "1"
               DetailPrint $5

               okIni:
          !endif

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecSkins
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          StrCpy $_unSetup 1

          un_SecSkins:

     SectionEnd
!endif


;tools section

!ifdef _Tools
     Section "Tools" SecTools
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\tools"
          File /r .\tools\*.*

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecTools
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          StrCpy $_unSetup 1

          un_SecTools:

     SectionEnd
!endif


;luamacros section

!ifdef _Luamacros
     Section "Luamacros" SecLuamacros
          SectionIn RO

          ; Copying files
          SetOutPath "$INSTDIR\luamacros"
          File /r .\luamacros\*.*
          ; Does required.lua already exists
          ; then add lua required filename in it
          ; else copy it
          IfFileExists "$INSTDIR\Luamacros\required.lua" 0 LuaCopy

          ;search in required.lua for lua required filename
          FileOpen $1 "$INSTDIR\Luamacros\required.lua" "a"

          ReadLine:
          FileRead $1 $2
          IfErrors Verified
          StrLen $4 $2
          IntCmp $4 2 0 Verified 0
          IntOp $4 $4 - 2
          StrCpy $3 $2 $4
          StrCmp $3 'require "${PRODUCT_EXTENSION}"' CloseLua ReadLine

          CloseLua:
          FileClose $1
          goto okLua

          Verified:
          FileSeek $1 0 END
          FileWrite $1 "require "
          FileWriteByte $1 "34"
          FileWrite $1 ${PRODUCT_EXTENSION}
          FileWriteByte $1 "34"
          FileWriteByte $1 "13"
          FileWriteByte $1 "10"
          FileClose $1
          DetailPrint $(required_updated)
          goto okLua

          LuaCopy:
          ; copy it
          File .\luamacros\NoMacros\required.lua

          okLua:

          ; if uninstaller hasn't yet been created or updated, create it
          StrCmp $_unSetup 1 un_SecLuamacros
          WriteUninstaller $INSTDIR\Extensions\un_${PRODUCT_EXTENSION}.exe
          StrCpy $_unSetup 1

          un_SecLuamacros:

     SectionEnd
!endif


          Page suivante >>>

Aucun commentaire !

Ajouter un commentaire à cette page :

Seuls les membres peuvent ajouter des commentaires.
Utilisez la page de connexion pour vous inscrire.


- Merci de commencer par consulter l'aide.
- Pour des demandes d'aide, pensez au forum.
- Le lien ne fonctionne pas ? Commencez SVP par lire la page installer une extension.

Les commentaires vulgaires, blessants ou injurieux seront supprimés. Merci de faire des critiques constructives qui nous aideront à nous améliorer.

Le code HTML dans le commentaire sera affiché comme du texte. Pour formater votre texte vous pouvez utiliser la syntaxe Wiki :

Règles de base :
**Texte en gras !** ---> Texte en gras !
//Texte en italique.// ---> Texte en italique.
##texte à espacement fixe## ---> texte à espacement fixe
[[http://www.geckozone.org Lien vers Geckozone]] ---> Lien vers Geckozone