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 add addons #8031

Open
mathpopo opened this issue Jul 8, 2024 · 13 comments
Open

how to add addons #8031

mathpopo opened this issue Jul 8, 2024 · 13 comments

Comments

@mathpopo
Copy link

mathpopo commented Jul 8, 2024

ubuntu22.04
cd OF/examples/graphics/polygonExample
make
make run

but no make

@dimitre
Copy link
Member

dimitre commented Jul 8, 2024

try

cd OF/examples/graphics/polygonExample
cp ../scripts/templates/linux/{Makefile,config.make} .
make -j
make RunRelease

@mathpopo
Copy link
Author

mathpopo commented Jul 9, 2024

image
ok @dimitre ,thanks! any other example need do like this?

@mathpopo
Copy link
Author

mathpopo commented Jul 10, 2024

@dimitre if i want to add new addons, should i do ? because i just use openFrameworks/scripts/linux/download_libs.sh && compileOF.sh && compilePG.sh, i just add addons code into addon/ ,again use these sh, just
in cmakelist:
file(GLOB OF_LIBS
"${OF_ROOT}/libs/openFrameworksCompiled/lib/linux64/.a"
"${OF_ROOT}/addons/**/libs/
/lib/linux64/.a"
"${OF_ROOT}/libs/tess2/lib/linux64/
.a"
)
no effect?so coule you tell me ?

@mathpopo mathpopo changed the title no make how to add addons Jul 10, 2024
@dimitre
Copy link
Member

dimitre commented Jul 10, 2024

you can edit addons.make file in project folder and add there
take a look at examples/templates/allAddonsExample

@mathpopo
Copy link
Author

mathpopo commented Jul 10, 2024

for example :
first:
~/disk1/github/openFrameworks/addons/ofxTrueTypeFontUL2$ ls
example libs LICENSE.md README.md src
senond:

openFrameworks/examples/templates/allAddonsExample$ ls
addons.make allAddonsExample.png bin README.md src

addons.make:

add ofxTrueTypeFontUL2
image

above all done!!!

again download_libs.sh && compileOF.sh && compilePG.sh?

@dimitre
Copy link
Member

dimitre commented Jul 10, 2024

no need to run this scripts. I think this two are enough

make -j
make RunRelease

@mathpopo
Copy link
Author

mathpopo commented Jul 10, 2024

i just want to use file(GLOB OF_LIBS
"${OF_ROOT}/libs/openFrameworksCompiled/lib/linux64/.a"
"${OF_ROOT}/addons/**/libs//lib/linux64/.a"
"${OF_ROOT}/libs/tess2/lib/linux64/.a"
)
in which folder to run "make"?~/disk1/github/openFrameworks/examples/templates/allAddonsExample$ ?

(base) chenxin@chenxin-Nitro-AN515-52:~/disk1/github/openFrameworks/examples/templates/allAddonsExample$ make
[make: *** 没有指明目标并且找不到 makefile。 停止。](make: *** No targets specified and no makefile found. Stop)

@dimitre
Copy link
Member

dimitre commented Jul 10, 2024

go to the example/project folder and run

cp ../scripts/templates/linux/{Makefile,config.make} .

so you have the default makefiles in this folder and can run make

@mathpopo
Copy link
Author

