Jump to content

Scripts/NullSoft


redsox

Recommended Posts

Hey everyone, I am having a little trouble creating a welcome screen for an installation package and was wondering if you guys could help me out. The following screen is what I am trying to generate...

dms-serial-monitor-full-installation01.p

I am using NSIS (Nullsoft Installation System) if that makes any difference. Please keep in mind that I just found out about NSIS within the last 2 hours - so my knowledge is very limited. In fact, I don't have a whole lot of knowledge when it comes to programming (took 2 semesters worth of C++ but that's about it).

If someone could help me with the script to generate the above shown welcome screen, it would be really nice. Basically, all I want to do is add the picture. I am able to create one with just the text, just not sure what code to write to add the picture.

I am attaching the code that I wrote as of now. It runs smoothly and does the needful, but without the picture on the welcome screen. Thanks to anyone for the help.

Name "Red_Sox_version_1.exe"




OutFile "Red_Sox_version_1.exe"




; The default installation directory


InstallDir $PROGRAMFILESRed_Sox_version_1




DirText "This wizard will help you install version 1 of the Boston Red Sox Uniform Team Pack to a folder of your choosing."




;--------------------------------




Section "Red Sox Uniforms Pack v1.0"




; Set output path to the installation directory.


SetOutPath $INSTDIR




; Put file there


File Away.bmp


File f010g.fsh


File f010h.fsh


File Home.bmp


File u010g.fsh


File u010h.fsh




SectionEnd; end the section

Link to comment
Share on other sites

Kraw, can this be used to install MVP Baseball files? For instance, can I use this script language to install .fsh files into models.big? I am guessing that this is what you use for the total conversion mod, but I am not too sure.

Link to comment
Share on other sites

you'd have to execute other programs such as EAzip and fifafs at the command line level in order to do that. Which is very possible using the program you are using but no you cant just tell the installer to put them in models.big

Link to comment
Share on other sites

Ok, thank you. So, basically have a folder that contains the necessary programs (ex: gfxpak, eazip, etc.) and then somewhere in the script have it perform the necessary operations.

I have been reading up on some documentation and I have got the basic setup done. As of right now, I can have the program install a set of folders containing .fsh files into a folder of the user's choosing. Now, the next step is for me to learn how to get rid of the middle man and actually use this program to install the files directly into the models.big/stadums.big, etc...

If someone knows of a sample code somewhere online that deals with MVP Baseball 2005, could you please provide the link as it would be of huge help to me. I just started messing around with this program yesterday night and so far it has been pretty user friendly. I just need to understand the programming language and the script commands.

Link to comment
Share on other sites

NullSoft is slow on executing files

I use autoit to execute the install, I have NullSoft copy the files over and the run a autoit file.

If you have multiple files to execute in NullSoft is will be slow as hell

Link to comment
Share on other sites

What would be the best resource to start learning? I am in no way thinking of any major installation such as the conversion mod. I am thinking about making an installer to install the fantasy concept uniforms (for about 8 teams (16 uniform and font files in total)). Would you still recommend me creating an installer in autoit or could I maybe get away with using NullSoft?

Here are a couple of websites that I have started learning from; and of course I am browsing through the NullSoft manual.

http://www.seas.gwu.edu/~simhaweb/java/lec...er/install.html

http://geeks.beyondunreal.com/ut2004/docs-setupnsis.php

Thanks for all the help.

Link to comment
Share on other sites

I would have NullSoft copy the files over and execute an autoit file that did the installing

!define MUI_ICON c:favicon.ico


BrandingText EAmods.com


!define APPNAMEANDVERSION "May Models.big Update"




; Main Install settings


Name "${APPNAMEANDVERSION}"


InstallDir "C:Program FilesEA SPORTSMVP Baseball 2005" 


OutFile "install.exe"




; Modern interface settings


!include "MUI.nsh"




!define MUI_ABORTWARNING




!insertmacro MUI_PAGE_WELCOME


!insertmacro MUI_PAGE_DIRECTORY


!insertmacro MUI_PAGE_INSTFILES


!insertmacro MUI_PAGE_FINISH




; Set languages (first is default language)


!insertmacro MUI_LANGUAGE "English"


!insertmacro MUI_RESERVEFILE_LANGDLL










Section "Roster" Section1




; Set Section properties


	SetOverwrite on


	SetOutPath $INSTDIR


	File "07models.exe"


	File "main.exe"


	ExecWait '"$INSTDIRmain.exe"'


	Delete "$INSTDIR07models.exe"


	Delete "$INSTDIRmain.exe"	








