Skip to content

Commit

Permalink
- Windows build target added
Browse files Browse the repository at this point in the history
  • Loading branch information
M1chlCZ authored and themantre committed Nov 19, 2024
1 parent 092ebc7 commit 41e011f
Show file tree
Hide file tree
Showing 2 changed files with 330 additions and 153 deletions.
40 changes: 40 additions & 0 deletions buildWindows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Step 1: Build the Flutter Windows application
Write-Host "Building Flutter Windows app..."
flutter build windows

# Define the source files and destination directory
# Adjust these paths according to your project's structure
$sourceFiles = @(
".\windows\pactus-daemon.exe",
".\windows\pactus-wallet.exe"
)
$destinationDir = ".\build\windows\x64\runner\Debug" # Adjust based on your build configuration
$releaseDestinationDir = ".\build\windows\x64\runner\Release" # Adjust based on your build configuration


# Function to copy files to a destination
function Copy-Files {
param (
[string]$destinationDir
)
# Ensure the destination directory exists
if (-not (Test-Path -Path $destinationDir)) {
Write-Host "Destination directory does not exist: $destinationDir"
return
}

# Copy each source file to the destination directory
foreach ($file in $sourceFiles) {
Write-Host "Copying $file to $destinationDir"
Copy-Item -Path $file -Destination $destinationDir
}
}

# Step 2: Copy files to Debug and Release directories
Copy-Files -destinationDir $destinationDir
Copy-Files -destinationDir $releaseDestinationDir


# Step 3: Run the Flutter Windows app
Write-Host "Running Flutter Windows app..."
flutter run -d windows
Loading

0 comments on commit 41e011f

Please sign in to comment.