Mercurial > 510Connectbot
annotate Makefile @ 523:775a81a78a2b stable-1.9.4-7
add more debug code
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 31 May 2024 18:53:22 -0600 |
parents | 5d55f83b4e87 |
children | b61919d8a701 |
rev | line source |
---|---|
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
1 na=$(shell find . -iname '*.c' -o -iname '*.h' -o -iname '*.cpp') |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
2 style:=release |
498
3feac274a27b
updates for android10+
Carl Byington <carl@five-ten-sg.com>
parents:
493
diff
changeset
|
3 dest:=../ASM.v6/installers |
444
5a74f1b7c1db
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
443
diff
changeset
|
4 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2) |
5a74f1b7c1db
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
443
diff
changeset
|
5 id:=$(shell hg id --id || echo 1) |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
6 da:=$(shell date '+%Y-%m-%dT%H:%M:%S') |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
7 version:=\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
8 <?xml version=\"1.0\" encoding=\"utf-8\"?>\n\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
9 <resources>\n\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
10 <string name=\"msg_version\" translatable=\"false\">510Connectbot $(ver) ($(id) $(da))</string>\n\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
11 </resources>\n |
493 | 12 apk:=$(dest)/510Connectbot-$(ver).$(style).apk |
521 | 13 debugapk:=$(dest)/510Connectbot-$(ver).debug.apk |
493 | 14 signapk:=$(shell cat ~/.signapk) |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
15 |
521 | 16 # path to google binaries on AndroidBuild |
17 adb=/home/carl/Android/Sdk/platform-tools/adb | |
18 aapt=/home/carl/Android/Sdk/build-tools/33.0.0/aapt | |
19 | |
523 | 20 # dropbox path |
21 dropboxpathandroid:='AccuSpeech Mobile Dropbox/AccuSpeech/Software/Android' | |
22 | |
170
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
23 ifeq ($(style),release) |
451
621313775834
only build arm package
Carl Byington <carl@five-ten-sg.com>
parents:
444
diff
changeset
|
24 task:=assembleArmRelease |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
25 debug:=0 |
170
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
26 else |
451
621313775834
only build arm package
Carl Byington <carl@five-ten-sg.com>
parents:
444
diff
changeset
|
27 task:=assembleArmDebug |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
28 debug:=1 |
493 | 29 signapk:= |
170
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
30 endif |
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
31 |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
32 fn:=app/src/main/java/com/five_ten_sg/connectbot/monitor/MonitorService.java |
0 | 33 |
34 all: | |
493 | 35 make build.asm.packages |
73
accf93be8c12
update documentation; use xterm-256color as default terminal type
Carl Byington <carl@five-ten-sg.com>
parents:
1
diff
changeset
|
36 |
457
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
37 builder: clean prep |
493 | 38 echo ./gradlew $(task) |
39 @echo -e "$(signapk)\n$(signapk)" | ./gradlew $(task) | |
454
7492d2cb7b75
update to latest toolchain, gradle 4.10.2
Carl Byington <carl@five-ten-sg.com>
parents:
451
diff
changeset
|
40 mv app/build/outputs/apk/arm/$(style)/app-arm-$(style).apk $(apk) |
0 | 41 |
457
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
42 clean: |
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
43 rm -rf app/build/* |
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
44 rm -rf app/.externalNativeBuild || true |
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
45 |
362
d51bf957d955
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
360
diff
changeset
|
46 prep: |
457
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
47 echo -e "$(version)" >app/src/main/res/values/version.xml |
513 | 48 make docs |
362
d51bf957d955
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
360
diff
changeset
|
49 |
0 | 50 genkey: |
1
ab7313512aba
missing comma in DN, regenerate keystore
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
51 keytool -genkeypair -keystore 510Connectbot.keystore -alias 510Connectbot -dname "cn=510Connectbot , ou=510Connectbot, o=five-ten-sg, o=com, c=US" -keyalg RSA -keysize 2048 -validity 10000 |
0 | 52 |
483
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
53 exportkey: |
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
54 keytool -export -alias 510Connectbot -file 510Connectbot.crt -keystore 510Connectbot.keystore |
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
55 openssl x509 -inform der -in 510Connectbot.crt -out 510Connectbot.pem |
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
56 |
0 | 57 docs: |
58 (cd xml; make) | |
360
7eb24880b111
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
332
diff
changeset
|
59 (cd help; make) |
0 | 60 |
116 | 61 buildicon: |
430
47de9ffed872
add feature icon for google play store
Carl Byington <carl@five-ten-sg.com>
parents:
378
diff
changeset
|
62 convert base.510.icon.png -background white -resize 500x500 -extent 1024x500 google.play.store/feature.510.icon.png |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
63 cp -a base.510.icon.png app/src/main/res/drawable-xxxhdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
64 convert base.510.icon.png -resize 144x144 app/src/main/res/drawable-xxhdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
65 convert base.510.icon.png -resize 96x96 app/src/main/res/drawable-xhdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
66 convert base.510.icon.png -resize 72x72 app/src/main/res/drawable-hdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
67 convert base.510.icon.png -resize 48x48 app/src/main/res/drawable-mdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
68 convert base.510.icon.png -resize 36x36 app/src/main/res/drawable-ldpi/icon.png |
116 | 69 |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
70 convert app/src/main/res/drawable-xxxhdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-xxxhdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
71 convert app/src/main/res/drawable-xxhdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-xxhdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
72 convert app/src/main/res/drawable-xhdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-xhdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
73 convert app/src/main/res/drawable-hdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-hdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
74 convert app/src/main/res/drawable-mdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-mdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
75 convert app/src/main/res/drawable-ldpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-ldpi/notification_icon.png |
0 | 76 |
77 indentc: | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
78 dos2unix $(na) |
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
79 for i in $(na); do sed -i -e 's/\r//g' $$i; done |
0 | 80 indent --line-length100 \ |
81 --brace-indent4 \ | |
82 --braces-on-if-line \ | |
83 --braces-on-func-def-line \ | |
84 --case-brace-indentation4 \ | |
85 --case-indentation4 \ | |
86 --comment-indentation60 \ | |
87 --cuddle-else \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
88 --cuddle-do-while \ |
0 | 89 --declaration-comment-column60 \ |
90 --no-tabs \ | |
91 -nbbo \ | |
92 -npcs \ | |
93 -nprs \ | |
94 -npsl \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
95 -bad -bap -bbb -sob \ |
0 | 96 -saf -sai -saw \ |
97 -i4 \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
98 $(na) |
0 | 99 |
100 | |
101 indentjava: | |
102 astyle --style=java \ | |
103 --attach-namespaces \ | |
104 --attach-classes \ | |
105 --indent-classes \ | |
106 --indent-switches \ | |
107 --indent-cases \ | |
108 --indent-namespaces \ | |
109 --break-blocks \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
110 --pad-oper \ |
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
111 --pad-first-paren-out \ |
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
112 --pad-header \ |
332 | 113 --unpad-paren \ |
0 | 114 --delete-empty-lines \ |
115 --align-pointer=type \ | |
116 --break-closing-brackets \ | |
117 --keep-one-line-blocks \ | |
118 --keep-one-line-statements \ | |
119 --convert-tabs \ | |
120 --break-after-logical \ | |
121 --mode=java \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
122 $(shell find . -iname '*.java' | grep -v /gen/) |
0 | 123 |
124 internaldocs: | |
125 doxygen | |
479
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
126 |
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
127 |
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
128 build.asm.packages: |
493 | 129 make prep |
479
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
130 make builder style=release |
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
131 make builder style=debug |
492
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
132 |
514 | 133 update.copyrights: |
134 sed -i -re 's/(Copyright .C. ....-).... /\1$(year) /g' app/src/main/java/ch/ethz/ssh2/crypto/SecureRandomFix.java | |
135 sed -i -re 's/(Copyright . ....-).... /\1$(year) /g' app/src/main/res/values/notrans.xml | |
136 sed -i -re 's/(Copyright .C. ....-).... /\1$(year) /g' xml/510connectbot.in | |
137 | |
521 | 138 install.android: |
139 $(adb) devices | |
140 echo installing $(debugapk) | |
141 $(adb) install -r -d $(debugapk) | |
142 | |
143 logcat.device: | |
523 | 144 $(adb) logcat -c |
521 | 145 $(adb) logcat |
146 | |
523 | 147 push.dropbox: |
148 cp -a -p $(apk) ~/$(dropboxpathandroid) | |
149 cp -a -p $(debugapk) ~/$(dropboxpathandroid) | |
150 | |
511
6dbddfa27f6c
update connections file
Carl Byington <carl@five-ten-sg.com>
parents:
504
diff
changeset
|
151 push: |
6dbddfa27f6c
update connections file
Carl Byington <carl@five-ten-sg.com>
parents:
504
diff
changeset
|
152 # from from android build machine |
513 | 153 hg push ssh://ns.five-ten-sg.com/usr/hg/510Connectbot || /bin/true |
154 hg push ssh://root@ns.five-ten-sg.com//usr/hg-repository/510Connectbot || /bin/true | |
155 hg push ssh://root@ns1.five-ten-sg.com//usr/hg-repository/510Connectbot || /bin/true | |
511
6dbddfa27f6c
update connections file
Carl Byington <carl@five-ten-sg.com>
parents:
504
diff
changeset
|
156 ssh ns.five-ten-sg.com "cd usr/hg/510Connectbot; hg update" |
513 | 157 ssh root@ns.five-ten-sg.com "cd /usr/hg-repository/510Connectbot; hg update" |
158 ssh root@ns1.five-ten-sg.com "cd /usr/hg-repository/510Connectbot; hg update" | |
159 scp -p html/* root@ns.five-ten-sg.com://home/httpd/html/510sg/510Connectbot | |
160 scp -p html/* root@ns1.five-ten-sg.com://home/httpd/html/510sg/510Connectbot | |
511
6dbddfa27f6c
update connections file
Carl Byington <carl@five-ten-sg.com>
parents:
504
diff
changeset
|
161 |
492
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
162 # |
515
caba9dfe7a89
fix vt320 delete area, missing screeh change test
Carl Byington <carl@five-ten-sg.com>
parents:
514
diff
changeset
|
163 # make update.copyrights year=2024 |
caba9dfe7a89
fix vt320 delete area, missing screeh change test
Carl Byington <carl@five-ten-sg.com>
parents:
514
diff
changeset
|
164 # hg commit -m 'update copyrights' |
514 | 165 |
492
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
166 # release procedure |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
167 # make any changes |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
168 # hg commit -m 'commit message' |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
169 # make build.asm.packages |
515
caba9dfe7a89
fix vt320 delete area, missing screeh change test
Carl Byington <carl@five-ten-sg.com>
parents:
514
diff
changeset
|
170 # make push |
523 | 171 # make push.dropbox |
521 | 172 # make install.android |