Commit Graph

105 Commits

Author SHA1 Message Date
Hiroshi Miura
61c5625f3a Width adaptive list of tools
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-07-15 12:25:10 +09:00
Hiroshi Miura
15267182fa Refactoring class structure: Factory class, Data and consumer (#309)
* Introduce tooldata class

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Refactoring list command

- Introduce show_list function that is part of UI
- ListCommand class can be used as library to retrieve metadata.
- Rename ListCommand to MetadataFactory
- Rename action method to getList

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-07-15 11:48:39 +09:00
David Dalcino
30f643d5e5 Add code to validate extensions
This change adds a function that checks for obvious misuses of the
`--extension` flag, according to these rules:

1. On Qt6 for Android, an extension for processor architecture is
required.
2. On any platform other than Android, or on Qt5, an extension for
processor architecture is forbidden.
3. The "wasm" extension only works on desktop targets for Qt 5.13-5.15.

This validation function is only called on requests for 'modules' and
'architectures', because these are the only places where the version
of Qt is known and the extension matters. Hopefully, this change will
reduce confusion among users.
2021-07-13 23:51:24 -07:00
David Dalcino
d02aada8b4 Fix failure of requests for Qt 5.9.0 (#312)
* Fix failure of requests for Qt 5.9.0

Currently, the following two commands fail with an HTTP 404 when they shouldn't:

```bash
aqt list qt5 windows desktop --modules 5.9.0
aqt list qt5 windows desktop --arch 5.9.0
```

This happens because ListCommand is looking for an xml file at `<base>/<host>/<target>/qt5_590/Updates.xml`; that file doesn't exist because it's actually at `<base>/<host>/<target>/qt5_59/Updates.xml`. So far, this is the only exception like this.

This change accounts for this exception.

* fix whitespace
2021-07-14 14:53:32 +09:00
Hiroshi Miura
a5bb6b7e96 Introduce metadata package (#305)
* Introduce metadata module

that has Versions and ListCommand class

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Introduce custom Version class

A Version class override semantic_version.Version class
that accept qt versions and tools versions

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* PEP8/Black

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Improve test assertion

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Move ArchiveId class to metadata module

And Improve imports

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Refactoring Version class

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Refactoring Table class

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Refactoring Table class(wip)

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Fix output format of `list tools` command

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* list: Improve print output

avoid str.join()

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-07-13 00:10:36 +09:00