update the readme + preparations for Qt 5.9.0

This commit is contained in:
therecipe 2017-04-08 19:46:06 +02:00
parent 3221164870
commit 88938f41fe
6 changed files with 53 additions and 15 deletions

View file

@ -44,6 +44,33 @@ The following targets are currently supported:
| SailfishOS-Emulator | 32 | system libs | No | Windows/macOS/Linux |
| AsteroidOS | arm | system libs | No | Linux |
FAQ
---
- What are the system requirements?
- 2.5gb free ram (only needed during the setup) and at least 5gb free disk space.
- How long does it take to get started?
- It takes 15-30 min to download and install everything.
- Why is the setup so slow?
- The setup spends most of it's time installing the packages to speed up the compilation of your applications later.
- Can I make the setup faster or lower the system requirements?
- Yes, you can export `QT_STUB=true` prior running the setup, and thereby also lower the system requirements.
- Why is qtdeploy so slow?
- qtdeploy is slow, because it is intended to be used for deploying and therefore takes some extra actions that may not be needed during development.
- Can I make qtdeploy faster?
- Yes, you can use the `-fast` flag to skip most of the actions taken otherwise and so drastically reduce the time it takes to compile your application.
Docker
------
@ -126,7 +153,7 @@ These are some general environmental variables, you can find the target specific
<details> <summary>Official (with Android support)</summary>
- Install Go: https://golang.org/doc/install?download=go1.8.windows-amd64.msi
- Install Go: https://golang.org/doc/install?download=go1.8.1.windows-amd64.msi
- Clone the repo: `go get -u -v github.com/therecipe/qt/cmd/...`
@ -146,7 +173,7 @@ These are some general environmental variables, you can find the target specific
<details> <summary>MSYS2</summary>
- Install Go: https://golang.org/doc/install?download=go1.8.windows-amd64.msi
- Install Go: https://golang.org/doc/install?download=go1.8.1.windows-amd64.msi
- Clone the repo: `go get -u -v github.com/therecipe/qt/cmd/...`
@ -184,7 +211,7 @@ These are some general environmental variables, you can find the target specific
<details> <summary>Official (with iOS/Android support)</summary>
- Install Go: https://golang.org/doc/install?download=go1.8.darwin-amd64.pkg
- Install Go: https://golang.org/doc/install?download=go1.8.1.darwin-amd64.pkg
- Install Xcode
@ -206,7 +233,7 @@ These are some general environmental variables, you can find the target specific
<details> <summary>HomeBrew (no deployments possible)</summary>
- Install Go: https://golang.org/doc/install?download=go1.8.darwin-amd64.pkg
- Install Go: https://golang.org/doc/install?download=go1.8.1.darwin-amd64.pkg
- Install Xcode
@ -228,7 +255,7 @@ These are some general environmental variables, you can find the target specific
<details> <summary>Official (with Android support)</summary>
- Install Go: https://golang.org/doc/install?download=go1.8.linux-amd64.tar.gz
- Install Go: https://golang.org/doc/install?download=go1.8.1.linux-amd64.tar.gz
- Clone the repo: `go get -u -v github.com/therecipe/qt/cmd/...`
@ -261,7 +288,7 @@ These are some general environmental variables, you can find the target specific
<details> <summary>Pkg-Config (no deployments possible)</summary>
- Install Go: https://golang.org/doc/install?download=go1.8.linux-amd64.tar.gz
- Install Go: https://golang.org/doc/install?download=go1.8.1.linux-amd64.tar.gz
- Clone the repo: `go get -u -v github.com/therecipe/qt/cmd/...`
@ -928,12 +955,10 @@ type exampleStruct struct {
//this will let qtmoc know that you want a property called "firstProperty"
//there will be helper getter + setter functions and a changed signal created called:
//FirstProperty (IsFirstProperty for bools), SetFirstProperty, FirstProperyChanged
//the changed signal will be automatically called, when the property changes
_ string `property:"firstProperty"`
}
//this function will be automatically called, when you use the `NewExampleStruct` function
//because you defined the "init" function as the constructor
func (s *exampleStruct) init() {
//here you can do some initializing
s.SetFirstProperty("defaultString")
@ -979,7 +1004,7 @@ It's recommended to use `qtdeploy -fast build ...` if you want to have your proj
This will skip most of the actions `qtdeploy` would take otherwise, such as running `qtmoc`, `qtminimal` and deploying your project.
Note that this option is only available for the `desktop` target, and on windows it's mandatory to run the normal deployment at least once before using the `-fast` flag.
Note that this option is only available for the `desktop` target, and it's mandatory to run the normal deployment at least once before using the `-fast` flag.
Beside the option to use the `-fast` flag, you could also just use `qtrcc`, `qtmoc` and `qtminimal` manually with `go build`.

View file

@ -30,6 +30,8 @@ func main() {
var docker bool
flag.BoolVar(&docker, "docker", false, "run command inside docker container")
//TODO: -fast flag
if cmd.ParseFlags() {
flag.Usage()
}

View file

@ -108,7 +108,8 @@ func CleanName(name, value string) string {
"new",
"signal",
"ptr",
"register":
"register",
"forever":
{
return name[:len(name)-2]
}
@ -123,7 +124,7 @@ func CleanName(name, value string) string {
}
}
case "f":
case "f", "fmt":
{
return "fo"
}
@ -176,13 +177,15 @@ var LibDeps = map[string][]string{
"Charts": {"Widgets", "Gui", "Core"},
//"Quick2DRenderer": {}, //TODO: uncomment
//"NetworkAuth": {"Network", "Gui", "Core"},
"Speech": {"Core"},
"QuickControls2": {"Quick", "QuickWidgets", "Widgets", "Network", "Qml", "Gui", "Core"}, //Quick, QuickWidgets, Widgets, Network, Qml, Gui (needed for static linking ios)
"Sailfish": {"Core"},
"WebView": {"Core"},
"NetworkAuth": {"Network", "Gui", "Core"},
"RemoteObjects": {"Network", "Core"},
MOC: make([]string, 0),
"build_ios": {"Core", "Gui", "Network", "Sql", "Xml", "Nfc", "Script", "Sensors", "Positioning", "Widgets", "Qml", "WebSockets", "XmlPatterns", "Bluetooth", "WebChannel", "Svg", "Multimedia", "Quick", "Help", "Location", "ScriptTools", "MultimediaWidgets", "UiTools", "PrintSupport", "WebView"},
}
@ -292,12 +295,14 @@ func GetLibs() []string {
"Charts", //GPLv3
//"Quick2DRenderer", //GPLv3
//"NetworkAuth",
"Speech",
"QuickControls2",
"Sailfish",
"WebView",
//"NetworkAuth",
//"RemoteObjects",
}
for i := len(libs) - 1; i >= 0; i-- {
@ -308,7 +313,10 @@ func GetLibs() []string {
runtime.GOOS != "linux" && libs[i] == "X11Extras":
libs = append(libs[:i], libs[i+1:]...)
case utils.QT_VERSION() != "5.8.0" && libs[i] == "Speech":
case !(utils.QT_VERSION() == "5.8.0" || utils.QT_VERSION() == "5.9.0") && libs[i] == "Speech":
libs = append(libs[:i], libs[i+1:]...)
case utils.QT_VERSION() != "5.9.0" && (libs[i] == "NetworkAuth" || libs[i] == "RemoteObjects"):
libs = append(libs[:i], libs[i+1:]...)
}
}

View file

@ -60,6 +60,7 @@ func (m *Module) Prepare() error {
f.ClassName() == "QHighDpi" ||
f.ClassName() == "QPdf" ||
f.ClassName() == "QPlatformGraphicsBufferHelper" ||
f.ClassName() == "QIcu" ||
strings.ToLower(f.ClassName()) == f.ClassName() {
continue
}

View file

@ -317,6 +317,8 @@ func createCgo(module, path, target string, mode int, ipkg string) string {
tmp := string(out)
switch target {
case "darwin":
tmp = strings.Replace(tmp, "$(EXPORT_ARCH_ARGS)", "-arch x86_64", -1)
case "ios":
tmp = strings.Replace(tmp, "$(EXPORT_ARCH_ARGS)", "-arch arm64", -1)
tmp = strings.Replace(tmp, "$(EXPORT_QMAKE_XARCH_CFLAGS)", "", -1)

View file

@ -23,7 +23,7 @@ ENV QT_QPA_PLATFORM minimal
RUN curl -sL --retry 10 --retry-delay 10 -o /tmp/$QT https://download.qt.io/official_releases/qt/5.8/5.8.0/$QT && chmod +x /tmp/$QT && curl -sL --retry 10 --retry-delay 10 -o /tmp/$QT_SCRIPT https://raw.githubusercontent.com/therecipe/qt/master/internal/ci/iscript.qs && /tmp/$QT --script /tmp/$QT_SCRIPT && rm -f /tmp/$QT && rm -f /tmp/$QT_SCRIPT
ENV GO go1.8.linux-amd64.tar.gz
ENV GO go1.8.1.linux-amd64.tar.gz
RUN curl -sL --retry 10 --retry-delay 10 -o /tmp/$GO https://storage.googleapis.com/golang/$GO && tar -xzf /tmp/$GO -C /usr/local && rm -f /tmp/$GO
ENV PATH $PATH:/usr/local/go/bin
ENV GOPATH $HOME/work