You are here

Help Needed Compiling NSIS Scripts

20 posts / 0 new
Last post
chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
Help Needed Compiling NSIS Scripts

I am trying to compile a heavily modified script from this site and neither it nor the original script will compile. They throw this message:
.
.
.
Invalid command: RealProgress::SetProgress
Error in script "C:\Documents and Settings\vuts\Desktop\NSISBackup\Other\EasyBackupSource\PortableAppsBackup.nsi" on line 267 -- aborting creation process

Full Story:

So I finally decided to learn to script in NSIS. I'm trying to make an application which is very similar to PortableApps Backup--except that it backs up files from the host computer to a USB drive, instead of the other way around. The idea is for 'normal' computer users (non-PortableApps junkies and non-computer nerds) to be able to back their computer up to a portable hard drive with just a couple clicks.

I did (what I suspect might be) all the necessary modifications to John's PortableApps Backup source and stuck it in the NSIS compiler. First it complained about not being able to

!include Registry.nsh

Well, I managed to figure out that I need to go download a Registry.nsh and put it in my Includes folder. Now, I'm running into the following problem: when I compile (either my hacked version or John's vanilla version), I get:

.
.
.
IfFileExists: "$BACKUPDIRECTORY\$BACKUPFILENAME" ? : SetupProgressBar
SetDetailsPrint: none
Invalid command: RealProgress::SetProgress
Error in script "C:\Documents and Settings\vuts\Desktop\NSISBackup\Other\EasyBackupSource\PortableAppsBackup.nsi" on line 267 -- aborting creation process

Throwing that error into the search box here yielded nothing. Throwing it into Even Google yielded nothing. I feel very lost.

I also wouldn't mind bouncing the finished product (when it's finished)off of someone who knows about copyright and trademark stuff. I really don't want to step on John's toes with my program.

If anyone has any guidance for an NSIS newbie, please either post here or (even better) email me at chris @t oremus music (but get rid of the space between oremus and music) d0t n3t.

Thanks in advance!

[edit] I misspelled the title...

nycjv321
Offline
Last seen: 16 years 3 months ago
Joined: 2006-06-04 15:53
well its sounds like

"Invalid command: RealProgress::SetProgress"

sounds like u dont have the plugin. check out NSIS home page and download then extract to the plugins directory of NSIS directory

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
thx

yep, that was it. It seems that NSIS needs a lot of plugins to be able to do PortableApps stuff...

Thanks for the quick help!
__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
just one more thing....

So I have the backup half working, with nycjv321's help. Now I have one more problem.

I'm working on the restore half of the utility. I haven't been able to get it to work. Turns out the reason is that when I read the restore directory from settings.ini, I get a full path (C:\Documents and Settings\yaddaya.dda) instead of a relative path (../../yadda.yad). 7za.exe (the command line version of 7-zip that comes with the PortableApps Backup) apparently doesn't take full paths.

This worries me a bit because, in order to restore the backup file on the USB drive, you need to switch drive letters (From, say, F:\, to C:\). How do you do this with anything other than full paths?

I could make a temporary work folder, but I'd slightly prefer not to do that. It seems to me to be a waste of computational time and not very secure, seeing that the temporary directory can easily be undeleted.

Again, any advice either here or at my above email address would be highly appreciated.
__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

nycjv321
Offline
Last seen: 16 years 3 months ago
Joined: 2006-06-04 15:53
well

instead of "../../yadda.yad"
dont you mean "..\..\yadda.yad" ?

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
yes that is what I mean

I was just lazy to find the \ key.

thanks for the quick response again.
__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

nycjv321
Offline
Last seen: 16 years 3 months ago
Joined: 2006-06-04 15:53
o ok

well cant you specify true location is 7za when extracting? refer the portable apps backup utlity source and see how john does it (which im sure u are already doing)

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
.

John gets around the problem by extracting to "$DRIVELETTER\PorttableApps\" or a similar folder. This works because $DRIVELETTER refers to the same drive that PortableApps Backup is on. The problem here is that I want the utility to be on the portable drive and I want it to copy off the portable drive (easy) to the root drive (usually C:\, very difficult).

