Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Samples to Photino v3.0 #46

Merged
merged 31 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7e163da
Updated NuGet packages
MikeYeager Oct 25, 2022
f5166dd
Fixed NuGet references.
MikeYeager Oct 25, 2022
bae5586
feat: allows running react app in parallel, with hot-reload
mykeels Nov 8, 2022
9e83013
Merge branch 'debug' into allow-running-react-app
MikeYeager Nov 10, 2022
87582cd
Merge pull request #39 from mykeels/allow-running-react-app
MikeYeager Nov 10, 2022
e1a93b9
Updated samples to Photino.NET 2.4.0 and updated test bench with late…
MikeYeager Apr 13, 2023
333ebf2
Updated to .NET 8 and Photino.NET 2.6.0. Fixed GRPC sample.
MikeYeager Jan 11, 2024
9b4757e
Reference parent window in child window in MultiWindow sample
philippjbauer Feb 9, 2024
08c8831
Add publishing example and explanation
philippjbauer Mar 19, 2024
9da8424
Move sample into correct sub-folder
philippjbauer Mar 19, 2024
b27a3be
Enable outputs for dotnet steps
philippjbauer Mar 19, 2024
0f603ae
Fix/add RID options for clarity. Update deb control file dependencies
philippjbauer Mar 19, 2024
04500af
Fix libwebkit2gtk version
philippjbauer Mar 19, 2024
bd8d69b
Fix Windows icon path
philippjbauer Mar 19, 2024
4628e45
Ignore publish build and output folders
philippjbauer Mar 19, 2024
d7c7fde
Add output directory creation in publish script
philippjbauer Mar 19, 2024
ee9da5e
Update csproj in readme to reflect latest changes
philippjbauer Mar 19, 2024
26a8612
Fix flatpak build
philippjbauer Mar 19, 2024
bfee974
Add information on content inclusion for Blazor apps
philippjbauer Mar 19, 2024
132de99
Improve publishing sample
philippjbauer Mar 21, 2024
39dd665
Improve publish script, fix flatpak packaging
philippjbauer Mar 26, 2024
96f220e
Move publish into correct dir
philippjbauer Mar 26, 2024
f680f0b
Resize app icon in debian package
philippjbauer Mar 26, 2024
66a65ad
Fix Windows icon path and move publish into correct dir
philippjbauer Apr 11, 2024
cd4bba6
Update Photino.NET package to version 3.0.0
philippjbauer May 30, 2024
5f67aee
Update React Sample
philippjbauer May 30, 2024
1b9e1e8
Update Angular Sample
philippjbauer May 30, 2024
1865f3f
chore: Update debug mode logic in Program.cs
philippjbauer May 30, 2024
9c13514
Update Vue Sample
philippjbauer May 30, 2024
8e49b2d
Update next.config.js for output directory and link behavior
philippjbauer May 30, 2024
d2a141c
Merge branch 'master' into debug
philippjbauer May 30, 2024
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
434 changes: 431 additions & 3 deletions .gitignore

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions Photino.HelloPhotino.3d.React/HelloPhotino.3d.React.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -16,8 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Photino.Native" Version="2.5.2" />
<PackageReference Include="Photino.NET" Version="2.5.2" />
<PackageReference Include="Photino.NET" Version="3.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Photino.HelloPhotino.3d.React/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PhotinoNET;
using Photino.NET;
using System;
using System.Drawing;

Expand Down
5 changes: 2 additions & 3 deletions Photino.HelloPhotino.3d/HelloPhotino.3d.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -16,8 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Photino.Native" Version="2.5.2" />
<PackageReference Include="Photino.NET" Version="2.5.2" />
<PackageReference Include="Photino.NET" Version="3.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Photino.HelloPhotino.3d/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PhotinoNET;
using Photino.NET;
using System;
using System.Drawing;

Expand Down
11 changes: 4 additions & 7 deletions Photino.HelloPhotino.Angular/HelloPhotino.Angular.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -18,11 +18,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" Condition=" '$(GenerateEmbeddedFilesManifest)' == 'true' " />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
<PackageReference Include="Photino.Native" Version="2.5.2" />
<PackageReference Include="Photino.NET" Version="2.5.2" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.1" Condition=" '$(GenerateEmbeddedFilesManifest)' == 'true' " />
<PackageReference Include="Photino.NET" Version="3.0.0" />
<PackageReference Include="Photino.NET.Server" Version="1.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
</ItemGroup>
Expand Down Expand Up @@ -60,7 +57,7 @@
<Exec WorkingDirectory="$(UiRoot)" Command="npm run build" />

<ItemGroup>
<UiBuildOutputFiles Include="$(UiRoot)$(UiBuildOutput)**\*.*" />
<UiBuildOutputFiles Include="$(UiRoot)$(UiBuildOutput)\**\*.*" />
</ItemGroup>

<Copy SourceFiles="@(UiBuildOutputFiles)" DestinationFiles="@(UiBuildOutputFiles->'$(WwwRoot)%(RecursiveDir)%(Filename)%(Extension)')" />
Expand Down
25 changes: 19 additions & 6 deletions Photino.HelloPhotino.Angular/Program.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
using System.Drawing;
using System.Text;
using PhotinoNET;
using Photino.NET;
using PhotinoNET.Server;
using System.Drawing;
using System.Text;

namespace Photino.HelloPhotino.Angular;

class Program
{
#if DEBUG
public static bool IsDebugMode = true;
#else
public static bool IsDebugMode = false;
#endif

[STAThread]
static void Main(string[] args)
{
PhotinoServer
.CreateStaticFileServer(args, out string baseUrl)
.CreateStaticFileServer(args, 8000, 100, "wwwroot/browser/", out string baseUrl)
.RunAsync();

// The appUrl is set to the local development server when in debug mode.
// This helps with hot reloading and debugging.
string appUrl = IsDebugMode ? "http://localhost:4200" : $"{baseUrl}/index.html";
Console.WriteLine($"Serving Angular app at {appUrl}");

// Window title declared here for visibility
string windowTitle = "Photino.Angular Demo App";

Expand All @@ -24,6 +35,8 @@ static void Main(string[] args)
.SetSize(new Size(2048, 1024))
// Resize to a percentage of the main monitor work area
//.Resize(50, 50, "%")
.SetUseOsDefaultSize(false)
.SetSize(new Size(800, 600))
// Center window in the middle of the screen
.Center()
// Users can resize windows by default.
Expand Down Expand Up @@ -56,8 +69,8 @@ static void Main(string[] args)
// "window.external.receiveMessage(callback: Function)"
window.SendWebMessage(response);
})
.Load($"{baseUrl}/index.html"); // Can be used with relative path strings or "new URI()" instance to load a website.
.Load(appUrl); // Can be used with relative path strings or "new URI()" instance to load a website.

window.WaitForClose(); // Starts the application event loop
}
}
}
16 changes: 0 additions & 16 deletions Photino.HelloPhotino.Angular/UserInterface/.browserslistrc

This file was deleted.

2 changes: 1 addition & 1 deletion Photino.HelloPhotino.Angular/UserInterface/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
Expand Down
6 changes: 3 additions & 3 deletions Photino.HelloPhotino.Angular/UserInterface/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PhotionHelloPhotinoAngularUi
# PhotinoHellophotinoAngular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.3.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.2.

## Development server

Expand All @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
77 changes: 44 additions & 33 deletions Photino.HelloPhotino.Angular/UserInterface/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,59 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Photion.HelloPhotino.Angular.Ui": {
"photino-hellophotino-angular": {
"projectType": "application",
"schematics": {},
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist",
"outputPath": "dist/photino-hellophotino-angular",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"sourceMap": true
}
},
"defaultConfiguration": "production"
Expand All @@ -59,29 +64,35 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "Photion.HelloPhotino.Angular.Ui:build:production"
"buildTarget": "photino-hellophotino-angular:build:production"
},
"development": {
"browserTarget": "Photion.HelloPhotino.Angular.Ui:build:development"
"buildTarget": "photino-hellophotino-angular:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "Photion.HelloPhotino.Angular.Ui:build"
}
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
}
Expand Down
44 changes: 0 additions & 44 deletions Photino.HelloPhotino.Angular/UserInterface/karma.conf.js

This file was deleted.

Loading