PaintLab / PixelFarm

From Vectors to (sub) Pixels, C# 2D Rendering Library
Other
156 stars 20 forks source link

How to deal with 3 repo?, Submodules consideration #37

Closed hamarb123 closed 5 years ago

hamarb123 commented 5 years ago

Here are the errors (too many to put in here) https://docs.google.com/document/d/1OYyfHqRinmgp1Fnz4UJBTY2lIj0Wvecc7TuQO-mvtH0/edit?usp=sharing And could you please release NuGet packages for this amazing project

prepare commented 5 years ago

update 2020, all-in-one , please visit => https://github.com/LayoutFarm/HtmlRenderer.Build

The error may come from it miss Typography repo


How to build the PixelFarm

  1. This repo needs the Typography repo (https://github.com/LayoutFarm/Typography) staying together side-by-side in the same dir

    like this ...

    d:\projects\PixelFarm d:\projects\Typography

buiding_pixel_farm

  1. at this time please use git to clone it => because you may want to switch to the latest branch

hamarb123 commented 5 years ago

I tried that, I looked through all of the 'missing libraries' and found the following errors when I tried to specifically build them (instead of build all): Typography\PixelFarm.Typography\3_FontFaceImpl\AggGlyphTextureGen.cs Line 43: PixelFarm.CpuBlit.VertexProcessing.BoundingRect.GetBoundingRect(new VertexStoreSnap(glyphVxs), ref bounds); The type or namespace name 'VertexStoreSnap' could not be found (are you missing a using directive or an assembly reference?) PixelFarm.Typography

And here is all the 'missing libraries' (removed duplicates, there are 49 errors after completely recloning it): \PixelFarm\src\PixelFarm\PixelFarm.Typography\bin\Debug\PixelFarm.Typography.dll \PixelFarm\src\PixelFarm\PixelFarm.Drawing.GdiPlus\bin\Debug\PixelFarm.Drawing.GdiPlus.dll \PixelFarm\src\PixelFarm\PixelFarm.Drawing.GLES2\bin\Debug\PixelFarm.Drawing.GLES2.dll \PixelFarm\src\PixelFarm\PixelFarm.Drawing.Skia\bin\Debug\PixelFarm.Drawing.Skia.dll \PixelFarm\src\PixelFarm\PaintLab.Platforms.WinNeutral\bin\Debug\PaintLab.Platforms.WinNeutral.dll \PixelFarm\src\Tests\Debug\TestSamples.dll \PixelFarm\src\Tests\WinFormTestBed\bin\Debug\WinFormTestBed.dll

FIXED: I got it fixed by changing that line to PixelFarm.CpuBlit.VertexProcessing.BoundingRect.GetBoundingRect(glyphVxs, ref bounds);

jlewin commented 5 years ago

I've also been struggling with making a build and syncing the project dependencies.

@prepare - is there any trick to keeping PixelFarm/HtmlRenderer/Typography on git refs that are compatible?

Submodules are sort of a pain but have the benefit of keeping compatible builds in lockstep

jlewin commented 5 years ago

If there's anything I can do to assist or if it would be helpful to explain how/why we use submodules in MatterControl to corral the three interconnected repositories that make up the project, let me know.

jlewin commented 5 years ago

I spent the evening moving between various commits across projects until I finally found a compatible set that compiled without error and let me run the demos I've been excited to try out.

It was quite a bit of effort and really reinforces the idea that the project would benefit from a simple way to checkout working branch pointers.

There are many different ways you could tackle this and I choose the least impactful route, where I created a super project that emulates the behavior described in this post. This project has no direct content and simply wraps the three repos and uses submodules to control their last working and compatible commits. Theoretically each time you advance one or more of the child repositories (especially if they contain with breaking changes), you'd make a commit to lock in where you were across the three.

An example of this type of project can be found at https://gitlab.com/lewin76/pixelfarm. If you clone the repository and checkout master, you end up on pointers I finally used to get a working build.

Since I didn't want much history and my connection was running slow, I used shallow clones to only pull in a few recent commits but either way should have the same effect:

Shallow

git clone https://gitlab.com/lewin76/pixelfarm.git
git submodule init
git submodule update --depth 10

Full

git clone https://gitlab.com/lewin76/pixelfarm.git --recursive
prepare commented 5 years ago

I think the same with you.

I've created a new 'all-in-one' to handle, here https://github.com/PaintLab/pxdev

not finish yet :)

jlewin commented 5 years ago

Fantastic, great to see you're already on it and heading down a similar path

prepare commented 5 years ago

@jlewin, I fork your repo (https://gitlab.com/lewin76/pixelfarm) to here => https://github.com/LayoutFarm/HtmlRenderer.Build

jlewin commented 5 years ago

The new repository is great! Cloned and was up and running in minutes. I think this will really help newcomers to the project

Ninjastorm380 commented 4 years ago

@prepare the latest version of the build repository does not work

prepare commented 4 years ago

@Ninjastorm380 , please try again at latest commit(https://github.com/LayoutFarm/HtmlRenderer.Build/commit/09cf4d6834d26ac93fe3ed9aee14244bbc27321b)


This is my screenshot (a few minutes ago)

a_few_min_ago

Ninjastorm380 commented 4 years ago

Typography fails to build: image

Ninjastorm380 commented 4 years ago

It gave me some libraries to work with, but now I need to put all of those libraries into one file. I see a Merge project, but it keeps throwing an error about directory not found

Ninjastorm380 commented 4 years ago

also, if I modify the project to point to the right location, it says method not supported @prepare

prepare commented 4 years ago

I forget to test the Xamarin.IOS, give me a time to test it.

prepare commented 4 years ago

ok, I fix it, see https://github.com/LayoutFarm/HtmlRenderer.Build/commit/e25c3a9964996ea41e3121d03e18fb76fbc87981


These are my snapshots.

android_t

Android


ios

iOS

Ninjastorm380 commented 4 years ago

everything builds, but BuildPixelFarmMerge throws an error about a bad path image

Ninjastorm380 commented 4 years ago

@prepare

prepare commented 4 years ago

Thank you,

That is a bug :)

please give me a time to fix it

prepare commented 4 years ago

@Ninjastorm380, check latest commit again ( https://github.com/LayoutFarm/HtmlRenderer.Build/commit/d8b528adcb23170a48c18969e51f2e4dc3745f4a)

Ninjastorm380 commented 4 years ago

@prepare ok, one last question for you: How do I get the controls to show up in the toolbox? added all the libraries to my project, but nothing shows up. Also tried to add manually, but VS said that there is no controls in any of the libraries

prepare commented 4 years ago

Yes, in the current version=> no 'easy-to-use' control.

An 'easy-to-use' control is in the plan.

for now , please see the example project, 1). output: the library renders to any surface that supports GLES, Hwnd

2). input: user must forward user events (eg, mouse, keyboard) to the library.

with 1) and 2) above=> create your own user control.

prepare commented 4 years ago

Feel free to ask more questions :)