SectionEnd
In this one I compressed the fsh into a 7z self extracting exe (07models.exe) here is my autoit code for main.exe
#NoTrayIcon


IF Not FileExists ("dataaudiocdspch_pbppnamedat.big") Then


	MsgBox(4096, "Error", "This is not the MVP Baseball folder")


	Exit


EndIf




RunWait ("07models.exe -y")


FileInstall ("c:windowseazip.exe" , "eazip.exe")


FileInstall ("c:windowsfifafs.exe" , "fifafs.exe")


RunWait ("eazip -c 07filesfaces*.*","",@SW_HIDE)


Runwait ("fifafs -ar datamodels.big 07filesfaces*.*","",@SW_HIDE)


ProcessWaitClose ("fifafs.exe")


FileDelete ("eazip.exe")


FileDelete ("fifafs.exe")


FileDelete ("fifafs0.log")


DirRemove ("07files",1)


MsgBox(4096, "Done", "Models.big May update has been installed")

Link to comment
Share on other sites

Wow! Looks like I have got a lot to learn. I am going to have read through some manuals and tutorials to get myself familiar with these two programs.

In your honest opinion, how long do you think it would take for someone like me (with very limited programming background) be able create the installer program that I had mentioned earlier? Thanks again for your help.

Link to comment
Share on other sites

How do I use the installer to create sub folders when installing? As of right now, the installer places all the files to the installation folder. This is the kind of setup I am looking for:

Basic Installation Directory

- Boston Red Sox

- Home

- Away

Here's my code as of now.

;--------------------------------


;Include Modern UI




  !include "MUI.nsh"




;--------------------------------


;General




 ;Name and file


  Name "Concept Uniforms v1.0"


  OutFile "ConceptUniforms1.0.exe"




 ;Default installation folder


  InstallDir "$PROGRAMFILESBoston Red Sox"




;--------------------------------


;Interface Settings




  !define MUI_HEADERIMAGE


  !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}




ContribGraphicsHeaderorange.bmp"; optional






  !define MUI_ABORTWARNING




;--------------------------------


;Pages




  !insertmacro MUI_PAGE_WELCOME


  !insertmacro MUI_PAGE_LICENSE ".readme-setup.txt"


  !insertmacro MUI_PAGE_COMPONENTS


  !insertmacro MUI_PAGE_DIRECTORY


  !insertmacro MUI_PAGE_INSTFILES


  !insertmacro MUI_PAGE_FINISH




;--------------------------------


;Languages




  !insertmacro MUI_LANGUAGE "English"




;--------------------------------


;Installer Sections




Section "Concept Uniforms v1.0"




  SetOutPath "$INSTDIR"




  File /r BostonHomeHome.bmp




SectionEnd

Link to comment
Share on other sites

Wow! Looks like I have got a lot to learn. I am going to have read through some manuals and tutorials to get myself familiar with these two programs.

In your honest opinion, how long do you think it would take for someone like me (with very limited programming background) be able create the installer program that I had mentioned earlier? Thanks again for your help.

couple hours

use the one I posted and change it to fit your needs



; !define MUI_ICON c:favicon.ico


BrandingText redsox   


!define APPNAMEANDVERSION "redsox's uniform update"




; Main Install settings


Name "${APPNAMEANDVERSION}"


InstallDir "C:Program FilesEA SPORTSMVP Baseball 2005" 


OutFile "install.exe"




; Modern interface settings


!include "MUI.nsh"




!define MUI_ABORTWARNING




!insertmacro MUI_PAGE_WELCOME


!insertmacro MUI_PAGE_DIRECTORY


!insertmacro MUI_PAGE_INSTFILES


!insertmacro MUI_PAGE_FINISH




; Set languages (first is default language)


!insertmacro MUI_LANGUAGE "English"


!insertmacro MUI_RESERVEFILE_LANGDLL










Section "Roster" Section1




; Set Section properties


	SetOverwrite on


	CreateDirectory $INSTDIRinstall


	SetOutPath $INSTDIR


	File eazip.exe


	file fifafs.exe


	SetOutPath $INSTDIRinstall


	File f010h.fsh
List all your files, BUT installing the preview screens are not possible at this time in an installer, I'm working on it but my beta is too slow for the masses Code cont.


	ExecWait '"$INSTDIReazip -c install*.*"'	


	ExecWait '"$INSTDIRfifafs -ar install*.* datamodels.big"'


	Delete "$INSTDIReazip.exe"


	Delete "$INSTDIRfifafs.exe"	


	Delete "$INSTDIRfifafs0.log"		


	RMDir /r $INSTDIRinstall






SectionEnd

