My addon requires to run certain exes and hence I used to package the exes alongwith my addon and put them under the content dir. At the time of running the exe, I used to access the executable by going to <ProfileDir>/extensions/<addon-unique-id>/content/ dir.
While I was trying to make my addon compatible with FF 4, i figured out that now the extensions do not get expanded into a directory under extension/ dir; rather a <addon-unique-id>.xpi file is present there.
Can someone tell me how can I access my exes now?
Thanks
Kapil
You can have it unpack still by adding a line to your install.rdf file.
Related
I have created an installer program for my application using NWJS. I need to package the NWJS app into a single exe. I was going to use windows iexpress becasue that would provide exactly the function I need, however I can't use that because it does not support directorys inside the archive and even with the app html files packaged into package.nw NWJS still requires the locales directory to run and also iexpress has some security flaws.
Basically I need something like this:
1: it is a single portable executable file which contains some sort of archive with the nwjs files in it.
2: when the exe is run it extracts the archive to a temporary directory and runs nwjs.
3: when nwjs exits it deletes the temp directory.
So far I have not found any way of doing this.
I did some more research and solved it myself by using Enigma Virtual Box.
http://enigmaprotector.com/en/downloads.html
Whenever I try to load a PNG using SDL_Image's IMG_Load function it gives the error Failed loading libpng16-16.dll:. I have all the right dll's in the right path and I can use other parts of SDL_Image, but for some reason it can't load the libpng dll. How can I fix this? Any help is appreciated.
It appears that libpng16-16.dll has a dependency on zlib1.dll for MinGW-w64 (32-bit). Try to include zlib into your dependnecies--include the DLL in the folder where the executable runs.
See my article "SDL2: Loading Images with SDL_image":
If you're going to run from Visual Studio, make sure the image is in the same folder as your main.cpp file; otherwise if you're running straight from the executable, the image should be in the same folder with it.
Needless to say, what I wrote about the image here goes for the DLLs as well.
The VS do not searches dlls on anywhere except the execution dir, so you probably need to copy that dll to the Debug/ directory on your solution's path.
Very niche answer, but for those running into this issue because of pySDL2, it could be caused because your python interpreter is sub-par. For me, using the windows store install for python interpreter 3.10, gave this issue. However, when I switched to 3.10 from python.org all my issues were fixed.
This link show you how to set up SDL library/libpng16-16.dll to be available for acceess by the compiler.exe (the last step right before the sample code)
yourProgram proprety page -> Builds event-> post-build event
in my case i have
copy “C:\Users\MehdiB\Desktop\C Program\Library\SDL2-devel-2.0.4-VC\SDL2-2.0.4\lib\x86\SDL2.dll” “$(OutDir)SDL2.dll”;
copy “C:\Users\MehdiB\Desktop\C Program\Library\SDL2_image-devel-2.0.1-VC\SDL2_image-2.0.1\lib\x86\SDL2_image.dll” “$(OutDir)SDL2_image.dll”;
copy “C:\Users\MehdiB\Desktop\C Program\Library\dll\libjpeg-9.dll” “$(OutDir)libjpeg-9.dll”
here where you can get this dll
i just replaced zlib1.dll in system32 and SysWOW64 with the one downloaded from
https://github.com/OctaForge/OF-Windows/blob/master/bin_win32/zlib1.dll
.and worked nicely
I recently received the following comment from the reviewer of one of my add-ons at the official Mozilla Add-ons website:
The permissions in your XPI are broken. Most files and directories do not have the expected read and execute permissions, or indeed any permissions at all.
I wasn't aware that file permissions were an issue in XPI files. To my knowledge, none of the files in my XPI need the execute bit set (I only package standard stuff: XUL, JavaScript, CSS, etc). I create my XPI in Windows using the Cygwin zip tool, and since Windows knows nothing about file permissions, they aren't stored as they would be in Linux.
What file permissions are expected for file and directory entries in an XPI? The Extension Packaging page at MDN has the following quote, but no associated details on what they should be:
... you must verify that the file system permissions for the directories and files for the extension are set properly. Otherwise, the Extension Manager may not function properly with the extension or the extension itself may not work properly.
This is typically an issue if you create the extension package on Windows but the extension is used on Linux or OS X later - Windows doesn't have any file permissions to be put into a ZIP archive and unpacking on Linux or OS X sometimes creates bogus file permissions (000 rather than the usual 755 or 644). You could try using a different ZIP packer, e.g. Info-ZIP that doesn't cause such issues for me. Better yet, don't require your extension to be unpacked at all - <em:unpack> is often used but rarely really required.
I have the .proto file used in the open-source Android API (http://code.google.com/p/android-market-api/), and am having some trouble compiling the file to generate the .py.
I'm trying to follow the instructions here, https://developers.google.com/protocol-buffers/docs/pythontutorial , and am on the steps that are under the header "Compiling Your Protocol Buffers".
I've downloaded the compiler, protoc.exe. The readme says "To install, simply place this binary somewhere in your PATH," which I'm not understanding. I'm messed around with it for a while now, but can't think of how to proceed.
I'm quite the novice programmer, so please tell me if something isn't clear, or if I'm having some sort of fundamental misunderstanding... about anything. I'm on Windows 7 by the way.
Thanks!
if protoc.exe is not in the same directory you're calling it from, you need to add it to your PATH environment variable to be accessible from the calling directory when you're in the shell. open up a command shell and execute:
set PATH=%PATH%c:\directory\to\proto\executable;
then change directories over to where your source code is and execute the compilation line as instructed from the google page.
I had the same problem because it is not written that clear in the README.txt. What they mean is to:
1. take the protoc.exe and put it in the same folder with the other files of your project.
2. open the cmd to that directory and run: protoc --cpp_out=. myfile.proto
=> This will create the 2 new files in the folder with the files of your project, and then you can add them normally to your program.
This helped me: http://www.scriptol.com/programming/protocol-buffers-tutorial.php
This is for c++, but I guess it will be something similar for python; I guess you just have to change the command you are using in the cmd :)
I have followed the instructions here [MDC - Adding Extensions using the Windows Registry],
but haven't been able to get Firefox to automatically install my extension when I restart it.
I have written an application that is half windows service and half FF extension. I have built an installer and want it to be able to install the Firefox extension along with the service.
So far I have tried the following things:
Removing my dev version of the
extension from FF first
Removing the
pointer file to my dev version of the
extension from my profile dir
Removing my "dev" profile completelly
so that FF only has a "default"
profile
Running FF without the
-no-remote and -P switches I setup for the dev environment
Trying the
key in both HKEY_CURRENT_USER and
HKEY_LOCAL_MACHINE
Carefully checking
the ID and Paths I have used
Trying
Paths that don't include spaces
Trying the Paths in Quotes
Trying a
trailing \ at the end of the path
Trying the .xpi filename at the end of the path instead of just the dir name
Building the XPI using the Extension
Builder plugin instead of manually
(although my manual build would
install just fine if I dragged it to
FF)
I'm using FF3.5.2 on Windows 2003 Server
(could it be a W2K3 install security issue?)
UPDATE: Now tested also on WinXP FF3.0.11. Same problem.
OK. I figured it out myself! I miss-read one line of the instructions!!!
"the location of the unpacked XPI"
I must be losing my mind. For some reason I reread this as the "packed XPI" over and over!!!
(I feel very silly now)
The answer was to use the unpacked files in the install dir not the .xpi file.
I noticed that it's really important to have back-slash in the file path, ex: [TARGETDIR]Extension\Firefox\