/usr/include/c++/11/string:67:11: note: ‘std::pmr::string’
67 | using string = basic_string;
| ^~~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1984:80: error: expected primary-expression before ‘float’
1984 | void ofxTrueTypeFontUL2::getLayoutData(vector&facePosis,string s, float x, float y,float width,float height,int textAlign){
| ^~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1984:89: error: expected primary-expression before ‘float’
1984 | void ofxTrueTypeFontUL2::getLayoutData(vector&facePosis,string s, float x, float y,float width,float height,int textAlign){
| ^~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1984:97: error: expected primary-expression before ‘float’
1984 | void ofxTrueTypeFontUL2::getLayoutData(vector&facePosis,string s, float x, float y,float width,float height,int textAlign){
| ^~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1984:109: error: expected primary-expression before ‘float’
1984 | void ofxTrueTypeFontUL2::getLayoutData(vector&facePosis,string s, float x, float y,float width,float height,int textAlign){
| ^~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1984:122: error: expected primary-expression before ‘int’
1984 | void ofxTrueTypeFontUL2::getLayoutData(vector&facePosis,string s, float x, float y,float width,float height,int textAlign){
| ^~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1987:50: error: return type ‘class ofPath’ is incomplete
1987 | ofPath ofxTrueTypeFontUL2::getCountours(int index){
| ^
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp: In member function ‘void ofxTrueTypeFontUL2::getCountours(int)’:
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1988:23: error: ‘class ofxTrueTypeFontUL2::Impl’ has no member named ‘charOutlines’
1988 | return mImpl->charOutlines[index];
| ^~~~~~~~~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp: In member function ‘int ofxTrueTypeFontUL2::getLoadedCharactersCount()’:
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1993:23: error: ‘class ofxTrueTypeFontUL2::Impl’ has no member named ‘cps’
1993 | return mImpl->cps.size();
| ^~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp: In static member function ‘static bool ofxTrueTypeFontUL2::initLibraries()’:
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:2007:17: error: ‘FcBool’ was not declared in this scope; did you mean ‘FT_Bool’?
2007 | FcBool result = FcInit();
| ^~~~~~
| FT_Bool
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:2008:21: error: ‘result’ was not declared in this scope
2008 | if(!result){
| ^~~~~~
In file included from ../../../libs/openFrameworks/3d/ofMesh.inl:8,
from ../../../libs/openFrameworks/3d/ofMesh.h:720,
from ../../../libs/openFrameworks/graphics/ofTrueTypeFont.h:4,
from ../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.h:2,
from ../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1:
../../../libs/openFrameworks/utils/ofLog.h: In instantiation of ‘std::string ofVAArgsToString(const char*, Args&& ...) [with Args = {}; std::string = std::__cxx11::basic_string]’:
../../../libs/openFrameworks/utils/ofLog.h:464:35: required from ‘ofLog::ofLog(ofLogLevel, const char*, Args&& ...) [with Args = {}]’
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:1731:82: required from here
../../../libs/openFrameworks/utils/ofLog.h:18:33: warning: format not a string literal and no format arguments [-Wformat-security]
18 | size_t n = std::snprintf(buf, sizeof(buf), format, std::forward(args)...);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libs/openFrameworks/utils/ofLog.h:30:22: warning: format not a string literal and no format arguments [-Wformat-security]
30 | std::snprintf(const_cast<char *>(s.data()), s.size(), format, std::forward(args)...);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp: At global scope:
../../../addons/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.cpp:719:13: warning: ‘loadFontFace’ defined but not used [-Wunused-variable]
719 | static bool loadFontFace(string fontname, int _fontSize, FT_Face & face, string & filename){
| ^~~~~~~~~~~~
make[1]: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:362:../../../addons/obj/linux64/Release/ofxTrueTypeFontUL2/src/ofxTrueTypeFontUL2.o] 错误 1
make[1]: 离开目录“/home/chenxin/disk1/github/openFrameworks/examples/templates/allAddonsExample”
make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:131:Release] 错误 2
---this should be addons error

@dimitre
Copy link
Member

dimitre commented Jul 10, 2024

Yes this addon probably have to be modified to run corrrectly with latest openFrameworks

@mathpopo
Copy link
Author

mathpopo commented Jul 11, 2024

could you introduce me a ofx like ofxpango?

@2bbb
Copy link
Contributor

2bbb commented Jul 11, 2024

@mathpop
I think it's best to ask on the forum.
https://forum.openframeworks.cc

@danoli3
Copy link
Member

danoli3 commented Jul 14, 2024

I reckon we can do better with addons / management. I know there's a few solutions but if we can cook a solution into the c++ command line project generator and thus embed it also in the gui I think we will solve a lot of hassles. I'll side quest into project generator stuff while I sort out Android merge.

Lots of blocks we need to fix for the devs

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