I am trying to use Nib CSS3 extensions in stylus. Installed stylus and nib (tried local & global -g). But none works, when I do
stylus styles.styl > build/styles.css
# styles.styl
#import "nib"
I get
/usr/lib/node_modules/stylus/bin/stylus:502
throw err;
^
Error: styles.styl:1
> 1| #import "nib"
2|
3| body
4| background: linear-gradient(top, white, black)
failed to locate #import file nib.styl
at Evaluator.visitImport (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:659:21)
at Evaluator.Visitor.visit (/usr/lib/node_modules/stylus/lib/visitor/index.js:28:40)
at Evaluator.visit (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:75:18)
at Evaluator.visitRoot (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:521:27)
at Evaluator.Visitor.visit (/usr/lib/node_modules/stylus/lib/visitor/index.js:28:40)
at Evaluator.visit (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:75:18)
at Evaluator.evaluate (/usr/lib/node_modules/stylus/lib/visitor/evaluator.js:150:15)
at Renderer.render (/usr/lib/node_modules/stylus/lib/renderer.js:69:26)
at /usr/lib/node_modules/stylus/bin/stylus:496:15
at fs.readFile (fs.js:176:14)
Yes I think I missed out the -u flag as #Jonathan pointed out
the complete line of code for automatic transpilation would be :
stylus -w -u nib test.styl -o test.css
Related
I have tried building HDF5 from source, on a virtual machine Linux #1 SMP Debian 5.10.140-1 (2022-09-02). I followed the basic instructions:
gunzip < hdf5-1.14.0.tar.gz | tar xf -
cd hdf5-1.14.0
./configure --prefix=/usr/local/hdf5
make
make check # run test suite.
make install
make check-install # verify installation
The configure step runs successfully (after removing the unwanted newline characters \r in the files which caused errors, as explained in 1) but the make command returns the following errors:
Making all in src
make[1]: entrata nella directory «/home/myname/hdf5-1.14.0/src»
make all-am
make[2]: entrata nella directory «/home/myname/hdf5-1.14.0/src»
CC H5.lo
In file included from H5private.h:36,
from H5.c:21:
/usr/include/stdio.h:77:19: error: conflicting types for ‘ssize_t’
77 | typedef __ssize_t ssize_t;
| ^~~~~~~
In file included from H5private.h:26,
from H5.c:21:
H5public.h:273:13: note: previous declaration of ‘ssize_t’ was here
273 | typedef int ssize_t;
| ^~~~~~~
In file included from H5.c:21:
H5private.h:438: warning: "LOCK_SH" redefined
438 | #define LOCK_SH 0x01
|
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
from /usr/include/fcntl.h:35,
from H5private.h:31,
from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:237: note: this is the location of the previous definition
237 | # define LOCK_SH 1 /* Shared lock. */
|
In file included from H5.c:21:
H5private.h:439: warning: "LOCK_EX" redefined
439 | #define LOCK_EX 0x02
|
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
from /usr/include/fcntl.h:35,
from H5private.h:31,
from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:238: note: this is the location of the previous definition
238 | # define LOCK_EX 2 /* Exclusive lock. */
|
In file included from H5.c:21:
H5private.h:440: warning: "LOCK_NB" redefined
440 | #define LOCK_NB 0x04
|
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
from /usr/include/fcntl.h:35,
from H5private.h:31,
from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:239: note: this is the location of the previous definition
239 | # define LOCK_NB 4 /* Or'd with one of the above to prevent
|
In file included from H5.c:21:
H5private.h:441: warning: "LOCK_UN" redefined
441 | #define LOCK_UN 0x08
|
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
from /usr/include/fcntl.h:35,
from H5private.h:31,
from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:241: note: this is the location of the previous definition
241 | # define LOCK_UN 8 /* Remove lock. */
|
make[2]: *** [Makefile:1737: H5.lo] Errore 1
make[2]: uscita dalla directory «/home/myname/hdf5-1.14.0/src»
make[1]: *** [Makefile:1201: all] Errore 2
make[1]: uscita dalla directory «/home/myname/hdf5-1.14.0/src»
make: *** [Makefile:729: all-recursive] Errore 1
HDF5 defines several POSIX things for platforms like Windows, including ssize_t. If it is getting re-defined on Linux, it's probably because the header is being mis-parsed.
Why are you getting Windows line endings on Linux? Where are you getting the source tarball?
I'm pretty new in Golang and i have some problems to install gocv.
I don't know weather it is impotent to know, but
I use Manjaro Linux on version 5.19.3, the current go- version is 1.14.2 and last but not least gccgo on version 10.1.0 (amd64).
I installed gocv as described on https://gocv.io/getting-started/linux/
go get -u -d gocv.io/x/gocv
cd $GOPATH/pkg/mod/gocv.io/
make install
If it works correctly, following message should be desplayed:
gocv version: 0.24.0
opencv lib version: 4.4.0
# gocv.io/x/gocv
In file included from features2d.cpp:1:
features2d.h:22:21: error: 'SIFT' is not a member of 'cv'
22 | typedef cv::Ptr<cv::SIFT>* SIFT;
| ^~~~
features2d.h:22:21: error: 'SIFT' is not a member of 'cv'
features2d.h:22:25: error: template argument 1 is invalid
22 | typedef cv::Ptr<cv::SIFT>* SIFT;
| ^
features2d.cpp: In function 'int* SIFT_Create()':
features2d.cpp:434:28: error: 'SIFT' is not a member of 'cv'; did you mean 'SIFT'?
434 | return new cv::Ptr<cv::SIFT>(cv::SIFT::create());
| ^~~~
In file included from features2d.cpp:1:
features2d.h:22:28: note: 'SIFT' declared here
22 | typedef cv::Ptr<cv::SIFT>* SIFT;
| ^~~~
features2d.cpp:434:28: error: 'SIFT' is not a member of 'cv'; did you mean 'SIFT'?
434 | return new cv::Ptr<cv::SIFT>(cv::SIFT::create());
| ^~~~
In file included from features2d.cpp:1:
features2d.h:22:28: note: 'SIFT' declared here
22 | typedef cv::Ptr<cv::SIFT>* SIFT;
| ^~~~
features2d.cpp:434:32: error: template argument 1 is invalid
434 | return new cv::Ptr<cv::SIFT>(cv::SIFT::create());
| ^
features2d.cpp:434:38: error: 'cv::SIFT' has not been declared
434 | return new cv::Ptr<cv::SIFT>(cv::SIFT::create());
| ^~~~
features2d.cpp: In function 'KeyPoints SIFT_Detect(SIFT, Mat)':
features2d.cpp:443:9: error: base operand of '->' is not a pointer
443 | (*d)->detect(*src, detected);
| ^~
features2d.cpp: In function 'KeyPoints SIFT_DetectAndCompute(SIFT, Mat, Mat, Mat)':
features2d.cpp:460:9: error: base operand of '->' is not a pointer
460 | (*d)->detectAndCompute(*src, *mask, detected, *desc);
| ^~
Fehler: Prozess beendet mit Rückgabewert 2.
I tried to find a solution on in the internet, but I don't even understand the problem.
I hope someone can help me.
best regards
Felix
SIFT (Scale-Invariant Feature Transform) algorithm is a patented algorithm that requires user to import a non-free header file if you need to use it as below :
#include <opencv2/nonfree/nonfree.hpp>
However, the patent is already expired as of now. (OpenCV 4.4.0) So this package is moved to main repository of opencv (check release highlightes https://opencv.org/opencv-4-4-0/)
As a result,the gocv repository which using SIFT has been updated to get this algorithm from the opencv main repository as below, (in gocv v0.24.0 change log: https://github.com/hybridgroup/gocv/commit/04b71cbb6d82e8c396ccbbf0d65b446a80a0e8fa)
typedef cv::Ptr<cv::SIFT>* SIFT;
This is the line of code updated which causes you failed to build.(You will only get this error if you are not using opencv 4.4.0, you may check the MakeFile that you are using)
To solve this problem, you may try get/update the gocv repository again now as they have updated all MakeFile to use opencv 4.4.0 already. Or you may just manually update your MakeFile to change the opencv version to 4.4.0
I tried a lot of things from online forums. But never worked. Installed Xcode to see if it works. But it doesn't.
At first, there was an issue with the C executables at the time of the OpenSSL installation. But later, I found from here, the error occurred because of Anaconda installation. So I uninstalled anaconda and tried to install again.
But now it is throwing a different error.
➜ ~ rbenv install 2.4.0 Downloading openssl-1.1.0j.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246
Installing openssl-1.1.0j... Installed openssl-1.1.0j to
/Users/akashpinnaka/.rbenv/versions/2.4.0
Downloading ruby-2.4.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2 Installing ruby-2.4.0... ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.15.1 using ruby-build 20191124)
Inspect or clean up the working tree at
/var/folders/xs/gy8wglwj22g9lbhqfv9mwp7m0000gn/T/ruby-build.20191205014031.81437.0Fmlfl
Results logged to
/var/folders/xs/gy8wglwj22g9lbhqfv9mwp7m0000gn/T/ruby-build.20191205014031.81437.log
Last 10 log lines: num2int.c:64:5: note: to match this '('
sprintf(buf, "%"PRI_LL_PREFIX"u", NUM2ULL(num));
^ /usr/local/include/secure/_stdio.h:47:27: note: expanded from macro 'sprintf' builtin___sprintf_chk (str, 0, __darwin_obsz(str),
__VA_ARGS)
^ 190 warnings and 2 errors generated. make[2]: * [num2int.o] Error 1 make1: * [ext/-test-/num2int/all]
Error 2 make: *** [build-ext] Error 2
Did anyone face this problem before? Any help would be greatly appreciated.
UPDATE
Adding the last few lines in the logfile. Most of them look like errors in C lang
/usr/local/include/stdlib.h:354:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
strtouq(const char *__str, char **__endptr, int __base);
^
/usr/local/include/stdlib.h:354:36: note: insert '_Nullable' if the pointer may be null
strtouq(const char *__str, char **__endptr, int __base);
^
_Nullable
/usr/local/include/stdlib.h:354:36: note: insert '_Nonnull' if the pointer should never be null
strtouq(const char *__str, char **__endptr, int __base);
^
_Nonnull
/usr/local/include/stdlib.h:356:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
extern char *suboptarg; /* getsubopt(3) external variable */
^
/usr/local/include/stdlib.h:356:13: note: insert '_Nullable' if the pointer may be null
extern char *suboptarg; /* getsubopt(3) external variable */
^
_Nullable
/usr/local/include/stdlib.h:356:13: note: insert '_Nonnull' if the pointer should never be null
extern char *suboptarg; /* getsubopt(3) external variable */
^
_Nonnull
num2int.c:56:21: error: expected ')'
sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));
^
num2int.c:56:5: note: to match this '('
sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));
^
/usr/local/include/secure/_stdio.h:47:27: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
^
num2int.c:64:21: error: expected ')'
sprintf(buf, "%"PRI_LL_PREFIX"u", NUM2ULL(num));
^
num2int.c:64:5: note: to match this '('
sprintf(buf, "%"PRI_LL_PREFIX"u", NUM2ULL(num));
^
/usr/local/include/secure/_stdio.h:47:27: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
^
190 warnings and 2 errors generated.
make[2]: *** [num2int.o] Error 1
make[1]: *** [ext/-test-/num2int/all] Error 2
make: *** [build-ext] Error 2
Here is the pate bin for the detailed errors:
https://pastebin.com/wzLGzvC5
EDIT:
$ which clang
/usr/bin/clang
$ brew ls
adns gnutls libksba openssl ruby
autoconf icu4c libtasn1 openssl#1.1 ruby-build
automake libassuan libtool p11-kit sqlite
awk libevent libunistring pinentry unbound
coreutils libffi libusb pkg-config zlib
gettext libgcrypt libyaml postgresql
gmp libgpg-error nettle rbenv
gnupg libidn2 npth readline
$ brew doctor
Your system is ready to brew.
After I deleted the files suggested by brew doctor
Few lines from
$ ls -la /usr/local/include
total 0
drwxrwxr-x 270 akashpinnaka admin 8640 Dec 24 11:30 .
drwxr-xr-x 18 root wheel 576 Dec 5 11:15 ..
-rw-r--r-- 1 akashpinnaka admin 0 Dec 5 10:11 .keepme
lrwxr-xr-x 1 root admin 85 Dec 5 11:21 AppleTextureEncoder.h -> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AppleTextureEncoder.h
lrwxr-xr-x 1 root admin 78 Dec 5 11:21 AssertMacros.h -> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AssertMacros.h
lrwxr-xr-x 1 root admin 78 Dec 5 11:21 Availability.h -> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h
lrwxr-xr-x 1 root admin 86 Dec 5 11:21 AvailabilityInternal.h -> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternal.h
lrwxr-xr-x 1 root admin 84 Dec 5 11:21 AvailabilityMacros.h -> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityMacros.h
lrwxr-xr-x 1 root admin 86 Dec 5 11:21 AvailabilityVersions.h -> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityVersions.h
First, let trim your log to the significant part:
num2int.c:56:21: error: expected ')'
sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));
^
num2int.c:56:5: note: to match this '('
sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));
^
/usr/local/include/secure/_stdio.h:47:27: note: expanded from macro 'sprintf'
__builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__)
Basically, this says that there was an error while expanding a macro to some line in file num2int.c. So, where is does that macro come from? The log says that the macro was defined in file /usr/local/include/secure/_stdio.h.
This file correspond to a locally installed package, most probably added through brew (it could also have been installed by some application installed with a package installer, but this appears less probable). I have not found yet to which package that file belongs (don't have it on my computer and havn't found any reference to it on Google), but _stdio.h files are rather exceptionnal, so I believe that it might be related to brew's private GCC. Yet, ruby-build (when executed though rb-env install) prefer to use XCode's clang compiler, which might not support some syntax extension supported by brew's GCC.
In short, you end up loading in Apple's clang some local include file that use some syntax thaat is not compatible with that compiler.
What to do now?
You must determine if the /usr/local/include/secure/ directory is actually useful. Maybe, this is related to a program that you no longer use… I can't tell you exactly what to do about this, but here are some ideas:
Check if either secure or secure/_stdio.h is a symlink (i.e.: ls -l /usr/local/include/secure/). If they have been installed by brew, they should point to somewhere under ../Cellar/<package-name>. If there are, maybe you could consider uninstalling that package…
Run brew doctor and check for "Unexpected header files".
Ideally, you want to end up deleting that directory… If you are not certain either it is a good idea, then you may consider moving it temporarilly out of the include directory, for example by doing the following:
mkdir /usr/local/include.disabled
mv /usr/local/include/secure /usr/local/include.disabled/secure
# Compile ruby
mv /usr/local/include.disabled/secure /usr/local/include/secure
rm -rf /usr/local/include.disabled
If none of this works, please post the output of the following commands to a pastebin:
which clang
brew doctor
brew ls
ls -la /usr/local/include
How to move all OSX SDK include files out of local/include
I think the following command should be enough to move all include files pointing to the OSX SDK out of the /usr/local/include directory (my uncertainty here is related to either sub-directories were themselves symlinked, or if it is the content of these subdirectories that is symlinke… I assumed the first, and this oneliner script will miss directories if they are of the second type).
mkdir -p /usr/local/include.disabled/
find /usr/local/include/ -depth 1 -lname '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/*' -exec mv '{}' /usr/local/include.disabled/ ';'
Run these commands, then execute ls -la /usr/local/include again… There should be much less content in it. Do you still have a secure directory there?
And most importanly, can you now get through your original build?
I was facing a similar issue and can recommend the approach below that's related to binutils needing to be uninstalled first. What worked for me:
brew uninstall binutils
# Uninstalling /usr/local/Cellar/binutils/2.33.1... (134 files, 167.6MB)
rbenv install 2.6.5 && rbenv local 2.6.5 ;
# Downloading openssl-1.1.1d.tar.gz...
# -> https://dqw8nmjcqpjn7.cloudfront.net/1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
# Installing openssl-1.1.1d...
# Installed openssl-1.1.1d to /Users/auser/.rbenv/versions/2.6.5
# Downloading ruby-2.6.5.tar.bz2...
# -> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.bz2
# Installing ruby-2.6.5...
# ruby-build: using readline from homebrew
# Installed ruby-2.6.5 to /Users/auser/.rbenv/versions/2.6.5
Prior to this the I was also getting a number of varying messages in ruby-build.log - with the last being:
# ld: symbol(s) not found for architecture x86_64
A number of other steps that I took as part of my homebrew stepup (prior to uninstall) included:
brew install perl ruby rbenv
# // UPDATE PATHs with suggestions made by brew during install
which awk perl
# /usr/local/bin/awk
# /usr/local/bin/perl
# ^^^ IN SHORT ALL PATHs should be with /usr/local/opt OR /usr/local/bin
You can re-install binutils again after as needed and remember to repeat the uninstallation with any future rbenv install version(s) that you're likely to re-execute (note to self).
PS - tested on macOS Catalina 10.15.3 (19D76) successfully installing both 2.4.0 & 2.6.5
Can you try to run these commands:
brew unlink gawk
brew reinstall awk
awk
before running rbenv install 2.4.0
I would like to pack my firefox extension as xpi file. I tried by adding it to archive and name it as filename.xpi
But when i try to install it on firefox am getting "package corrupted" message. Is there any way i can create a valid xpi file ?
I have installed cygwin and tried to execute zip command to create xpi file. But got zip is not a command error.
Can somebody guide me to get it done ?
If you are on windows (to install cygwin it looks like you do), you can use the windows built in tool:
Select the contents of the extension (remember, don't select the outside folder).
Right Click
Send to
Compressed (zipped) folder
Then just replace the .zip for .xpi in the filename
Looks like your problem is on completing the point 1. correctly. Select only the contents of the extension. Not the folder that contains it.
So basically your zip file should have following structure:
my_extension.zip
|- install.rdf
|- chrome.manifest
|- <chrome>
and NOT this structure:
my_extension.zip
|- <my_extension>
|- install.rdf
|- chrome.manifest
|- <chrome>
I experienced the same problems today and found the error to be that the add-on was obviously not signed by Mozilla, causing Firefox to refuse the installation. Up until recently, it was possible to by-pass this security check by setting xpinstall.signatures.required to false in about:config. However, as of Firefox 46, signing is mandatory and no by-pass is provided any longer, see https://blog.mozilla.org/addons/2016/01/22/add-on-signing-update/ This means that one has to either downgrade to a previous version or use a non release channel version to test one's addons :(
Also, here's how I pack an extension for Firefox with command line 7z:
cd /the/extension/folder/
7z a ../<extension_name>.xpi * -r
(where 'a' stands for "add/create" and "-r" for recursive)
Or to update the extension with the file(s) we just edited:
cd /the/extension/folder/
7z u ../<extension_name>.xpi * -r
("u" for update the archive's content)
Two methods, using the GUI 7zFM.exe, or a command line or batch file.
1.0) GUI method. Assuming 7-Zip is installed with shell integration so you see 7-Zip show up in the context-menu (right-click of selected files) of Windows Explorer.
1.a) Go into the folder of your add-on.
1.b) Select all the files and folders you want to include in the .xpi. Assuming you don't have any files you want to ignore down in any sub-folders. If you do, you might want to use the command line option.
1.c) Right-click on the list of selected files, find the 7z icon, choose the Add to archive... option.
1.d) A dialog pops up. Edit the location and name of the zip file, change to .zip to .xpi, etc.
1.e) Note if you create the .xpi in the same folder, don't re-archive it in the future, as your add-on will fail horribly. You never want an .xpi ending up inside your .xpi by accident. I usually just create it in the parent folder, by adding ..\ to the beginning of the file name, e.g. ..\addon-1.2.3-fx.xpi
1.f) 7-Zip has a lot of powerful compression options, not all of which Firefox can handle. Choose settings which Firefox is able to process. Refer to image.
2.0) Command Line method. Assuming you're in Windows, and know how to open a command prompt, change drives and directories (a.k.a. folders).
2.a) CD to your add-on directory.
2.b) Use the most basic 7-Zip command line.
"C:\Program Files\7-Zip\7z.exe" a -tzip addon-1.2.3-fx.xpi *
2.c) You can get a smaller file by finding the exact command line options which correspond to the above GUI, namely:
"C:\Program Files\7-Zip\7z.exe" a -tzip -mx=9 -mm=Deflate -mfb=258 -mmt=8 "addon-1.2.3-fx.xpi" *
Note that there is no Dictionary size = 32kb option when using Deflate Compression method. Otherwise, the options are in order and correspond to the GUI.
|-----------------------|---------|--------------|
| Option / Parameter | GUI | Command line |
|-----------------------|---------|--------------|
| Archive format | zip | -tzip |
| Compression level | Ultra | -mx=9 |
| Compression method | Deflate | -mm=Deflate |
| Dictionary size | 32 KB | (none) |
| Word size | 258 | -mfb=258 |
| Number of CPU threads | 8 | -mmt=8 |
|-----------------------|---------|--------------|
| Additional Parameters | | |
|-----------------------|---------|--------------|
| Recurse into Folders | (none) | -r |
| Multiple passes | (none) | -mpass=15 |
| Preserve Timestamps | (none) | -mtc=on |
| Ignore files in list | | -x#{ignore} |
|-----------------------|---------|--------------|
Notes:
i) The multi-thread option (-mmt=8) is specific to my system which has 8 cores. You will need to lower this to 6 or 4 or 2 or 1 (i.e. remove option) if you have fewer cores, etc, or increase if you have more. Won't make much difference either way for a small extension.
ii) The option to recurse into folder may or may not be the default, so specifying this option should ensure proper recursion.
iii) The option to preserve windows timestamps (creation, access, modification) should default to on anyways, so may not be needed.
iv) The ignore files in list option is any file which has a list of files and wildcards of files you wish to exclude.
2.d) Advanced topic #1: ignore file list (examples)
|----------------|------------------------------------|
| What to Ignore | Why to Ignore |
|----------------|------------------------------------|
| TODO.txt | Informal reminders of code to fix. |
| *.xpi | In case you forget warning above! |
| .ignore | Ignore the ignore file list. |
| ignore.txt | Same thing, if you used this name. |
|----------------|------------------------------------|
"C:\Program Files\7-Zip\7z.exe" a -tzip -mx9 -mm=Deflate -mfb=258 -mmt=8 -mpass=15 -mtc=on "addon-1.2.3-fx.xpi" * -x#ignore.txt
2.e) Advanced topic #2: Batch file (Windows CMD.EXE), assuming fairly recent windows, i.e. from the 21st century. This can be as simple and rigid, or complex and flexible as you care to make it. A general balance is to assume you will be in the Command Prompt, in the top level directory of the add-on you are working on, and that you have intelligently named that directory to have the same basename of the .xpi file e.g. D:\dev\addon-1.2.3-fx directory for the addon-1.2.3-fx.xpi add-on xpi. This batch file makes this assumption, and dynamically figures out the correct basename to use for the .xpi.
#ECHO OFF
REM - xpi.bat - batch file to create Mozilla add-on xpi using 7-Zip
REM - This finds the folder name, and discards the rest of the full path, saves in an environment variable.
FOR %%* IN (.) DO SET XPI=%%~nx*
REM - Uncomment the DEL line, or delete .xpi file manually, if it gets corrupted or includes some other junk by accident.
REM DEL "%XPI%.xpi"
REM - Command line which does everything the GUI does, but also lets you run several passes for the smallest .xpi possible.
"C:\Program Files\7-Zip\7z.exe" a -tzip -r -mx=9 -mm=Deflate -mfb=258 -mmt=8 -mpass=15 -mtc=on "%XPI%.xpi" * -x#ignore.txt
REM - Cleanup the environment variable.
SET XPI=
When pack extension using 7z, compress into .zip and then rename to .xpi, dont compress i
Do as per the following while using 7z
Select only the inner contents and not the outer folder.
Enter the filename as filename.xpi and choose archive format as zip in the prompt that appears while zipping.
You will find a valid xpi file created.
Use the created xpi for installing your extension on firefox.
It works!
Just zip all the files and folders inside my_extension folder and change the resulting zipped file's extension to my_extension.xpi
/my_extension
|- defaults/
|- locale/
|- resources/
|- install.rdf
|- ... (other files and folders)
Installation of xpi file created from zipped file of my_extension folder will result error as
"This add-on could not be installed because it appears to be corrupt." error
I try myself to build a zip in several ways because I was convinced I do something wrong 'cause all i got was "package corrupted" stuff .
well.. not anymore and I do not even need to load it from Load temporary add-on (now i drag and drop the xpi file from the desktop over Waterfox and I install it as legit xpi file!
How I do that?
'Cause I try myself the github stuff I load it first in Load temporary add-on (url:about:debugging#addons) the xpi file using the method used by user314159 with the .bat file method that use 7zip.
after you load that you should read somewhere something similar to:
Extension ID
86257e65ca311ee368ffcee50598ce25733a049b#temporary-addon
then all you should do is add inside manifest.json modifying the "applications" :
"applications": {
"gecko": {
"strict_min_version": "54.0a1",
"id": "86257e65ca311ee368ffcee50598ce25733a049b#temporary-addon"
}
},
after this push Remove to uninstall the temporary addon then you should build the xpi again like you did before
now is a normal xpi file SIGNED what you can install normal ! (here is works without modifying anything else)
I use Waterfox x64 i's seems to be problems to Firefox
the answer is you should upload your extension on the hub then to use mozilla signing api
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Distribution
Create file config.js
Insert code into config.js
//
try {
Components.utils.import("resource://gre/modules/addons/XPIProvider.jsm", {})
.eval("SIGNED_TYPES.clear()");
}
catch(ex) {}
Move config.js to application work folder, eg: C:\Program Files\Mozilla Firefox\
Create config-prefs.js and write code into:
pref("general.config.obscure_value", 0);
pref("general.config.filename", "config.js");
Place config-pres.js to C:\Program Files\Mozilla Firefox\defaults\pref\
Restart Firefox
Look result
After upgrading to Xcode 4.3.2. I'm getting a metric ton of build errors.
A whole line of them are error code 255
gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
Command /usr/bin/gcc-4.2 failed with exit code 255
I noticed that there is no /usr/bin/arm-apple-darwin11-gcc-4.2.1 file on my machine. Could this be the source of the problem?
What's the output of this command?
$ printenv | grep "CC="
It might be honoring your C Compiler (CC) selection. I was getting similar errors (through cocoapods) and doing an
$ export CC=
fixed it for me.