Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.idea/modules.xml
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/duy/editor/TextEditorApplication.java
#	app/src/main/java/com/pdaxrom/cctools/CCToolsActivity.java
#	app/src/main/java/com/pdaxrom/editor/CodeEditor.java
  • Loading branch information
tranleduy2000 committed May 28, 2018
2 parents eaada10 + f7b5d66 commit f5ddfd3
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 29 deletions.
14 changes: 14 additions & 0 deletions app/src/main/java/com/duy/CppIdeApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

package com.duy;

import android.support.multidex.MultiDexApplication;


public class CppIdeApplication extends MultiDexApplication {

@Override
public void onCreate() {
super.onCreate();
}

}
61 changes: 61 additions & 0 deletions cctools-repo/build-i386.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash

BUILD_START=$(date +%s)

WRKDIR=$PWD/tmp
#WRKDIR=/mnt/nfs/Work/cctools-pro/tmp

#
# uncomment to build pie compiler
# -------------------------------
export BUILD_PIE_COMPILER="yes"
WRKDIR=${WRKDIR}-pie
# -------------------------------
#

SDKDIR=/home/duy/Android/Sdk
NDKDIR=/home/duy/Android/android-ndk-r12b
NDKSRC=/home/duy/github

for d in binutils gcc gmp mpc mpfr cloog isl ppl llvm; do
ln -sf ${NDKSRC}/${d} src/
done

export PATH=~/bin/CodeSourcery/bin:$PATH

#./build-shell-utils.sh ${PWD}/src arm-linux-androideabi ${WRKDIR}/arm-repo $NDKDIR $SDKDIR || exit 1

#./build-shell-utils.sh ${PWD}/src mipsel-linux-android ${WRKDIR}/mips-repo $NDKDIR $SDKDIR || exit 1

./build-shell-utils.sh ${PWD}/src i686-linux-android ${WRKDIR}/i686-repo $NDKDIR $SDKDIR || exit 1

#./build-shell-utils.sh ${PWD}/src aarch64-linux-android ${WRKDIR}/arm64-repo $NDKDIR $SDKDIR || exit 1

#./build-shell-utils.sh ${PWD}/src mips64el-linux-android ${WRKDIR}/mips64-repo $NDKDIR $SDKDIR || exit 1

#./build-shell-utils.sh ${PWD}/src x86_64-linux-android ${WRKDIR}/x86_64-repo $NDKDIR $SDKDIR || exit 1

test -e ${WRKDIR}/repo/armeabi-v7a || ln -sf armeabi ${WRKDIR}/repo/armeabi-v7a
test -e ${WRKDIR}/repo/mips-r2 || ln -sf mips ${WRKDIR}/repo/mips-r2

for d in armeabi mips x86 arm64-v8a mips64 x86_64; do
pushd .
cp -f make_packages.sh ${WRKDIR}/repo/${d}/
cd ${WRKDIR}/repo/${d}
./make_packages.sh
popd
done

mkdir -p ${WRKDIR}/repo/src

find `find src -type d` -type f -exec cp -f {} ${WRKDIR}/repo/src/ \;

BUILD_END=$(date +%s)

TOTAL_TIME=$(($BUILD_END - $BUILD_START))

echo
echo
echo "Build time: $(date -u -d @$TOTAL_TIME +%T)"
echo
echo "DONE!"
2 changes: 1 addition & 1 deletion cctools-repo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export PATH=~/bin/CodeSourcery/bin:$PATH

#./build-shell-utils.sh ${PWD}/src mipsel-linux-android ${WRKDIR}/mips-repo $NDKDIR $SDKDIR || exit 1

./build-shell-utils.sh ${PWD}/src i686-linux-android ${WRKDIR}/i686-repo $NDKDIR $SDKDIR || exit 1
#./build-shell-utils.sh ${PWD}/src i686-linux-android ${WRKDIR}/i686-repo $NDKDIR $SDKDIR || exit 1

#./build-shell-utils.sh ${PWD}/src aarch64-linux-android ${WRKDIR}/arm64-repo $NDKDIR $SDKDIR || exit 1

