The online racing simulator
Live For Speed Installer Patch 0.5Y
What does it do that I cant do if I download lfs from official sites?
It is just an installer does nothing special but installs LFS in X:\Program Files\Live For Speed

where X is the default drive or Local Disk
this is an lfs installer i made (unnoficial) but does the kob of the 7 zip extractor but it easier.

This is version V0.1 later i will add a script to create shortcuts tot the start menu and desktop.
Quote from master_lfs.5101 :This is version V0.1 later i will add a script to create shortcuts tot the start menu and desktop.

It doesn't even do that? So what does it do?
bob he says he is going to, i can see why he does it cos the 7zip install thing does confuse people sometimes
#7 - Ian.H
Sorry to piss on a bonfire.. but since when do you have beta versions of installers!?

Sounds like right now, all it does is adds a pretty picture (UI) to the front end of a self-extracting archive... a bit like coding a text editor, but making the editor part read-only until v0.2



Regards,

Ian
I think the moral of the story here is: if you're going to do something, sit down, take your time, and do a thorough and quality job. Don't rush something out in 5 minutes and then do daily fixes which, after a week, make it usable. Especially at 155MB per time! Something various memory editing app devs should have been aware of too.
NSIS is a wonderful install system. It really is, but I don't fell that it's needed in this case.

Oh, and make your life easier, use Venis IX. I've done some things with NSIS, mainly addon installers for BF1942, so if you need any help, just let me know.
Could an Admin please allow the uploading of .NSI files? They are simply NSIS Install Scripts to help build the installer.
Attached files
Install.zip - 20.7 KB - 307 views
If you replace the first 26, or to the compressor set line, lines with the following code, it will give you the following result.

; Includes
!include LogicLib.nsh

; Define your application name
!define APPNAME "Live For Speed"
!define APPNAMEANDVERSION "Live For Speed S2 0.5Y"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\Live For Speed"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "Install.exe"

; Custom function, to see if LFS.exe is present.
Function .onVerifyInstDir
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1019
${If} ${FileExists} "$INSTDIR\LFS.exe"
SetCtlColors $R0 000000 00FF00
${Else}
SetCtlColors $R0 000000 FF0000
${EndIf}
FunctionEnd

; Use compression
SetCompressor LZMA

Attached images
Compleated.png
Installing.png
Directory.png
License.png
Introduction.png
unCompleted.png
unIntroduction.png
Thats pretty cool Dygear.
The main power behind the NSIS system is not that it's got the world class compression algorithm of LZMA, and indeed LZMA (whole). It is that you can interact, and change the course of the installation process on the fly. I've provided an example of that in this post, you'll find it in the attachments.

For this example, try to change the directory to a place where the LFS.exe would not be found, then change it to your install directory for LFS, where the LFS.exe is found. Take a look at the back ground color for the install directory text box and you'll notice a change.

Here is the code of the attached is the installer.

; Includes
!include LogicLib.nsh

; Define your application name
!define APPNAME "Live For Speed"
!define VERSION "S2 0.5Y"
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"

BrandingText "${APPNAME}"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\${APPNAME}"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "Install.exe"

; Custom function, to see if LFS.exe is present.
Function .onVerifyInstDir
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1019
${If} ${FileExists} "$INSTDIR\LFS.exe"
SetCtlColors $R0 000000 00FF00
${Else}
SetCtlColors $R0 000000 FF0000
${EndIf}
FunctionEnd

; Use compression
SetCompressor LZMA

; Modern interface settings
!include "MUI.nsh"

!define MUI_ABORTWARNING
!define MUI_FINISHPAGE_RUN "$INSTDIR\Install.nsi"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "README.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL

Section "Live For Speed" Section1

; Set Section properties
SetOverwrite on

; Set Section Files and Shortcuts
SetOutPath "$INSTDIR\"
File "Install.nsi"

CreateShortCut "$DESKTOP\InstallScript.lnk" "$INSTDIR\Install.nsi"
CreateDirectory "$SMPROGRAMS\Live For Speed"
CreateShortCut "$SMPROGRAMS\Live For Speed\InstallScript.lnk" "$INSTDIR\Install.nsi"
CreateShortCut "$SMPROGRAMS\Live For Speed\UninstallProgram.lnk" "$INSTDIR\uninstall.exe"

SectionEnd

Section -FinishSection

WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"

SectionEnd

; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "Live For Speed"
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;Uninstall section
Section Uninstall

;Remove from registry...
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
DeleteRegKey HKLM "SOFTWARE\${APPNAME}"

; Delete self
Delete "$INSTDIR\uninstall.exe"

; Delete Shortcuts
Delete "$DESKTOP\InstallScript.lnk"
Delete "$SMPROGRAMS\Live For Speed\InstallScript.lnk"
Delete "$SMPROGRAMS\Live For Speed\UninstallProgram.lnk"

; Clean up Live For Speed
Delete "$INSTDIR\Install.nsi"

; Remove remaining directories
RMDir "$SMPROGRAMS\Live For Speed"

SectionEnd

; eof

This would be very useful for patch updates to LFS, so that you can confirm, without requiring that the install directory include the LFS.exe. As so they don't update the wrong files. Also patches would be smaller with the use of another add on that simple changes only the bytes that are effected for each file that needs to be patched. It's a tremendous improvement over old simple patches systems, but still having it's own pit falls. Such as if the user moidfied the file, then the new file could become corrupted as the installed is expecting a non edited file.


You could say that I kinda grok this stuff, so I'm kinda excited that some one else has brought it into the front. I can provide more examples on this install system. Like providing links in the start menu to the LFS Website, LFS Fourm, LFS Wiki.

; This would be placed inside of the
; 'Section "Live For Speed" Section1' and 'Section End' around 'CreateShortCut'.
CreateShortCut "$SMPROGRAMS\Live For Speed\LFS Site.lnk" "http://www.lfs.com/"
CreateShortCut "$SMPROGRAMS\Live For Speed\LFS Wiki.lnk" "http://www.lfswiki.com/"
CreateShortCut "$SMPROGRAMS\Live For Speed\LFS Forum.lnk" "http://www.lfsforum.com/"

Attached files
Install.zip - 88.5 KB - 348 views

FGED GREDG RDFGDR GSFDG