DarK_TaO
10th June 2006 00:59 UTC
Whole game setup (w00t)
Hi, well I'm new here, as in forums, as in NSIS =P.
So let me tell you wat's up: I'm trying to make a game Setup.
It has a lot of files and the Spanish tutorials that I read, only explain how to add the files manualy (File *.ext).
Is there, anyway to add all files in a directory and sub directories ?
Other question.
REgistry stuff.
LEt's say I want to add this to the windows registry:
[HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings]
"io"="1148601249"
"DELV"=dword:00000002
"EngineDLL"="hw.dll"
"User Token 2"=""
"User Token 3"=""
"ScreenWindowed"=dword:00000000
"CrashInitializingVideoMode"=dword:00000000
"ScreenWidth"=dword:00000400
"ScreenHeight"=dword:00000300
"ScreenBPP"=dword:00000010
"EngineD3D"=dword:00000000
How do I do that,(Just one key example :P) and How do I do to read current values if already installed?
Thanx, I'm just asking because I'ts really hard for me to read english tutorials, and spanish ones are useless (could'nt find anithyng about registry or what I've asked).
If someone is experienced and would like to give me some help by MSN, plz send me an PM with email =).
Thanx, sorry if I to n00b :P, hehe.
Joel
10th June 2006 01:07 UTC
If you see File instruction at the help system, you notice some flag called wildcard.
Good luck! :)
Mr Inches
10th June 2006 09:32 UTC
From the help files:
1) Use File File*.ext /r to (r)ecurse through subdirectories.
Look up the File command in the help for more information.
2) Use WriteRegDWord or WriteRegStr to add items to the registry. Look in the help under these items for more information.
Hope this helps.
Duncan
DarK_TaO
11th June 2006 00:27 UTC
Thnx, it was hard for me to understand the helpfile, but i finaly got it, thanks for your guide =).
Ok so the installer is ALMOST ready, i have a problem with a registry key.
I'll put it just like windows shows it.
I have spanish windows, so maybe a translation is not good
"name" "tipe" "data(?)"
"EngineDLL" "REG_SZ" "hw.dll"
How do I add that info?. DWORD command worked just fine. but I still can't add that one. =(
I tried:
WriteRegStr HKCU Software\blah\" "ENGINEDLL" "hw.dll"
and
WriteRegStr HKCU Software\blah\" "hw.dll" "ENGINEDLL"
This is what i Have until Now:
/* Script Hecho por ^DarK_TaO^
*
* Enjoy!
*
* Instalador TFC 1.6 Full v23B
*
*Tipica manera de iniciar una seccion
*
*;Seccion "Nombre de comentario" (Dejar un ; adelante)
*
*Section "Nombre de la seccion"
*
* File archivo.ext
*
*SectionEnd
*/
#
;//////////////////////////////////////////////////////
;*********************** General **********************
;
;Version
!define VERSION "1.0"
;Nombre del Programa
Name "TFC 1.6 Half-Life 1.6 V23B Nosteam"
;Nombre del archivo
OutFile "TFC Full.exe"
;Directorio por defecto
InstallDir C:\Valve
;Texto que se muestra
DirText "Por favor elegi donde queres instalar todo."
;Icono del Instalador
Icon "tf.ico"
;Buscar mejor Compresion Automaticamente
SetCompress Auto
;Guardar Archivos Temporales
SetDateSave On
;Optimizar archivos Automaticamente
SetDataBlockOptimize On
;Mostrar Detalles del instalador automaticamente (Letras verdes)
ShowInstDetails show
;Archivo de licencia
LicenseData "Lic.txt"
;******************************************************
;//////////////////////////////////////////////////////
;*********************** Desinstalar ******************
;
Section "Uninstall"
;
Delete $INSTDIR\Uninst.exe
Delete $INSTDIR\HL.exe
Delete $INSTDIR\HLDS.exe
Delete $INSTDIR\HLTV.exe
RMDir $INSTDIR
;
SectionEnd
;
;******************************************************
;//////////////////////////////////////////////////////
;*********************** Paginas **********************
;
Page license
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;
;******************************************************
;//////////////////////////////////////////////////////
;*********Seccion DLLS de la carpeta principal*********
;
Section "Registro de Windows"
;
WriteRegDWORD HKCU "Software\Valve\Half-Life\Settings" "DELV" 0x00000002
WriteRegDWORD HKCU "Software\Valve\Half-Life\Settings" "ENGINED3D" 0x00000000
WriteRegDWORD HKCU "Software\Valve\Half-Life\Settings" "ScreenBPP" 0x00000016
WriteRegDWORD HKCU "Software\Valve\Half-Life\Settings" "ScreenHeight" 0x00000300
WriteRegDWORD HKCU "Software\Valve\Half-Life\Settings" "ScreenWidth" 0x00000400
WriteRegDWORD HKCU "Software\Valve\Half-Life\Settings" "ScreenWindowed" 0x00000000
SectionEnd
;
Section "Engine Principal"
;
SetOutPath $INSTDIR
;
File a3dapi.dll
File Core.dll
File dbg.dll
File DemoPlayer.dll
File FileSystem_Stdio.dll
File FileSystem_Steam.dll
File hw.dll
File Mss32.dll
File Steam.dll
File proxy.dll
File steamclient.dll
File sw.dll
File swds.dll
File tier0_s.dll
File vgui2.dll
File vgui.dll
File voice_miles.dll
File voice_speex.dll
File vstdlib_s.dll
;
;********Carpeta principal********
;
File hl.exe
File hlds.exe
File hltv.exe
File Mp3dec.asi
File Mssv12.asi
File Mssv29.asi
File InstallRecord.blob
File hltv.cfg
File kver.kp
File hlds_steamgames.vdf
File language.inf
;
;********GLDRV********
;
SetOutPath $INSTDIR\gldrv
;
File gldrv\3dfxgl.dll
File gldrv\drvmap.txt
;
SectionEnd
;Carpeta "Plataform"
;
Section "Plataforma"
;
;------------plataform------------
;
SetOutPath $INSTDIR\platform
;
File /r platform\*.*
;
;------------reslists------------
;
SetOutPath $INSTDIR\reslists
;
File /r reslists\*.*
;
SectionEnd
;
;------------tfc------------
;Carpeta "tfc"
;
Section "TFC"
;
SetOutPath $INSTDIR\tfc
;
File /r tfc\*.*
;
SectionEnd
;Carpeta "valve"
;
Section "Half-Life"
;
;------------valve------------
;
SetOutPath $INSTDIR\valve
;
File /r valve\*.*
;
SectionEnd
Afrow UK
11th June 2006 09:55 UTC
WriteRegStr HKCU "Software\blah" "ENGINEDLL" "hw.dll"
I'm not sure if that was the exact code you posted, but you were missing a quote (").
-Stu