Archive: script help


script help
ok, I searched, I read, and I still don't understand. I used Venis wizard to create my script, and I looked at the font reg plug in. I just don't understand how, where to place the script. No matter how I do it it comes out wrong. I just made a skin for another program (not Winamp), and it requires a font. I know that I could just have a reboot prompt at the end of the install, but I would rather not. Also some users may be using XP, 98, ME or 2000, so I need the installer to find the font folder and the reg key. If someone could just modify this script and post it I would be greatful.

; Script generated with the Venis Install Wizard

; Define your application name
!define APPNAME "test"
!define APPNAMEANDVERSION "test 1.0"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "C:\Program Files\test\"
OutFile "..\..\Program Files\Venis\test.exe"

; Modern interface settings
!include "MUI.nsh"

!define MUI_ABORTWARNING

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "EULA.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_LINK "Visit my website for the latest news."
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.test.net/test.html"

!define MUI_FINISHPAGE_RUN "C:\Program Files\test\test.exe"

!insertmacro MUI_PAGE_FINISH

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

Section "test" Section1

; Set Section properties
SetOverwrite on

; Set Section Files and Shortcuts
SetOutPath "$INSTDIR\"
File "..\..\Program Files\test\test.exe"
File "..\..\Program Files\test\test.jpg"
File "..\..\Program Files\test\test1.jpg"

SectionEnd

Section "test font" Section2

; Set Section properties
SetOverwrite on

; Set Section Files and Shortcuts
SetOutPath "C:\Windows\Fonts\"
File "..\..\My Documents\test font\test.TTF"

SectionEnd

; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "test"
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Required font!"
!insertmacro MUI_FUNCTION_DESCRIPTION_END

BrandingText "me"

; eof

Thanks


No one can help me?:(


Its hard to imaging that no one here is willing to take a moment to help me. I dont understand the script and I'm not a programmer. I really dont feel like taking a course on scripting when this is probably the only time I will ever use it.

Please take a moment to help, please.


Attaching script...

Look, this is simple:
1. Read the DOCs about the constants of Windows, Program files, etc...

2. The font isn't apply that easy, search the web archive for the font installer, more or less.

3. Try to post exactly the error, that way we can guide without the hole script editing...

Just, as you posted, take a time to see the examples, readmes, FAQ, etc., then you can mastering the power of NSIS.

Hope that I helped... :winamp: :)


Originally posted by Lobo Lunar
Attaching script...

Look, this is simple:
1. Read the DOCs about the constants of Windows, Program files, etc...

2. The font isn't apply that easy, search the web archive for the font installer, more or less.

3. Try to post exactly the error, that way we can guide without the hole script editing...

Just, as you posted, take a time to see the examples, readmes, FAQ, etc., then you can mastering the power of NSIS.

Hope that I helped... :winamp: :)
1. I don't understand all that, Its over my head. Its seems everything is geared towards those who already understand the script language. I dont understand the terms or the definitions of the terms. Push the stack means nothing to me. While I'm sure its easy for you it's definitely not easy for me.

2. I have found the font plugin, but again there's nothing that tells me how to use it. It seems once again that it's geared for those who know the script language. There are two parts that must be edited in some way and placed some where in the script, but no indication where they go or what changes must be made.

3. I cant get an error for you because as I stated before I don't know how I need to change the font plugin script, or where to place it within my script.

As for taking some time to learn for myself. Well I have tried. I have probably spent ten hours trying to figure this out for myself. I have search, and read the docs., I have not seen an example on how the font plugin works in a complete script, so without that I am just stabing in the dark.

This is really over my head, I just wanted to make an installer for a skin that I made, and to have it install and register the font, so that users dont have to install the font manually, or reboot.

Plugin calls are done on run-time, therefore they go in a Section or a Function.

So, call the Font plugin in a Section preferably after you extract the font!

-Stu


ok, this is what from the font register fonts page.

Save this script as a NSIS Include file in the Include directory of NSIS so that then you can easily get font registration functionality in any script by simply including this file. (Suggested file name: FontReg.nsh)
(actually I had to change it to FontReg.nsi before I could include it) Is that correct?

I did that and added !include FontReg.nsi in section 2 after DetailPrint. Am I on the right track so far? Now I get an error.
"!include: error in script: "C:\PROGRAM FILES\NSIS\Include\FontReg.nsi" on line 1
Error in script "stdin" on line 53 -- aborting creation process"

Line 1 is "var FONT_DIR", what should it be?

I did that and added !include FontReg.nsi in section 2 after DetailPrint

!include

Must go out-side from the sections.
Look, contact me by pm (private message) I can help you by MSN... :) If you want.....