feat: better packaging
This commit is contained in:
@@ -18,7 +18,7 @@ Set-Location $ProjectRoot
|
||||
|
||||
# Define paths
|
||||
$BuildDir = "build\windows\x64\runner\Release"
|
||||
$PortableZip = Join-Path (Resolve-Path $OutputDir) "plezy-windows-portable.zip"
|
||||
$PortableZip = Join-Path (Resolve-Path $OutputDir) "plezy-windows-portable.7z"
|
||||
$InstallerExe = Join-Path (Resolve-Path $OutputDir) "plezy-windows-installer.exe"
|
||||
$SetupScript = "setup.iss"
|
||||
|
||||
@@ -30,6 +30,25 @@ if (-not (Test-Path $BuildDir)) {
|
||||
|
||||
Write-Host "Found build at: $BuildDir" -ForegroundColor Green
|
||||
|
||||
# Check for 7-Zip
|
||||
Write-Host "`nChecking for 7-Zip..." -ForegroundColor Cyan
|
||||
if (-not (Get-Command 7z -ErrorAction SilentlyContinue)) {
|
||||
Write-Host "7-Zip not found in PATH. Installing via Chocolatey..." -ForegroundColor Yellow
|
||||
|
||||
if (-not (Get-Command choco -ErrorAction SilentlyContinue)) {
|
||||
Write-Error "Chocolatey is not installed. Please install it from https://chocolatey.org/install"
|
||||
exit 1
|
||||
}
|
||||
|
||||
choco install 7zip -y
|
||||
refreshenv
|
||||
|
||||
if (-not (Get-Command 7z -ErrorAction SilentlyContinue)) {
|
||||
Write-Error "Failed to install 7-Zip"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Create Portable Archive
|
||||
Write-Host "`nCreating portable archive..." -ForegroundColor Cyan
|
||||
Push-Location $BuildDir
|
||||
@@ -37,7 +56,7 @@ try {
|
||||
if (Test-Path $PortableZip) {
|
||||
Remove-Item $PortableZip -Force
|
||||
}
|
||||
Compress-Archive -Path * -DestinationPath $PortableZip
|
||||
7z a -mx=9 $PortableZip *
|
||||
Write-Host "Created: $PortableZip" -ForegroundColor Green
|
||||
} finally {
|
||||
Pop-Location
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <hotkey_manager_windows/hotkey_manager_windows_plugin_c_api.h>
|
||||
#include <os_media_controls/os_media_controls_plugin_c_api.h>
|
||||
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
|
||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
#include <window_manager/window_manager_plugin.h>
|
||||
@@ -30,8 +29,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("OsMediaControlsPluginCApi"));
|
||||
ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
|
||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
||||
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
|
||||
@@ -9,7 +9,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
hotkey_manager_windows
|
||||
os_media_controls
|
||||
screen_retriever_windows
|
||||
share_plus
|
||||
sqlite3_flutter_libs
|
||||
url_launcher_windows
|
||||
window_manager
|
||||
|
||||
Reference in New Issue
Block a user