Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ jobs:
with:
name: Flow Installer
path: |
Output\Packages\Flow-Launcher-*.exe
Output\Packages\Flow-Launcher-Setup.exe
compression-level: 0
- name: Upload Framework-Dependent Setup
uses: actions/upload-artifact@v6
with:
name: Flow Installer Framework-Dependent
path: |
Output\Packages\Flow-Launcher-Setup-FD.exe
compression-level: 0
- name: Upload Portable Version
uses: actions/upload-artifact@v6
Expand All @@ -74,6 +81,13 @@ jobs:
path: |
Output\Packages\Flow-Launcher-Portable.zip
compression-level: 0
- name: Upload Framework-Dependent Portable Version
uses: actions/upload-artifact@v6
with:
name: Portable Version Framework-Dependent
path: |
Output\Packages\Flow-Launcher-Portable-FD.zip
compression-level: 0
- name: Upload Full Nupkg
uses: actions/upload-artifact@v6
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
<PublishDir>..\Output\Release-FD\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>False</PublishTrimmed>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@

[Windows 10+ Installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Setup.exe) or [Portable Version](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Portable.zip)

> **Note:** The default installers include the .NET runtime. If you already have .NET 9.0 runtime installed, you can download smaller framework-dependent packages:
> - [Framework-Dependent Installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Setup-FD.exe)
> - [Framework-Dependent Portable Version](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Portable-FD.zip)

#### Winget

