Can not find opencv naclport build output - c++

Sorry if this is a really dump question. I was able to build opencv for nacl using naclports. I checked-out with pepper 42 and the built it using NACL_ARCH=pnacl make opencv command and it built successfully.
But in src/out/build/opencv folder there are no much files and it is not the file structure that i have seen with regular opencv build. In include/opencv2 folder there is only one file called "opencv.hpp".
I guess i have to do something like make install but i have no idea how to do it. I tried simply running make install but no result. Please if someone can guide me how to get done the rest of the process from here and build it to use with nacl it would be a great help.

The output directory for naclports has structure that captures both the build and install results for packages (per arch) so it has a few more layers.
The installation (result of doing make install) of opencv for pnacl is in:
src/out/build/opencv/install_pnacl/payload/
That installation is also injected into the nacl sdk you're currently pointed at. So ideally, if you're building against something requiring opencv, you'll be able to do so without explicitly referencing the copy in out/.

Related

Build Standalone Release Porject CryEngine V

I'm making my project with CryEngine V (5.5) and I'd like to obtain a release-standalone build.
I'm really going crazy with that. My porject is the First Person Shooter template with some dependecies on boost and OpenSSL.
I'm able to build the release and profile solution and if I build the "Packaged Build" the stand alone executables under the bin folder run with no problem on my machine. My problem is when I try to export the built package on another machine: The game says that it can't find the Game.dll. On the documentation I can't find some reliable references or a clean example (if I try to follow any on the required steps I got errors everywhere).
Can anybody explain me how to do it properly? The documentation is TOO poor for a clear comprehension about this process.
Thanks

C++ V8 Embedding project structure

I'm trying to get chrome V8 embedded in my C++ project, and I can only get what I could call, my project being embedded in V8. My only concern with this is that my program is cross-platform and I would like build commands to be the same. I started development it on Windows, but I'm using a mac now to get V8 running.
I can get V8 built and their samples running using this setup:
Get this: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
get source: https://v8.dev/docs/source-code
build: https://v8.dev/docs/build
My current solution has a few commands install, build, run. The build command is more complicated as it attempts to automatically edit the BUILD.gn file in V8 to insert your project instead of V8. It will add all files in your source directory to the sources.
This approach feels very wrong for a few reasons. The first being that there is almost definitely a better way to configure my project than editing a build script with a python script. Secondly, I would like V8 to be embedded in my project, not the other way around. I only have SDL2 as a dependency but I have cross platform CMake builds setup, which would be abandoned for however V8 builds the source files. I feel this way could get hard to manage if I add more dependencies.
I'm currently working with a small test project with one source file.
EDIT: I can't find anything on embedding V8 between running a sample and API usage
The usual approach is to have a step in your build system that builds the V8 library as a dependency (as well as any other dependencies you might have). For that, it should use the official V8 build instructions. If you have a split between steps to get sources/dependencies and compiling them, then getting depot_tools and calling fetch_v8/gclient sync belongs in there. Note that you probably want to pin a version (latest stable branch) rather than using tip-of-tree. So, in pseudocode, you'd have something like:
step get_dependencies:
download/update depot_tools
download/update V8 # pinned_revision (using depot_tools)
step compile (depends on "get_dependencies"):
cd v8; gn args out/...; ninja -C out/...;
cd sdl; build sdl
build your own code, linking against V8/sdl/other deps.
Many build systems already have convenient ways to do these things. I don't know CMake very well though, so I can't suggest anything specific there.
I agree that using scripts to automatically modify BUILD.gn feels wrong. It'll probably also turn out to be brittle and high-maintenance over time.
I got V8 building with CMake very easily using brew:
brew install v8
then add the following lines to CMakeLists.txt
file(GLOB_RECURSE V8_LIB # just GLOB is probably fine
"/usr/local/opt/v8/lib/*.dylib"
)
include_directories(
YOUR_INCLUDES
/usr/local/opt/v8
/usr/local/opt/v8/include
)
target_link_libraries(YOUR_PROJECT LINK_PUBLIC YOUR_LIBS ${V8_LIB})
Worked on Mojave 10.14.1

Install Qt without admin rights

