jdogresorg / freewallet-mobile

Mobile wallet for iOS/Android/Browser which supports Bitcoin and Counterparty
https://freewallet.io
MIT License
70 stars 66 forks source link

Provide build instructions to rebuild the app from Google Play #34

Open Giszmo opened 3 years ago

Giszmo commented 3 years ago

I tried to rebuild the apk from Google Play but did not get too far. There are no clear build instructions and I couldn't guess how to compile it neither.

My full review can be found here.

ScriptProdigy commented 3 years ago

Also have had issues compiling!

I believe sencha cmd has been deprecated and integrated into another software suite which (I believe) renders the current code useless? Really Im clueless.

I have no history with sencha cmd, but I believe that is what is used to compile this codebase after digging around a little.

jdogresorg commented 3 years ago

| I believe sencha cmd has been deprecated and integrated into another software suite which (I believe) renders the current code useless? Really Im clueless.

You are correct, Sencha touch has been merged into the ExtJS toolkit (sencha.com) . The build process was using Phonegap to provide native functionality and using Phonegap build services to handle building/signing the builds.

The build process was simply zipping up the github repo codebase into a .zip file and uploading it to the phonegap build service (https://build.phonegap.com/) which also has been depreciated.

Below is the build.sh script I would use to create builds.

I plan on working on a CP compatible mobile and desktop wallet in 2021, so I probably won't be spending the time to port the app from Sencha Touch to ExtJS toolkits.

#!/bin/sh
#
# Script to handle building the native app
#
# Written By  : Jeremy Johnson <j-dog@j-dog.net>
#####################################################
curr_dir=`pwd`
base_dir=/Users/jjohnson/Sites/freewallet-mobile/
cfg_file=$base_dir/phonegap/config.xml
app_file=$base_dir/app/controller/Main.js
tmp_file=$app_file.tmp

# Extract the current version from phonegap/config.xml file
version=`cat $cfg_file | grep "version=" | grep -v xml | awk -F "=" '{print $2}' | tr -d '"'`;

# Get the line # where FW.APP_VERSION is specified in app 
linenum=`cat $app_file | grep -n "FW.APP_VERSION=" | awk -F ":" '{print $1}' `

echo "Detected version $version...";

# Swap in the new version number
cat $app_file | sed "$linenum s/.*/        FW.APP_VERSION=\"$version\"/" >  $tmp_file
mv $tmp_file $app_file

# Check if user wants to create web build
while true; do
    read -p "Create production build (web)?" yn
    case $yn in
        [Yy]* ) cd $base_dir
                sencha app build production
                break;;
        [Nn]* ) break;;
        * ) echo "Please answer yes or no.";;
    esac
done

# Check if user wants to create native build
while true; do
    read -p "Create native builds (iOS/Android)?" yn
    case $yn in
        [Yy]* ) cd $base_dir
                phonegap remote logout
                sencha app build native
                break;;
        [Nn]* ) break;;
        * ) echo "Please answer yes or no.";;
    esac
done

# Return user to the current directory
cd $curr_dir
ScriptProdigy commented 3 years ago

Thanks for the quick reply!

Thanks for the bit of guidance, Ive been able to build freewallet-desktop just fine but struggling for longer than Id like to admit trying to build this repo.. lol

Im looking into porting this codebase to ExtJS toolkits. I want to build this wallet into a mobile wallet for Aspire ( aspirecrypto.com ) which is based on counterparty and our own blockchain ( not on bitcoin, saving space on chain for bitcoin :) ) Starting from this base I figured would be much quicker than building a mobile wallet from scratch.

Giszmo commented 3 years ago

@ScriptProdigy there are hundreds of apps out there. I would suggest to not build on one that uses deprecated libraries and build pipelines.

@jdogresorg please let me know when you have some complete build instructions including dependencies up.

ScriptProdigy commented 3 years ago

@ScriptProdigy there are hundreds of apps out there. I would suggest to not build on one that uses deprecated libraries and build pipelines.

hundreds of open source counterparty mobile wallets? Please link me

jdogresorg commented 3 years ago

@ScriptProdigy I just recently ported some other apps from Sencha Touch to ExtJS7 and it wasn't really that difficult.... Also, not sure if your aware of it, but Tokenly put out a fork of copay which worked with Counterparty for a time.... I believe https://github.com/tokenly/pockets is the repo

Giszmo commented 3 years ago

hundreds of open source counterparty mobile wallets? Please link me

Nah, not counterparty. I track 240 apps at WalletScrutiny but those are for Bitcoin.