Generacion icon app
@@ -1,6 +0,0 @@
|
||||
package com.example.seguridad_electronica
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
||||
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 139 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#0A0E14</color>
|
||||
</resources>
|
||||
@@ -1,12 +1,12 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.10'
|
||||
ext.kotlin_version = '1.7.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# SENTINEL ONE — Script de generación de build
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
CYAN='\033[0;36m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
RED='\033[0;31m'
|
||||
BOLD='\033[1m'
|
||||
RESET='\033[0m'
|
||||
|
||||
echo ""
|
||||
echo -e "${CYAN}${BOLD}╔══════════════════════════════════════╗${RESET}"
|
||||
echo -e "${CYAN}${BOLD}║ SENTINEL ONE — Build Tool ║${RESET}"
|
||||
echo -e "${CYAN}${BOLD}╚══════════════════════════════════════╝${RESET}"
|
||||
echo ""
|
||||
|
||||
# ── Selección de plataforma ───────────────────────────────────
|
||||
echo -e "${BOLD}Selecciona la plataforma:${RESET}"
|
||||
echo ""
|
||||
echo " 1) Android — APK release"
|
||||
echo " 2) Android — APK debug"
|
||||
echo " 3) Android — App Bundle (.aab) para Play Store"
|
||||
echo " 4) Linux — Ejecutable de escritorio"
|
||||
echo " 5) Web — Sitio estático"
|
||||
echo ""
|
||||
read -p "Opción [1-5]: " opcion
|
||||
|
||||
echo ""
|
||||
|
||||
case $opcion in
|
||||
|
||||
# ── Android APK release ──────────────────────────────────────
|
||||
1)
|
||||
echo -e "${YELLOW}▶ Generando APK release para Android...${RESET}"
|
||||
flutter build apk --release
|
||||
if [ $? -eq 0 ]; then
|
||||
APK="build/app/outputs/flutter-apk/app-release.apk"
|
||||
SIZE=$(du -sh "$APK" | cut -f1)
|
||||
echo ""
|
||||
echo -e "${GREEN}${BOLD}✓ APK generado correctamente${RESET}"
|
||||
echo -e " Archivo : ${BOLD}$APK${RESET}"
|
||||
echo -e " Tamaño : ${BOLD}$SIZE${RESET}"
|
||||
echo ""
|
||||
read -p "¿Instalar en dispositivo conectado por ADB? [s/N]: " instalar
|
||||
if [[ "$instalar" =~ ^[sS]$ ]]; then
|
||||
echo -e "${YELLOW}▶ Instalando...${RESET}"
|
||||
adb install -r "$APK"
|
||||
[ $? -eq 0 ] && echo -e "${GREEN}✓ Instalado correctamente${RESET}" \
|
||||
|| echo -e "${RED}✗ Error al instalar. Verifica que el dispositivo esté conectado.${RESET}"
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}✗ Error al generar el APK.${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
# ── Android APK debug ────────────────────────────────────────
|
||||
2)
|
||||
echo -e "${YELLOW}▶ Generando APK debug para Android...${RESET}"
|
||||
flutter build apk --debug
|
||||
if [ $? -eq 0 ]; then
|
||||
APK="build/app/outputs/flutter-apk/app-debug.apk"
|
||||
SIZE=$(du -sh "$APK" | cut -f1)
|
||||
echo ""
|
||||
echo -e "${GREEN}${BOLD}✓ APK debug generado${RESET}"
|
||||
echo -e " Archivo : ${BOLD}$APK${RESET}"
|
||||
echo -e " Tamaño : ${BOLD}$SIZE${RESET}"
|
||||
echo ""
|
||||
read -p "¿Instalar en dispositivo conectado por ADB? [s/N]: " instalar
|
||||
if [[ "$instalar" =~ ^[sS]$ ]]; then
|
||||
echo -e "${YELLOW}▶ Instalando...${RESET}"
|
||||
adb install -r "$APK"
|
||||
[ $? -eq 0 ] && echo -e "${GREEN}✓ Instalado correctamente${RESET}" \
|
||||
|| echo -e "${RED}✗ Error al instalar.${RESET}"
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}✗ Error al generar el APK debug.${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
# ── Android App Bundle ───────────────────────────────────────
|
||||
3)
|
||||
echo -e "${YELLOW}▶ Generando App Bundle (.aab) para Play Store...${RESET}"
|
||||
flutter build appbundle --release
|
||||
if [ $? -eq 0 ]; then
|
||||
AAB="build/app/outputs/bundle/release/app-release.aab"
|
||||
SIZE=$(du -sh "$AAB" | cut -f1)
|
||||
echo ""
|
||||
echo -e "${GREEN}${BOLD}✓ App Bundle generado${RESET}"
|
||||
echo -e " Archivo : ${BOLD}$AAB${RESET}"
|
||||
echo -e " Tamaño : ${BOLD}$SIZE${RESET}"
|
||||
echo ""
|
||||
echo -e " ${CYAN}Sube este archivo a Google Play Console para publicar.${RESET}"
|
||||
else
|
||||
echo -e "${RED}✗ Error al generar el App Bundle.${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
# ── Linux desktop ────────────────────────────────────────────
|
||||
4)
|
||||
echo -e "${YELLOW}▶ Generando ejecutable para Linux...${RESET}"
|
||||
flutter build linux --release
|
||||
if [ $? -eq 0 ]; then
|
||||
DIR="build/linux/x64/release/bundle"
|
||||
SIZE=$(du -sh "$DIR" | cut -f1)
|
||||
echo ""
|
||||
echo -e "${GREEN}${BOLD}✓ Build Linux generado${RESET}"
|
||||
echo -e " Directorio : ${BOLD}$DIR${RESET}"
|
||||
echo -e " Tamaño : ${BOLD}$SIZE${RESET}"
|
||||
echo ""
|
||||
read -p "¿Ejecutar ahora? [s/N]: " ejecutar
|
||||
if [[ "$ejecutar" =~ ^[sS]$ ]]; then
|
||||
echo -e "${YELLOW}▶ Ejecutando...${RESET}"
|
||||
"$DIR/seguridad_electronica" &
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}✗ Error al generar build Linux.${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
# ── Web ──────────────────────────────────────────────────────
|
||||
5)
|
||||
echo -e "${YELLOW}▶ Generando build Web...${RESET}"
|
||||
flutter build web --release
|
||||
if [ $? -eq 0 ]; then
|
||||
DIR="build/web"
|
||||
SIZE=$(du -sh "$DIR" | cut -f1)
|
||||
echo ""
|
||||
echo -e "${GREEN}${BOLD}✓ Build Web generado${RESET}"
|
||||
echo -e " Directorio : ${BOLD}$DIR${RESET}"
|
||||
echo -e " Tamaño : ${BOLD}$SIZE${RESET}"
|
||||
echo ""
|
||||
read -p "¿Servir localmente con flutter serve? [s/N]: " servir
|
||||
if [[ "$servir" =~ ^[sS]$ ]]; then
|
||||
echo -e "${YELLOW}▶ Iniciando servidor en http://localhost:8080 ...${RESET}"
|
||||
flutter run -d web-server --web-port 8080
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}✗ Error al generar build Web.${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo -e "${RED}Opción inválida. Ejecuta el script de nuevo.${RESET}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo -e "${CYAN}${BOLD}══════════════════════════════════════${RESET}"
|
||||
echo -e "${GREEN}${BOLD} Build finalizado — SENTINEL ONE${RESET}"
|
||||
echo -e "${CYAN}${BOLD}══════════════════════════════════════${RESET}"
|
||||
echo ""
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 816 KiB |
|
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 709 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 4.9 MiB |
@@ -6,7 +6,11 @@ import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import path_provider_macos
|
||||
import shared_preferences_foundation
|
||||
import sqflite
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
}
|
||||
|
||||