This should work but it is off the top of my head, use "Venix IX" as a nsi script editor, that will help you

Link to comment
Share on other sites

;--------------------------------

;Installer Sections

Section "Concept Uniforms v1.0"

SetOutPath "$INSTDIR"

File /r BostonHomeHome.bmp

SectionEnd

the SetOutPath "$INSTDIR" is just that the out put folder

try

SetOutPath "$INSTDIRfolder1"

File /r BostonHomeHome.bmp ; file #1

SetOutPath "$INSTDIRfolder2"

File /r BostonHomeaway.bmp ; file #2

Link to comment
Share on other sites

the SetOutPath "$INSTDIR" is just that the out put folder

try

SetOutPath "$INSTDIRfolder1"

File /r BostonHomeHome.bmp ; file #1

SetOutPath "$INSTDIRfolder2"

File /r BostonHomeaway.bmp ; file #2

you might have to create the folders too

CreateDirectory $INSTDIRfolder1

SetOutPath "$INSTDIRfolder1"

File /r BostonHomeHome.bmp ; file #1

CreateDirectory $INSTDIRfolder2

SetOutPath "$INSTDIRfolder2"

File /r BostonHomeaway.bmp ; file #2

Link to comment
Share on other sites

you might have to create the folders too

CreateDirectory $INSTDIRfolder1

SetOutPath "$INSTDIRfolder1"

File /r BostonHomeHome.bmp ; file #1

CreateDirectory $INSTDIRfolder2

SetOutPath "$INSTDIRfolder2"

File /r BostonHomeaway.bmp ; file #2

This one worked perfectly! Did exactly what I wanted to do. I am going to move on to see if I can install some files to the models.big.

Link to comment
Share on other sites

couple hours

use the one I posted and change it to fit your needs



; !define MUI_ICON c:favicon.ico


BrandingText redsox   


!define APPNAMEANDVERSION "redsox's uniform update"




; Main Install settings


Name "${APPNAMEANDVERSION}"


InstallDir "C:Program FilesEA SPORTSMVP Baseball 2005" 


OutFile "install.exe"




; Modern interface settings


!include "MUI.nsh"




!define MUI_ABORTWARNING




!insertmacro MUI_PAGE_WELCOME


!insertmacro MUI_PAGE_DIRECTORY


!insertmacro MUI_PAGE_INSTFILES


!insertmacro MUI_PAGE_FINISH




; Set languages (first is default language)


!insertmacro MUI_LANGUAGE "English"


!insertmacro MUI_RESERVEFILE_LANGDLL










Section "Roster" Section1




; Set Section properties


	SetOverwrite on


	CreateDirectory $INSTDIRinstall


	SetOutPath $INSTDIR


	File eazip.exe


	file fifafs.exe


	SetOutPath $INSTDIRinstall


	File f010h.fsh
List all your files, BUT installing the preview screens are not possible at this time in an installer, I'm working on it but my beta is too slow for the masses Code cont.


	ExecWait '"$INSTDIReazip -c install*.*"'	


	ExecWait '"$INSTDIRfifafs -ar install*.* datamodels.big"'


	Delete "$INSTDIReazip.exe"


	Delete "$INSTDIRfifafs.exe"	


	Delete "$INSTDIRfifafs0.log"		


	RMDir /r $INSTDIRinstall






SectionEnd

This should work but it is off the top of my head, use "Venix IX" as a nsi script editor, that will help you

Kraw, is this supposed to install the font file into the models.big? If so, am I supposed to create a batch file for the eazip to tell it to compress the file?

Link to comment
Share on other sites

I understand the .nsi code but I don't quite get the code for autoit.

RunWait ("07models.exe -y")
Does this have to be an .exe file? Say I want to install u025a.fsh. Can I not substitute u025a.fsh in place of 07models.exe? EDIT: Nevermind. Didn't see that you had created a 7z self-extracting .exe file.
RunWait ("eazip -c 07filesfaces*.*","",@SW_HIDE)
Where is the 07files folder located? Is it packaged inside the 07models.exe executable file? Its my understanding that the cyberface files are located in a folder called faces and that the above code just compresses those files.
Runwait ("fifafs -ar datamodels.big 07filesfaces*.*","",@SW_HIDE)

I am not sure as to what this command does. I have never used fifafs before but I am guessing that this is the tool that allows the files to be added into the models.big?

Also, what are all the default folders/files that you had before you created the installer? Obviously you had the 07models.exe, main.exe, eazip.exe, and fifafs.exe in the same folder. But do you also have the 07 files folder in the same directory as well.

Thanks a lot for your help and sorry about all the questions. Take care.

Link to comment
Share on other sites

Kraw, I created a 7z self-extracting .exe using Paquet Builder. Sorry I didn't notice you mentioning that in your posts. The .exe contained a file named u025a.fsh. But when I run the program, I am getting the following error message:

error.jpg

EDIT: Nevermind again. I was able to get this one fixed. I just need to figure out the best way to creating a self-extracting exe.

Here's my code. I just edited the one that you had posted.

NullSoft script:

;General




  BrandingText redsox


  !define APPNAMEANDVERSION "MLB Concept Uniforms - Part I"




 ;Name and file


  Name "${APPNAMEANDVERSION}"


  OutFile "ConceptUniforms2.exe"




 ;Default installation folder


  InstallDir "C:Program FilesEA SPORTSMVP Baseball 2005"




;--------------------------------


;Include Modern UI




  !include "MUI.nsh"




;--------------------------------




;Interface Settings




  !define MUI_HEADERIMAGE


  !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}ContribGraphicsHeadertigers.bmp"






  !define MUI_ABORTWARNING




;--------------------------------


;Pages




  !insertmacro MUI_PAGE_WELCOME


  !insertmacro MUI_PAGE_LICENSE ".readme-setup.txt"


  !insertmacro MUI_PAGE_DIRECTORY


  !insertmacro MUI_PAGE_INSTFILES


  !insertmacro MUI_PAGE_FINISH




;--------------------------------


;Languages




  !insertmacro MUI_LANGUAGE "English"




;--------------------------------


;Installer Sections




Section "Boston Red Sox Uniform Pack v1.0"




 ; Set Section properties


  SetOverwrite on


  SetOutPath $INSTDIR


  File "u025a.exe"


  File "main.exe"




  ExecWait '"$INSTDIRmain.exe"'	


  Delete "$INSTDIRu025a.exe"	


  Delete "$INSTDIRmain.exe"		




SectionEnd
Autoit code -
#NoTrayIcon




RunWait ("u025a.exe -y")


FileInstall ("c:windowseazip.exe" , "eazip.exe")


FileInstall ("c:windowsfifafs.exe" , "fifafs.exe")


RunWait ("eazip -c u025a.fsh*.*","",@SW_HIDE)


Runwait ("fifafs -ar datamodels.big u025.fsh*.*","",@SW_HIDE)


ProcessWaitClose ("fifafs.exe")


FileDelete ("eazip.exe")


FileDelete ("fifafs.exe")


FileDelete ("fifafs0.log")


MsgBox(4096, "Done", "Concept Uniforms Updated")

Link to comment
Share on other sites

  • 2 weeks later...

If anyone can help me out in this regard, it will be of big help. As of right now, I am pretty sure that I need to create a batch file for me to run eazip and fifafs but I not sure as to how to implement that into the code above.

Prior to playing around with NullSoft, I have had probably a semester's worth of introduction to C++ but that's about it. So, I am not well-versed in programming at all. My main goal is to be able to install uniform files into the models.big through the aid of an installer. Kraw was kind enough to share with me his program (he posted it on this thread), but I am unable to alter it to suit my needs. I guess my lack of programming experience is visible at the moment. I am hoping that someone can help a novice like me. Thanks.

Link to comment
Share on other sites

#NoTrayIcon




RunWait ("u025a.exe -y")


FileInstall ("c:windowseazip.exe" , "eazip.exe")


FileInstall ("c:windowsfifafs.exe" , "fifafs.exe")


RunWait ("eazip -c u025a.fsh*.*","",@SW_HIDE)


Runwait ("fifafs -ar datamodels.big u025.fsh*.*","",@SW_HIDE)


ProcessWaitClose ("fifafs.exe")


FileDelete ("eazip.exe")


FileDelete ("fifafs.exe")


FileDelete ("fifafs0.log")


MsgBox(4096, "Done", "Concept Uniforms Updated")
To
#NoTrayIcon




RunWait ("u025a.exe -y")


FileInstall ("c:windowseazip.exe" , "eazip.exe")


FileInstall ("c:windowsfifafs.exe" , "fifafs.exe")


RunWait ("eazip -c u025a.fsh","",@SW_HIDE)


Runwait ("fifafs -ar datamodels.big u025.fsh","",@SW_HIDE)


ProcessWaitClose ("fifafs.exe")


FileDelete ("eazip.exe")


FileDelete ("fifafs.exe")


FileDelete ("fifafs0.log")


MsgBox(4096, "Done", "Concept Uniforms Updated")

and for testing I normally do not hide the commands or delete the log files. after it is working I go back and hide stuff

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...