Commit Graph

45 Commits

Author SHA1 Message Date
Damien Elmes
2d26280dab migrate the majority of the sass vars to css variables
Allows add-ons to easily override the theme, and allows us to apply
styling to elements outside of the normal document flow (like applying
the normal background colour to a position: fixed element).
2020-09-01 10:24:38 +10:00
Damien Elmes
603210149c update to latest isort, pylint and pytest 2020-08-31 12:05:36 +10:00
Damien Elmes
1f4f5b8c45 include generated js in aqt_data 2020-06-29 15:48:01 +10:00
Damien Elmes
329186f140 qt's js code now shares ts/node_modules; more graph work 2020-06-29 15:48:01 +10:00
Damien Elmes
85b28f13d2 avoid installing pyaudio on every run 2020-05-12 21:10:21 +10:00
evandrocoan
4cf64519fb Automatically install pyaudio when running make check 2020-05-09 13:26:42 -03:00
evandrocoan
a48fa4ad87 Add missing aqt and anki modules dependency requirements 2020-04-30 17:30:22 -03:00
evandrocoan
26480fb13c Fixed make clean rule not working on Windows 2020-04-26 03:02:02 -03:00
Damien Elmes
16ab351bf8 avoid unnecessary work in 'make build' 2020-04-07 10:59:14 +10:00
evandrocoan
efe319ec95 Deprecated sdist wheels and pyqtwebengine as dependency 2020-04-02 22:56:48 -03:00
evandrocoan
50e9780e66 Set to build a source distribution instead of build distribution
for aqt on qt/Makefile, because .whl files are just zip simple
zip files and do not support dynamic versioning. Also, there is no
restriction for aqt to be shipped as source tarball because it does
not ship any binaries.
2020-04-02 22:56:37 -03:00
evandrocoan
721453f923 Merge remote-tracking branch 'danielelmes/master' into create_actions_for_windows_macos
# Conflicts:
#	.github/scripts/trailing-newlines.sh
#	.github/workflows/checks.yml
#	Makefile
#	pylib/Makefile
#	qt/Makefile
#	qt/tools/typecheck-setup.sh
#	rspy/Makefile
2020-03-24 22:49:49 -03:00
evandrocoan
20c9837770 Created the .github/workflows/windows.yml
# Conflicts:
#	.github/scripts/trailing-newlines.sh
#	Makefile
#	qt/tools/typecheck-setup.sh
#	react/Makefile
#	rspy/Makefile
#	svelte/Makefile
#	tslib/Makefile
2020-03-23 19:51:03 -03:00
evandrocoan
1ade1a1a0f Fixed moved comment line on qt/aqt/main.py, long variables names on
pylib/Makefile and qt/Makefile, and rg --version not going to /dev/null
on .github/scripts/trailing-newlines.sh
2020-03-18 11:36:50 -03:00
evandrocoan
802c5b59cb Fixed mypy and pylint not building on Windows
1. error: unused 'type: ignore' comment
2. Module 'pywintypes' has no 'error' member
3. Module 'win32pipe' has no 'SetNamedPipeHandleState' member,
   but source is unavailable. Consider adding this module to
   extension-pkg-whitelist if you want to perform analysis based on
   run-time introspection of living objects.
2020-03-17 19:48:16 -03:00
evandrocoan
07a24c0d42 Fixed make check for pylint not working on Windows due
F:\Python\python.exe: can't open file '/cygdrive/f/anki/pyenv/Scripts/pylint': [Errno 2] No such file or directory
2020-03-17 19:48:16 -03:00
Damien Elmes
368e03e1a8 stop fetching qt translations as part of recompile step 2020-02-27 20:38:05 +10:00
evandrocoan
dc049ce26a Merge remote-tracking branch 'danielelmes/master' into fix_windows_build
# Conflicts:
#	Makefile
2020-02-27 00:20:34 -03:00
Damien Elmes
46fadc2a82 don't abort build if mo file fails; rename files for consistency
Issues are now checked for in CI, so there's no need to break the
build for everyone each time there's a problem with the gettext
catalogs.
2020-02-26 17:47:02 +10:00
evandrocoan
d88e5eb308 Removed the qt/Makefile INSTALL_PYAUDIO variable and
created the Makefile SYSTEM_PACKAGES updating README.development
2020-02-25 21:08:05 -03:00
evandrocoan
26cdff29ec Renamed FIND_EXEC to FIND, replaced IS_WINDOWS by specific commands
as PYTHON_BIN, ACTIVE_SCRIPT and INSTALL_PYAUDIO.
Fixed echo statements not using @ to suppress double message output.
Deprecated the usage of ECHOCMD := /bin/echo -e because it has no
effect: https://stackoverflow.com/questions/60387684/how-to-make-the-makefile-echos-to-use-bin-echo-e

