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

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

Closed
hamarb123 opened this issue Sep 26, 2018 · 23 comments
Closed

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

hamarb123 opened this issue Sep 26, 2018 · 23 comments

Comments

@hamarb123
Copy link

hamarb123 commented Sep 26, 2018

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
Copy link
Member

prepare commented Sep 26, 2018

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
Copy link
Author

hamarb123 commented Sep 28, 2018

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);

@prepare prepare closed this as completed Sep 28, 2018
@jlewin
Copy link
Contributor

jlewin commented Oct 12, 2018

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

@prepare prepare reopened this Oct 12, 2018
@prepare prepare changed the title My Pixelfarm (I downloaded it using github) has 141 errors, and NuGet How to deal with 3 repo?, Submodules consideration Oct 12, 2018
@jlewin
Copy link
Contributor

jlewin commented Oct 12, 2018

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
Copy link
Contributor

jlewin commented Oct 13, 2018

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
Copy link
Member

prepare commented Oct 13, 2018

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
Copy link
Contributor

jlewin commented Oct 13, 2018

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

@prepare
Copy link
Member

prepare commented Oct 24, 2018

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

@prepare prepare closed this as completed Oct 24, 2018
@jlewin
Copy link
Contributor

jlewin commented Oct 26, 2018

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

@Ninjastorm380
Copy link

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

@prepare
Copy link
Member

prepare commented Mar 9, 2020

@Ninjastorm380 ,
please try again at latest commit(LayoutFarm/HtmlRenderer.Build@09cf4d6)


This is my screenshot (a few minutes ago)

a_few_min_ago

@Ninjastorm380
Copy link

Typography fails to build:
image

@Ninjastorm380
Copy link

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
Copy link

Ninjastorm380 commented Mar 10, 2020

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

@prepare
Copy link
Member

prepare commented Mar 10, 2020

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

@prepare
Copy link
Member

prepare commented Mar 10, 2020

ok, I fix it, see LayoutFarm/HtmlRenderer.Build@e25c3a9


These are my snapshots.

android_t

Android


ios

iOS

@Ninjastorm380
Copy link

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

@Ninjastorm380
Copy link

@prepare

@prepare
Copy link
Member

prepare commented Mar 10, 2020

Thank you,

That is a bug :)

please give me a time to fix it

@prepare
Copy link
Member

prepare commented Mar 10, 2020

@Ninjastorm380, check latest commit again ( LayoutFarm/HtmlRenderer.Build@d8b528a)

@Ninjastorm380
Copy link

Ninjastorm380 commented Mar 12, 2020

@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
Copy link
Member

prepare commented Mar 12, 2020

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
Copy link
Member

prepare commented Mar 12, 2020

Feel free to ask more questions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants