I’m trying to build the engine on windows 10. Using mingw32 shell I get this message:
Waf: The wscript in ‘e:\DefoldSource\defold\engine\dlib’ is unreadable
Traceback (most recent call last):
File “e:\DefoldSource\defold\tmp\dynamo_home\ext\bin\waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d\waflib\Scripting.py”, line 102, in waf_entry_point
set_main_module(wscript)
File “e:\DefoldSource\defold\tmp\dynamo_home\ext\bin\waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d\waflib\Scripting.py”, line 142, in set_main_module
Context.g_module=Context.load_module(file_path)
File “e:\DefoldSource\defold\tmp\dynamo_home\ext\bin\waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d\waflib\Context.py”, line 362, in load_module
exec(compile(code,path,‘exec’),module.dict)
File “e:\DefoldSource\defold\engine\dlib\wscript”, line 9, in
import Options
ImportError: No module named Options
None
Traceback (most recent call last):
File “scripts/build.py”, line 1919, in
f()
File “scripts/build.py”, line 891, in build_engine
self._build_engine_lib(args, lib, host, skip_tests = skip_tests)
File “scripts/build.py”, line 861, in _build_engine_lib
run.env_command(self._form_env(), args + plf_args + self.waf_options + skip_build_tests, cwd = cwd)
File “e:\DefoldSource\defold\build_tools\run.py”, line 63, in env_command
return _exec_command(args, shell = False, stdout = None, env = env, **kwargs)
File “e:\DefoldSource\defold\build_tools\run.py”, line 41, in _exec_command
raise ExecException(process.returncode, output)
run.ExecException
I’m not on windows so can’t check, but in general I think you should first run the package script package_win32_sdk.sh under script/package. That should create a WindowsKitssomething in a packages folder. When running build.py install_ext …, it expects to download packages from the path pointed to by the –package-path argument. That argument probably should accept local file paths, but I think for now it actually needs to be a url. I usually start a simple web server in my packages folder, using python: python -m SimpleHTTPServer (if using python 2.7, as you should when building defold). Then the install_ext command line should be something like ./scripts/build.py install_ext --platform=x86_64-win32 --package-path=http://0.0.0.0:8000
It looks like the WindowsKit version is slightly off right now, so you’ll probably need to tweak the numbers used in the scripts.
Just confirming that you need to run a HTTP file server for the packages for this step to work currently. It’s a good candidate for the community to improve to allow to run without this necessary.
Ran package_win32_sdk.sh. Placed results in the packages folder(WindowsKits-8.1.tar.gz). Using the simple web server I get this error:
Downloading http://0.0.0.0:8000/WindowsKits-8.1.tar.gz
Traceback (most recent call last):
File “scripts/build.py”, line 1919, in
f()
File “scripts/build.py”, line 479, in install_ext
self.install_sdk()
File “scripts/build.py”, line 504, in install_sdk
download_sdk( ‘%s/%s.tar.gz’ % (self.package_path, PACKAGES_WIN32_SDK_8), join(win32_sdk_folder, ‘WindowsKits’, ‘8.1’) )
File “scripts/build.py”, line 486, in download_sdk
dlpath = self._download(url)
File “scripts/build.py”, line 357, in _download
path = http_cache.download(url, lambda count, total: self._log(‘Downloading %s %.2f%%’ % (url, 100 * count / float(total))))
File “e:\DefoldSource\defold\build_tools\http_cache.py”, line 67, in download
response = urllib2.urlopen(req)
File “C:\Python27\lib\urllib2.py”, line 154, in urlopen
return opener.open(url, data, timeout)
File “C:\Python27\lib\urllib2.py”, line 429, in open
response = self._open(req, data)
File “C:\Python27\lib\urllib2.py”, line 447, in _open
‘_open’, req)
File “C:\Python27\lib\urllib2.py”, line 407, in _call_chain
result = func(*args)
File “C:\Python27\lib\urllib2.py”, line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File “C:\Python27\lib\urllib2.py”, line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 10049] The requested address is not valid in its context>