Cocos2d-x linux release build (deploy) doesn't include libraries - linux

I'm quite new to cocos2d-x, so this question may be a bit on the amateur side.
I built a release version of my game using cocos deploy -p linux -m release, found it in the bin folder of my cocos project. I compress it into a tarball, send it to my friend so he can try it in a clean Ubuntu VM. Here's what happened:
Is there a way to include shared libraries in the finished cocos executable or do I have to provide a bash script to install these libraries?

Related

Distributing built version of gcc

I've built from source a version of GCC for Red Hat. Given that was a fairly expensive exercise, I'd like to "back up" the built version so I can avoid having to do it again on other machines or even if I scrap the VM it's currently built on.
What are my best options for doing that please?
This is what package managers are for. However, you have to build (usually) or deploy the package under the control of the package manager, because it is what keeps track of where the installed files are. You built it without using a package manager, and no longer have the complete build directory? Sorry, it's going to be quite tricky to find all the installed files.
However, if you still have the build directory and you haven't run make clean, you can just tar that up and copy that tar file somewhere, and run make install from an untarred copy of that tar file on each machine. Alternatively, you could use something like GNU Stow or XStow as a poor-man's package manager to deploy and undeploy it on various machines, by installing it to /usr/local/stow/gcc, tarring up the /usr/local/stow/gcc directory, untarring it on another machine, and then using GNU Stow to install it.

How to build zeromq4-haskell with local zmq?

I want to be able to build zeromq4-haskell or build a project that depends on zeromq4-haskell without ZeroMQ installed in my system.
In other words,I want a command stack build zeromq4-haskell to succeed and compile with my local version of ZeroMQ. I have already tried setting the LIBRARY_PATH and LD_LIBRARY_PATH to a directory, which is containing libzmq.so,but without any luck.
My goal is to build a project, depending on ZeroMQ, on a client's machine that might not have ZeroMQ installed or doesn't have rights to install it with a package manager.

Clone compiled cmake build to identical hardware

I have successfully compiled opencv 3.1 on a raspberry pi. Developing with the library works perfectly fine. Now I wanted to set up another, identical raspberry with opencv and to save the compilation time, my idea was to copy the binaries to the second raspberry.
So I copied the opencv directories including the build folder and tried to run sudo make install. Instead of using the already compiled files, compilation using cmake starts over again.
How can I convince the second raspberry's build environent that there is no need to recompile everything? On my original raspberry, I can run sudo make install on the exactly same files without recompilation. Installed dev-libraries are the same on both systems. Is this a cmake, make or a opencv specific problem?
I also tried to copy all .so and .h files from /usr/... directories, but then I run into further problems when other cmake projects try to locate the opencv package.
Build directory is not intended to be copied into other place or on another machine.
For deliver program to other machine you should use installed files, or, more generally, a package.
CMake is shipped with CPack, which can build the program from sources and create package contained all its deliverables.
You may create .deb package on the first Raspberry PI machine:
cpack -G DEB <source-dir>
and install it on the second machine using dpkg.
There are also "archive" packages like .tgz or .zip. Full list of CPack generators is described in wiki.

Unable to Run mksdcard sdk tool on ARMv7 Processor Ubuntu 14.04

When trying to install Android Studio on my Linux Laptop, I get "Unable to Run mksdcard tool" From what I can tell from searching, this is usually caused by lacking the 32 bit compatibility libraries on 64 bit Linux, however I am running it on an ARMv7 processor, using the crouton project to use Linux on my Chromebook. I have tried install the recomended packages ending in i386, but the command line returned:
Reading Package Lists... Done
Building Dependendency Tree
Reading State information... Done
E: unable to locate package [Name of package here]
E: Couldn't find any package by Regex '[Name of package]'
Does anyone know what is causing this and how I can fix it?
I've discovered a workaround.
After a little searching, I've found that we can create executable binary of the tool for the ARMv7 platform ourselves! Whupee!
Head over to GitHub and pick up the source code, mksdcard.c. Download this to wherever you'd like, but make sure you download it as mksdcard.c and not as mksdcard.c.txt, which your browser might try to do. You can always rename the file later in case you accidentally save the filename incorrectly.
Over in your chroot environment, head to the directory where you downloaded the file.
Make sure you have the gcc compilation tools installed. Try running gcc -v in an attempt to see what version of GCC you have installed. If this doesn't work, you'll need to install GCC via sudo apt-get install gcc.
Run gcc -o mkdscard mksdcard.c. This uses GCC to compile the source code into something that can be executed. After compilation has completed, you can use ./mkscard to have Linux execute the binary file, which verifies that it works.
Navigate to your Android SDK Tools directory. This is usually ~/Downloads/Android/Sdk/tools. By running ls, you'll list the files and find the version of mksdcard that your Linux distribution doesn't understand how to run. (Running ./mksdcard on this file will confirm this.)
Backup the broken binary somewhere, then delete the copy in the tools folder. (I created a backups/ directory within the Android SDK Tools folder to move it to.)
Within the directory, use rm -r mksdcard to delete the old mksdard binary.
Finally, copy your compatible binary over to take it's place, e.g. cp ~/Downloads/mksdcard . (Copies the mksdcard binary we've created to the current directory ., the Android SDK Tools folder.)
Head back over to your Android Studio installer. In the dialogue complaining about mksdcard failing, hit Retry and the installation should continue. After it's finished, be sure to apply any updates that are recommended by the environment. Enjoy!
For newer versions eg. 3.1 C4 of Android Studio running with Ubuntu on ARM32 you will also need to place mksdcard in ~/Downloads/Android/Sdk/emulator (referencing like path from Alext T.).

CMAKE building for cygwin

I used CMAKE to create the Visual Studios C++ project for a library that I needed to build, and then I used VC++ to build the library. However, the time has come to rebuild the same library for cygwin so that I can link to it with the GNU tool chain (g++ make gdb). I've been trying to figure out how to configure CMAKE to build for cygwin but I'm not getting very far. I've checked the CMAKE website for help (and I will continue to search around there), but I barely have a grasp on what CMAKE really is, so I am having trouble finding the answers. Can anyone point me in a better direction? (Thanks, All.)
CMake is a build system. It's designed to let you write a single cross-platform build description, then it creates platform-specific build files (such as makefiles for the GNU toolchain) from that build setup.
To make it work under Cygwin, it should suffice to install the cmake Cygwin package (using Cygwin's setup.exe) then run commands similar to the following: (Since you'll be running CMake for Cygwin, you won't need to do anything to configure it for the GNU toolchain).
mkdir my-project-build
cd my-project-build
cmake /path/to/my-project
make

Resources