; project.nsi ;------------------------------------------ Name "project" Caption "project" InstallButtonText "Install" OutFile "C:\project\project.exe" InstallDir "Install Folder" Function "SetMyOutPath" SetOutPath "$INSTDIR\models\generic" FunctionEnd DirText "Please select your folder." "" "" Section "" Call "SetMyOutPath" File "nowheel.DFF" Sectionend ;------------------------------------------------- Section "" FileOpen $0 "$INSTDIR\data\default.ide" "r" GetTempFileName $R0 FileOpen $1 $R0 "w" loop: FileRead $0 $2 IfErrors done StrCmp $2 "# wheels: 250-257$\r$\n" 0 +3 FileWrite $1 "# wheels: 250-257, 249$\r$\n" Goto loop FileWrite $1 $2 Goto loop done: FileClose $0 FileClose $1 Delete "$INSTDIR\data\default.ide" CopyFiles /SILENT $R0 "$INSTDIR\data\default.ide" Delete $R0 SectionEnd ;---------------------------------------------------------- Section "" FileOpen $3 "$INSTDIR\data\default.dat" "r" GetTempFileName $R3 FileOpen $4 $R3 "w" loop2: FileRead $3 $5 IfErrors done2 StrCmp $5 "MODELFILE MODELS\GENERIC\WHEELS.DFF$\r$\n" 0 +3 FileWrite $4 "MODELFILE MODELS\GENERIC\WHEELS.DFF$\r$\nMODELFILE MODELS\GENERIC\nowheel.DFF$\r$\n" Goto loop2 FileWrite $4 $5 Goto loop2 done2: FileClose $3 FileClose $4 Delete "$INSTDIR\data\default.dat" CopyFiles /SILENT $R3 "$INSTDIR\data\default.dat" Delete $R3 SectionEnd ;----------------------------------------------- Section "" FileOpen $0 "$INSTDIR\data\default.ide" "r" GetTempFileName $R0 FileOpen $1 $R0 "w" loop: FileRead $0 $2 IfErrors done StrCmp $2 "256, wheel_smallcar, generic, 2, 20, 70, 0$\r$\n" 0 +3 FileWrite $1 "256, wheel_smallcar, generic, 2, 20, 70, 0$\r$\n249, wheel_lightmod, generic, 2, 20, 70, 0$\r$\n" Goto loop FileWrite $1 $2 Goto loop done: FileClose $0 FileClose $1 Delete "$INSTDIR\data\default.ide" CopyFiles /SILENT $R0 "$INSTDIR\data\default.ide" Delete $R0 SectionEnd