Mac Yosemite Spotlight - force it to index specific Library folders? - spotlight

How can I get Spotlight to index a directory in the system>Library folder?
I'm trying to get Spotlight running 10.10.3 to index some folders in the Macintosh HD/Library folder. I'm not getting any search results from these folders so it appears Spotlight is not searching/indexing them. The folder can be found at:
Macintosh HD/Library/FileMaker Server/HTTPServer/htdocs/
I am getting search results for other Library folders, such as my web root folder at:
/Library/WebServer/Documents/
Is there a way to force Spotlight to also index the Library/FileMaker Server/HTTPServer/htdocs folder as well?

It is best practice to turn off Spotlight on a FileMaker Server. See page 182: https://fmhelp.filemaker.com/docs/13/en/fms13_help.pdf

Related

How can I point a folder in Documents folder?

How can I point a folder or file which stored in Documents folder?
So in my case that would be C:/Users/Vanya/Documents/ATFolder (AT Folder is folder I need)
What should I put instead "Vanya" to get into Documents folder, on any PC not just mine
In case it matters I'm trying to do this:
QDir().mkdir("C:/Users/%USERPROFILE%/Documents/ATFolder");
It responds as false and doesn't create folder.
Qt solution - QStandardPaths
Use QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); to get Documents directory.
Try to use std::getenv to get the value of the environment variable "USERPROFILE".
It worked for me.

Qt app with dependencies on mac - dependent sdk has #executable_path in otool list... how do I change it?

I am trying to build/run/deploy a qt app on mac. It has, among other dependencies, an sdk that I have placed in a lib folder... and set the path in the pro file. The app builds fine, but I cannot execute it.
Running otool -L myapp shows, for this particular sdk:
#executable_path/../Frameworks/blah.0.dylib
If I could copy the dylib in a folder like "/usr/local/lib/" i would be able to make it work I think... But have no admin rights.
Without admin rights, I cannot search the system to see what location it may have... but oddly, even without admin rights i can ls /Libraries/Frameworks and it only contains Qt frameworks at the moment. ls /Frameworks tells me that /Frameworks doesn't exist. neither does Frameworks (relative to the app dir)
Placing the dylib in the same folder as my app doesn't work (I guess mac is not windows lol). I am looking for alternatives, but also will need to deploy this app so I must do the install_name_tool to convince the linker that the dylib is inside the bundle I am creating.
The problem is, as much as I understand it from the qt-4.8/deployment-mac.html page, that I need the original location of the app - the original id.
mkdir myapp.app/Contents/Libraries
cp lib/blah.0.dylib myapp.app/Contents/Libraries
install_name_tool -id #executable_path/../Libraries/blah.0.dylib myapp.app/Contents/Libraries/blah.0.dylib
install_name_tool -change path/to/blah.0.dylib #executable_path/../Libraries/blah.0.dylib myapp.app/Contents/MacOs/myapp
So, the question is: for the 4th step, what do I use for path/to/blah.0.dylib ? I imagine it is the path the linker thinks it is now... but how do I ask him ? Also... since the previous id has "Frameworks" in its name, can I replace it with "Libraries" ?
Edit: one step forward:
install_name_tool -change myapp.app/Contents/Frameworks/blah.0.dylib #executable_path/../Libraries/blah.0.dylib myapp.app/Contents/MacOs/myapp
the above has the correct address now... but it doesn't work.
Placing blah.0.lib in the Frameworks folder will allow the linker to find it. But install_name_tool doesn't seem able to change that path.
oddly, install_name_tool was able to change some paths for the linker but not others - and once ran with a typo on a name (for a different lib dependency which initially did not have a defined id), I was unable to change it...
How do I remove such a linker path ? How do I change the path once set ?
your app is a package,
your app is a special package called a bundle.
your app bundle is a directory...
YourApp.app/
Contents/
Resources/
<images, plists, core data models, etc.>
MacOS/
yourApp <-- this is the actual executable
Frameworks/ <- optional frameworks directory
blah.dyld goes here
the #executable_path is expanded to what ever the MacOS/yourApp is
the dynamic linker is then looking for your dyld in YourApp.app/Contents/Frameworks/... but I assume it isn't there, so you need to add a build phase to copy it there.

Installing OpenCart extensions locally

When installing OpenCart extensions, you´re generally given a bunch of folders that should be copied to the root directory and the extension files will find their way to the right subfolders. This works great in FTP software, but on a local installation (Mac OSX) using Finder, this operation makes Finder want to overwrite the folders completely, deleting the actual site and just keep the extension.
I can hold Alt when dragging the folders and it will give me the option to not overwrite, the problem is I have hidden files visible, which means there's now a .DS_STORE file in each folder and the ”Hold ALT”-approach doesn’t work in case there are ANY duplicate files in any of the folders.
I’m sure someone out there has stumbled upon the same problem, any ideas for how to solve such a simple but annoying problem? I do not wish to use FTP software for local file management.
I have the same problem, and i found 3 different ways to solve this:
a - use another file manager, i personally use "Transmit" to do this sort of things;
b - use terminal, like: ditto <source> <destination>. Or easier way just type ditto, and drag the source folder, then drag the destination folder, all inside source will merge inside destination;
c - unzip the plugin, inside the OC folder using the terminal, like: tar -zxvf plugin.zip;

