Integrating Cocos2d-x v2.2.5 into Marmalade - c++

I've changed this post from a question regarding an error I was getting (which BTW received no answers) into actual instructions on HOW-TO integrate cocos2d-x version 2.2.5 into Marmalade (because none could be found online). This should prove valuable to new Marmalade developers and experienced developers alike. Marmalade comes with an older and (oh dear, a) BETA version of Cocos2dx (version 2.1.0 Beta3 as of this post) and we want to upgrade that. These instructions apply to Mac OSX systems but a similar approach (minus directory soft-linking) can be applied to Win32 systems as well.
Assuming you've already downloaded and installed Marmalade.
Download Cocos2dx version 2.2.5 (or the latest 2.x branch)
Open the Applications folder (from GUI) and scroll down to Marmalade, right-click on Marmalade and choose Show Package Contents.
Drill down the following path ./Contents/modules/third_party/
Rename the cocos2dx directory to cocos2dx_2.1.0_beta3 (you can tell what version of cocos2dx came with Marmalade by opening the ./cocos2dx/cocos2dx/ folders and viewing the cocoos2d.cpp file.)
Create a new folder called cocos2dx_2.2.5.
Copy the following folders from your cocos2dx 2.2.5 download: cocos2dx, CocosDenshion, extenstions, external, licenses, scripting, tools.
Paste those into the new cocos2dx_2.2.5 folder.
Open Terminal and cd into /Applications/Marmalade.app/Contents/modules/third_party
Create a soft-link to the new cocos2dx_2.2.5 directory: ln -s cocos2dx_2.2.5/ cocos2dx (note: for Win32 users, simply rename the new directory to cocos2dx).
Performing a ls -l under /Applications/Marmalade.app/Contents/modules/third_party should now yield something that looks similar to the following:
drwxr-xr-x# 8 user admin 272 Oct 1 08:35 Photon
drwxr-xr-x# 6 user admin 204 Oct 1 08:35 c-ares
lrwxr-xr-x 1 user admin 15 Nov 5 23:32 cocos2dx -> cocos2dx_2.2.5/ <-- soft-link
drwxr-xr-x# 9 user admin 306 Oct 1 08:35 cocos2dx_2.1.0_beta3 <-- this
drwxr-xr-x 9 user admin 306 Nov 5 23:28 cocos2dx_2.2.5 <-- this
drwxr-xr-x# 7 user admin 238 Oct 1 08:35 curl
drwxr-xr-x# 8 user admin 272 Oct 1 08:35 expat
drwxr-xr-x# 6 user admin 204 Oct 1 08:35 gaf
drwxr-xr-x# 11 user admin 374 Oct 1 08:35 jsoncpp
drwxr-xr-x# 8 user admin 272 Oct 1 08:35 libjpeg
drwxr-xr-x# 6 user admin 204 Oct 1 08:35 libpng
drwxr-xr-x# 8 user admin 272 Oct 1 08:35 lua
drwxr-xr-x# 7 user admin 238 Oct 1 08:35 ode
drwxr-xr-x# 12 user admin 408 Oct 1 08:35 openquick
drwxr-xr-x# 12 user admin 408 Oct 1 08:35 openssl
drwxr-xr-x# 7 user admin 238 Oct 1 08:35 sqlite
drwxr-xr-x# 6 user admin 204 Oct 1 08:35 tiniconv
drwxr-xr-x# 10 user admin 340 Oct 1 08:35 tinyxml
drwxr-xr-x# 6 user admin 204 Oct 1 08:35 twitcurl
drwxr-xr-x# 7 user admin 238 Oct 1 08:35 zlib
From now on Marmalade will use the latest 2.x release of Cocos2dx. Simply change the soft-link to point to a newer version when it comes out, or an older version if you have problems.
Hope it helps.

To do something in a more Marmalade friendly way, I would suggest the following:
DO NOT place this code in your Marmalade SDK area - it just means that everytime a new SDK comes along you have to hack things, and it won't work out of the box.
Instead add something the following near the top of the mkb for the programs you want to use:
option module_path="whereeverIputcoscos/cocos2dx_2.2.5"
filling in the correct path. Not tried it, but this is the basic method. Once you've got that setup, it will use it without you having to fiddle with any SDK first.

Related

Incompatible version of OpenSSL on Fedora Linux

Am struggling to use ssl with QWebSocket. Get the following error messages:
QML debugging is enabled. Only use this in a safe environment.
qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL 1.x, runtime version is >= 3.x)
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
WSInterface::onError(): Got the web-socket connection error: QAbstractSocket::UnsupportedSocketOperationError
Using Qt 6.4.2 installed from the Qt Installer as binaries (not built from source) on Fedora 37 on Intel with gcc 12.2
QSslSocket::supportsSsl() return false.
/usr/lib64 is holding:
-rwxr-xr-x. 1 root root 430944 Nov 18 08:51 libssl3.so
lrwxrwxrwx. 1 root root 15 Nov 2 00:41 libssl.so -> libssl.so.3.0.5
lrwxrwxrwx. 1 root root 15 Nov 2 00:41 libssl.so.3 -> libssl.so.3.0.5
-rwxr-xr-x. 1 root root 677480 Nov 2 00:41 libssl.so.3.0.5
I can't see any ssl (or even references to libssl using ldd in the Qt directories)
If I add /usr/lib64 to the front of LD_LIBRARY_PATH the application sig faults on:
this->WebSocket = new QWebSocket();
Since the Qt Maintenance Tool provides the source code for OpenSSL 1.1.1q, I downloaded that and built it using the following commands. Build and install was smooth:
sudo dnf group install 'Development Tools' -y
sudo dnf install perl-core zlib-devel -y
cd ~/Qt/Tools/OpenSSL/src
./config --prefix=/usr/lib64 --openssldir=/usr/lib64 shared zlib
make -j8
make test
sudo make install
make install added the following files to /usr/lib64
lrwxrwxrwx. 1 root root 29 Jul 22 02:33 libevent_openssl-2.1.so.7 -> libevent_openssl-2.1.so.7.0.1
-rwxr-xr-x. 1 root root 36840 Jul 22 02:33 libevent_openssl-2.1.so.7.0.1
lrwxrwxrwx. 1 root root 28 Oct 24 18:02 libxmlsec1-openssl.so -> libxmlsec1-openssl.so.1.2.34
lrwxrwxrwx. 1 root root 28 Oct 24 18:02 libxmlsec1-openssl.so.1 -> libxmlsec1-openssl.so.1.2.34
-rwxr-xr-x. 1 root root 304712 Oct 24 18:02 libxmlsec1-openssl.so.1.2.34
-rw-r--r--. 1 root root 10909 Jan 10 18:43 openssl.cnf
-rw-r--r--. 1 root root 10909 Jan 10 18:43 openssl.cnf.dist
ossl-modules:
total 1736
drwxr-xr-x. 2 root root 38 Jan 8 18:32 .
dr-xr-xr-x. 173 root root 118784 Jan 10 18:43 ..
-rwxr-xr-x. 1 root root 1488504 Nov 2 00:41 fips.so
-rwxr-xr-x. 1 root root 120392 Nov 2 00:41 legacy.so
This did not seem to change the result - same error messages when running the application; same sig fault when adding /usr/lib64 in front of LD_LIBRARY_PATH
There seems to no mention on how to proceed in the help. Qt Forum / Bugs and Stackoverflow seem to have lots of articles. Besides the LD_LIBRARY_PATH and building from source the other suggestion seems to be install openssl 1.1.1 from the package manager.
sudo dnf install openssl-1.1.1q-1.fc35.x86_64.rpm
Can't find the .rpm. If I download it from:
https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/Packages/o/openssl-1.1.1l-2.fc35.x86_64.rpm
then Fedora refuses to install it.
Any guidance would be appreciated.

I can't move issues on Agile board

I have a auto-deploy REDMINE by Bitnami (ubuntu) on a AWS instance, I've installed AGILE Plugin follow this steps:
https://docs.bitnami.com/aws/apps/redmine/configuration/install-plugin-agile/
Agile plugin is proper installed, but i cant move issues on agile board
I trying to move issue card from a column to another, but not work, follow this steps :
https://www.redmineup.com/pages/help/agile/cannot-move-issues
I've grant permissions to bitnami user to this folders, with no results
permissons:
-rwxrwxrwx 1 bitnami daemon 0 Apr 6 2020 empty
drwxrwxrwx 5 bitnami bitnami 4096 Nov 10 18:08 redmine_agile
drwxrwxrwx 5 bitnami bitnami 4096 Nov 10 18:08 redmine_crm

Synbolik link to aws EFS on web server doesn't work?

I have static folder serving the files on uwsgi.
/user/app/static/
lrwxrwxrwx 1 root root 23 Oct 13 09:40 _out -> /usr/src/app/_mat/_out/
drwxr-xr-x 8 root root 4096 Oct 13 09:49 assets
drwxr-xr-x 8 root root 4096 Oct 13 09:40 pages
in this case, the imagefiles under assets can be appeared correctly,
however the image files under _out can not be accessed.(404 error occurs)
static/assets/test.png is ok
static/_out/test.png returns 404 error
/usr/src/app/_mat/ are on the aws EFS.
I checked the permissions.
Generally speaking, does symbolic link work under web server?

Jetty is throwing `Unknown module' error when running with --add-to-start

I am trying to configure Jetty and facing this:
root#jans-dev:~/jetty-base# java -jar $JETTY_HOME/start.jar --add-to-start=http,deploy
ERROR : Unknown module='http'. List available with --list-modules
Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
java -jar $JETTY_HOME/start.jar --help # for more information
Background:
Jetty 9.4 installed as root on an lxc container on Ubuntu using sudo apt install jetty9
Jetty service is running and I can access default landing page
Jetty home is set to export JETTY_HOME=/usr/share/jetty
Jetty base is set to export JETTY_BASE=/root/jetty-base
I have executed below command successfully before trying to add modules.
root#jans-dev:~/jetty-base# java -jar $JETTY_HOME/start.jar --create-startd
MKDIR : ${jetty.base}/start.d
INFO : Base directory was modified
Also, when I run --list-modules, it is coming up empty:
root#jans-dev:~/jetty-base# java -jar $JETTY_HOME/start.jar --list-modules
Available Modules:
==================
tags: [-internal]
Enabled Modules:
================
root#jans-dev:~/jetty-base#
I am not sure what am I missing here. How do I make modules available to Jetty? I have also checked this reference
Sounds like your linux distro has mangled the jetty distribution.
Does your /usr/share/jetty directory contain the directories etc/, lib/, and modules/? If not, then that's not a valid ${jetty-home}.
Perhaps your linux distribution put the jetty-home somewhere else?
But that would also be invalid, as the start.jar should be in the same directory as those other directories.
Example of what a proper ${jetty.home} looks like ...
$ ls -la jetty-home-9.4.44.v20210927
total 776
drwxr-xr-x 6 joakim joakim 4096 Sep 27 18:12 ./
drwxr-xr-x 74 joakim joakim 12288 Nov 2 15:32 ../
drwxr-xr-x 2 joakim joakim 4096 Oct 7 10:07 bin/
drwxr-xr-x 4 joakim joakim 4096 Oct 14 07:17 etc/
drwxr-xr-x 14 joakim joakim 4096 Oct 7 10:07 lib/
-rw-r--r-- 1 joakim joakim 30012 Sep 27 18:12 license-eplv10-aslv20.html
drwxr-xr-x 22 joakim joakim 4096 Oct 7 10:07 modules/
-rw-r--r-- 1 joakim joakim 6262 Sep 27 18:12 notice.html
-rw-r--r-- 1 joakim joakim 163958 Sep 27 18:10 start.jar
-rw-r--r-- 1 joakim joakim 550572 Sep 27 17:44 VERSION.txt
In the past, there were Linux Distributions that tried to put the various Jetty libs (The jar files in ${jetty.home}/lib/) in their distribution setup as separate dependencies, but that's not a valid setup for a modular Servlet/Web Container like Jetty. Most distributions have realized this and have reverted to a sane setup now.
The fastest fix for you is to remove this bad Jetty package from your linux distribution and just download and use the official tarball.
https://search.maven.org/artifact/org.eclipse.jetty/jetty-home
https://www.eclipse.org/jetty/download.php

Google PageSpeed Apache Error log CentOS

I installed the Google PageSpeed module to my CentOS 7.0 DA VPS.
I used this blog, by installing the PageSpeed module: http://www.haloseeker.com/install-go...h-directadmin/
When I check my Apache Error Log, I found the following errors:
[pagespeed:error] [pid 2593] [mod_pagespeed 1.11.33.1-0 #2593] Could not create directories for file /var/cache/mod_pagespeed/v3/domain.com/https,3A/,2Fwww.domain.com/icon_feed.gif,.temp
[pagespeed:error] [pid 2593] [mod_pagespeed 1.11.33.1-0 #2593] /var/cache/mod_pagespeed/v3/domain.com/https,3A/,2Fwww.domain.com/icon_feed.gif,.temp8f2OKe:0: opening temp file: No such file or directory
[pagespeed:error] [pid 2673] [mod_pagespeed 1.11.33.1-0 #2673] Failed to make directory /var/cache/mod_pagespeed/v3/domain.com/https,3A/,www.domain.com/images: Permission denied
How can I solve this problem?
Try to update your directory permission with the following command and let me know if you have any issues.
chmod -R a+w /var/cache/mod_pagespeed
This doesn't have to work. Depending on the Apache configuration (mpm_itk), it's possible that each vhost is served as another user.
So important directories are made under user A, and when another request to host B, user B cannot delete/create subdirectories.
I haven't figured out how to solve this, running CentOS and cPanel as hoster.
-rw-------. 1 tvr86nl tvr86nl 13 Aug 17 23:14 !clean!time!
drwxr-xr-x. 4 tvr86nl tvr86nl 37 Aug 17 00:45 prop_page
drwxr-xr-x. 12 tvr86nl tvr86nl 4.0K Aug 17 12:54 rname
drwxr-xr-x. 3 tvr86nl tvr86nl 22 Aug 16 18:16 v3
root#vps1.sse-ict.nl /var/mod_pagespeed/cache>
so this happens every time when these directories are created :(
perhaps a cron-job would do the trick. But it's a mod_pagespeed
shortcoming!