Hello, im having problems with a nsis script im compiling. IM Having trouble with the "VIProductVersion", it always says "Error: invalid VIProductVersion format, should be X.X.X.X
Error - aborting creation process" and i have tried to figure out what is wrong but cant. What do u put in VIProductVersion part, i looked at another NSIS script and it had this in its place VIProductVersion "${Ver}" i put that in and i still get the same error message, also i put in my products version, which is "4.13.5" and i still get the same error message. Any help will be appreciated.
You are here
HELP WITH NSIS SCRIPT
March 1, 2008 - 5:11pm
#1
HELP WITH NSIS SCRIPT
means it has to have 4 digits.
If you use ${Ver} you have to specify it in advance.
In your case try 4.13.5.0 and if that doesn't work use 4.1.3.5.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Thanks 4 the help, it worked now that i put 4 digits in. I feel dumb now because that seemed so simple. thanks 4 your help now im gonna test out my app and see if it runs portably.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
My program im making portable made a folder in my application folder 4 my account. How would u add this in (cause i have it as the same format 4 apps found here) and would i have to add something to my script so it knows to save its data there.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
there are 3 possibilities:
1) You can tell the exe via a command line switch where it should look for the data. Check the VLC launcher for an example.
2) You have to set an Environment variable pointing to the settings folder. PokerTH would be an example for that.
3) You have to backup eventually existing local settings, copy the settings to the local PC, run the Application , save the settings back to the drive and rename the local settings.
3) is the most complicated so its better to use 1 or 2.
I don't know how well you know NSIS. If all this is Greek to you, then I'd suggest you study the existing launchers (Mozillas Apps are the most complicated) to get some clues.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
HERE is my script(this is my first nsis script so be nice)
(P.S I want to make Frostwire for my personal use)
["pre" tags added by mod Tim]
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Hmmm, that doesn't look right. Did you copy the log window or something?
it says this "StrCpy expects 2-4 parameters, got 1.
Usage: StrCpy $(user_var: output) str [maxlen] [startoffset]"
How would i fix this??
Also i took the NSIS script from Firefox and i have been changing some of it. i need to go through it and delete everything 4 firefox and add my stuff in.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Well, the answer is "do it the way the example says". It says it needs two parameters, and you only gave it one.
To get more assistance, you could do two things:
You probably only need to post a small amount of code at a time.
If you are posting code, you should surround the code with "pre" tags, <pre> and </pre>. That sets them in a different typeface and gives the forum software a bit of control over the length.
MC
"If you are posting code, you should surround the code with "pre" tags... That sets them in a different typeface and gives the forum software a bit of control over the length."
I did it for him, I hope I did it right.
Tim
Things have got to get better, they can't get worse, or can they?
["pre" tags added by mod Tim]
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
would anyone be willing to build a NSIS script for me cause i just dont know what to write in the script that would make it open and save its data from the "data" folder that i copied over from "my account/application data/frostwire" do u write something in the beginning like !define APPDATA "data/frostwire" cause i dont know what im doing im new at this but i though it would be fun to do. here is where i got frostwire http://www.frostwire.com/ just so u know frostwire is open source and it is hosted on sourceforge.net. here is the link to it. http://sourceforge.net/projects/frostwire/
it would be nice if john made this portable.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Hi Nathan --
Try this.
MC
thanks 4 making that. i really appreciate it.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
It runs great and so far i have had no problems with it. It also hasn't left anything on the host cpu and ive tried it on 2 computers. U should try to get John to host this cause it might be usefull to other people. Great job!!
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Let me know if you want to figure out how I did it or apply the same techniques to another program.
The IRC might be a good place to chat in closer to real time.
MC
Did u use other programs to help you with your script?? Also how did u get Frostwire to save its appdata in the data folder, cause i kept having problems with that when i tried to do it. Oh yeah do u have to have this.....
;=== Include
;!include "GetParameters.nsh"
!include "FileFunc.nsh"
; !insertmacro GetRoot
!insertmacro GetParent
!include "ReplaceInFile.nsh"
!include "StrRep.nsh"
!include "MUI.nsh"
!insertmacro GetParent
or did u just use those when u made it??
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
I copied from the FreemindPortable launcher, which was copied (I think) from SumatraPDF launcher. But I did have to work on FreemindPortable some to get the java settings to work the way I wanted.
MC
Oh yeah i saw in your script that u put under the defaultexe u put "frostwire.jar"
y didnt u put the "frostwire.exe" was there a major difference if u used the exe instead?
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
The frostwire.exe is a launcher; it activates the frostwire.jar executable. But I found (when working on Freemind) that a launcher I create (with NSIS) can do the same thing, while redirecting much of the default data storage to be on the removable drive, instead of under %appdata%. Basically I figure out what the "official" launcher is doing, then do the same thing with slightly different settings.
One way to figure it out is to see how the JAR file is launched on Linux. There is usually not an executable (like a windows .exe) but rather a shell script, which is much easier to look at. But with open source apps, the launcher itself is usually available in source code form, if you hunt for it, so you can see how it handles it on Windows.
FrostWire was a bit harder than Freemind. It kept trying to see if %appdata% might be the best place, even when told not to look there by the usual method. So I had to hunt through the .java code to find another way to tell it to stick with Data and not go checking out %appdata%. It turned out that there was a global environment variable named FROSTWIRE_PREFS_DIR that I could set, and put an end to its wandering attentions.
MC
yeah now im planning on making dvd shrink portable and i have been looking at that tutorial i posted earlier. im also gonna post how to make super hidden folders in a bit, instead of ppl hiding things by right clicking and choosing hidden.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Now it's Your Turn to Beta Test His work
Tim
[edit: Never mind, crossed posts ]
4:51
Things have got to get better, they can't get worse, or can they?
i just made DVD Shrink Portable. haha i feel so happy. I wonder if it is in the Beta selection if not im gonna post it there. Also how do u make it into .paf format and where do i get that splash screen??
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Boy are you asking the wrong guy
I'm the Mod that's Not a Dev
I would suggest that you do a little more Alpha testing at home before posting it. The fact that it "works" doesn't mean it's ready to go.
Have you checked for left over files or registry changes?
Have you tried it on a clean machine that has never had any version of the app before?
Have you tried it without Admin Privs?
One of the Devs will need to tell you about .paf format and the splash.
I just say not to rush.
It's a pain sometimes when someone posts an app "just about ready to go" and it turns out it needs 10 revisions because they didn't do basic testing themselves.
Good Luck
Tim
Things have got to get better, they can't get worse, or can they?
i just need to test it on an No Admin Privs cpu, though it should work cause i think i put in the script 4 it to run without admin privs but ill test 4 a while and ill tell u what happens.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Just a comment: I think most people think of the Intel processor (the Pentium or whatever) when they hear "central processing unit" (CPU), but it seems when you refer to CPU you are talking about the box that holds the motherboard (where the CPU plugs in) and storage and I/O devices and all the rest.
Really, you're not talking about either the physical box nor the CPU chip, but rather the desktop computer -- the way the operating system is configured, what privileges the user has, how programs run. People who hear you refer to "CPU" have to translate from "Pentium chip" to "desktop computer".
MC
Please don't post threads where the text is in all caps. Your post will be read and replied to as soon as someone gets a chance. We understand that your issue may be urgent but please refrain from this in the future.
Failure is not an option. It comes bundled with Windows.
Sean
The post is almost 27hrs old and has had 24 replies without comment on the caps.
As you did not contribute to the discussion I must ask,
Was this comment really necessary, helpful?
Please Don't Post just to post.
Respectfully,
Tim
Things have got to get better, they can't get worse, or can they?
i just found out that dvd shrink saves a setting in the alluser/appdata
man i dont know how to redirect where it saves its settings. quick question, what is !define EXEPARMS it says set some default parameters but parameters for what??
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
(Removed Script till complete)
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Nathan,
You need to slow down and be careful making replies.
You have just replied to my post to Sean's post about caps.
I am certain this is not what you wanted to do.
Note the tree/root structure of the posts.
Reply to the post that you really are referring to, not just the last one.
If you don't the posts get very messy and no one knows whose talking to whom.
In answer to your question,
Again, I'm the wrong guy to ask these questions.
YOU know more about writing an app or script than I do.
Your question is Greek to me.
Try reposting to an appropriate post higher up from the folks who were helping you earlier, or start a new topic.
Good luck,
Tim
[Dam kids know so much they make me feel stupid ]
Things have got to get better, they can't get worse, or can they?
Tim,
I completely agree with him, not that it's a huge problem, but if we all went around making every post with capital letters, it would get rather bothersome, so he's only kindly asking him to prevent from doing it in the future as I see it. Capitals normally show someone is impatient, and wants answers fast. Not saying the original poster is impatient, but if he does continue to post in caps, people may assume he is and that is how harsh responses start.
That's like saying your post above is unnecessary as many people do make that mistake, but I myself feel your reply was infact needed.
Just as Respectively,
Patrick.
But a comment like that would have been more appropriate from a mod or at least someone who was trying to answer the question of the post. And certainly earlier on.
It's like someone who posts "Search First" after others have already been giving assistance to the questioner, it's just no longer as appropriate.
Also the Title was so short I barely noticed it was all caps.
It only contained 4 words, one of which NSIS would normally be capitalized anyway. It's not like it was a sentence with 7 words in it.
I just did not think the comment was really needed at that point and in that context.
[Mod Hug ]
Tim
Things have got to get better, they can't get worse, or can they?
You edited yout post while I was replying so I now address the edit:
"That's like saying your post above is unnecessary as many people do make that mistake, but I myself feel your reply was infact needed."
He was getting lost in the thread and I was trying to help him sort it out.
God forbid he thought "I" could answer his question. I was in no way being critical, at least I hope I did not come across that way.
Tim
Things have got to get better, they can't get worse, or can they?
I agree your comment was deff. needed, I was just making a comparison.
When you define your registry in a NSIS Script do u put just where it is generally found or the all the path for example in my program i am making portable its main registry value, (like the beginning value of it) is [HKEY_CURRENT_USER\Software\DVD Shrink], then it leaves others like [HKEY_CURRENT_USER\Software\DVD Shrink\DVD Shrink 3.2\Preferences], so would i just include the main one [HKEY_CURRENT_USER\Software\DVD Shrink]
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
It depends on how the Portable Application Template handles things. Generally if you are using the registry plugin with NSIS, it will handle the whole "tree", that is, the HKCU\Software\SomeProgram plus keys and values (branches and leaves) below it like HKCU\Software\SomeProgram\Preferences. It handles the tree as a unit, making a copy of it all at once, or restoring it all at once.
Since the plugin handles the whole key and its branches as one unit, it might be easier to just let it do that, rather than trying to get it to work with the top level but leave the branches below it alone.
The question is what happens if the regular installed version is started while the Portable version is running. When the installed version reads that registry key, will it get all messed up, or change values the portable version relies on, or what? You can also think about what happens if the power fails before the launcher gets a chance to put things back. I think the Portable App Template takes care of some of that for you, but it's probably still something to test.
MC