[Project_owners] install.js

Eric Jung grimholtz at yahoo.com
Mon Jun 20 09:42:38 EDT 2005


p.s. when I say "nothing happens", I mean the extension install just
fine, but the file defaults/passwordmaker.xml isn't copied to
ProfileDir.

--- Eric Jung <grimholtz at yahoo.com> wrote:

> Hi,
> I'm trying to get my install.js to copy the file
> defaults/passwordmaker.xml, which is inside the XPI, to the profile
> directory (thanks to Phillip Chee for the help so far). Nothing
> happens... is there anyway I can get a log of the install procedure
> to see if there was an error? Here's the code I'm using...
> 
> // Add JAR file
> var profileDir = Install.getFolder('Profile', 'chrome')
> var err = Install.addFile(null, 'chrome/' + jarName, profileDir,
> null);
> // Add passwordmaker.xml
> if(err == SUCCESS) {
>   err = addFile("PasswordMaker Defaults", "0.6.1",
> "defaults/passwordmaker.xml", profileDir, "passwordmaker.xml",
> true);
>   // on unixy platforms, global defaults directory is not writable!
> Ignore this error but notify user.
>  if(err == ACCESS_DENIED || err == READ_ONLY) {
>    Install.alert("Could not write passwordmaker.xml to " +
> profileDir
> + ", probably due to a lack of permissions.\nYou should re-run the
> installation with an account\nthat has permissions or copy the file
> there manually.");
>    err = SUCCESS;
>  }
> }
> 
> Thank you,
> Eric Jung
> 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Find what you need with new enhanced search. 
> http://info.mail.yahoo.com/mail_250
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250


More information about the Project_owners mailing list