kovidgoyal / build-calibre

Build the calibre installers, including all dependencies from scratch
https://calibre-ebook.com
GNU General Public License v3.0
29 stars 11 forks source link

Need patch in cygwin packages etc #17

Open rashuf opened 5 years ago

rashuf commented 5 years ago

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
kovidgoyal commented 5 years ago

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.

rashuf commented 5 years ago

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

rashuf commented 5 years ago

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.