alternetsoft / AlternetUI

MIT License
24 stars 2 forks source link

Easy way to create a new project using the last commited version #68

Closed generalloki closed 8 months ago

generalloki commented 9 months ago

A great question from @neoxeo:

Can you tell me, please, what is the easy way to create a new project using the last commited version of each "components" from a template ?


We decided to respond here. There will be at least two solutions for that. One is quick which require copy and paste, and one is correct using console command. The task is the following: to have the easy way to create custom project using latest components version from master like we have with nuget. There we have a command for that: dotnet new alternet-ui

We are working on the solution and will post here any updates on this issue.

generalloki commented 9 months ago

I have uploaded first version of the template to https://github.com/alternetsoft/AlternetUI/tree/master/Install.Scripts/MinMasterTemplate

This is minimal project template to use with Alternet.UI latest master version from github.

Limitations:

I will update this issue when we have an improved template.

neoxeo commented 9 months ago

Thanks a lot !

I will test this very quickly and give you result.

neoxeo commented 9 months ago

@generalloki

I have tested using MinMasterTemplate with this project (code is not clean but this is not the goal for this moment) : ASCII_Art3.zip

I follow this instructions : You need to edit MinMaster.csproj file and change "AlternetUISourcePath" property to the path where Alternet.UI Source folder is located. But you need to do this too : You need to open project with VS2022, save it and run "run.bat" and open again. Else it doesn't compile into VS2022.

But this is a good starting point !!!

generalloki commented 9 months ago

@neoxeo , Thanks for the feedback on this issue. I have updated MinMaster template and instructions for it. So, now they are:

How to use:

And I have seen your Mario ascii art :)

neoxeo commented 8 months ago

@generalloki

I work on a script to create a new project (UI or Console) from scratch using latest version of AlternetUI development. It works manually now it's time to convert that to PowerShell.

I hope to finish it before this end of this week.

I will publish it hete as soon it is available.

neoxeo commented 8 months ago

@generalloki

Here is the first release of script to create a new AlternetUI project from scratch using latest version of AlternetUI development : MinMasterTemplateNew.zip

This zip need to be uncompress into Install.Scripts folder.

Launch it, enter informations, wait and open your new project !

generalloki commented 8 months ago

I doubt I will be using this project, I prefer "Copy and paste" approach. For now I added a link to this issue in the readme.md of MinMaster folder. Like this:

neoxeo commented 8 months ago

@generalloki

OK, thanks.

The most important part of the script is how you can create the 2 Nuget packets for AlternetUI/AlternetUI.PAL, on the fly, with the latest comit posted on github and use these packages locally with the NuGet.config file.

generalloki commented 8 months ago

@neoxeo , Now when you pointed on this I understand that this is useful - to create nuget on the fly. I will think on how this could be integrated. Maybe even in the main solution, we could have such project or script, so it will be possible to click it to run and to build nuget with the latest source.

generalloki commented 8 months ago

For now I am closing this issue, as there are many other more important things to do. The official way is to use nuget. Also there is MinMaster project and solution from neoxeo which is mentioned above.

generalloki commented 7 months ago

@neoxeo,

I have used your idea with local nugets in \Source\Tests\UseLocalPackages\ project. If copy UI nugets into LocalPackages subfolder, project will use them. This was useful for debug nugets. Thanks!

neoxeo commented 7 months ago

@generalloki

Yes I have seen, good news ! Thanks

I have created a powershell script to update an existing project using LocalPackages folder to use the last version of of AlternetUI available (I rebuild nuget packages on the fly and replace current packages present in project with the lastest). I continue tests and post it when I will finish it.

generalloki commented 7 months ago

@neoxeo

I have uploaded new version of Install.Scripts\MinMasterTemplate. Now it supports uixml forms.