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:
code_language.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".