Closed NoamDev closed 2 months ago
@NoamDev Sorry didn't quite get around to it yet. I've had limited time in front of the computer these past weeks.
@forslund That's ok, if you need help with cross-compiling tell me:)
@NoamDev I've built a static binary of mimic for windows and added to the latest mimic-release: Direct link: https://github.com/MycroftAI/mimic1/releases/download/1.3.0.1/mimic_windows_amd64.zip
Works for me(TM) but let me know if there are issues with using it.
How can I force it to use mimic1 specifically without unpairing/disconnecting network?
@MatthewScholefield I saw that you're the one who tagged the precise releases. How do you build them?
@NoamDev I run ./build.sh in the repo.
How can I force it to use mimic1 specifically without unpairing/disconnecting network?
Select British Male as the voice, this is Mimic 1. AKA "ap" in the config which stands for "Alan Pope"
I run ./build.sh in the repo.
Thanks! I see it uses pyinstaller which does not support cross-compiling. So I think the first step towards windows build is a setup file for windows. Then, we can use pyinstaller the same way. That means the build process should be done on a windows machine. Do you think the setup file should be batch or powershell? powershell is much more convenient, but I'm afraid wine does not support powershell out of the box. Or maybe use py2exe? Edit: nevermind, pyinstaller does support cross-compilation (it didn't in the past). no need for py2exe which somewhat dead. I'll try to see if I can compile it to a windows executable. Edit2: support was removed in 1.5 again but it's possible to be done with wine.
@forslund your mimic executable works very well! i'd change my win-setup so that it'll download and unpack this. Edit: done that.
Because of multiple edits, I'll clarify about precise: to compile precise we use pyinstaller in order to compile to windows one should either:
use a windows machine
use wine
wine does not support powershell out of the box meaning if we use wine we have to use batch scripts. What's wrong with batch? In gentle words I don't like batch, it's ugly.
So, the question is: Are you OK with building precise for windows on a windows machine? please say yes 😅
I think there are two ways of looking at that. On the one hand, it makes sense to build on the target platform. On the other hand, it makes sense to ensure that all builds can be performed by the same machines, and I can't see too many people migrating from Linux to Windows =P
IMO, it comes down to how committed you are to maintaining the Windows build. If there's a reasonable chance that it might become abandonware, I think its best shot at attracting a new maintainer would be cross-compilation, so suffer through the batfile. If you expect you'll be doing it for the foreseeable future, do it however's easiest for you. I wouldn't wish a batfile on my worst enemy.
The biggest danger in packaging a FOSS project for an unsupported platform is not that you'll do it wrong. It's that you'll do it wrong and nobody else knows how to fix it. That ends with really irate users looking for help where none exists 😛 you haven't lived until you've seen somebody throw a fit at a dev team over an unofficial package they found in the Arch User Repository!
So I'd base the decision entirely on whether you think you'll still be maintaining the build in a year.
@ChanceNCounter Thanks! I'm indeed not planning to maintain that forever, so I'll work a little more to make it cross-compilable (have I just made the word up?) Batch, here we come!
Hmm, I can use python sometimes, instead. This would both more easy and maintainable.
I created windows precise build script and have built windows precise tars 🥳 I still have to make sure it actuallt works, but hay, we are one step ahead!
How can I run the tests on precise executable?
pip3 install pytest
pytest
inside or outside the venv?
Inside
As you can see in the issue, releasing a new pyache version is required. The latest release is not windows compatible (though the source code is already).
I'm away camping for a couple of days, in case Kris hasn't verified and prepped the release I can look at the pyache release this weekend and do a release (Kris permitting)
I'm away camping for a couple of days, in case Kris hasn't verified and prepped the release I can look at the pyache release this weekend and do a release (Kris permitting)
@forslund sure, enjoy yourself!
Amm, what's up with that? @krisgesling already opened a PR, but a review is needed.
I feel confused. why precise has so many places to list its requirements? requirements.txt, requirements/prod.txt and setup.py has its own independent list of requirements.. setup.py doesn't actually use the above txt files if I understand correctly, it doesn't use find_packages or something like that.. and so, build.sh in its turn doesn't use them. Am I missing anything?
Seems like some merge has gone wrong there, the requirements.txt shouldn't be needed (replaced by the requirements/prod.txt
) (and the setup.py should be changed to reference that one)
As far as I know the short list in the setup.py is the list of packages actually needed for building the executable.
Maybe my gist for building the bundle on Arm64 Linux could be of use, though windows is likely quite different so probably not.
Something that's good to know is that Python 3.8 and precise doesn't work.
I need to make sure astor's data files get included, astor (a requirement of tensorflow) now uses a file named VERSION. Ideally, I would add to the spec file:
a.datas += collect_data_files('astor', subdir=None, include_py_files=False)
But the spec tamplate is used for building many scripts and I worry that not all of them use tensorflow.. So is there a reason to worry? If so, is it possible to include those data files only when needed?
Hey all, took me a while but I adapted precise for windows support :) MycroftAI/mycroft-precise#180
Closing Issue since we're archiving the repo
This a central issue for discussions about porting Mycroft to windows. cc @el-tocino