Skip to content

Commit

Permalink
Merge pull request #46 from tryphotino/debug
Browse files Browse the repository at this point in the history
Update Samples to Photino v3.0
  • Loading branch information
philippjbauer authored May 30, 2024
2 parents 3d3a71b + d2a141c commit b246310
Show file tree
Hide file tree
Showing 135 changed files with 22,552 additions and 49,523 deletions.
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

0 comments on commit b246310

Please sign in to comment.