qt creator can not load icon

I am a beginer of QT, I tried to add an action to a toolbar and I wrote as follows:
toolbar->addAction(QIcon("/icons/new.png"), "New File");
However, the image can not be loaded. Is that related to my debug path? I can see the button, but no images.
those codes are in test.cpp and my icons folder is in the same path with test.cpp
Paths are interesting.
If you are on linux, you just specified that the root of the drive has a folder called icons, and inside it it has a file called new.png.
If you were using that kind of a path on a website, it would chop off everything to the left besides the domain and subdomain names.
example.com/path/to/some/folder/index.html, processes link to /icons/new.png, and you end up at: example.com/icons/new.png.
The best way to handle paths correctly is to use common notations for relative paths (in most cases... in some cases, absolute paths make sense).
./ means the folder that I am currently in aka the working directory.
../ means the folder above me.
A leading / means the highest folder possible or the root folder, on Unix systems. It is also akin to giving an absolute path for a file.
No leading . or .. or / means the same as ./, or from the working directory.
And there are even more rules about this. See the wiki entry:
http://en.wikipedia.org/wiki/Path_(computing)
In Qt there is also the resource system, that embeds files into the exe itself and can give you a harder-to-change image or graphic on your program.
The notation to access this is:
:/ means the root of the qresource system.
And if you do decide there is a reason to use a backslash, be sure to escape it. Normally Qt will take any input with backslashes and convert it for you on the fly to forward slashes.
So to double check that the file is there, use QFile file("icons/new.png"); followed by if(!file.exists()){ qDebug() << "File is not found!" << file.fileName(); }
Sometimes I find it helpful to see where my program is when this is happening. Either using system("dir"); or qDebug() << QDir::currentPath();
http://doc.qt.io/qt-5.5/qdir.html#currentPath
You can also see what your initial working directory is by looking at your project properties for the project in Qt Creator under:
Projects (tab) > Run (tab) > Run > Working directory:
Usually it is the root of where your source code is and where your .pro file is located.
Hope that helps.
If you are using Qt resources then you need a colon:
toolbar->addAction(QIcon(":/icons/new.png"), "New File");`
if you don't use resources then yuo should use relative path. Remember that Qt Creator uses by default "build in different place" so you must make sure that icon is deployed in respective directory.

TFS Build/MSBuild 2010 bin folder auto redirection to binaries folder not redirecting all projects

I have TFS2010 build workflow that compiles our solution which contains ~100 projects. Compilation is successful, tests run as expected etc. The issue I have relates to the redirection of the bin output folders.
As I understand it, the TFS2010 build activity for MSBuild redriects your bin folder output to a binaries folder at the the same level as the Sources and TestResults folders as shown below.
C:\Builds\1\MyPlatform\MyPlatform Main - CI\Binaries
C:\Builds\1\MyPlatform\MyPlatform Main - CI\Sources
C:\Builds\1\MyPlatform\MyPlatform Main - CI\TestResults
This redirection of the bin folder works as expected for 80% of my projects. The remaining projects bin folders appear unredirected in their standard location as if I was compiling using VS on a local machine.
To illustrate, when working as expected...
Source path:-
C:\Builds\1\MyPlatform\MyPlatform Main - CI\Sources\Source\MyPlatform.Modules.Interaction.Specs
Bin output succesfully redirected to the binaries folder :-
C:\Builds\1\MyPlatform\MyPlatform Main - CI\Binaries\Mixed Platforms\Debug\MyPlatform.Modules.Interaction.Specs
and now a non redirected example...
Source path :-
C:\Builds\1\MyPlatform\MyPlatform Main - CI\Sources\Source\MyPlatform.AddIns.Framework.Services
Bin output not redirected and remains in the source folder:-
C:\Builds\1\MyPlatform\MyPlatform Main - CI\Sources\Source\MyPlatform.AddIns.Framework.Services\bin\Debug
To clarify, this is not an issue with the drop location but the redirection of bin output to the intermediate Binaries folder. The copy to my final drop location works as expected, all be it minus the projects whos bin output wasn't initially redirected to the binaries folder.
I've had a good look around and all information I've seen points towards customising the output to the binaries folder or relates to the drop location. Having read this, I can't see anything that should cause some projects to ignore the default redirection.
Most of my projects are standard .NET 4 class libraries although there are a couple of c++ projects and a WIX installer. I initially though it would be related to this difference but this problem is occuring on several .NET 4 class libraries that have identical settings to all the other projects that redirect successfully.
One more point about the example paths above. I've substituted "My" for actual project prefixes but otherwise paths are as used.
Does anyone know why some projects bin output might not be redirected?
Any help you can offer would be appreciated.
Thanks
H
Continued investigations and a shove in the right direction from Dharmesh Shah on MSDN revealed this was all related to the "TeamBuildOutDir" setting. More details can be found here http://blogs.msdn.com/b/jimlamb/archive/2010/04/13/customizableoutdir-in-tfs-2010.aspx