build-calibre icon indicating copy to clipboard operation
build-calibre copied to clipboard

Need patch in cygwin packages etc

Open rashuf opened this issue 6 years ago • 3 comments

Hi, Kovid!

  1. Please, add patch to list of cygwin packages.
  2. Also, I think I need to fix absolute path of WiX packages in wix.py because this path include version. Add WiX to PATH environment variable.
  3. During build I get some errors: Python function terminated unexpectedly
  [Errno 2] No such file or directory: u'C:\\t\\t\\frozen-hajxe4\\winfrozen\\app
\\resources\\localization\\iso639.calibre_msgpack' (Error Code: 1)
Traceback (most recent call last):
  File "site.py", line 101, in main
  File "site.py", line 78, in run_entry_point
  File "site-packages\calibre\debug.py", line 304, in main
  File "site-packages\calibre\test_build.py", line 316, in test
  File "site-packages\calibre\test_build.py", line 309, in find_tests
  File "site-packages\calibre\spell\dictionary.py", line 90, in <module>
  File "site-packages\calibre\spell\__init__.py", line 30, in parse_lang_code
  File "site-packages\calibre\utils\localization.py", line 408, in canonicalize_
lang
  File "site-packages\calibre\utils\localization.py", line 356, in _load_iso639
  File "site-packages\calibre\utils\resources.py", line 76, in get_path
IOError: [Errno 2] No such file or directory: u'C:\\t\\t\\frozen-hajxe4\\winfroz
en\\app\\resources\\localization\\iso639.calibre_msgpack'

and

======================================================================
ERROR: test_lzma (calibre.test_build.BuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "site-packages\calibre\test_build.py", line 66, in test_lzma
  File "site-packages\lzma\xz.py", line 480, in test_lzma2
  File "site-packages\calibre\utils\resources.py", line 76, in get_path
IOError: [Errno 2] No such file or directory: u'C:\\t\\t\\frozen-mpbikx\\winfroz
en\\app\\resources\\template-functions.json'

After adding localization directory and template-functions.json file to C:\calibre\resources I get error:

======================================================================
FAIL: test_dlls (calibre.test_build.BuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "site-packages\calibre\test_build.py", line 33, in test_dlls
AssertionError: Failed to load DLL api-ms-win-core-console-l1-1-0.dll with error
: [Error 193] %1 is not a valid Win32 application

----------------------------------------------------------------------

I could not fix only the last error. I did quick fix C:\calibre\src\calibre\test_build.py :)

def test_dlls(self):
        import win32api
        base = win32api.GetDllDirectory()
        for x in os.listdir(base):
            if x.lower().endswith('.dll'):
                try:
                    ctypes.WinDLL(str(os.path.join(base, x)))
                except Exception as err:
				    continue

Question. Kovid, why I get different msi packages (different sizes) after building? After installation fresh msi package, I get error

Python function terminated unexpectedly
No module named filename_pattern_ui (Error Code: 1)

How to fix this? Thanks! PS: I build 64 bit calibre

rashuf avatar Apr 08 '19 19:04 rashuf

If you are using a different version of WiX or any of the other deps, you will get different bte sizes. The build process is not setup for reproducible builds in any case.

kovidgoyal avatar Apr 09 '19 03:04 kovidgoyal

I use same versions of all deps for any build process.

rashuf avatar Apr 09 '19 04:04 rashuf

I builded portable installer for 32 bit calibre (./main.py 32 calibre), thx! But I after installation I get same error:

Python function terminated unexpectedly
No module named filename_pattern_ui (Error Code: 1)

For portable version, I get error:

Python function terminated unexpectedly
No module named send_email_ui (Error Code: 1)

Also I get 32bit msi packages with different sizes.

rashuf avatar Apr 09 '19 06:04 rashuf