New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Dictionaries on Windows #19
Conversation
Cleanup Update README Fix bug in JMnedict parsing Update Makefile Fix Bug in minifying index Fix Bug in minifying index Fix Bug in minifying index Update README Rename
Update Action
@@ -8,20 +8,22 @@ on: | |||
|
|||
jobs: | |||
build: | |||
runs-on: ubuntu-latest | |||
runs-on: windows-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to stop running on Linux. I'd like to run on both.
env: | ||
MAKEFLAGS: -j2 | ||
PYTHON3: /usr/bin/python3 | ||
run: .\build.ps1 | ||
- name: upload-artifact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer that Linux artifact is the one is uploaded, unless there's a good reason to use Windows artifacts. Because Linux is the platform I can easily build and test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrfonseca Currently there is no good reason to use windows. Kindle Previewer just uses Kindlegen, but gives us fewer options to build. This was just intended as a proof of concept.
@@ -0,0 +1,46 @@ | |||
$SENTENCES = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might as well write one single build.py
script. It would safe us the trouble of having separate Makefile PowerShell scripts.
Another alternative would be to use mingw32-make
, for example, from https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/make/ , avoiding the need for the whole cygwin
This is a proof of concept and the makefile with cygwin still is way nicer to use. Unfortunately I currently see no easy way to use cagwin in the action, since I have not found a way, how to open cygwin at the current location reliably.
Builds the dictionaries on windows the official way. However this leads to the combined dictionary not being able to be built (size).
Behind the scenes Kindle Previewer still uses kindlegen. This means we could use it instead and ensure the size stays small enough. I am not a fan of this option since it it isn't the officially supported method.