-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
106 lines (90 loc) · 4.97 KB
/
Makefile
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
MONERO_C_TAG=v0.18.3.4-RC8-zano
COIN=monero
.PHONY: android
android:
./build_changelog.sh
flutter build apk --flavor calc --dart-define=libstealth_calculator=true
flutter build apk --flavor clean --dart-define=libstealth_calculator=false
.PHONY: linux
linux:
./build_changelog.sh
flutter build linux
./build_moneroc.sh --prebuild --coin monero --tag ${MONERO_C_TAG} --triplet $(shell gcc -dumpmachine) --location build/linux/${FLUTTER_ARCH}/release/bundle/lib
-rm build/linux/${FLUTTER_ARCH}/release/xmruw-linux-${FLUTTER_ARCH}.tar*
(cd build/linux/${FLUTTER_ARCH}/release && cp -a bundle xmruw && tar -cvf xmruw-linux-${FLUTTER_ARCH}.tar xmruw && xz -e xmruw-linux-${FLUTTER_ARCH}.tar)
.PHONY: linux_debug_lib
linux_debug_lib:
./build_moneroc.sh --prebuild --coin monero --tag ${MONERO_C_TAG} --triplet x86_64-linux-gnu --location build/linux/*/debug/bundle/lib
.PHONY: ios_lib_download
ios_lib_download:
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios --location ios
cd ios && ./gen_framework.sh
.PHONY: ios_lib_build
ios_lib_build:
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios --location ios
cd ios && ./gen_framework.sh
.PHONY: ios
ios:
flutter build ipa
.PHONY: dev
dev: libs
dev:
lib/const/resource.g.dart:
dart pub global activate flutter_asset_generator
timeout 15 ${HOME}/.pub-cache/bin/fgen || true
mv lib/const/resource.dart lib/const/resource.g.dart
.PHONY: lib/const/resource.g.dart
.PHONY: sailfishos
sailfishos:
./build_changelog.sh
bash ./elinux/sailfish_build.sh
.PHONY: version
version:
sed -i "s/^version: .*/version: 1.0.0+$(shell git rev-list --count HEAD)/" "pubspec.yaml"
sed -i "s/^ Version: .*/ Version: 1.0.0+$(shell git rev-list --count HEAD)/" "debian/debian.yaml.txt"
sed -i "s/^Version=.*/Version=1.0.0+$(shell git rev-list --count HEAD)/" "debian/gui/xmruw.desktop"
sed -i "s/^Version=.*/Version=1.0.0+$(shell git rev-list --count HEAD)/" "elinux/unnamed-monero-wallet.desktop"
sed -i "s/^Version: .*/Version: 1.0.0/" "elinux/sailfishos.spec"
sed -i "s/^Release: .*/Release: $(shell git rev-list --count HEAD)/" "elinux/sailfishos.spec"
sed -i "s/^Version: .*/Version: 1.0.0/" "elinux/sailfishos.spec"
sed -i "s/^const xmruwVersion = .*/const xmruwVersion = '$(shell git describe --tags)';/" "lib/helpers/licenses_extra.dart"
.PHONY: version_nongnu
version_nongnu:
sed -i '' "s/^version: .*/version: 1.0.0+$(shell git rev-list --count HEAD)/" "pubspec.yaml"
sed -i '' "s/^ Version: .*/ Version: 1.0.0+$(shell git rev-list --count HEAD)/" "debian/debian.yaml.txt"
sed -i '' "s/^Version=.*/Version=1.0.0+$(shell git rev-list --count HEAD)/" "debian/gui/xmruw.desktop"
sed -i '' "s/^Version=.*/Version=1.0.0+$(shell git rev-list --count HEAD)/" "elinux/unnamed-${COIN}-wallet.desktop"
sed -i '' "s/^Version: .*/Version: 1.0.0/" "elinux/sailfishos.spec"
sed -i '' "s/^Release: .*/Release: $(shell git rev-list --count HEAD)/" "elinux/sailfishos.spec"
sed -i '' "s/^Version: .*/Version: 1.0.0/" "elinux/sailfishos.spec"
sed -i '' "s/^const xmruwVersion = .*/const xmruwVersion = '$(shell git describe --tags)';/" "lib/helpers/licenses_extra.dart"
.PHONY: lib/helpers/licenses.g.dart
lib/helpers/licenses.g.dart:
dart run flutter_oss_licenses:generate -o lib/helpers/licenses.g.dart
libs_android_download:
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet x86_64-linux-android --location android/app/src/main/jniLibs/x86_64
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet armv7a-linux-androideabi --location android/app/src/main/jniLibs/armeabi-v7a
libs_android_build:
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet x86_64-linux-android --location android/app/src/main/jniLibs/x86_64
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet armv7a-linux-androideabi --location android/app/src/main/jniLibs/armeabi-v7a
windows_libs_download:
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet x86_64-w64-mingw32 --location build/windows/x64/runner/Release
.PHONY: macos_arm64
macos_arm64:
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-darwin --location macos
flutter build macos
test -f build/xmruw_darwin_arm64.dmg && rm -rf build/xmruw_darwin_arm64.dmg || true
create-dmg \
--volname "xmruw" \
--background "assets/macos_installer_background.png" \
--window-pos 200 120 \
--window-size 588 440 \
--icon-size 75 \
--icon unnamed_monero_wallet.app 134 205 \
--hide-extension unnamed_monero_wallet.app \
--app-drop-link 460 205 \
--eula LICENSE \
build/xmruw.dmg \
build/macos/Build/Products/Release