Skip to content

Commit

Permalink
Rename FwLiteDesktop to FwLiteMaui and reword other desktop references
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Dec 20, 2024
1 parent 4917ae3 commit 4dceaf4
Show file tree
Hide file tree
Showing 47 changed files with 823 additions and 61 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/fw-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
working-directory: backend/FwLite/LocalWebApp
run: dotnet publish -r linux-x64 --artifacts-path ../artifacts -p:PublishSingleFile=true -p:Version=${{ needs.build-and-test.outputs.semver-version }}

- name: Upload FWLite Desktop artifacts
- name: Upload FWLite Linux artifacts
uses: actions/upload-artifact@v4
with:
name: fw-lite-local-web-app-linux
Expand Down Expand Up @@ -155,15 +155,15 @@ jobs:
run: dotnet workload install maui

- name: Publish Android
working-directory: backend/FwLite/FwLiteDesktop
working-directory: backend/FwLite/FwLiteMaui
run: dotnet publish -f net9.0-android --artifacts-path ../artifacts -p:ApplicationDisplayVersion=${{ needs.build-and-test.outputs.semver-version }} -p:InformationalVersion=${{ needs.build-and-test.outputs.version }}

- name: Upload FWLite App artifacts
uses: actions/upload-artifact@v4
with:
name: fw-lite-android
if-no-files-found: error
path: backend/FwLite/artifacts/publish/FwLiteDesktop/*/*
path: backend/FwLite/artifacts/publish/FwLiteMaui/*/*

publish-win:
name: Publish FW Lite app for Windows
Expand All @@ -187,18 +187,18 @@ jobs:
run: dotnet workload install maui-windows

- name: Publish Windows MAUI portable app
working-directory: backend/FwLite/FwLiteDesktop
working-directory: backend/FwLite/FwLiteMaui
run: |
dotnet publish -f net9.0-windows10.0.19041.0 --artifacts-path ../artifacts -p:WindowsPackageType=None -p:ApplicationDisplayVersion=${{ needs.build-and-test.outputs.semver-version }} -p:InformationalVersion=${{ needs.build-and-test.outputs.version }}
mkdir -p ../artifacts/sign/portable
cp -r ../artifacts/publish/FwLiteDesktop/* ../artifacts/sign/portable/
cp -r ../artifacts/publish/FwLiteMaui/* ../artifacts/sign/portable/
- name: Publish Windows MAUI msix app
working-directory: backend/FwLite/FwLiteDesktop
working-directory: backend/FwLite/FwLiteMaui
run: |
dotnet publish -f net9.0-windows10.0.19041.0 --artifacts-path ../artifacts -p:ApplicationDisplayVersion=${{ needs.build-and-test.outputs.semver-version }} -p:InformationalVersion=${{ needs.build-and-test.outputs.version }}
mkdir -p ../artifacts/msix
cp ../artifacts/bin/FwLiteDesktop/*/AppPackages/*/*.msix ../artifacts/msix/
cp ../artifacts/bin/FwLiteMaui/*/AppPackages/*/*.msix ../artifacts/msix/
- name: Bundle MSIX
working-directory: backend/FwLite/artifacts/msix
Expand All @@ -209,7 +209,7 @@ jobs:
$sdkToolsPath = Join-Path -Path 'C:\Program Files (x86)\Windows Kits\10\bin' -ChildPath $SdkVersion -AdditionalChildPath $Architecture
$env:Path += ";$sdkToolsPath"
MakeAppx.exe bundle /v /bv ${{ needs.build-and-test.outputs.semver-version }}.1 /d . /p ../sign/FwLiteDesktop.msixbundle
MakeAppx.exe bundle /v /bv ${{ needs.build-and-test.outputs.semver-version }}.1 /d . /p ../sign/FwLiteMaui.msixbundle
- name: Sign with Trusted Signing
if: ${{ github.ref_name == 'develop' || github.ref_name == 'main' }}
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build FwLite Blazor (Windows)",
"program": "${workspaceFolder}/backend/FwLite/FwLiteDesktop/bin/Debug/net9.0-windows10.0.19041.0/win10-x64/FwLiteDesktop.exe",
"cwd": "${workspaceFolder}/backend/FwLite/FwLiteDesktop",
"program": "${workspaceFolder}/backend/FwLite/FwLiteMaui/bin/Debug/net9.0-windows10.0.19041.0/win10-x64/FwLiteMaui.exe",
"cwd": "${workspaceFolder}/backend/FwLite/FwLiteMaui",
"stopAtEntry": false,
},
{
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj",
"${workspaceFolder}/backend/FwLite/FwLiteMaui/FwLiteMaui.csproj",
"--framework",
"net9.0-windows10.0.19041.0",
],
Expand Down
2 changes: 1 addition & 1 deletion FwLiteOnly.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"backend\\FwLite\\LcmCrdt\\LcmCrdt.csproj",
"backend\\FwLite\\LcmCrdt.Tests\\LcmCrdt.Tests.csproj",
"backend\\FWLite\\LocalWebApp\\LocalWebApp.csproj",
"backend\\FwLite\\FwLiteDesktop\\FwLiteDesktop.csproj",
"backend\\FwLite\\FwLiteMaui\\FwLiteMaui.csproj",
"backend\\FwLite\\FwLiteShared\\FwLiteShared.csproj",
"backend\\FWLite\\FwDataMiniLcmBridge\\FwDataMiniLcmBridge.csproj",
"backend\\FwLite\\FwDataMiniLcmBridge.Tests\\FwDataMiniLcmBridge.Tests.csproj",
Expand Down
2 changes: 1 addition & 1 deletion LexBox.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FwDataMiniLcmBridge", "back
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FwDataMiniLcmBridge.Tests", "backend\FwLite\FwDataMiniLcmBridge.Tests\FwDataMiniLcmBridge.Tests.csproj", "{B0299A49-C0B2-4553-A72E-1670D4CB5138}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FwLiteDesktop", "backend\FwLite\FwLiteDesktop\FwLiteDesktop.csproj", "{9001FE0F-DBBF-4A78-9EB9-9B5042CF8A78}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FwLiteMaui", "backend\FwLite\FwLiteMaui\FwLiteMaui.csproj", "{9001FE0F-DBBF-4A78-9EB9-9B5042CF8A78}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FwLiteProjectSync", "backend\FwLite\FwLiteProjectSync\FwLiteProjectSync.csproj", "{2245BAB6-753A-48AE-B929-6D8C35CB9804}"
EndProject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:FwLiteDesktop"
x:Class="FwLiteDesktop.App">
xmlns:local="clr-namespace:FwLiteMaui"
x:Class="FwLiteMaui.App">
<Application.Resources>
<ResourceDictionary>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FwLiteDesktop;
namespace FwLiteMaui;

public partial class App : Application
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public class AppVersion
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using FwLiteDesktop.Components
@using FwLiteDesktop
@using FwLiteMaui.Components
@using FwLiteMaui
@using FwLiteShared
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>FwLiteDesktop</RootNamespace>
<RootNamespace>FwLiteMaui</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -31,7 +31,7 @@
<ApplicationTitle>FieldWorks Lite</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.sil.fwlitedesktop</ApplicationId>
<ApplicationId>com.sil.FwLiteMaui</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using Microsoft.Extensions.Logging;
using NReco.Logging.File;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public static class FwLiteDesktopKernel
public static class FwLiteMauiKernel
{
public static void AddFwLiteDesktopServices(this IServiceCollection services,
public static void AddFwLiteMauiServices(this IServiceCollection services,
ConfigurationManager configuration,
ILoggingBuilder logging)
{
Expand Down Expand Up @@ -53,7 +53,7 @@ public static void AddFwLiteDesktopServices(this IServiceCollection services,
});

var defaultDataPath = IsPortableApp ? Directory.GetCurrentDirectory() : FileSystem.AppDataDirectory;
var baseDataPath = Path.GetFullPath(configuration.GetSection("FwLiteDesktop").GetValue<string>("BaseDataDir") ??
var baseDataPath = Path.GetFullPath(configuration.GetSection("FwLiteMaui").GetValue<string>("BaseDataDir") ??
defaultDataPath);
logging.AddFilter("FwLiteShared.Auth.LoggerAdapter", LogLevel.Warning);
logging.AddFilter("Microsoft.EntityFrameworkCore.Database", LogLevel.Warning);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:FwLiteDesktop"
xmlns:local="clr-namespace:FwLiteMaui"
xmlns:shared="clr-namespace:FwLiteShared;assembly=FwLiteShared"
x:Class="FwLiteDesktop.MainPage">
x:Class="FwLiteMaui.MainPage">
<BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type shared:Routes}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public partial class MainPage : ContentPage
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Maui.LifecycleEvents;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public static class MauiProgram
{
Expand Down Expand Up @@ -49,7 +49,7 @@ public static MauiApp CreateMauiApp()
{
essentialsBuilder.UseVersionTracking();
});
builder.Services.AddFwLiteDesktopServices(builder.Configuration, builder.Logging);
builder.Services.AddFwLiteMauiServices(builder.Configuration, builder.Logging);

builder.ConfigureLifecycleEvents(events =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using FwLiteShared.Auth;
using Microsoft.Identity.Client;

namespace FwLiteDesktop;
namespace FwLiteMaui;

[Activity(Theme = "@style/Maui.SplashTheme",
MainLauncher = true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Android.App;
using Android.Runtime;

namespace FwLiteDesktop;
namespace FwLiteMaui;
[Application]
public class MainApplication : MauiApplication
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Foundation;

namespace FwLiteDesktop;
namespace FwLiteMaui;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ObjCRuntime;
using UIKit;

namespace FwLiteDesktop;
namespace FwLiteMaui;
public class Program
{
// This is the main entry point of the application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.Maui;
using Microsoft.Maui.Hosting;

namespace FwLiteDesktop;
namespace FwLiteMaui;

internal class Program : MauiApplication
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="8" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="maui-application-id-placeholder" exec="FwLiteDesktop.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<ui-application appid="maui-application-id-placeholder" exec="FwLiteMaui.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label>
<icon>maui-appicon-placeholder</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<maui:MauiWinUIApplication
x:Class="FwLiteDesktop.WinUI.App"
x:Class="FwLiteMaui.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:FwLiteDesktop.WinUI">
xmlns:local="using:FwLiteMaui.WinUI">

</maui:MauiWinUIApplication>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace FwLiteDesktop.WinUI;
namespace FwLiteMaui.WinUI;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using LexCore.Entities;
using Microsoft.Extensions.Logging;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public class AppUpdateService(
IHttpClientFactory httpClientFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="FwLiteDesktop"
<Identity Name="FwLiteMaui"
Publisher="CN=&quot;Summer Institute of Linguistics, Inc.&quot;, O=&quot;Summer Institute of Linguistics, Inc.&quot;, L=Dallas, S=Texas, C=US"
Version="0.0.0.0" />
<Properties>
<!-- publisher name must match the microsoft store-->
<!-- <PublisherDisplayName>Kevin Hahn</PublisherDisplayName>-->
<!-- modified with ApplicationTitle in FwLiteDesktop.csproj-->
<!-- modified with ApplicationTitle in FwLiteMaui.csproj-->
<DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>SIL</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System.Runtime.InteropServices;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public static class WindowsKernel
{
public static void AddFwLiteWindows(this IServiceCollection services)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return;
if (!FwLiteDesktopKernel.IsPortableApp)
if (!FwLiteMauiKernel.IsPortableApp)
{
services.AddSingleton<IMauiInitializeService, AppUpdateService>();
services.AddSingleton<IMauiInitializeService, WindowsShortcutService>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System.Text;
using Windows.ApplicationModel;

namespace FwLiteDesktop;
namespace FwLiteMaui;

public class WindowsShortcutService(IVersionTracking versionTracking) : IMauiInitializeService
{
public void Initialize(IServiceProvider services)
{
if (FwLiteDesktopKernel.IsPortableApp || !versionTracking.IsFirstLaunchEver || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return;
if (FwLiteMauiKernel.IsPortableApp || !versionTracking.IsFirstLaunchEver || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return;
var package = Package.Current;
IShellLink link = (IShellLink)new ShellLink();
link.SetPath($@"shell:AppsFolder\{package.Id.FamilyName}!App");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="FwLiteDesktop.WinUI.app"/>
<assemblyIdentity version="1.0.0.0" name="FwLiteMaui.WinUI.app"/>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Foundation;

namespace FwLiteDesktop;
namespace FwLiteMaui;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ObjCRuntime;
using UIKit;

namespace FwLiteDesktop;
namespace FwLiteMaui;
public class Program
{
// This is the main entry point of the application.
Expand Down
Loading

0 comments on commit 4dceaf4

Please sign in to comment.