```
Expand Down Expand Up @@ -198,7 +202,7 @@
<li>es-419, Spanish (Latin America)</li>
<li>Italiano</li>
<li>Norsk Bokmål</li>
<li>Slovenčina</li>

Check warning on line 205 in README.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`ina` is not a recognized word. (unrecognized-spelling)
<li>Türkçe</li>
<li>čeština</li>
<li>اللغة العربية</li>
Expand All @@ -212,7 +216,7 @@
- Fully portable.
- Type `flow user data` to open your saved user settings folder. They are located at:
- If using roaming: `%APPDATA%\FlowLauncher`
- If using portable, by default: `%localappdata%\FlowLauncher\app-<VersionOfYourFlowLauncher>\UserData`

Check warning on line 219 in README.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`localappdata` is not a recognized word. (unrecognized-spelling)
- Type `open log location` to open your logs folder, they are saved along with your user settings folder.

### 🎮 Game Mode
Expand Down Expand Up @@ -372,7 +376,7 @@

### Mentions

- [Why I Chose to Support Flow-Launcher](https://dev.to/appwrite/appwrite-loves-open-source-why-i-chose-to-support-flow-launcher-54pj) - Appwrite

Check warning on line 379 in README.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`Appwrite` is not a recognized word. (unrecognized-spelling)
- [Softpedia Editor's Pick](https://www.softpedia.com/get/System/Launchers-Shutdown-Tools/Flow-Launcher.shtml)

<img src="https://user-images.githubusercontent.com/6903107/144858082-8b654daf-60fb-4ee6-89b2-6183b73510d1.png" width="100%">
Expand All @@ -391,7 +395,7 @@

### WPF UI Library

Our UI library is using [iNKORE.UI.WPF.Modern](https://github.com/iNKORE-NET/UI.WPF.Modern).

Check warning on line 398 in README.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`NKORE` is not a recognized word. (unrecognized-spelling)

Check warning on line 398 in README.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`NKORE` is not a recognized word. (unrecognized-spelling)

<a href="https://docs.inkore.net/ui-wpf-modern/introduction">
<img src="https://github.com/iNKORE-NET/UI.WPF.Modern/blob/main/assets/images/banners/UI.WPF.Modern_Main_1280w.png?raw=true" alt="iNKORE.UI.WPF.Modern" width="400">
Expand Down
54 changes: 42 additions & 12 deletions Scripts/post_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ param(
)
Write-Host "Config: $config"

# Constants for build configurations
$RELEASE_CONFIG = "Release"
$RELEASE_FD_CONFIG = "Release-FD"
$FD_SUFFIX = "-FD"

function Build-Version {
if ([string]::IsNullOrEmpty($env:flowVersion)) {
$targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve
Expand Down Expand Up @@ -61,34 +66,41 @@ function Validate-Directory ($output) {
}


function Pack-Squirrel-Installer ($path, $version, $output) {
function Pack-Squirrel-Installer ($path, $version, $output, $inputPath = "$path\Output\Release", $suffix = "") {
# msbuild based installer generation is not working in appveyor, not sure why
Write-Host "Begin pack squirrel installer"

$spec = "$path\Scripts\flowlauncher.nuspec"
$input = "$path\Output\Release"

Write-Host "Packing: $spec"
Write-Host "Input path: $input"
Write-Host "Input path: $inputPath"

# dotnet pack is not used because ran into issues, need to test installation and starting up if to use it.
nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release
nuget pack $spec -Version $version -BasePath $inputPath -OutputDirectory $output -Properties Configuration=Release

$nupkg = "$output\FlowLauncher.$version.nupkg"

# Rename the nupkg file if this is the framework-dependent version to avoid conflicts
if ($suffix -ne "") {
$nupkgRenamed = "$output\FlowLauncher$suffix.$version.nupkg"
Move-Item $nupkg $nupkgRenamed -Force
$nupkg = $nupkgRenamed
}

Write-Host "nupkg path: $nupkg"
$icon = "$path\Flow.Launcher\Resources\app.ico"
Write-Host "icon: $icon"
# Squirrel.com: https://github.com/Squirrel/Squirrel.Windows/issues/369
New-Alias Squirrel $env:USERPROFILE\.nuget\packages\squirrel.windows\1.9.0\tools\Squirrel.exe -Force
# why we need Write-Output: https://github.com/Squirrel/Squirrel.Windows/issues/489#issuecomment-156039327
# directory of releaseDir in squirrel can't be same as directory ($nupkg) in releasify
$temp = "$output\Temp"
$temp = "$output\Temp$suffix"

Squirrel --releasify $nupkg --releaseDir $temp --setupIcon $icon --no-msi | Write-Output
Move-Item $temp\* $output -Force
Remove-Item $temp

$file = "$output\Flow-Launcher-Setup.exe"
$file = "$output\Flow-Launcher-Setup$suffix.exe"
Write-Host "Filename: $file"

Move-Item "$output\Setup.exe" $file -Force
Expand All @@ -106,31 +118,49 @@ function Publish-Self-Contained ($p) {
dotnet publish -c Release $csproj /p:PublishProfile=$profile
}

function Publish-Portable ($outputLocation, $version) {
function Publish-Framework-Dependent ($p) {

$csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve
$profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net9.0-FrameworkDependent.pubxml" -Resolve

& $outputLocation\Flow-Launcher-Setup.exe --silent | Out-Null
# we call dotnet publish on the main project.
# The other projects should have been built in Release at this point.
dotnet publish -c Release $csproj /p:PublishProfile=$profile
}

function Publish-Portable ($outputLocation, $version, $suffix = "") {

& "$outputLocation\Flow-Launcher-Setup$suffix.exe" --silent | Out-Null
mkdir "$env:LocalAppData\FlowLauncher\app-$version\UserData"
Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath $outputLocation\Flow-Launcher-Portable.zip
Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath "$outputLocation\Flow-Launcher-Portable$suffix.zip" -Force
Remove-Item "$env:LocalAppData\FlowLauncher" -Recurse -Force
}

function Main {
$p = Build-Path
$v = Build-Version
Copy-Resources $p

if ($config -eq "Release"){
if ($config -eq $RELEASE_CONFIG){

Delete-Unused $p $config

# Build self-contained version (includes .NET runtime)
Write-Host "Building self-contained version..."
Publish-Self-Contained $p

Remove-CreateDumpExe $p $config

$o = "$p\Output\Packages"
Validate-Directory $o
Pack-Squirrel-Installer $p $v $o

Publish-Portable $o $v

# Build framework-dependent version (requires .NET runtime to be installed)
Write-Host "Building framework-dependent version..."
Publish-Framework-Dependent $p
Remove-CreateDumpExe $p $RELEASE_FD_CONFIG
Pack-Squirrel-Installer $p $v $o "$p\Output\$RELEASE_FD_CONFIG" $FD_SUFFIX
Publish-Portable $o $v $FD_SUFFIX
}
}

Expand Down
10 changes: 7 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ after_test:
artifacts:
- path: 'Output\Release\Flow.Launcher.Plugin.*.nupkg'
name: Plugin nupkg
- path: 'Output\Packages\Flow-Launcher-*.exe'
- path: 'Output\Packages\Flow-Launcher-Setup.exe'
name: Squirrel Installer
- path: 'Output\Packages\Flow-Launcher-Setup-FD.exe'
name: Squirrel Installer Framework-Dependent
- path: Output\Packages\Flow-Launcher-Portable.zip
name: Portable Version
- path: Output\Packages\Flow-Launcher-Portable-FD.zip
name: Portable Version Framework-Dependent
- path: 'Output\Packages\FlowLauncher-*-full.nupkg'
name: Squirrel nupkg
- path: 'Output\Packages\RELEASES'
Expand Down Expand Up @@ -82,7 +86,7 @@ deploy:
Please report any bugs or issues over at the [main repository](https://github.com/Flow-Launcher/Flow.Launcher/issues)'
auth_token:
secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv
artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES
artifact: Squirrel Installer, Squirrel Installer Framework-Dependent, Portable Version, Portable Version Framework-Dependent, Squirrel nupkg, Squirrel RELEASES
force_update: true
on:
branch: dev
Expand All @@ -91,7 +95,7 @@ deploy:
release: v$(flowVersion)
auth_token:
secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv
artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES
artifact: Squirrel Installer, Squirrel Installer Framework-Dependent, Portable Version, Portable Version Framework-Dependent, Squirrel nupkg, Squirrel RELEASES
draft: true
force_update: true
on:
Expand Down
Loading