-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·90 lines (76 loc) · 2.09 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·90 lines (76 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
echo "🚀 Setting up Fortis Cryptocurrency Wallet"
echo "============================================="
# Check if Rust is installed
if ! command -v cargo &> /dev/null; then
echo "❌ Rust is not installed. Please install Rust first:"
echo " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
exit 1
fi
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3 first."
exit 1
fi
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js first:"
echo " https://nodejs.org/"
exit 1
fi
echo "✅ Prerequisites check passed"
# Build Rust application
echo "🔨 Building Rust wallet core..."
cargo build --release
if [ $? -eq 0 ]; then
echo "✅ Rust wallet core built successfully"
else
echo "❌ Failed to build Rust wallet core"
exit 1
fi
# Setup Python blockchain bridge
echo "🐍 Setting up Python blockchain bridge..."
cd python_bridge
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
if [ $? -eq 0 ]; then
echo "✅ Python blockchain bridge setup complete"
else
echo "❌ Failed to setup Python blockchain bridge"
exit 1
fi
cd ..
# Setup web GUI
echo "🌐 Setting up web GUI..."
cd web_gui
npm install
if [ $? -eq 0 ]; then
echo "✅ Web GUI dependencies installed"
else
echo "❌ Failed to install web GUI dependencies"
exit 1
fi
# Build web GUI
npm run build
if [ $? -eq 0 ]; then
echo "✅ Web GUI built successfully"
else
echo "❌ Failed to build web GUI"
exit 1
fi
cd ..
echo ""
echo "🎉 Setup complete! Your advanced cryptocurrency wallet is ready."
echo ""
echo "📋 Available commands:"
echo " ./target/release/crypto-wallet create --name my-wallet"
echo " ./target/release/crypto-wallet server"
echo ""
echo "🌐 To start the web interface:"
echo " ./target/release/crypto-wallet server"
echo " Then open http://localhost:8080 in your browser"
echo ""
echo "🔧 For development:"
echo " cargo run -- server"
echo ""