About the only way I can think of to get around this is to extract the files to the backup drive and then use an external batch file to copy them over to C:\. However, I see some problems with this:

  1. It requires a HUGE amount of empty disk space if you're backing up, say, "My Documents".
  2. Even after the temporary file is deleted, a hacker with an undelete utility can get at the files (not really that big of an issue, but why do it if you don't have to?).
  3. It is a waste of system resources to uncompress and then copy and then delete. It would be much more efficient to just uncompress the archive to where the files are supposed to end up.
  4. The extra reads and writes increase wear on hardware.

Thanks!
[EDIT] I didn't address your question about 7za.exe.

You can't say (even if you manually type into the command line)

7za.exe x exampleArchive.7z C:\Documents and Settings\ExampleUser\Desktop\

If you do, 7za says


Error
cannot use absolute pathnames for this command

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

nycjv321
Offline
Last seen: 16 years 3 months ago
Joined: 2006-06-04 15:53
yea very true 7-zip is

yea very true
7-zip is faulted in that *every* time it extracts an it extracts to temp if u didnt already know so its already un secure so i would be only backup at home pc.
but to fix the issue why not letting user specify location to restore then pass the along to 7za such as user inputs "C:\EHbackup_2" then u pass to 7za that location and the switchs needed. im sorry if im not helped try going to 7-zip forums for more help igor (7-zip creator) should provide the answer that i appear not to have Sad

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
.

ok. well thanks for your very quick help.

@anyone who knows about these things: I should get this working pretty soon. Before trying to distribute it and getting my hand slapped for infringing on trademarks / copyrights, I wouldn't mind bouncing it off someone who knows what a trademark infringement looks like (or what a cheesy rip-off that insults the original author looks like). I respect John and PortableApps.com way too much to just randomly cheese them off.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

nycjv321
Offline
Last seen: 16 years 3 months ago
Joined: 2006-06-04 15:53
o ok i just realized that

o ok i just realized that 7za doesnt accept abosulte locations no exception so sorry i didnt fully read well like i said check with igor he could help

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
yep. I just posted something on his sf page. Thx.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Maybe I can help

about the copyright:
AFAIK, it is ok if you mention John and distribute the source (cause its GPL):
Something like

Based on John T. Hallers portable backup utility from PortableApps.com

John (or Ryan): If I am wrong, please correct me.
“Science is the belief in the ignorance of the experts” - Richard P. Feynman

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

John Bentley
John Bentley's picture
Offline
Last seen: 15 years 3 months ago
Developer
Joined: 2006-01-24 13:26
It also has to be GPLed.

It also has to be GPLed.

cowsay Moo
cowthink 'Dude, why are you staring at me.'

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
.

oh don't worry, it'll be GPL. I might try to get someone to look at the finished product when I'm done with it.
I pretty much am done with it, as soon as I'm done with some initial testing.
__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
Yep

But you can't include any PortableApps.com logos as they are trademarked.
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
.

I guess my question at this point is how thoroughly I have to get rid of all mention of PortableApps. Of course, I can't use the logo. I've gotten rid of that. What about .ini files that are called PortableApps<whatever>? What about command windows that may pop up that are labeled PortableApps Backup? What about if the source .nsi script is still called PortableAppsBackup?

Like I said, it's a fine line between building off someone else's work and giving them credit for it (good), and changing a couple pictures and icons and repackaging and calling it your work (bad--even if you include a credit). I like and respect this site WAY too much to piss the 'locals' here off.

[EDIT]: Ryan, maybe if you have some extra time, once I have a couple bugs worked out, you could take a look at it and see if it's all good?
__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
.

I've always got time Biggrin
The rest should be fine, as PortableApps.com is the trademark, but don't call your project anything with PortableApps.com or PortableApps (wo/space) as it may confuse people (and the former would be a trademark violation).
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

chris0
Offline
Last seen: 15 years 1 month ago
Joined: 2006-12-02 18:51
should I email it?

if so, to what address?
__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

__
chris

It is not your audience's responsibility to puzzle out what you intended to say; it is your responsibility to express yourself so clearly that no one with a modicum of intelligence and good will could possibly mistake your meaning.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
Yep

cubegames[at]gmail.com
Make sure it's a .7z file
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

Log in or register to post comments