Skip to content

Commit

Permalink
Added scrypt submodule and F-droid build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kumaigorodski committed Dec 12, 2015
1 parent 81bbeb6 commit ddbbf9e
Show file tree
Hide file tree
Showing 32 changed files with 70 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "app/scrypt"]
path = app/scrypt
url = https://github.com/wg/scrypt
19 changes: 19 additions & 0 deletions VisualBitcoinWallet.iml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="VisualBitcoinWallet" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
6 changes: 3 additions & 3 deletions app/app.iml
Expand Up @@ -101,16 +101,16 @@
<orderEntry type="library" exported="" name="guava-16.0.1" level="project" />
<orderEntry type="library" exported="" name="bitcoinj-core-0.13.3" level="project" />
<orderEntry type="library" exported="" name="scrypt-1.4.0" level="project" />
<orderEntry type="library" exported="" name="scala-library-2.11.7" level="project" />
<orderEntry type="library" exported="" name="protobuf-java-2.5.0" level="project" />
<orderEntry type="library" exported="" name="scala-library-2.11.7" level="project" />
<orderEntry type="library" exported="" name="core-3.2.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.2.0" level="project" />
<orderEntry type="library" exported="" name="core-1.51.0.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.2.0" level="project" />
<orderEntry type="library" exported="" name="android-segmented-1.0.4" level="project" />
<orderEntry type="library" exported="" name="jbox2d-library-2.3.1-SNAPSHOT" level="project" />
<orderEntry type="library" exported="" name="jsr305-2.0.1" level="project" />
<orderEntry type="library" exported="" name="okio-1.2.0" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.7.7" level="project" />
<orderEntry type="library" exported="" name="okio-1.2.0" level="project" />
<orderEntry type="library" name="scala-sdk-2.9.1.final" level="application" />
</component>
</module>
17 changes: 17 additions & 0 deletions app/prepare_fdroid.sh
@@ -0,0 +1,17 @@
cd scrypt
patch -p1 < ../scrypt_Makefile.patch
if [ `uname -m` = "x86_64" ]; then
export SYSTEM="linux-x86_64"
else
export SYSTEM="linux-x86"
fi
for ARCH in arm-linux-androideabi mipsel-linux-android x86; do
export ARCH_SHORT=`echo $ARCH | cut -d'-' -f 1 | sed s/mipsel/mips/` # arm|mips|x86
export PATH=$ANDROID_NDK/toolchains/$ARCH-4.8/prebuilt/$SYSTEM/bin:$PATH
make clean TARGET=android
make NDK_ROOT=$ANDROID_NDK TARGET=android ARCH_SHORT=$ARCH_SHORT ARCH=`echo $ARCH | sed s/x86/i686-linux-android/`
ARCHDIR=../src/main/jniLibs/`echo $ARCH_SHORT | sed s/arm/armeabi/` # armeabi|mips|x86
mkdir -p $ARCHDIR
cp target/libscrypt.so $ARCHDIR
done
cd ..
1 change: 1 addition & 0 deletions app/scrypt
Submodule scrypt added at 067523
21 changes: 21 additions & 0 deletions app/scrypt_Makefile.patch
@@ -0,0 +1,21 @@
diff --git a/Makefile b/Makefile
index cbb27b2..c707bd4 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,14 @@ SRC := $(wildcard src/main/c/*.c)
OBJ = $(patsubst src/main/c/%.c,$(OBJ_DIR)/%.o,$(SRC))

ifeq ($(TARGET), android)
- CC := arm-linux-androideabi-gcc
- SYSROOT := $(NDK_ROOT)/platforms/android-9/arch-arm/
+ CC := $(ARCH)-gcc
+ SYSROOT := $(NDK_ROOT)/platforms/android-9/arch-$(ARCH_SHORT)/
CFLAGS += --sysroot=$(SYSROOT)
- LDFLAGS += -lc -Wl,--fix-cortex-a8 --sysroot=$(SYSROOT)
+ ifeq ($(ARCH_SHORT), arm)
+ LDFLAGS += -lc -Wl,--fix-cortex-a8 --sysroot=$(SYSROOT)
+ else
+ LDFLAGS += -lc --sysroot=$(SYSROOT)
+ endif
SSE2 :=
endif
10 changes: 5 additions & 5 deletions app/src/main/java/com/btcontract/wallet/TxsActivity.scala
Expand Up @@ -73,16 +73,16 @@ class TxsActivity extends InfoActivity { me =>
else if (scrHeight < 5.1) 5 else if (scrHeight < 5.5) 6
else if (scrHeight < 6.2) 10 else 12

adapter = if (scrWidth < 2.0) new TxsListAdapter(new TxViewHolder(_), R.layout.frag_transaction_small)
else if (scrWidth < 3.2) new TxsListAdapter(new TxViewHolderNormal(_), R.layout.frag_transaction_normal)
else if (scrWidth < 4.4) new TxsListAdapter(new TxViewHolder(_), R.layout.frag_transaction_large)
else new TxsListAdapter(new TxViewHolderNormal(_), R.layout.frag_transaction_extra)

if (app.isAlive) {
add(constantListener.mkTxt, Informer.PEERS).ui.run
new Anim(app.kit.currentBalance, Utils.appName)
setContentView(R.layout.activity_txs)

adapter = if (scrWidth < 2.0) new TxsListAdapter(new TxViewHolder(_), R.layout.frag_transaction_small)
else if (scrWidth < 3.2) new TxsListAdapter(new TxViewHolderNormal(_), R.layout.frag_transaction_normal)
else if (scrWidth < 4.4) new TxsListAdapter(new TxViewHolder(_), R.layout.frag_transaction_large)
else new TxsListAdapter(new TxViewHolderNormal(_), R.layout.frag_transaction_extra)

// Periodic list update
list setOnScrollListener new ScrollListener {
timer.schedule(me anyToRunnable go, 10000, 10000)
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-hdpi/ic_launcher__.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/ic_launcher__.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/ic_launcher__.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-xxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Expand Up @@ -144,7 +144,7 @@

<array name="txs_total">
<item>No history</item>
<item>%1$s tranaction</item>
<item>%1$s transaction</item>
<item>%1$s txns</item>
</array>

Expand Down

0 comments on commit ddbbf9e

Please sign in to comment.