Expand Down
8 changes: 4 additions & 4 deletions cctools-repo/doc/export.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export LD_LIBRARY_PATH='/data/data/com.pdaxrom.cctools/root/cctools/lib:/system/lib'
export PATH='/data/data/com.pdaxrom.cctools/root/cctools/sbin:/data/data/com.pdaxrom.cctools/root/cctools/bin:/system/xbin:/system/bin:/data/data/com.pdaxrom.cctools/root/cctools/bin:/data/data/com.pdaxrom.cctools/root/cctools/sbin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin'
export TEMPDIR='/data/data/com.pdaxrom.cctools/root/cctools/home/tmp'
export LD_LIBRARY_PATH='/data/data/${APPLICATION_ID}/root/cctools/lib:/system/lib'
export PATH='/data/data/${APPLICATION_ID}/root/cctools/sbin:/data/data/${APPLICATION_ID}/root/cctools/bin:/system/xbin:/system/bin:/data/data/${APPLICATION_ID}/root/cctools/bin:/data/data/${APPLICATION_ID}/root/cctools/sbin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin'
export TEMPDIR='/data/data/${APPLICATION_ID}/root/cctools/home/tmp'
export TERM='xterm'
export TMPDIR='/data/data/com.pdaxrom.cctools/root/cctools/home/tmp'
export TMPDIR='/data/data/${APPLICATION_ID}/root/cctools/home/tmp'
6 changes: 3 additions & 3 deletions cctools-repo/misc/build-helper/build-helper
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if [ "$openbuild" = true ]; then
dialogid="$1"
fi

