I've strange problem with Qt. Recently I downloaded Qt 5.0.1. And now every project I start in Qt as "Build->Start" works well. But if I start Release version of it from explorer there's no effect. And if I start Debug version from explorer I have this error
What's wrong?
I think you forgot to copy plugins directory beside your application.
Dependency Walker wont show them in the list, because they're loaded in runtime by Qt Core libs. So final executable have no idea about linkage or location of those plugins at compile time.
It precisely says, what it needs - the "windows" plugin. It should be located in folder "platforms", as qwindows.dll.
You can read more in Qt5 official windows deployment guide, but rather look on the forums for more practical info, i. e. here.
In short: to make your application (compiled with Qt built dynamically) run on other machine, you must include many libs with it. All of them should be copied from
Qt_installation_folder/Qt_version/used_compiler/bin
&
Qt_installation_folder/Qt_version/used_compiler/plugins/
QML plugins should be copied from
Qt_installation_folder/Qt_version/used_compiler/qml
&
Qt_installation_folder/Qt_version/used_compiler/imports
It is very important to copy Qt libraries from exact the same compiler as used in the project.
Below I present you an example (borrowed from above second link) with explanations:
ROOT FOLDER
│ YourApp.exe
│ D3DCompiler_43.dll // } \
│ libEGL.dll // } --> If you use Qt built with ANGLE support
│ libGLESv2.dll // } /
│
│ icudt49.dll // } \
│ icuin49.dll // } --> If you use Qt built with WebKit (Unicode support)
│ icuuc49.dll // } /
│
│ Qt5Core.dll // --> Basic Qt module, always needed
│ Qt5Gui.dll // --> If you use GUI module
│
│ Qt5Network.dll // } \
│ Qt5Qml.dll // } --> If you use QML
│ Qt5Quick.dll // } --> module
│ Qt5V8.dll // } /
│
│ Qt5Multimedia.dll // } --> If you use multimedia
│ Qt5MultimediaQuick_p.dll // } --> from QtQuick
│
├───platforms
│ qwindows.dll // Always needed for windows
│
├───QtMultimedia // If you import QtMultimedia 5.x
│ declarative_multimedia.dll
│ plugins.qmltypes
│ qmldir
│ Video.qml
│
├───QtQuick.2 // If you import Qt.Quick 2.x
│ plugins.qmltypes
│ qmldir
│ qtquick2plugin.dll
Related
I learned of a way to run julia, so I can use the file structure of a package for my project.
Namely julia --project inside my developement directory. With this I can load all projects structured like projectName/src/projectName.jl inside the same folder.
An Example:
all my julia projects/
├─ project 1/
│ ├─ working with files in julia.jl
│ ├─ data.csv
├─ project 2/
│ ├─ project.toml
│ ├─ src/
│ │ ├─ project 2.jl
├─ project 3/
│ ├─ draft.uxf
│ ├─ .gitignore
│ ├─ project.toml
│ ├─ auto_compile.jl
│ ├─ src/
│ │ ├─ project 3.jl
With this file structure I want to call auto_compile.jl that does the following:
using Pkg
cd("..")
Pkg.activate(".")
Pkg.instatiate()
Pkg.add("PackageCompiler")
using PackageCompiler
create_app("Project 3", "Project 3 Compiled")
However, PackageCompiler.jl only works with the --project command. The --project argument doesnt seem to modify LOAD_PATH, what does it do exactly? Can I edit my julia session with --project later on? I figured julia does the same when loading packages from the ~user/.julia/packages/ dir, but how do I do that, and are there more usefull arguments I should know about?
after some quick "testing" I can confirm:
the --project/--project=. flags when starting julia from the terminal do the same as Pkg.activate(".")
I recently bought a template that uses sass with compass. I have been reading and mostly every blog says compass is deprecated. I am looking for a ways to replace or remove compass and use bourbon.
I have not been able to compile the sass with compass, everytime I run npm run dev it says there is a variable missing.
Is there any easy way to remove all the mixim call from compass and replace them with bourbon or any way to remove compass overall?
What I am doing right now is looking for any call to the mixins, and replacing them with pure sass or css. I feel like this might take a long time. The folder structure is the following:
scss
├── style.scss
├── compass
│ ├── css3
│ │ ├── _animation.scss
│ │ ├── _appearance.scss
│ │ ├── _background-clip.scss
│ │ ├── _border-radius.scss
│ │ ├── etc
│ ├── helper
│ │ ├── _header.scss
│ │ ├── _mixin.scss
│ │ ├── _responsive.scss
│ │ ├── etc
Take a look at your config.rb file, where your compass settings are stored, see if there are any links to files that you are currently using.
What you want to do next is remove compass completely by uninstalling it via ruby or deleting it manually.
gem uninstall compass in the console. Or, find the dir remove it, and then trace all of your used mixins so that you can remove them too (this is going to be a bit messy).
Bourbon does not support all of the functionality presented in Compass, but it sure is the most adequate mixin library to date.
Next, learn to use npm. This is the piece of software that will save you a lot of time and hassle.
npm install bourbon --save in the console, and that's it. You simply import it in your SCSS after.
Next, learn to use Gulp, so that you don't lose more time while developing.
Question:
How do I set up Typescript with Symfony with the minimum amount of configurations changes to Symphony’s configuration files?
Here are the points that this solution should solve:
Typescript MVC Pattern in a private typescript directory:
src > XBundle > Resources > private > typescript
Javascript bundles compiled in :
src > XBundle > Resources > public > js
the private directory should consist of multiple apps for different pages. (If an app requires it's own tsconfig.json file, that's fine)
an app is simply (for example) home.app.ts that imports (for example) a search.component.ts and a chat.component.ts
Compiled "apps" should be located in the public > js repository mentioned in point (2) and should be named (example taken from point (4)) home.bundle.js
In the public > js folder, there should only be x.bundle.js files
Adding the bundles to my twig files, and calling my view should immediately run the bundle. I should not have to add an extra script to call the "module" (this is the reason why I want to avoid AMD / System )
What I'm not looking for:
I'm not looking for a solution with react and angular but a general solution using the /web directory (or even the Resources directory in a bundle) at the root of a symfony project.
Most articles regarding this talk about symfony2 and try integrating react and angular.
I'm not looking for an installation tutorial for npm and tsc.
I don't need an automatic compile. I use Phpstorm so it does it automatically anyway.
I ended up using webpack for this to work. Props to #zerkms.
This is a work in progress, and could be better optimized.
Installation:
Install webpack, I personally installed it globally. (Unsure how to configure Phpstorm to use webpack, there doesn't seem to be a direct built in system for it)
Go to src > XBundle > Resources > private > typescript
npm init -y
Install the dev dependencies: npm install --save-dev awesome-typescript-loader and npm install --save-dev typescript
Side note:
#Morgan Touverey Quilling, recommends installing webpack locally, your choice:
npm install --save-dev webpack
Configuration:
Here is my folder structure:
├── XBundle/
│ ├── Controller
│ ├── Resources
│ │ ├── config
│ │ ├── private
│ │ │ ├── typescript
│ │ │ │ ├── components
│ │ │ │ │ ├── auth
│ │ │ │ │ │ ├── auth.component.ts
│ │ │ │ │ ├── search
│ │ │ │ │ │ ├── search.component.ts
│ │ │ │ ├── services
│ │ │ │ │ ├── http.service.ts
│ │ │ │ ├── node_modules
│ │ │ │ ├── package.json
│ │ │ │ ├── webpack.config.js
│ │ │ │ ├── tsconfig.json
│ │ ├── public
│ │ │ ├── js
│ │ │ │ ├── build
│ │ │ │ │ ├── auth.bundle.js
webpack.config.js
This config could probably be simplified much further.
For every bundle, a new config should be created pointing to the main file. Remember to rename the output bundle.
There shouldn't be more than one bundle per page. If you need (for example) the auth.bundle.js and the search.bundle.js on the home page, you should probably create a home.component.ts that uses auth.component.ts and search.component.ts and create a config in webpack.config.js to create the home.bundle.js
const path = require('path');
//Common configurations
let config = {
module: {
loaders: [
{ test: /\.ts$/, loader: 'awesome-typescript-loader' }
]
},
resolve: {
extensions: ['.ts']
}
};
//Copy and paste this for as many different bundles
//as required
let authConfig = Object.assign({}, config, {
entry: path.join(__dirname, 'components/auth','auth.component.ts'),
output: {
path: path.join(__dirname, '../../public/js/build'),
filename: 'auth.bundle.js',
library: 'XApp'
}
});
//Add each config here.
module.exports = [
authConfig
];
tsconfig.json
{
"compileOnSave": true,
"compilerOptions": {
"sourceMap": true,
"moduleResolution": "node",
"lib": ["dom", "es2015", "es2016"]
},
"exclude": [
"node_modules"
]
}
Run
Type webpack in the directory where webpack.config.js resides.
Adding JS to your Twig file
Somewhere in one of your templates.
{% block javascripts %}
{# More stuff here #}
{% javascripts
'#XBundle/Resources/public/js/build/auth.bundle.js'
%}
{# More stuff here #}
{% endjavascripts %}
{% endblock %}
And run the following commands for any new bundles.js created for the first time in the root directory of your symfony project:
php bin/console assets:install
php bin/console assetic:dump
I'm trying to create a very simple Spring Boot 1.3.3 Web application with Thymeleaf and embedded Tomcat using OpenUI5 as the client-side javascript UI library... but I can't seem to get OpenUI5 to load the data-sap-ui-resourceroots. Is this supposed to be possible?
I started by going to start.spring.io and generating a maven project with Web and Thymeleaf dependencies and then added in a basic OpenUI5 structure with an XML view. I followed the following tutorials:
Serving Web Content with Spring MVC
OpenUI5 Walkthrough - Step 4: XML Views
I ended up with the following project structure:
root
├── src
│ ├── main
│ │ ├── java
│ │ │ └── myPackage
│ │ │ ├── controllers
│ │ │ │ └── LandingPageController.java
│ │ │ └── Application.java
│ │ └── resources
│ │ ├── application.properties
│ │ ├── static
│ │ │ └── webapp
│ │ │ └── view
│ │ │ └── App.view.xml
│ │ └── templates
│ │ └── landingPage.html
│ └── test
│ └── java
│ └── myPackage
│ └── ApplicationTests.java
│
└── pom.xml
Even though it's all basically standard from those tutorials, for completeness, I'll include my source code:
Application.java:
package myPackage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
LandingPageController.java:
package myPackage.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
#Controller
#RequestMapping("/")
public class LandingPageController {
#RequestMapping(method=RequestMethod.GET)
public String redirect() {
return "landingPage";
}
}
landingPage.html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8" />
<title>SAPUI5 Walkthrough</title>
<script
id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"
data-sap-ui-compatVersion="edge"
data-sap-ui-preload="async"
data-sap-ui-resourceroots='{
"sap.ui.demo.wt": "./"
}'>
</script>
<script>
sap.ui.getCore().attachInit(function () {
sap.ui.xmlview({
viewName : "sap.ui.demo.wt.view.App"
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
App.view.xml:
<mvc:View
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc">
<Text text="Hello World"/>
</mvc:View>
My application.properties file is empty and the pom.xml is exactly what was generated by the Spring Initializr.
I believe the issue is with this line in the landingPage.html, but I don't know what else to put other than "./":
data-sap-ui-resourceroots='{
"sap.ui.demo.wt": "./"
}
I was able to get this to work up to step 3 in the OpenUI5 tutorial; however, it seems that once I have to define the view in an XML file, the OpenUI5 library cannot locate it. I don't know where else to put the App.view.xml file, I would have thought that anywhere under the static folder would be fine...
I'm not sure if this has to do with the fact that I'm using an embedded Tomcat, but I'd like this to work using embedded Tomcat.
Any suggestions on how I can make this work?
I am not familiar with Spring or any of the mentioned Java frameworks, but I can try to help you with the resourceRoots.
With that setting, you can tell the OpenUI5 framework, where to find certain resources.
A setting of "sap.ui.demo.wt": "./" means that everything starting with sap.ui.demo.wt can be found in the same directory as the current page / file. Any further .<something> means a subfolder with that name.
You can define the resourceRoots relative to your html file or absolute by using for example:
"sap.ui.demo.wt": "/resources/static/webapp"
In that case your view with the name sap.ui.demo.wt.view.App will be found (or at least looked for) at /resources/static/webapp/view/App.view.xml.
I am trying to deploy a simple Qt based chat program, that uses a WebWidget for the chat itself, QListWidgets and some labels. As well as QWebSocket for the network connection. But I do need to add 120 MB files to deploy it.
This are my QT and CONFIG variables in the pro file:
CONFIG += qt release
QT += gui websockets webkitwidgets widgets
This is the list of files I had to add:
│ D3Dcompiler_47.dll
│ icudt54.dll
│ icuin54.dll
│ icuuc54.dll
│ libEGL.dll
│ libgcc_s_dw2-1.dll
│ libGLESV2.dll
│ libstdc++-6.dll
│ libwinpthread-1.dll
│ opengl32sw.dll
│ Qt5Core.dll
│ Qt5Gui.dll
│ Qt5Multimedia.dll
│ Qt5MultimediaWidgets.dll
│ Qt5Network.dll
│ Qt5OpenGL.dll
│ Qt5Positioning.dll
│ Qt5PrintSupport.dll
│ Qt5Qml.dll
│ Qt5Quick.dll
│ Qt5Sensors.dll
│ Qt5Sql.dll
│ Qt5Svg.dll
│ Qt5WebChannel.dll
│ Qt5WebKit.dll
│ Qt5WebKitWidgets.dll
│ Qt5WebSockets.dll
│ Qt5Widgets.dll
│
├───audio
│ qtaudio_windows.dll
│
├───bearer
│ qgenericbearer.dll
│ qnativewifibearer.dll
│
├───iconengines
│ qsvgicon.dll
│
├───imageformats
│ qdds.dll
│ qgif.dll
│ qicns.dll
│ qico.dll
│ qjp2.dll
│ qjpeg.dll
│ qmng.dll
│ qsvg.dll
│ qtga.dll
│ qtiff.dll
│ qwbmp.dll
│ qwebp.dll
│
├───mediaservice
│ dsengine.dll
│ qtmedia_audioengine.dll
│
├───platforms
│ qwindows.dll
│
├───playlistformats
│ qtmultimedia_m3u.dll
│
├───position
│ qtposition_positionpoll.dll
│
├───printsupport
│ windowsprintersupport.dll
│
├───sensorgestures
│ qtsensorgestures_plugin.dll
│ qtsensorgestures_shakeplugin.dll
│
├───sensors
│ qtsensors_generic.dll
│
├───sqldrivers
│ qsqlite.dll
│ qsqlmysql.dll
│ qsqlodbc.dll
│ qsqlpsql.dll
│
└───translations
qt_ca.qm
qt_cs.qm
qt_de.qm
qt_en.qm
qt_fi.qm
qt_fr.qm
qt_he.qm
qt_hu.qm
qt_it.qm
qt_ja.qm
qt_ko.qm
qt_lv.qm
qt_ru.qm
qt_sk.qm
qt_uk.qm
QtPositioning, Sql dlls, Qml and QtQuick? Last time I deployed a Qt program was with Qt4; I remember I had less dependencies.. Is there something wrong?
You might want to do your own Qt build and cut it down as much as possible. It will still be a mess, but a smaller one. Remove optional modules you don't need, resort to using system libraries instead of those bundled with Qt wherever possible, don't use ICU - that alone will cut almost 30MB of dependencies.
The best option is to use a static build and link statically, but there are plenty of limitations at play, you either need a commercial license or to open your code, and still, deployment for QML projects is and has been broken for years. Sadly, it seems like making the lives of all of those using Qt for free as miserable as possible has become quite a priority, in order to force developers into spending on the expensive commercial license, which is the sole remedy to the situation, or at least it will be hopefully by the time Qt 5.7 is released.
BTW, if those DLLs got pulled in by the deployment tool - I advice against trusting it. I have tried it literally yesterday, and it turned out to be completely broken - failed to pull in half of the needed DLLs, half of those it pulled in weren't actually needed, and in terms of qml files, it did even worse.
If not by the deployment tool, those extra dlls are probably indirect dependencies - for example the web sockets define a QML API, so they might pull QML in as a dependency, which itself pulls a cascade of other modules and libraries. You should investigate if you can build those modules without their QML side.