Explorar el Código

app: fix android builds with new stable toolchain

darkfi hace 1 año
padre
commit
930470bbcd
Se han modificado 6 ficheros con 135 adiciones y 378 borrados
  1. 118 364
      bin/app/Cargo.lock
  2. 8 6
      bin/app/Cargo.toml
  3. 2 5
      bin/app/Dockerfile
  4. 2 2
      bin/app/Makefile
  5. 1 1
      bin/app/src/main.rs
  6. 4 0
      bin/app/src/text2/editor/android.rs

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 118 - 364
bin/app/Cargo.lock


+ 8 - 6
bin/app/Cargo.toml

@@ -69,27 +69,29 @@ enable-netdebug = []
 freetype-rs = { git = "https://github.com/narodnik/freetype-rs" }
 freetype-sys = { git = "https://github.com/narodnik/freetype-sys2" }
 
-halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
-halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
+halo2_proofs = { git="https://github.com/parazyd/halo2", branch="v4" }
+halo2_gadgets = { git="https://github.com/parazyd/halo2", branch="v4" }
 # This patch didn't work for me
 #dirs-sys = {git="https://github.com/sbechet/dirs-sys-rs.git"}
 
 # Once merged, we can remove this
 swash = { git = "https://github.com/valadaptive/swash", branch = "tight-bounds" }
 
+tor-rtcompat = { git = "https://github.com/narodnik/arti" }
+tor-rtmock = { git = "https://github.com/narodnik/arti" }
+
 [target.'cfg(not(target_os = "android"))'.dependencies]
 dirs = "5.0.1"
 
 [target.'cfg(target_os = "android")'.dependencies]
 android_logger = "0.13.3"
 # Required by Arti: tor-dirmgr
-rusqlite = {version = "0.32.1", features = ["bundled"]}
-tor-dirmgr = {version="0.26.0", features=["static"]}
-#android-fileopen = {path = "./android-fileopen/"}
+tor-dirmgr = { version="0.29.0", features=["static"] }
 
 [target.'cfg(target_os = "windows")'.dependencies]
 # Used by tor-dirmgr
-rusqlite = {version = "0.32.1", features = ["bundled"]}
+#rusqlite = {version = "0.32.1", features = ["bundled"]}
+tor-dirmgr = { version="0.29.0", features=["static"] }
 
 [package.metadata.android.activity_attributes]
 "android:exported" = "true"

+ 2 - 5
bin/app/Dockerfile

@@ -10,10 +10,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \
 
 RUN curl -o rustup.sh --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
 RUN chmod +x rustup.sh
-RUN ./rustup.sh -y --default-toolchain nightly-2025-04-10
-
-#RUN rustup toolchain install nightly
-#RUN rustup default nightly
+RUN ./rustup.sh -y
 RUN rustc --version
 
 RUN rustup target add armv7-linux-androideabi
@@ -56,7 +53,7 @@ RUN cargo install --path /root/cargo-apk
 ENV PATH="/opt/android-sdk-linux/build-tools/31.0.0/:${PATH}"
 
 # Lets cache packages for faster builds
-RUN git clone https://codeberg.org/darkrenaissance/darkfi
+RUN git clone --depth=1 https://codeberg.org/darkrenaissance/darkfi
 COPY Cargo.lock darkfi/bin/app/
 WORKDIR /root/darkfi/bin/app/
 RUN cargo fetch

+ 2 - 2
bin/app/Makefile

@@ -74,7 +74,7 @@ dev: $(SRC) fonts
 	./darkfi-app
 
 apk: $(SRC) fonts
-	podman run -v /home/narodnik/src/stuff/miniquad:/root/mq -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/app/ -t apk cargo quad-apk build $(DEV_FEATURES)
+	podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/app/ -t apk cargo quad-apk build $(DEV_FEATURES)
 	-mv $(DEBUG_APK) .
 	-adb uninstall darkfi.darkfi_app
 	adb install -r darkfi-app.apk
@@ -84,7 +84,7 @@ apk: $(SRC) fonts
 
 # Useful for dev
 cli:
-	podman run -v /home/narodnik/src/stuff/parley:/root/parley -v /home/narodnik/src/stuff/miniquad:/root/mq -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/app/ -it apk bash
+	podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/app/ -it apk bash
 
 clean:
 	podman run -v $(shell pwd):/root/dw -w /root/dw -t apk rm -fr target/

+ 1 - 1
bin/app/src/main.rs

@@ -17,7 +17,7 @@
  */
 
 // Use these to incrementally fix warnings with cargo fix
-//#![allow(warnings, unused)]
+#![allow(warnings, unused)]
 //#![deny(unused_imports)]
 
 use async_lock::{Mutex as AsyncMutex, RwLock as AsyncRwLock};

+ 4 - 0
bin/app/src/text2/editor/android.rs

@@ -149,4 +149,8 @@ impl Editor {
         let cursor_pos = Point::new(cursor_rect.x0 as f32, cursor_rect.y0 as f32);
         Some(cursor_pos)
     }
+
+    pub async fn driver<'a>(&'a mut self) -> Option<parley::PlainEditorDriver<'a, Color>> {
+        None
+    }
 }

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio