Skip to content

Commit f5ddfd3

Browse files
committed
Merge remote-tracking branch 'origin/master'
# 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
2 parents eaada10 + f7b5d66 commit f5ddfd3

File tree

10 files changed

+104
-29
lines changed

10 files changed

+104
-29
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
package com.duy;
3+
4+
import android.support.multidex.MultiDexApplication;
5+
6+
7+
public class CppIdeApplication extends MultiDexApplication {
8+
9+
@Override
10+
public void onCreate() {
11+
super.onCreate();
12+
}
13+
14+
}

cctools-repo/build-i386.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
BUILD_START=$(date +%s)
4+
5+
WRKDIR=$PWD/tmp
6+
#WRKDIR=/mnt/nfs/Work/cctools-pro/tmp
7+
8+
#
9+
# uncomment to build pie compiler
10+
# -------------------------------
11+
export BUILD_PIE_COMPILER="yes"
12+
WRKDIR=${WRKDIR}-pie
13+
# -------------------------------
14+
#
15+
16+
SDKDIR=/home/duy/Android/Sdk
17+
NDKDIR=/home/duy/Android/android-ndk-r12b
18+
NDKSRC=/home/duy/github
19+
20+
for d in binutils gcc gmp mpc mpfr cloog isl ppl llvm; do
21+
ln -sf ${NDKSRC}/${d} src/
22+
done
23+
24+
export PATH=~/bin/CodeSourcery/bin:$PATH
25+
26+
#./build-shell-utils.sh ${PWD}/src arm-linux-androideabi ${WRKDIR}/arm-repo $NDKDIR $SDKDIR || exit 1
27+
28+
#./build-shell-utils.sh ${PWD}/src mipsel-linux-android ${WRKDIR}/mips-repo $NDKDIR $SDKDIR || exit 1
29+
30+
./build-shell-utils.sh ${PWD}/src i686-linux-android ${WRKDIR}/i686-repo $NDKDIR $SDKDIR || exit 1
31+
32+
#./build-shell-utils.sh ${PWD}/src aarch64-linux-android ${WRKDIR}/arm64-repo $NDKDIR $SDKDIR || exit 1
33+
34+
#./build-shell-utils.sh ${PWD}/src mips64el-linux-android ${WRKDIR}/mips64-repo $NDKDIR $SDKDIR || exit 1
35+
36+
#./build-shell-utils.sh ${PWD}/src x86_64-linux-android ${WRKDIR}/x86_64-repo $NDKDIR $SDKDIR || exit 1
37+
38+
test -e ${WRKDIR}/repo/armeabi-v7a || ln -sf armeabi ${WRKDIR}/repo/armeabi-v7a
39+
test -e ${WRKDIR}/repo/mips-r2 || ln -sf mips ${WRKDIR}/repo/mips-r2
40+
41+
for d in armeabi mips x86 arm64-v8a mips64 x86_64; do
42+
pushd .
43+
cp -f make_packages.sh ${WRKDIR}/repo/${d}/
44+
cd ${WRKDIR}/repo/${d}
45+
./make_packages.sh
46+
popd
47+
done
48+
49+
mkdir -p ${WRKDIR}/repo/src
50+
51+
find `find src -type d` -type f -exec cp -f {} ${WRKDIR}/repo/src/ \;
52+
53+
BUILD_END=$(date +%s)
54+
55+
TOTAL_TIME=$(($BUILD_END - $BUILD_START))
56+
57+
echo
58+
echo
59+
echo "Build time: $(date -u -d @$TOTAL_TIME +%T)"
60+
echo
61+
echo "DONE!"

cctools-repo/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export PATH=~/bin/CodeSourcery/bin:$PATH
2727

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

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

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

cctools-repo/doc/export.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export LD_LIBRARY_PATH='/data/data/com.pdaxrom.cctools/root/cctools/lib:/system/lib'
2-
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'
3-
export TEMPDIR='/data/data/com.pdaxrom.cctools/root/cctools/home/tmp'
1+
export LD_LIBRARY_PATH='/data/data/${APPLICATION_ID}/root/cctools/lib:/system/lib'
2+
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'
3+
export TEMPDIR='/data/data/${APPLICATION_ID}/root/cctools/home/tmp'
44
export TERM='xterm'
5-
export TMPDIR='/data/data/com.pdaxrom.cctools/root/cctools/home/tmp'
5+
export TMPDIR='/data/data/${APPLICATION_ID}/root/cctools/home/tmp'

cctools-repo/misc/build-helper/build-helper

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if [ "$openbuild" = true ]; then
5353
dialogid="$1"
5454
fi
5555