I'd like to download Qt. I tried to download it from Qt's website but this gives me an exe file and since I've got a limited account when I try to run it it asks for an admin password. I've searched the web for a way for a limited account to install Qt but I haven't found anything. Could someone please help me find a solution?
In case it matters, I'm using Code::Blocks and Windows 7.
You could download the free software source code and compile and build it on your machine (that takes about a whole night, or maybe more). Don't forget to configure the build appropriately (I don't know Windows, but on Linux I'll suggest explicitly setting the -prefix to some writable directory ...). Before starting, ask explicitly your boss for permission (if you violate your company policies, you can be fired at once), and ask for guidance from someone knowing your operating system better than you do. You might need to change your PATH too.
Alternatively, ask permission to install and use a Linux distribution.
PS. Be sure to get permission to do something (even if technically you can do it alone).
You can download this ZIP file with Qt. All you have to do is unzip the ZIP file (which will take time) and place the files it contains in the right folder, nothing that requires administrator privileges. I recommend you put the contents of the ZIP file in C:\Qt, otherwise it might not work correctly (if this folder doesn't already exist, you can create it without administrator privileges and if it does exist, Qt is probably already installed on your computer in which case you don't need to do anything). I've also posted Qt's license agreement as it is in the installer program here since Qt wants you to read it before you use Qt.
Furthermore, I recommend using Qt Creator to make your Qt projects instead of Code::Blocks, because it's difficult to get Qt5 to work with Code::Blocks and Qt5 is the version of Qt used on both this website and Qt's installer (see this question) (if you find a way to get Qt5 to work with Code::Blocks, all the better, maybe you could even answer the question for which I posted a link). Qt Creator is included in the ZIP files on my website and to use Qt with Qt creator, all you have to do is include the right header files, no linking is needed. The path of Qt Creator is in the table on the bottom of the website.
You can download an archived distribution of MSYS2. After you extract and run it, you can use its packet manager to download numerous packages, including Qt. The only downside is you will have to settle for the version it provides, which is a little old, currently 5.5.1. You can install by typing:
pacman -S mingw-w64-i686-qt5 // for 32bit build or
pacman -S mingw-w64-x86_64-qt5 // for 64bit
This will install Qt and all dependencies automatically. Make sure your antivirus is not running in the final stage, because it can mess with the binary patcher that patches Qt to run from its current installation folder (because advanced software like Qt apparently cannot work without hard-coded paths).
You can even get a static build of Qt, which is quite useful, just add a -static to the package name.
Just in case you were wondering - MSYS2 is a build environment, it can come quite in handy, for getting ready to use libraries, or for building libraries which require a build environment. You can build Qt without it, however, it is a very slow process that may fail, and even though it is not complex to do, I would not recommend it as a first option.
If you still decide to build it from source, there is a detailed guide which will get you through the process.

Including OpenCV source in project without installation

I'm currently trying to setup an OpenCV project using CMake.
I want to have the highest portability between machines so I thought I can achieve it by including the OpenCV source and compiling it and link it in CMake to the executable.
I'm not quite sure how to go about it because I'm a beginner to CMake and OpenCV. However, I would like to avoid installing it on the machine as much as possible as I would just want to build it and run on a machine.
So far, I've looked at the possibility of including the source of OpenCV in the CMakeFiles.txt like so:
add_subdirectory(opencv-3.1.0)
target_link_libraries(foo opencv-core)
However, it hasn't worked for me so far.
Can anyone provide me with suggestions?
Thank you.
EDIT:
The main problem I've been encountering so far is that once I use make install to move all the binaries into place, it will try to move the compiled version of OpenCV into the install location which I'm not sure how to avoid using it.

Is it possible to make ImageMagick++ based applications check the local directory for dlls

I'm creating an application that uses ImageMagick++ to load and convert a sequence of pngs into gifs.
Everything works on my dev machine (unless I uninstall ImageMagick++), but it crashes on other users machines when it tries to use the gif and png coders. I don't want end users to have to install ImageMagick in order to user the software.
It requires IM_MOD_RL_gif_.dll and IM_MOD_RL_png_.dll from the ImageMagick install directory: C:\Program Files (x86)\ImageMagick-6.8.9-Q16\modules\coders
It finds all the dlls and functions correctly when copied to the local directory except the coders.
Which don't work regardless of whether I copy them directly to the program directory. The following locations also failed (based off of advice I found elsewhere on the web).
applicationDir/
applicationDir/ImageMagick-6.8.9-Q16/modules/coders
applicationDir/bin/ImageMagick-6.8.9-Q16/modules/coders
applicationDir/modules/coders
Is there anyway to make an application using ImageMagick++ check the local directory for coder dll's without having to rebuild ImageMagick++ myself?
I'll respond here because I've seen a similar question unanswered elsewhere.
You just need to set the environment variable MAGICK_CODER_MODULE_PATH for the process using the coders.