Forums

Creating scripts for games that use the NSIS installer

When using POL_SetupWindow_wait, it goes on to the next section of code before the install finishes.

Auteur Réponses
drampelt Dimanche 11 Novembre 2012 à 2:22
drampeltAnonymous

I made a script to install the game Cobalt by Oxeye Game Studios. However when starting the installer and using POL_SetupWindow_wait before running it, it waits for about 3 seconds and then moves on to the next step. And then a second after that it opens the installer. 

Cobalt is installed using an NSIS installer, and I am assuming that it  runs a separate process for the actual install and then the main process ends. Does anyone have any ideas of how to work around this?

EDIT: It works fine installing it manually so I'm not quite sure what I'm doing wrong. Here is the code I am using:

POL_SetupWindow_browse "Please select the installation program. It should be named CobaltInstaller.exe" "$TITLE"

POL_SetupWindow_wait "Please wait while Cobalt installs." "$TITLE"

POL_Wine start /unix "$APP_ANSWER"

EDIT AGAIN: I looked the the auto generated script when I installed it manually and noticed it had just POL_Wine instead of POL_WINE start /unix. This works now, but what is the difference?

Edité par drampelt

petch Dimanche 11 Novembre 2012 à 2:34
petch

drampelt Dimanche 11 Novembre 2012 à 2:38
drampeltAnonymous


Have you tried without "start /unix"?

Quote from petch
I was editing the post as you replied. It works now without that, but what is the difference?
petch Dimanche 11 Novembre 2012 à 9:19
petch

It starts the "start" program, that then starts your program, instead of starting your program directly.
According to some lore it can help sometimes when the program path can be ambiguously interpreted as a windows path instead (paths to CDROMs?), but personally I've yet to see a proof of that.

So,
- it's useless at least 95% of the time
- the intermediate "start" has side effects, like "detaching" the execution of programs (what you observed)

I recommend to all not using "start" by default, only add it if it proves necessary.

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com