I'm trying to run this example. But it won't run.
I've the latest version 45, along with JPM installed. From the command line if I give "jpm run" it gives couple of errors like name should be in all small letters and no content script specified etc.
How to make it run?
I want some options popup when it's browser icon is clicked. But this part as in package.json is n't working:
"browser_action": {
"default_icon": "icons/beasts-32.png",
"default_title": "Beastify",
"default_popup": "popup/choose_beast.html"
},
WebExtensions don't use JPM.
You just pack them into a ZIP file and rename it to XPI and that's it. You can also use the web-ext command-line tool to do it (web-ext build).
For testing your extension, you don't even need to pack it - just open about:debugging in your Firefox, click "Load add-on temporarily" and select your extension's main folder.
See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Packaging_and_installation for details.
Related
I installed LUA by following this guide: http://lua-users.org/wiki/BuildingLuaInWindowsForNewbies
I put LUA in Program Files(x86)>lua>5.3.5
If i open up a terminal and type 'lua' it works.
If i create a file called hello.lua with print("Hello, World!") in it, how do i run this file so it comes up in the output window of VSCode?
If i try 'start without debugging' nothing happens'. If i Terminal>Run active file/selected text, the VS terminal window says
'print("hello, world!")
Unable to initialize device PRN'
I've obviously missed something simple but i just don't see a way to run this file to the output window, and an hour hunting through the docs and i'm none the wiser. My only other experience is with VS Community where it's just CTRL+Shift+B to complile and ALt+A to run.
Anyone help?
Thanks.
The Code Runner extension supports Lua, so you can press Ctrl-Alt-N to run the current script file. If it complains about not being able to find the executable, add this to your user settings:
"code-runner.executorMap": {
"lua": "C:\\Program Files (x86)\\lua\\5.3.5\\bin\\lua.exe"
}
Install the extension "Code Runner" in VS Code;
Click the gear icon and open the "Extension Settings";
Search for "Code-runner: Executor Map";
Go into setting.json to update the directory of the installed lua.exe.
"code-runner.executorMap": {
"lua": "\"C:\\Program Files\\Lua\\lua.exe\"",
}
Do not forget to add \" before and end of the directory.
I'm developing a desktop application using javafx v8.0.60. I have created an exe package with ant in netbeans 8. When I run exe file in my computer, it is installed and run without any problem.
On the other hand, when I try to install and run it on some other computer, at the end of installation, window dialog pops up:
"Error invoking method"
I click Ok. Another window pop up saying:
"Failed to launch jvm"
Davood, greetings! I had this same problem and I, like you, found no help anywhere.
I submit to you a solution, which miraculously worked for me and helped me make sense of those blasted "Error invoking method." and "Failed to launch JVM" dialogs:
Find your .jar file
It has the same name as your Project and it's in your application's installation directory under AppData\Local\{ApplicationTitle}\app (shortcut: type %appdata% into explorer); if your project was named HelloWorld, there you will find HelloWorld.jar
Navigate to it's directory in command prompt
shift+Right Click any blank spot in the Explorer window and choose "Open command window here" (that's a fancy trick I recently learned; alternatively you would cd to the same directory using the command prompt)
Run your .jar via the command line
type java -jar "HelloWorld.jar" and hit Enter
Tadah! Behold your hidden exceptions (the existence of which "Error invoking method." so vaguely tries to communicate to you). *
If your problem is similar to mine it stems from a file structure difference between the project out folder and the installation directory, and that's why the program compiles just fine in the editor and builds just fine—there isn't a problem until it's built out, and the file structure is a little different.
*If you didn't get anything when you ran it via the command line, look for any errors that could be happening during that initialize() method; that's where your problem likely is. You can expose any exceptions during runtime by using a Popup Exception Dialog like shown in a similar problem, here.
How do you execute a lua file in sublime text 3? I tried opening the console and typing build <filename>.lua. I also looked through the menu's for a build and run. Supposedly saving a file or hitting F7 is supposed to execute lua scripts, but that did not work either. I expected 'helo world' to print in the console upon save and all it said was the file was written.
contents of helo.lua:
print('helo world');
You can manually create a build configuration for Lua. However, I suggest that it is simpler to install a Lua package that includes one.
Install Package Control
Open the Command Palette (Ctrl-Shift-P on Windows or COMMAND + SHIFT + P on Mac)
Type something like "packins" to get the "Package Control: Install Package" item.
After a momentary pause a list of available packages will appear. Type "Lua" to filter to Lua packages.
My personal favorite is "Lua Dev". Select this package and Package Control will download and install the package for you.
From now on, if your have your syntax set to Lua for a file (Ctrl-Shift-P, "Set Syntax: Lua", or click in the bottom right corner of the window and choose Lua) then pressing F7 (aka Tools->Build) will evaluate the file using the Lua interpreter.
You may also need to install "Fix Mac Path". At the time of this writing this package was not found by Package Control. Alternatively, install "Fix Mac Path" by running the following command in terminal:
git clone https://github.com/int3h/SublimeFixMacPath.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/FixMacPath
Go to Tools > Build System > New Build System.
Paste this code
{
"cmd": ["lua", "$file"],
"file_regex": "^lua: (...*?):([0-9]*):?([0-9]*)",
"selector": "source.lua"
}
Save it as lua.sublime-build
To run a lua program press ctrl+B.
PS: Ensure that lua executable is in you $PATH
I am developing an Add-on and I am having trouble finding documentation that explains how to let Firefox know where to look for updates. If I post an .xpi on my website and the user downloads and installs that .xpi, does Firefox know to check that URL for changes? or do I have to put something in package.json?
Are you using the online builder or the SDK command-line tool? You can only specify the update url using the cfx tool:
https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/cfx
When building your add-on, you would run cfx xpi with the following arguments:
cfx xpi --update-link https://example.com/addon/latest
--update-url https://example.com/addon/update_rdf
If you have already built your add-on using builder, a hackier option would be to download the xpi, unzip it, manually edit install.rdf and then re-zip it. See MDN for documentation on install.rdf syntax:
https://developer.mozilla.org/en/Install_Manifests
I am trying to install a firefox xpi silently through an msi installer. I am doing so by the following method:
Unzip my xpi in some temp dir and copy all the contents of that to the %APPDATA%\Mozilla\Firefox\Profiles\xxxx.default\extensions\<uniqueid-for-my-addon>
I expected the addon to be available the next time my firefox opens, but I am not able to get it. Can someone tell me if there is more to be done for a silent install of firefox addons?
Kapil
You want to add your add-on via the windows registry.
The key is the name of the folder you are placing inside the extensions folder, it has to be called as the extension id (which is defined inside the install.rdf file).
Also note that this will not be a completely silent install, the addon install dialog will warn the user the next time Firefox is started with that profile that a new extension has been installed.