56-
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
56+
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
5757
--es type build \
5858
--es cmdline "build-helper --native $native --executable $executable --run $run --buildwindow $buildwindow --runwindow $runwindow --dialogid $dialogid $@" \
5959
--es workdir "$PWD" \
@@ -87,7 +87,7 @@ run_exec() {
8787
else
8888
for m in ${CCTOOLSDIR} ${EXTERNAL_STORAGE}/CCTools; do
8989
if [ -e ${m}/share/modules/runargs.xml ]; then
90-
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
90+
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
9191
--es type module \
9292
--es path ${m}/share/modules/runargs.xml \
9393
--es workdir $PWD \
@@ -158,7 +158,7 @@ fi
158158
if [ "$buildwindow" = "true" ]; then
159159
for m in ${CCTOOLSDIR} ${EXTERNAL_STORAGE}/CCTools; do
160160
if [ -e ${m}/share/modules/compile.xml ]; then
161-
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
161+
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
162162
--es type module \
163163
--es path ${m}/share/modules/compile.xml \
164164
--es workdir $PWD \

cctools-repo/misc/build-helper/run-helper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mkdir -p ${CCTOOLSDIR}/tmp
1010
cp -f $in ${CCTOOLSDIR}/tmp/$out
1111
chmod 755 ${CCTOOLSDIR}/tmp/$out
1212

13-
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.pdaxrom.cctools/.CCToolsActivity \
13+
am start $(am 2>&1 | grep -q '\-\-user' && echo '--user 0') -n com.duy.c.cpp.compiler/.CCToolsActivity \
1414
--es type terminal \
1515
--es title "$out" \
1616
--es cmdline "/system/bin/sh -c \"${CCTOOLSDIR}/tmp/$out $args\"" \

cctools-repo/old/build-shell-utils-gcc-4.7.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ nano_version=2.2.6
55
busybox_version=1.20.2
66
emacs_version=24.2
77

8-
TARGET_INST_DIR="/data/data/com.pdaxrom.cctools/root/cctools"
9-
#TARGET_INST_DIR="/data/data/com.pdaxrom.cctools/cache/cctools"
8+
TARGET_INST_DIR="/data/data/${APPLICATION_ID}/root/cctools"
9+
#TARGET_INST_DIR="/data/data/${APPLICATION_ID}/cache/cctools"
1010

1111
SRC_PREFIX="$1"
1212

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

518518
make zipinstall \
519519
CPU_TARGET=$cpu_target \
520520
OS_TARGET=linux \
521521
CROSSBINDIR="$crossbindir" \
522522
OPT=$opt \
523-
INSTALL_PREFIX=/data/data/com.pdaxrom.cctools/root/cctools || error "FPC tgzinstall"
523+
INSTALL_PREFIX=/data/data/${APPLICATION_ID}/root/cctools || error "FPC tgzinstall"
524524
# PP=fpc
525525

526526
error "asd"

cctools-repo/patches/dropbear-0.52.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ diff -Nur dropbear-0.52-orig/options.h dropbear-0.52/options.h
9696
/* Default hostkey paths - these can be specified on the command line */
9797
#ifndef DSS_PRIV_FILENAME
9898
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
99-
+#define DSS_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear_dss_host_key"
99+
+#define DSS_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear_dss_host_key"
100100
#endif
101101
#ifndef RSA_PRIV_FILENAME
102102
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
103-
+#define RSA_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear_rsa_host_key"
103+
+#define RSA_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear_rsa_host_key"
104104
#endif
105105

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

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

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

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

226226
/* The default path. This will often get replaced by the shell */
227227
-#define DEFAULT_PATH "/usr/bin:/bin"
228-
+#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"
228+
+#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"
229229

230230
/* Some other defines (that mostly should be left alone) are defined
231231
* in sysoptions.h */

cctools-repo/patches/dropbear-2016.74.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ diff -Nur dropbear-2016.74-orig/options.h dropbear-2016.74/options.h
272272
/* Default hostkey paths - these can be specified on the command line */
273273
#ifndef DSS_PRIV_FILENAME
274274
-#define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key"
275-
+#define DSS_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear/dropbear_dss_host_key"
275+
+#define DSS_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear/dropbear_dss_host_key"
276276
#endif
277277
#ifndef RSA_PRIV_FILENAME
278278
-#define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key"
279-
+#define RSA_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear/dropbear_rsa_host_key"
279+
+#define RSA_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear/dropbear_rsa_host_key"
280280
#endif
281281
#ifndef ECDSA_PRIV_FILENAME
282282
-#define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key"
283-
+#define ECDSA_PRIV_FILENAME "/data/data/com.pdaxrom.cctools/root/cctools/etc/dropbear/dropbear_ecdsa_host_key"
283+
+#define ECDSA_PRIV_FILENAME "/data/data/com.duy.c.cpp.compiler/root/cctools/etc/dropbear/dropbear_ecdsa_host_key"
284284
#endif
285285

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

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

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

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

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

375375
/* The default path. This will often get replaced by the shell */
376376
-#define DEFAULT_PATH "/usr/bin:/bin"
377-
+#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"
377+
+#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"
378378

379379
/* Some other defines (that mostly should be left alone) are defined
380380
* in sysoptions.h */

cctools-repo/patches/perl-5.18.1.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

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

@@ -40,7 +40,7 @@
4040
foreach my $try ('/bin/pwd',
4141
'/usr/bin/pwd',
4242
'/QOpenSys/bin/pwd', # OS/400 PASE.
43-
+ '/data/data/com.pdaxrom.cctools/root/cctools/bin/pwd',
43+
+ '/data/data/com.duy.c.cpp.compiler/root/cctools/bin/pwd',
4444
) {
4545

4646
if( -x $try ) {

0 commit comments

Comments
 (0)