Jump to content

Installing the firefox addon sdk fails (batch file error)

I'm trying to install the firefox addons api on windows so that I can start developing addons. I've downloaded it from the links in this post on MDN, but when I follow the instructions, it comes up with the following error:
emVXsDD.png

It is running from a batch file, the source of which is as follows:

It appears to be failing at the line that says

if that helps.

If anyone knows either how to fix it or where there is a working copy of the sdk, I would greatly appreciate it.

Note that I have tried manually typing the code that was output from the program (reg QUERY etc.) and it seems to work when manually entered.

I do have python installed (x86 and x64)

EDIT: This issue is also present with v1.14 (1.15 is the latest and the one I have used above) that I downloaded from a mirror site. Which probably means it's an issue on my side.

@[member='Echo'] offrem This Source Code Form is subject to the terms of the Mozilla Publicrem License, v. 2.0. If a copy of the MPL was not distributed with thisrem file, You can obtain one at http://mozilla.org/MPL/2.0/.set VIRTUAL_ENV=%~dp0set VIRTUAL_ENV=%VIRTUAL_ENV:~0,-5%set CUDDLEFISH_ROOT=%VIRTUAL_ENV%SET PYTHONKEY=SOFTWARE\Python\PythonCorerem look for 32-bit windows and python, or 64-bit windows and pythonSET PYTHONVERSION=2.7call:CheckPython PYTHONINSTALL %PYTHONKEY%\%PYTHONVERSION%\InstallPathif "%PYTHONINSTALL%" NEQ "" goto FoundPythonSET PYTHONVERSION=2.6call:CheckPython PYTHONINSTALL %PYTHONKEY%\%PYTHONVERSION%\InstallPathif "%PYTHONINSTALL%" NEQ "" goto FoundPythonSET PYTHONVERSION=2.5call:CheckPython PYTHONINSTALL %PYTHONKEY%\%PYTHONVERSION%\InstallPathif "%PYTHONINSTALL%" NEQ "" goto FoundPythonif not defined ProgramFiles(x86) goto win32rem look for 32-bit python on 64-bit windowsSET PYTHONKEY=SOFTWARE\Wow6432Node\Python\PythonCoreSET PYTHONVERSION=2.7call:CheckPython PYTHONINSTALL %PYTHONKEY%\%PYTHONVERSION%\InstallPathif "%PYTHONINSTALL%" NEQ "" goto FoundPythonSET PYTHONVERSION=2.6call:CheckPython PYTHONINSTALL %PYTHONKEY%\%PYTHONVERSION%\InstallPathif "%PYTHONINSTALL%" NEQ "" goto FoundPythonSET PYTHONVERSION=2.5call:CheckPython PYTHONINSTALL %PYTHONKEY%\%PYTHONVERSION%\InstallPathif "%PYTHONINSTALL%" NEQ "" goto FoundPython:win32SET PYTHONVERSION=set PYTHONKEY=echo Warning: Failed to find Python installation directorygoto :EOF:FoundPythonif defined _OLD_PYTHONPATH (    set PYTHONPATH=%_OLD_PYTHONPATH%)if not defined PYTHONPATH (    set PYTHONPATH=;)set _OLD_PYTHONPATH=%PYTHONPATH%set PYTHONPATH=%VIRTUAL_ENV%\python-lib;%PYTHONPATH%if not defined PROMPT (    set PROMPT=$P$G)if defined _OLD_VIRTUAL_PROMPT (    set PROMPT=%_OLD_VIRTUAL_PROMPT%)set _OLD_VIRTUAL_PROMPT=%PROMPT%set PROMPT=(%VIRTUAL_ENV%) %PROMPT%if defined _OLD_VIRTUAL_PATH goto OLDPATHgoto SKIPPATH:OLDPATHPATH %_OLD_VIRTUAL_PATH%:SKIPPATHset _OLD_VIRTUAL_PATH=%PATH%PATH %VIRTUAL_ENV%\bin;%PYTHONINSTALL%;%PATH%set PYTHONKEY=set PYTHONINSTALL=set PYTHONVERSION=set key=set reg=set _tokens=python -c "from jetpack_sdk_env import welcome; welcome()"GOTO :EOF:CheckPython::CheckPython(retVal, key)::Reads the registry at %2% and checks if a Python exists there.::Checks both HKLM and HKCU, then checks the executable actually exists.SET key=%2%SET "%~1="SET reg=regif defined ProgramFiles(x86) (  rem 32-bit cmd on 64-bit windows  if exist %WINDIR%\sysnative\reg.exe SET reg=%WINDIR%\sysnative\reg.exe)rem On Vista+, the last line of output is:rem    (default)  REG_SZ  the_valuerem (but note the word "default" will be localized.rem On XP, the last line of output is:rem   <NO NAME>\tREG_SZ\tthe_valuerem (not sure if "NO NAME" is localized or not!)rem SO: we use ")>" as the tokens to split on, then nukerem the REG_SZ and any tabs or spaces.FOR /F "usebackq tokens=2 delims=)>" %%A IN (`%reg% QUERY HKLM\%key% /ve 2^>NUL`) DO SET "%~1=%%A"rem Remove the REG_SZset PYTHONINSTALL=%PYTHONINSTALL:REG_SZ=%rem Remove tabs (note the literal \t in the next lineset PYTHONINSTALL=%PYTHONINSTALL:	=%rem Remove spaces.set PYTHONINSTALL=%PYTHONINSTALL: =%if exist %PYTHONINSTALL%\python.exe goto :EOFrem It may be a 32bit Python directory built from source, in which case therem executable is in the PCBuild directory.if exist %PYTHONINSTALL%\PCBuild\python.exe (set "PYTHONINSTALL=%PYTHONINSTALL%\PCBuild" & goto :EOF)rem Or maybe a 64bit build directory.if exist %PYTHONINSTALL%\PCBuild\amd64\python.exe (set "PYTHONINSTALL=%PYTHONINSTALL%\PCBuild\amd64" & goto :EOF)rem And try HKCUFOR /F "usebackq tokens=2 delims=)>" %%A IN (`%reg% QUERY HKCU\%key% /ve 2^>NUL`) DO SET "%~1=%%A"set PYTHONINSTALL=%PYTHONINSTALL:REG_SZ=%set PYTHONINSTALL=%PYTHONINSTALL:	=%set PYTHONINSTALL=%PYTHONINSTALL: =%if exist %PYTHONINSTALL%\python.exe goto :EOFif exist %PYTHONINSTALL%\PCBuild\python.exe (set "PYTHONINSTALL=%PYTHONINSTALL%\PCBuild" & goto :EOF)if exist %PYTHONINSTALL%\PCBuild\amd64\python.exe (set "PYTHONINSTALL=%PYTHONINSTALL%\PCBuild\amd64" & goto :EOF)rem can't find it here, so arrange to try the next keyset PYTHONINSTALL=GOTO :EOF
FOR /F "usebackq tokens=2 delims=)>" %%A IN (`%reg% QUERY HKLM\%key% /ve 2^>NUL`) DO SET "%~1=%%A"
Edited by colonel_mortis

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×