Skip to content

An open-source cross-platform alternative to AirDrop

chore: add scripts

Tien Do Namfa8c7fd79697
diff --git a/scripts/compile_android_apk.sh b/scripts/compile_android_apk.sh
new file mode 100644
index 00000000..65a13300
--- /dev/null
+++ b/scripts/compile_android_apk.sh
@@ -0,0 +1,17 @@
+git reset --hard origin/main
+git pull
+git submodule update --remote
+
+cd ..
+cp localsend /tmp/build -r
+pushd /tmp/build
+
+alias flutter='submodules/flutter/bin/flutter'
+flutter config --no-analytics
+flutter config --android-sdk /opt/android-sdk
+flutter pub get
+flutter pub run build_runner build -d
+flutter build apk
+
+popd
+cd localsend
diff --git a/scripts/compile_android_appbundle.ps1 b/scripts/compile_android_appbundle.ps1
new file mode 100644
index 00000000..3ca641f8
--- /dev/null
+++ b/scripts/compile_android_appbundle.ps1
@@ -0,0 +1,9 @@
+git reset --hard origin/main
+git pull
+
+fvm flutter clean
+fvm flutter pub get
+fvm flutter pub run build_runner build -d
+fvm flutter build appbundle
+
+Write-Output 'Generated Android Appbundle!'
\ No newline at end of file
diff --git a/scripts/compile_ios.sh b/scripts/compile_ios.sh
new file mode 100644
index 00000000..456f0c0c
--- /dev/null
+++ b/scripts/compile_ios.sh
@@ -0,0 +1,10 @@
+git reset --hard origin/main
+git pull
+
+alias ff='fvm flutter'
+ff clean
+ff pub get
+ff pub run build_runner build -d
+ff precache --ios
+(cd ios;pod update)
+ff build ipa
diff --git a/scripts/compile_mac.sh b/scripts/compile_mac.sh
new file mode 100644
index 00000000..20d3d784
--- /dev/null
+++ b/scripts/compile_mac.sh
@@ -0,0 +1,8 @@
+git reset --hard origin/main
+git pull
+
+alias ff='fvm flutter'
+ff clean
+ff pub get
+ff pub run build_runner build -d
+ff build macos
diff --git a/scripts/compile_windows_msix.ps1 b/scripts/compile_windows_msix.ps1
new file mode 100644
index 00000000..965e8e37
--- /dev/null
+++ b/scripts/compile_windows_msix.ps1
@@ -0,0 +1,9 @@
+git reset --hard origin/main
+git pull
+
+fvm flutter clean
+fvm flutter pub get
+fvm flutter pub run build_runner build -d
+fvm flutter pub run msix:create --store
+
+Write-Output 'Generated Windows msix!'
\ No newline at end of file
diff --git a/scripts/compile_windows_zip.ps1 b/scripts/compile_windows_zip.ps1
new file mode 100644
index 00000000..7ba40786
--- /dev/null
+++ b/scripts/compile_windows_zip.ps1
@@ -0,0 +1,11 @@
+git reset --hard origin/main
+git pull
+
+fvm flutter clean
+fvm flutter pub get
+fvm flutter pub run build_runner build -d
+fvm flutter build windows
+
+Compress-Archive -Path build\windows\runner\Release\* -CompressionLevel Fastest -DestinationPath LocalSend-vXXX-windows.zip
+
+Write-Output 'Generated Windows zip!'
\ No newline at end of file