• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

News Cerberus X v2019-05-05 released

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,597
Hi folks,

here is again a new release of Cerberus X. Some fixes, some new stuff, new modules, etc etc.

https://krautapps.itch.io/cerberus-x

Again, a big thank you to all who were involved in this version.

And bear with me, this is my first Linux distribution. So I hope it works for you.

These are the notes from the change log:

MOD: [ANDROID] Changed MIN_SDK back to 16 like it was before.
MOD: [DOCS] Added A-Z shortcuts on top of indexes.
MOD: [Trans/ANDROID] Release builds are installed automatically now.
FIX: [AGK] Fixed docs creation to be compatible with the latest MakeDocs.
FIX: [MAKEDOCS] Fixed brl.markdown bug.
FIX: [TED] Fixed fixed displaying an iframe element in the docs. (Author: Dawlane)
FIX: [TED] Fixed scaling issues when displaying images.
NEW: [TED] Added overwrite mode. Just press the insert key to toggle it.
NEW: [MOJO2] Added Image.LoadFrames:Image[]( path:String,cellWidth:Int,cellHeight:Int,padded:Bool=False,xhandle:Float=.5,yhandle:Float=.5,flags:Int=Image.Filter|Image.Mipmap,shader:Shader=Null ).
NEW: [MOJO.APP] Added SetDeviceWindowIcon( _path:String ).
NEW: [MOJO.APP] Added SetDeviceWindowTitle( _title:String ).
NEW: [MOJO.APP] Added SetDeviceWindowSize( _width:Int, _height:Int ).
NEW: [MOJO.APP] Added SetDeviceWindowPosition( _x:Int, _y:Int ).
NEW: [MOJO.APP] Added SetDeviceWindowSizeLimits:Void( _minWidth:Int, _minHeight:Int, _maxWidth:Int, _maxHeight:Int )
NEW: [MOJO.INPUT] Added SetMousePos:Void( _x:Int, _y:Int ).
NEW: [MOJO.INPUT] Added SetClipboard:Void( _text:String ).
NEW: [MOJO.INPUT] Added GetClipboard:String().
NEW: [CERBERUS.INTERPOLATE] New module.
NEW: [MOJO.COLOR] New module.

Cheers
Michael
 
Last edited:
Hi, I still have problem compiling for the android target in this new version.
It is the same problem described by me, in thread: https://www.cerberus-x.com/community/threads/erro-sh-gradlew-permission-denied.209/
I'm using the supplied binaries, it compiles correctly on the other targets, however, on the android target, it does not compile.
This binary for linux, has been tested for the target android???
Is it just me who is having trouble compiling for the android target ????
 
What's basically happening is that when a target template is getting copied over, the file attributes are not being duplicated.
This is a bug with the original MonkeyX code copy function.

This is my fix that I was working on for it:
Code:
int CopyFile( String srcpath,String dstpath ){

#if _WIN32

    if( CopyFileW( OS_STR(srcpath),OS_STR(dstpath),FALSE ) ) return 1;
    return 0;

#elif __APPLE__

    // Would like to use COPY_ALL here, but it breaks trans on MacOS - produces weird 'pch out of date' error with copied projects.
    //
    // Ranlib strikes back!
    //
    // DAWLANE - Added file attributes COPYFILE_XATTR | COPYFILE_STAT (NEEDS CONFIRMING)
    if( copyfile( OS_STR(srcpath),OS_STR(dstpath),0,COPYFILE_XATTR | COPYFILE_STAT | COPYFILE_DATA )>=0 ) return 1;
    return 0;

#else

    int err=-1;
    if( FILE *srcp=_fopen( OS_STR( srcpath ),OS_STR( "rb" ) ) ){
        err=-2;
        if( FILE *dstp=_fopen( OS_STR( dstpath ),OS_STR( "wb" ) ) ){
            err=0;
            char buf[1024];
            while( int n=fread( buf,1,1024,srcp ) ){
                if( fwrite( buf,1,n,dstp )!=n ){
                    err=-3;
                    break;
                }
            }
            fclose( dstp );
        
            // DAWLANE - Copy over the file attributes.
            struct stat st;
            stat( OS_STR( srcpath ), &st );
            chmod( OS_STR( dstpath ), st.st_mode );
        }else{
//            printf( "FOPEN 'wb' for CopyFile(%s,%s) failed\n",C_STR(srcpath),C_STR(dstpath) );
            fflush( stdout );
        }
        fclose( srcp );
    }else{
//        printf( "FOPEN 'rb' for CopyFile(%s,%s) failed\n",C_STR(srcpath),C_STR(dstpath) );
        fflush( stdout );
    }
    return err==0;

#endif
}
Once the permissions are correctly set on the offending file, the should copy over.
 
Last edited:
I made the change in the "os.cpp" file, inside the "modules /os/native/" directory, reexecuted "rebuildall.sh", generated the binary. I was trying to compile for the android target, however, the error persists.
So I went to analyze the file "rebuildall.sh", in this line:

#Make transcc
echo "building transcc"
g++ -O3 -DNDEBUG -o ../bin/transcc_linux transcc/transcc.build/cpptool/main.cpp -lpthread

I was parsing the file "main.cpp", and realized that the file "os.cpp", is inside the "main.cpp", line: 2187 to 2520.
That is, the CopyFile that has been fixed, is the CopyFile of the module, so far so good, when you import module "os", "transcc" will use copyFile having nothing to do with compilation for any target.

In short, when you compile, transcc, internally, transcc makes the copy using the CopyFile of the main.cpp file, then you should also correct the command "CopyFile" of the file "main.cpp", which is the " transcc ".

I made the changes here, in the file "os.cpp" and "main.cpp", even then, the error persisted.

Analyzing the "MakeTarget: Void ()" method of the AndroidBuilder class in the file "android.cxs", between lines 173 and 180, specifically:

Cerberus:
If HostOS = "winnt"
                gradle="gradlew"
            Else
                gradle="./gradlew"
            Endif
            If Not( Execute( gradle+" clean " + gradlecfg, False ) )

And in the file "main.cpp", in lines 8007 and 8013, which corresponds to the lines "173 to 180" of file "android.cxs", that when the platform is not windows, the command to be executed is "./gradlew ".

However, when copying the "gradlew" file that is inside the source directory: "targets/android/template /gradletemplate" with the new "CopyFile" corrected, the permissions are being copied correctly, however, as in the source directory the file "gradlew" was never permission of executing, the "gradlew" file in the target directory will also not be permission of executing in "linux" and "macos".

In short, in addition to correcting the "CopyFile" function in the "os.cpp" and "main.cpp" files, you must change the permission to execute in the "gradlew" file, which is in the directory "targets/android/template/gradletemplate".
 
I did the test here, I went there in the directory I changed the permission of the file "gradlew", from the directory: targets/android/template/gradletemplate "which was like this:
from
rw-rw-r--,
to
rwxrwxr-x
and the android target is working correctly now.
 
Last edited:
Are the function parameters in the docs supposed to have an underscore prefix?


598
 
Lol, does it make these functions unusable? We have so many variations regarding parameter naming all over the modules, that imho it doesn't matter atm. But i will clean this up when i work on v2. Or maybe earlier.
 
Hehe, no it's just confusing at first glance. I'm getting a crash that I think I can replicate - want it here or in bug reports?
 
Back
Top Bottom