am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
--es type build \
--es cmdline "build-helper --native $native --executable $executable --run $run --buildwindow $buildwindow --runwindow $runwindow --dialogid $dialogid $@" \
--es workdir "$PWD" \
Expand Down Expand Up @@ -87,7 +87,7 @@ run_exec() {
else
for m in ${CCTOOLSDIR} ${EXTERNAL_STORAGE}/CCTools; do
if [ -e ${m}/share/modules/runargs.xml ]; then
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
--es type module \
--es path ${m}/share/modules/runargs.xml \
--es workdir $PWD \
Expand Down Expand Up @@ -158,7 +158,7 @@ fi
if [ "$buildwindow" = "true" ]; then
for m in ${CCTOOLSDIR} ${EXTERNAL_STORAGE}/CCTools; do
if [ -e ${m}/share/modules/compile.xml ]; then
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
--es type module \
--es path ${m}/share/modules/compile.xml \
--es workdir $PWD \
Expand Down
2 changes: 1 addition & 1 deletion cctools-repo/misc/build-helper/run-helper
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdir -p ${CCTOOLSDIR}/tmp
cp -f $in ${CCTOOLSDIR}/tmp/$out
chmod 755 ${CCTOOLSDIR}/tmp/$out

am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
--es type terminal \
--es title "$out" \
--es cmdline "/system/bin/sh -c \"${CCTOOLSDIR}/tmp/$out $args\"" \
Expand Down
8 changes: 4 additions & 4 deletions cctools-repo/old/build-shell-utils-gcc-4.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ nano_version=2.2.6
busybox_version=1.20.2
emacs_version=24.2

TARGET_INST_DIR="/data/data/com.pdaxrom.cctools/root/cctools"
#TARGET_INST_DIR="/data/data/com.pdaxrom.cctools/cache/cctools"
TARGET_INST_DIR="/data/data/${APPLICATION_ID}/root/cctools"
#TARGET_INST_DIR="/data/data/${APPLICATION_ID}/cache/cctools"

SRC_PREFIX="$1"

Expand Down Expand Up @@ -512,15 +512,15 @@ build_fpc() {
OS_TARGET=linux \
CROSSBINDIR="$crossbindir" \
OPT=$opt \
INSTALL_PREFIX=/data/data/com.pdaxrom.cctools/root/cctools || error "FPC build"
INSTALL_PREFIX=/data/data/${APPLICATION_ID}/root/cctools || error "FPC build"
# PP=fpc

make zipinstall \
CPU_TARGET=$cpu_target \
OS_TARGET=linux \
CROSSBINDIR="$crossbindir" \
OPT=$opt \
INSTALL_PREFIX=/data/data/com.pdaxrom.cctools/root/cctools || error "FPC tgzinstall"
INSTALL_PREFIX=/data/data/${APPLICATION_ID}/root/cctools || error "FPC tgzinstall"
# PP=fpc

error "asd"
Expand Down
12 changes: 6 additions & 6 deletions cctools-repo/patches/dropbear-0.52.patch
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ diff -Nur dropbear-0.52-orig/options.h dropbear-0.52/options.h
/* Default hostkey paths - these can be specified on the command line */
#ifndef DSS_PRIV_FILENAME
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
+#define DSS_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear_dss_host_key"
+#define DSS_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear_dss_host_key"
#endif
#ifndef RSA_PRIV_FILENAME
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
+#define RSA_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear_rsa_host_key"
+#define RSA_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear_rsa_host_key"
#endif

/* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
Expand Down Expand Up @@ -193,7 +193,7 @@ diff -Nur dropbear-0.52-orig/options.h dropbear-0.52/options.h
scripts etc. This can be overridden with the -P flag */
#ifndef DROPBEAR_PIDFILE
-#define DROPBEAR_PIDFILE "/var/run/dropbear.pid"
+#define DROPBEAR_PIDFILE "/data/data/com.pdaxrom.cctools/root/dropbear.pid"
+#define DROPBEAR_PIDFILE "/data/data/com.duy.c.cpp.compiler/root/dropbear.pid"
#endif

/* The command to invoke for xauth when using X11 forwarding.
Expand All @@ -210,13 +210,13 @@ diff -Nur dropbear-0.52-orig/options.h dropbear-0.52/options.h
* be enabled */
#ifndef SFTPSERVER_PATH
-#define SFTPSERVER_PATH "/usr/libexec/sftp-server"
+#define SFTPSERVER_PATH "/data/data/com.pdaxrom.cctools/root/cctools/libexec/sftp-server"
+#define SFTPSERVER_PATH "/data/data/com.duy.c.cpp.compiler/root/cctools/libexec/sftp-server"
#endif

/* This is used by the scp binary when used as a client binary. If you're
* not using the Dropbear client, you'll need to change it */
-#define _PATH_SSH_PROGRAM "/usr/bin/dbclient"
+#define _PATH_SSH_PROGRAM "/data/data/com.pdaxrom.cctools/root/cctools/bin/dbclient"
+#define _PATH_SSH_PROGRAM "/data/data/com.duy.c.cpp.compiler/root/cctools/bin/dbclient"

/* Whether to log commands executed by a client. This only logs the
* (single) command sent to the server, not what a user did in a
Expand All @@ -225,7 +225,7 @@ diff -Nur dropbear-0.52-orig/options.h dropbear-0.52/options.h

/* The default path. This will often get replaced by the shell */
-#define DEFAULT_PATH "/usr/bin:/bin"
+#define DEFAULT_PATH "/data/data/com.pdaxrom.cctools/root/cctools/sbin:/data/data/com.pdaxrom.cctools/root/cctools/bin:/system/sbin:/system/bin:/system/xbin"
+#define DEFAULT_PATH "/data/data/com.duy.c.cpp.compiler/root/cctools/sbin:/data/data/com.duy.c.cpp.compiler/root/cctools/bin:/system/sbin:/system/bin:/system/xbin"

/* Some other defines (that mostly should be left alone) are defined
* in sysoptions.h */
Expand Down
16 changes: 8 additions & 8 deletions cctools-repo/patches/dropbear-2016.74.patch
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@ diff -Nur dropbear-2016.74-orig/options.h dropbear-2016.74/options.h
/* Default hostkey paths - these can be specified on the command line */
#ifndef DSS_PRIV_FILENAME
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
+#define DSS_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear/dropbear_dss_host_key"
+#define DSS_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear/dropbear_dss_host_key"
#endif
#ifndef RSA_PRIV_FILENAME
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
+#define RSA_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear/dropbear_rsa_host_key"
+#define RSA_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear/dropbear_rsa_host_key"
#endif
#ifndef ECDSA_PRIV_FILENAME
-#define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key"
+#define ECDSA_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear/dropbear_ecdsa_host_key"
+#define ECDSA_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear/dropbear_ecdsa_host_key"
#endif

/* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens
Expand Down Expand Up @@ -344,28 +344,28 @@ diff -Nur dropbear-2016.74-orig/options.h dropbear-2016.74/options.h
scripts etc. This can be overridden with the -P flag */
#ifndef DROPBEAR_PIDFILE
-#define DROPBEAR_PIDFILE "/var/run/dropbear.pid"
+#define DROPBEAR_PIDFILE "/data/data/com.pdaxrom.cctools/root/cctools/var/run/dropbear.pid"
+#define DROPBEAR_PIDFILE "/data/data/com.duy.c.cpp.compiler/root/cctools/var/run/dropbear.pid"
#endif

/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
#ifndef XAUTH_COMMAND
-#define XAUTH_COMMAND "/usr/bin/xauth -q"
+#define XAUTH_COMMAND "/data/data/com.pdaxrom.cctools/root/cctools/bin/xauth -q"
+#define XAUTH_COMMAND "/data/data/com.duy.c.cpp.compiler/root/cctools/bin/xauth -q"
#endif

/* if you want to enable running an sftp server (such as the one included with
* OpenSSH), set the path below. If the path isn't defined, sftp will not
* be enabled */
#ifndef SFTPSERVER_PATH
-#define SFTPSERVER_PATH "/usr/libexec/sftp-server"
+#define SFTPSERVER_PATH "/data/data/com.pdaxrom.cctools/root/cctools/libexec/sftp-server"
+#define SFTPSERVER_PATH "/data/data/com.duy.c.cpp.compiler/root/cctools/libexec/sftp-server"
#endif

/* This is used by the scp binary when used as a client binary. If you're
* not using the Dropbear client, you'll need to change it */
-#define DROPBEAR_PATH_SSH_PROGRAM "/usr/bin/dbclient"
+#define DROPBEAR_PATH_SSH_PROGRAM "/data/data/com.pdaxrom.cctools/root/cctools/bin/dbclient"
+#define DROPBEAR_PATH_SSH_PROGRAM "/data/data/com.duy.c.cpp.compiler/root/cctools/bin/dbclient"

/* Whether to log commands executed by a client. This only logs the
* (single) command sent to the server, not what a user did in a
Expand All @@ -374,7 +374,7 @@ diff -Nur dropbear-2016.74-orig/options.h dropbear-2016.74/options.h

/* The default path. This will often get replaced by the shell */
-#define DEFAULT_PATH "/usr/bin:/bin"
+#define DEFAULT_PATH "/data/data/com.pdaxrom.cctools/root/cctools/sbin:/data/data/com.pdaxrom.cctools/root/cctools/bin:/system/sbin:/system/bin:/system/xbin"
+#define DEFAULT_PATH "/data/data/com.duy.c.cpp.compiler/root/cctools/sbin:/data/data/com.duy.c.cpp.compiler/root/cctools/bin:/system/sbin:/system/bin:/system/xbin"

/* Some other defines (that mostly should be left alone) are defined
* in sysoptions.h */
Expand Down
4 changes: 2 additions & 2 deletions cctools-repo/patches/perl-5.18.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

my $ld_run_path_shell = "";
--- /data/data/com.pdaxrom.cctools/root/cctools/home/perl-5.18.1/Configure
--- /data/data/com.duy.c.cpp.compiler/root/cctools/home/perl-5.18.1/Configure
+++ s/Configure
@@ -1347,7 +1347,7 @@

Expand Down Expand Up @@ -40,7 +40,7 @@
foreach my $try ('/bin/pwd',
'/usr/bin/pwd',
'/QOpenSys/bin/pwd', # OS/400 PASE.
+ '/data/data/com.pdaxrom.cctools/root/cctools/bin/pwd',
+ '/data/data/com.duy.c.cpp.compiler/root/cctools/bin/pwd',
) {

if( -x $try ) {
Expand Down

0 comments on commit f5ddfd3

Please sign in to comment.