I discovered that in a Plone install, which had a 1.2.0 five.grok installed, I just had to have a "static" folder in my egg source, and grok would register it appropriately.
When I moved to an environment with a 1.3.0 five.grok installed, this static folder was not registered. I can, of course register it explicitly in the configure.zcml file - which works fine. Checking the source code of five.grok there is indeed a change related to this: the class StaticResourcesGrokker was removed from meta.py between 1.2.0 and 1.3.0 of five.grok.
I'm just trying to understand if there's a new way of having the static folder registered in the "grok way", or should I just revert to using explicit registration in the configure.zcml?
I have no explanation on why such a handy feature disappeared. All I could find was this commit diff:
http://svn.zope.org/five.grok/trunk/src/five/grok/meta.py?rev=123298&r1=112163&r2=123298
As you can see from the diff, the StaticResourcesGrokker class was obliterated during a merge with the sylvain-zope213. (sic) branch, with no comments given.
Until this functionality is restored, it is best you register the static folder manually.
Probably the answer is here:
http://grok.zope.org/doc/1.3/upgrade.html
Quote:
The ‘static’ directory is no longer automatically grokked and registered as a DirectoryResource for serving static resources. Serving static resources is being superseded by the Fanstatic library and WSGI components.
Related
Using Petrel 2016.1
Libraries reference:
https://www.ocean.slb.com/~/media/files/testing%20plug%20ins/libraries/petrel_2016-1_3rd_party_libraries.html
My plugin uses Qt for a window and some plots with qwt. I would like to link against the Qt dlls present at Petrel\Public\Qt to save some space while deploying the app and because is not possible to deploy libs already present in Petrel as public libs by policy.
I've successfully linked with the same Qt version over there. The problem is that PluginPackager.exe does not see the libs. I've tried editing PluginPackager.exe.config inside Petrel dir to include Public\Qt, copied it to the Release folder, copied it to the main project folder and every dir that I may suspect PluginPackager.exe is looking for this file but nothing seems to cause any effect.
I've copied the Qt dlls to the Release folder, so PluginPackager.exe could see them and register the Plugin. It works, even if I delete the Qt dlls from the Release folder afterwards. Petrel is loading them from Public\Qt. The problem is that when I try to open the Qt window, a message saying that Qt failed to load plugin windows.
I figured that it is related to qwindows.dll, which is inside Public\Qt\plugins\platforms. If I set the environment variable QT_QPA_PLATFORM_PLUGIN_PATH to C:..\petrel...\Public\Qt\plugins\platforms, it works fine. I've tried to use addLibraryPath() from QApplication with no success.
I guess we have everything we need inside Public\Qt, but for some reason Petrel is not finding it. Two questions, then:
1- How to make PluginPackager to see all the libs inside Public\Qt?
2- How to make my application to find qwindows.dll?
Plugin has code in C#, C++ cli and C++
EDIT 1:
Ok, for Q.2 I've found a solution by trial and error.
QString path = QDir::currentPath();
QString finalPath = QDir(path).filePath("Public/Qt/plugins");
QApplication::addLibraryPath(finalPath);
This will add the plugins dir to the qt lib search path and does the trick. I hope I can deploy using this.
EDIT 2:
For Q.1
I realize now that the PluginPackager only sees things inside the Extensions folder. The problem was that, in my opinion, the folder name Public is misleading. This led me to think that all libs inside that folder could be used by developers freely. The Ocean guide states that all libs other than the ones inside Extensions are considered internal libs:
The PluginPackager.exe assumes that files in the Petrel installation directory tree other than those in the Extensions folder are internal Petrel libraries.
Well, why name a folder Public if all the libs inside it are internal? This is really confusing. Besides, the Slb.Ocean libs inside the Public folders are Ok to use, the others are not? As PluginPackager.exe.config has Public\ but not the folders inside it.
I try to integrate the QtVirtualKeyboard into a prototype, but I fail.
It is the first time I work with multiple projects or where I have to include non-basic-stuff in QML/QMake-Project.
I got the code from the git-repository and were successfully running the examples. But now I am puzzled on how to integrate it into my own project.
My project structure is as follows
Proto (dir)
+- Proto.pro
+- main.cpp
+- ...
+---QML (dir) <--- QML-Files
| +-main.qml
| +---CustomControls (dir)
| +---...
+---CPP (dir) <--- C++-Files and Headers
+---RES <--- Icons and stuff
Now I thought I might just add the src-project from the virtual keyboard to the root-folder (Proto), and add something like:
SUBDIR += src/src.pro
to the Proto.pro-file
=> Yes, I can do that, but there is no merrit in it.
So what do I need to do, to actually use it? It must be really easy, for I can't find any question regarding it anywhere on google, youtube or SO.
EDIT => I still fail. This is my story:
I tried the deployment-method, followed the instructions here.
As I'd prefer to have the keyboard within the application, I did the following:
I added the make install-stept
I passed qmake an additional argument "CONFIG+=disable-desktop
It seemed to work. Got new files in the mentioned directories:
C:\Qt\Qt5.7.0\5.7\mingw53_32\qml\QtQuick\VirtualKeyboard
C:\Qt\Qt5.7.0\5.7\mingw53_32\qml\QtQuick\Virtualkeyboard\Styles
C:\Qt\Qt5.7.0\5.7\mingw53_32\plugins\platforminputcontexts\
Now in my project, I added the line
QT_IM_MODULE=qtvirtualkeyboard myapp
And tried to import it in my main.qml
import QtQuick.VirtualKeyboard 2.0 // (also tried it with 2.1)
I got the error:
[path]/main.qml:10 module "QtQuick.VirtualKeyboard" is not installed
And that concludes my story sofar. Any suggestions where I failed?
Ok, I finally succeeded. Though it is indeed very close to the documentation I don't think the documentation is easily understood. Therefor I will post this step-by-step-guid, where I will clear my own misconceptions.
Download the sourcecode from the git-repository
Open the project qtvirtualkeyboard.pro with the QtCreator, and run it with the configuration release
It will create some directories and files in your Qt-installation dir. You do not need to add anything in your project directory. Once done and your good for all projects to come.
Make sure, you set the QT_IM_MODULE environment variable to include qtvirtualkeyboard. My mistake was, to assume (I don't know why) this might be done in the projects .pro-file. This seems to be wrong. The C++-method seems safe:
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
If you want to have the keyboard within your application, add
CONFIG += disable-desktop to your projects .pro-file
Have fun!
If you select the Qt Virtual Keyboard component under a particular Qt version, you should get the prebuilt binaries:
The Qt Enterprise Add-ons component has a virtual keyboard sub-component (?) which might only give you the sources.. not sure.
If you really need to have the module in your project's Git repo, it might be easier to just add it as a submodule, and reference that in a "3rdparty" SUBDIRS sub-project.
I've installed Swipestripe module. and added swipestripe-gallery module for product images.
when I did dev/bulid?flush=1 it shows error Class 'Gallery_PageExtension' does not exists
I have seen gallery.yml file in swipestripe-gallery/_config folder, which has
Product:
extensions:
- 'Gallery_PageExtension'
but this class is not there in Product.php file in swipestripe-gallery/code folder.
After commenting above code I did dev/build?flush=1 & there was no error. But in product page the Gallery tab is not added.
Please Help.
You didn't install using composer? Your fault ;) It installs all requirements for you and you can code happy.
See https://github.com/swipestripe/silverstripe-swipestripe-gallery#requirements, you'll need to install https://github.com/frankmullenger/silverstripe-gallery for getting this gallery extension in your codebase.
I strongly encourage you to install ALL modules with composer. It may be a bit hard in the beginning, but in some days your life will be much more comfortable! A good introduction can be found in the ss docs.
Swipestripe's config does not have that code: https://github.com/swipestripe/silverstripe-swipestripe/blob/2.1/_config/swipestripe.yaml
The gallery module for it does: https://github.com/swipestripe/silverstripe-swipestripe-gallery/blob/1.1/_config/gallery.yml
These are two separate modules. If the gallery file is in swipestripe/_config as you say, then it would seem to me that the install didn't happen as it should.
There should be two folders in your installation root
swipestripe/
swipestripe-gallery/
All files relating to each module should be in each (individual) folder. It seems you're missing the swipestripe-gallery folder all together, meaning that the class in fact does not exist (When you get this error, just check that the class exists somewhere in your install. Using grep is the easiest way).
I am working with sbt-thrift plugin 0.6 and SBT 0.12.
In my thrift files I have mentioned the namespace as below.
namespace java abc.xyz
//some
//thrift
//codes
But the generated files goes to
gen-java/abc/xyz
(gen-java prefix is added automatically). How can I change this into
abc/xyz
?
There is an -out <outdir> option which does exactly that. In your case, specify the current folder . as the outdir.
Note that, unlike with the automatically generated gen-* folders, the outdir directory must exist. In other words, you have to make sure the folder is created before calling the Thrift compiler.
The --help option gives more information about all the other switches.
Regarding SBT, if the information on https://github.com/bigtoast/sbt-thrift is true, then you should contact the author of that software to add the option thriftJavaOutputDir as it seems missing.
BTW, the question looks very much like a duplicate of How to change default settings of sbt-thrift plugin in SBT? I would recommend to NOT ask ten thousand copies of similar questions on SO.
I have a multi-project ASP.NET 4.0 Web Forms solution. Initially I created a project package consisting of static files: master, css, images, etc.
I have since upgraded to Nuget 1.4 to avail of a solution project (so I don't have to manually update each project). I planned to uninstall existing project package, then create and install a solution package containing the same common files.
After running Uninstall-Package MyProjectPackage, I noticed that there are still Nuget-related files in my projects. For example:
Project 1:
packages.config
Packages.dgml
MyProjectPackage.1.1.nuspec
MyProjectPackage.1.2.nupkg
Project 2:
MyProjectPackage.nuspec
Issues:
They are greyed-out like they are not included in the solution
anymore, but these files are still in the project folders. Should
they not have been totally removed?
I have created a new package using the GUI. What is the correct way to install this for the solution?
How do I add NuGet to my path? (getting "The term 'nuget' is not recognized..." on command line)
UPDATE 08-24-2011:
I created a new solution package and added it via the Package Manager Settings. Unfortunately, when I install it, it is not being pushed out to sub-project. Cannot get this to work.
UPDATE 08-25-2011:
In an effort to narrow this down, when I try to Manage Installed Package at the solution level, I cannot get to the "Select Projects GUI" because there is no "Manage" button, only an "Uninstall" button, in the 'MyProject.sln - Manage NuGet Packages' dialog.
Package Contents (basic structure for brevity):
controls (Folder)
- Footer.ascx
- Footer.ascx.cs
- Footer.ascx.designer.cs
images (Folder)
- footer.jpg
masters (Folder)
- Site.Master
- Site.Master.cs
- Site.Master.designer.cs
style (Folder)
- style.css
Based on the structure you have, you need to put everything in a content/ for it to apply to a project.
More information here:
http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_convention_based_working_directory