# Conflicts:
#	Makefile
2020-02-25 03:15:11 -03:00
evandrocoan
19f1c98025 Fixed development compilation with Windows 10
1. Documented on README.development how to setup the environment
   for Windows.
2. Fixed qt/ts/package.json not working due usage of ; instead
   of &&
3. Fixed copy-qt-files rsync using Windows paths instead of Unix
   ones
4. Fixed Makefile's using Windows Linux Subsystem bash instead of
    the Cygwin one.
5. Ensured running the correct pip module by using python -m pip
    instead of just pip.
6. Fixed Makefiles using Windows `find` command, instead of the
    Cygwin's one (POSIX find).
7. Fixed pyenv sourcing/activate using /pyevn/bin/ instead of
    /python/Scripts/ on Windows.
8. Fixed pyaudio not installing/linking with portaudio on Windows
    by installing for a patched fork at evandroforks/pyaudio
9. Forked and fixed portaudio not building with Visual Studio 2017
    or superior and added the reference for the patched fork on
    README.development at evandroforks/portaudio.
2020-02-24 14:59:11 -03:00
Damien Elmes
4430c67069 rework Fluent handling
- all .ftl files for a language are concatenated into a single file
at build time
- all languages are included in the binary
- external ftl files placed in the ftl folder can override the
built-in definitions
- constants are automatically generated for each string key
- dropped the separate StringsGroup enum
2020-02-23 13:22:50 +10:00
Damien Elmes
f940c326c2 fix initial build failing 2020-02-17 15:48:27 +10:00
Damien Elmes
2f199750c0 make sure ftl files get updated 2020-02-17 12:35:55 +10:00
Damien Elmes
97b9b94fc7 use new file locations for translations
- translation files are now stored in a separate repo, and
use a layout compatible with Pontoon
- normalize the language code in aqt, so that old config settings
and command line arguments are correctly handled
- store Qt and gettext translations in separate subfolders
- remove Crowdin scripts
2020-02-17 08:40:17 +10:00
Damien Elmes
7dcbc7efec basic night mode support
Forces the Fusion theme when running night mode, so we don't need
to work around platform themes that don't respond to the defined
palette.

Feedback/suggestions on the chosen colours welcome - _vars.scss is the
file to change if you want to experiment with adjustments.
2020-01-23 17:27:07 +10:00
Damien Elmes
44f2f16546 move css files to scss 2020-01-23 17:27:07 +10:00
Damien Elmes
dbca596b41 clean stale build folders before build
setuptools will bundle up files from that folder even if they're
no longer in the source tree.
2020-01-15 10:07:39 +10:00
Damien Elmes
c67aefa3ea move hook gen code out of anki/
It's not needed at runtime, and this allows hooks to be updated
even when the code is broken.
2020-01-15 09:11:20 +10:00
Damien Elmes
2921037c7b remove some comments that are no longer relevant 2020-01-14 20:45:18 +10:00
Damien Elmes
f379167648 run black on generated hooks 2020-01-13 17:55:58 +10:00
Damien Elmes
402a594c7b buildinfo required to generate hooks 2020-01-13 14:55:32 +10:00
Damien Elmes
4bb3d7a958 add separate file for gui hooks 2020-01-13 14:38:05 +10:00
Damien Elmes
b42912e639 mark anki and aqt modules as having typing info
This means once they're installed via develop or a wheel, add-ons
will be able to more easily typecheck their code against the Anki
code.
2020-01-13 13:03:37 +10:00
Damien Elmes
83f0e15213 show stdout/stderr when running tests 2020-01-08 15:52:51 +10:00
Damien Elmes
844e90fc80 don't need to rerun checks each time buildhash changes 2020-01-06 19:30:54 +10:00
Damien Elmes
947d35dfca add tests and setup.py to checks; fix warnings 2020-01-06 15:27:59 +10:00
Damien Elmes
1dd1acdffe quieten wheel build 2020-01-04 12:21:58 +10:00
Damien Elmes
1c1fbde733 move top level scripts into makefile 2020-01-04 12:21:58 +10:00
Damien Elmes
0aa01605d7 add buildhash to rspy and aqt, and check all three modules match 2020-01-03 15:15:18 +10:00
Damien Elmes
e2ede3af0e output into dist/ 2020-01-03 14:32:26 +10:00
Damien Elmes
1070c866f3 switch from nose2 to pytest
pytest will show what differs in simple assert statements

concurrent mode is supported with a plugin, but like nose2, concurrent
mode hides the cause of import errors, so I've left it off for now.
2020-01-03 08:52:10 +10:00
Damien Elmes
e92ba88af1 integrate i18n into new structure 2020-01-03 08:24:59 +10:00
Damien Elmes
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00