PDA

View Full Version : nOOb question :/


DITMan
7th June 2003, 12:52
Okay... I've done the difficult part... now for some file-extracting issues... :/

Installing...
C:\Archivos de programa\MSN Messenger
Extract: msgslang.dll
Translated!
Execute: C:\Archivos de programa\MSN Messengermsnmsgr.exe
Completed

Everything seems OK, but it never copies the file msgslang.dll where it should be :/

the script code is:
Name "MSN6-Spanish"
AllowRootDirInstall false
OutFile "MSN6-spanish.exe"
Caption "Traducción al Español del MSN 6 (BETA)"
ShowInstDetails show
InstallDir "$PROGRAMFILES\MSN Messenger"

Section "Main"
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON1 "¿Desea instalar la actualización al español

del MSN Messenger 6 (BETA)?" IDNO cancelar

## Instalamos el pack en español...

DetailPrint "Instalando traducción..."

## Matamos el proceso del MSN Messenger
KillProcDLL::KillProc "msnmsgr.exe"
DetailPrint $R0

## Descomprimimos el archivo...
DetailPrint $INSTDIR
File "msgslang.dll"
DetailPrint "Traducido!"

## Volvemos a cargar el MSN Messenger...
Exec $INSTDIR\msnmsgr.exe

## Si no quiere instalarlo, no lo hacemos...
cancelar:

SectionEnd

MoNKi
7th June 2003, 14:12
Wow, spanish! Try this dude:

...
InstallDir "$PROGRAMFILES\MSN Messenger"
...
...
Exec $INSTDIR\msnmsgr.exe
...

You need the \ in the path.

DITMan
7th June 2003, 14:26
The problem is that

File "msgslang.dll" stores the file in C:\ instead of $INSTDIR

I've corrected the $INSTDIR\msnmsgr.exe bit, that wasn't the problem...

Monki, are you in the emulespana.net forums?? :P

Edit: Latest code:
Name "MSN6-Spanish"
AllowRootDirInstall false
OutFile "MSN6-spanish.exe"
Caption "Traducción al Español del MSN 6 (BETA)"
ShowInstDetails show
InstallDir "$PROGRAMFILES\\MSN Messenger"

Section "Main"
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON1 "¿Desea instalar la actualización al español del MSN Messenger 6 (BETA)?" IDNO cancelar

## Instalamos el pack en español...

DetailPrint "Instalando traducción..."

## Matamos el proceso del MSN Messenger
KillProcDLL::KillProc "msnmsgr.exe"
DetailPrint $R0

## Descomprimimos el archivo...
DetailPrint $INSTDIR
File "msgslang.dll"
DetailPrint "Traducido!"

## Volvemos a cargar el MSN Messenger...
Exec $INSTDIR \\ msnmsgr.exe ##Displayed bad because the php label

goto +3

## Si no quiere instalarlo, no lo hacemos...
cancelar:
DetailPrint "Instalación abortada..."

SectionEnd

Afrow UK
7th June 2003, 15:14
See the goto +3 right at the end of section.
That only needs to be goto +2, as it skips commands only, not labels or jump-to's.

The reason why it is dumping File "msgslang.dll" to "C:\" is because you have not told it to go elsewhere.
Use:
File /oname=$INSTDIR\msgslang.dll "msgslang.dll"


And you should use:
Exec $INSTDIR\msnmsgr.exe

-Stu

DITMan
7th June 2003, 15:20
Thanks for the /oname switch... it means Output Name doesn't it?

The Exec is $INSTDIR\msnmsgr.exe, but I don't know why in the php tags it isnt displayed (even I escaped it :S)

It works perfectly now, I'm finishing the documentation for my DLL... where shall I upload it??

Afrow UK
7th June 2003, 15:22
Send dll and readme in a zip to afrowuk@tiscali.co.uk and I will upload and send you a direct url back.

-Stu

Sunjammer
7th June 2003, 15:31
It works perfectly now, I'm finishing the documentation for my DLL... where shall I upload it??

The Archive (nsis.sf.net/archive) although you need admin rights to upload files. I'm assuming Afrow UK was refering to some other site for hosting your dll since he/she doesn't have admin rights at the Archive.

Actually seeing as you've made 20 pages at the Archive I might just end up giving you admin rights anyway Afrow UK ! :)

If you send me the DLL and a readme in a zip I'll upload it to the Archive for you. It will then be listed on the downloads page there with the other NSIS dlls.

MoNKi
7th June 2003, 15:32
DITMan, I am very pleased that you have successfully completed your plugin and script.

And yes, I'm in the emulespana.net forums.

DITMan
7th June 2003, 15:35
I have a web server, I was asking if I can upload it to the NSDN Archive or something like that... more 'official' :P (to be famous and all that stuff :D)

Joel
7th June 2003, 15:51
Vaya! Vos está haciendo el parche para MSN Messenger 6 en español?
Bien :up:


wow, you are making the patch for MSN Messenger 6 to spanish?
Cool :up:

DITMan
7th June 2003, 16:18
Lobo Lunar, it's done already, I'm making a automatic-useless-user-proof installer for it... :)

You can get my DLL HERE (http://petra.uniovi.es/~i6948857/proj/KillProcDLL-bin.zip)

Or reach my Home Page (http://petra.uniovi.es/~i6948857/index.php) where you can get the translation packed with NSIS using the DLL I've just created :) (and the source for the .DLL ;) )

Sunjammer
7th June 2003, 17:47
Originally posted by DITMan
.. more 'official' :P (to be famous and all that stuff :D)Well the Archive (nsis.sf.net/archive) is about as official as it gets.

DITMan
8th June 2003, 12:39
Sunjammer it's done, you can get the zip file with the binary and sources here:

http://petra.uniovi.es/~i6948857/proj/KillProcDLL-bin.zip

Sunjammer
8th June 2003, 13:02
It's been uploaded, find it on this page (http://nsis.sourceforge.net/archive/download.php), thanks.

DITMan
8th June 2003, 17:51
I've just added an Archive page here (http://nsis.sourceforge.net/archive/nsisweb.php?page=325)