virtaal icon indicating copy to clipboard operation
virtaal copied to clipboard

New Virtaal release for Windows.

Open mbirtwell opened this issue 9 years ago • 5 comments

Hi, I was wondering when or if you are likely to release a new build of Virtaal for Windows. The feature that has prompted me to ask is the pythonbraceformat checker, that has gone in to translate-toolkit. I've tried using the currently released virtaal package with a new translate-toolkit library on Linux and that works just fine. I was unable to successfully build virtaal for windows like this though.

mbirtwell avatar Oct 29 '15 15:10 mbirtwell

Thank you for the interest. In the past I built the Windows packages, but it is not easy for me to do so any more. I've tried to get back to it a while ago, and a few things were giving problems. I can help you with getting up to speed on the basics, and it would be a tremendous help if you can take that over from me. I recently considered releasing a new version without a Windows build just because I haven't been able to make one as polished as the currently published one.

I can provide more details if you are interested in trying this. The new version has some other bugfixes as well that I think are nice to have.

friedelwolff avatar Oct 30 '15 08:10 friedelwolff

That's a very kind offer. I don't see myself wanting to take this over long term, because I don't really expect to be involved in translation long term. But I'm happy to help out a bit perhaps develop a script that itself has minimal dependencies and will install all the dependencies and build the Windows package to make this better for the next person. It would really cool to get it running on some kind of CI service AppVeyor maybe. What do you think I imagine I might need your help a bit.

mbirtwell avatar Oct 30 '15 13:10 mbirtwell

Oh I forgot to actually ask the questions I had to continue:

  • I was trying to build the 0.7 branch because that seemed like it was likely to be stable. Is this the right approach or is there a proposed release?
  • I have successfully run the setup.py bdist_wininst command I think that produced the installer for the virtaal package on it's own (.win.exe). Rather than the all in one installer (-setup.exe) which is what's on the website. I tried running the setup.py py2exe command to get the -setup.exe. Is that right?
  • If I try to run virtaal after installing it as a python package using the installer it appears to fail to find some dlls which I think are present.
Jonathan@JSH-VOSTRO C:\Users\Jonathan
> C:\Python27\python.exe C:\Python27\Scripts\virtaal

** (python.exe:2904): WARNING **: Error loading plugin: `C:\Python27\lib\site-packages\enchant\lib\enchant\libenchant_ispell.dll': The specified module could not be found.


** (python.exe:2904): WARNING **: Error loading plugin: `C:\Python27\lib\site-packages\enchant\lib\enchant\libenchant_myspell.dll': The specified module could not be found.


Jonathan@JSH-VOSTRO C:\Users\Jonathan
> dir C:\Python27\lib\site-packages\enchant\lib\enchant\
 Volume in drive C is OS
 Volume Serial Number is 5271-0F7E

 Directory of C:\Python27\lib\site-packages\enchant\lib\enchant

29/10/2015  14:44    <DIR>          .
29/10/2015  14:44    <DIR>          ..
29/10/2015  14:44           449,832 libenchant_ispell.dll
29/10/2015  14:44           937,047 libenchant_myspell.dll
29/10/2015  14:44               100 README.txt
               3 File(s)      1,386,979 bytes
               2 Dir(s)  132,930,252,800 bytes free
  • When trying to run setup.py py2exe I get some suspicious similar errors but then it bombs out unable to find a dictionary.
Jonathan@JSH-VOSTRO C:\Users\Jonathan\virtaal
> C:\Python27\python.exe setup.py py2exe

** (python.exe:7108): WARNING **: Error loading plugin: The specified module could not be found.


** (python.exe:7108): WARNING **: Error loading plugin: The specified module could not be found.

Traceback (most recent call last):
  File "setup.py", line 620, in <module>
    main(options)
  File "setup.py", line 598, in main
    options = add_platform_specific_options(options)
  File "setup.py", line 559, in add_platform_specific_options
    return add_win32_options(options)
  File "setup.py", line 447, in add_win32_options
    options['data_files'].extend(find_enchant_files())
  File "setup.py", line 419, in find_enchant_files
    en = enchant.Dict('en')
  File "C:\Python27\lib\site-packages\enchant\__init__.py", line 555, in __init__
    _EnchantObject.__init__(self)
  File "C:\Python27\lib\site-packages\enchant\__init__.py", line 168, in __init__
    self._init_this()
  File "C:\Python27\lib\site-packages\enchant\__init__.py", line 562, in _init_this
    this = self._broker._request_dict_data(self.tag)
  File "C:\Python27\lib\site-packages\enchant\__init__.py", line 307, in _request_dict_data
    self._raise_error(eStr % (tag,),DictNotFoundError)
  File "C:\Python27\lib\site-packages\enchant\__init__.py", line 255, in _raise_error
    raise eclass(default)
enchant.errors.DictNotFoundError: Dictionary for language 'en' could not be found
You have new mail in /var/spool/mail/root

So what do you think have you seen those kinds of errors before?

mbirtwell avatar Oct 30 '15 14:10 mbirtwell

Great that you already looked into it! Some comments:

  • The -setup.exe installer is made with "setup.py innosetup". However, I guess getting py2exe working will be necessary anyway.
  • Enchant is probably going to be the hardest part, if not the only really hard part. Uncomment the line calling find_enchant_files() (looks like setup.py::447 from your traceback) to get something usable to start with. Then it is easier to add one thing at a time.
  • Consider trying to build from git master. I did some fixes, cleanups, and I think it might be easier to work with, especially with current versions of the dependencies. I don't think we will re-release 0.7 anyway, and the current code in git is fairly stable (it has mostly seen bugfixes and isolated features since 0.7 anyway).
  • I don't have an immediate idea about the enchant errors, but as a start, maybe check that it is the right architecture (I assume you are using 32 bit versions for everything), and that you can import it from the command line and do a basic test (outside of Virtaal).

I hope that helps!

friedelwolff avatar Oct 31 '15 12:10 friedelwolff

Thank you all for working on this. For non-full time translators (and for some full time translators as well) I think this is the best CAT there is. I mention it in every training I give.

gertva avatar Oct 31 '15 12:10 gertva