Code Monkey home page Code Monkey logo

cadzinho's People

Contributors

denix666 avatar tpimh avatar zecruel avatar zyg-sys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cadzinho's Issues

macOS testing

With very little modification I was able to build CadZinho on macOS. I will publish my modifications soon, and invite everyone to test the resulting executable in the meantime: CadZinho.zip.

I'm also thinking of switching the build system to CMake, so the Makefile would be uniform on Windows, Linux and macOS (I was able to build on Linux, and Windows, but Windows executable just crashes on startup), and also packaging in Flatpak for Linux. Let me know if such changes are welcome (I will do it anyway in my fork, but won't submit any pull requests if these changes are unwanted).

Translations - generate with AI

Hi,

I generated new GUI translations using AI as follows.

image

The generated files are in folder translations.

To use these translations, simply copy the files to the /lang folder (Windows - in the executable folder, Linux - /usr/share/cadzinho/, macOS - CadZinho.app/Contents/Resources/), and they will be available in the configuration window.

For non-Latin languages ​​(Russian, Chinese) it is necessary to use a font that has the corresponding characters. I recommend using the GoNotoKurrent-Regular.ttf font, which is almost universal. To load the font it is necessary to change the configuration file indicating the path and file of the font to be used, as in the following example.

image

I ask that native speakers in these languages ​​check the quality of the translation and display on the screen. Feel free to submit improvements. The files consolidated in the verification/improvement will be incorporated into the next versions of CadZinho.

If you want to follow the same methodology to do other translations (base file in English), I used Copilot with the following prompt:
rewrite the Lua ‘translate’ table below, translating the value strings into --target lang--

See ya!

Release 0.5.0 binaries?

This commit references release 0.5.0: c4537bc

However, the latest release available for download is 0.4.1. Was release 0.5.0 removed for some reason? Or is it just a teaser for the next release?

Silent crash if OpenGL version is lower than 3.2

I have tried to build CadZinho with MSVC (VS2019 for both x64 and x86). These are the libraries that I was using:

The executable launches, but crashes with this error:

Access violation - code c0000005
eax=00000000 ebx=00000001 ecx=4e3a7c0a edx=7473bd44 esi=04bc9378 edi=04bc4a28
eip=00000000 esp=04afe018 ebp=04afe058 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00210246
00000000 ??              ???

With a debugger, I figured out that this is the exact line that crashes:

glGenVertexArrays(1, &vao);

How can I debug further to provide valuable information?

UI is lagging and slow

I am using it on Ubuntu 22.04 LTS. The UI specially the plotting pointer moves are slow and lagging.

shields?

Maybe add shields in README.md?:

![GitHub release (latest by date)](https://img.shields.io/github/v/release/zecruel/CadZinho)
![GitHub Release Date](https://img.shields.io/github/release-date/zecruel/CadZinho)
![GitHub repo size](https://img.shields.io/github/repo-size/zecruel/CadZinho)
![GitHub all releases](https://img.shields.io/github/downloads/zecruel/CadZinho/total)
![GitHub](https://img.shields.io/github/license/zecruel/CadZinho)

GitHub release (latest by date) GitHub Release Date GitHub repo size GitHub all releases GitHub

pkg-config?

Hi @zecruel .

Maybe replace

CadZinho/Makefile

Lines 3 to 6 in bbcf4ff

COMPILER_FLAGS = -g -c
LINKER_FLAGS = `sdl2-config --cflags --libs` -llua -lm -lGL -lGLU -lGLEW
INCLUDE_PATHS = -I. -I./src/ -I/usr/include/SDL2
LIBRARY_PATHS = -L/usr/lib -L.

to

CFLAGS = -g -c
CFLAGS += -I. -I./src/ `pkg-config --cflags lua sdl2`
LDFLAGS = `pkg-config --libs lua sdl2` -lm -lGL -lGLU -lGLEW -L/usr/lib -L.

?

See also zYg-sys#1

Flatpak testing

I have just built CadZinho in Flatpak, it works fine for me. My YAML config is published here: tpimh/cadzinho-flatpak. If anyone is interested, please test it and report if there are any problems. All suggestions are welcome!

Please support MSYS2 MINGW64

The code compiled just fine but it failed at linking:

gcc -L/usr/lib -L. `sdl2-config --cflags --libs` -llua -lm -lGL -lGLU -lGLEW   ./obj/_dirent.o  ./obj/bmp.o  ./obj/draw_gl.o  ./obj/dxf.o  ./obj/dxf_attract.o  ./obj/dxf_copy.o  ./obj/dxf_create.o  ./obj/dxf_dim.o  ./obj/dxf_edit.o  ./obj/dxf_ent.o  ./obj/dxf_export.o  ./obj/dxf_graph.o  ./obj/dxf_hatch.o  ./obj/dxf_image.o  ./obj/dxf_math.o  ./obj/dxf_print.o  ./obj/font.o  ./obj/graph.o  ./obj/gui.o  ./obj/gui_attrib.o  ./obj/gui_block.o  ./obj/gui_circle.o  ./obj/gui_config.o  ./obj/gui_dim.o  ./obj/gui_dupli.o  ./obj/gui_edit_attr.o  ./obj/gui_edit_text.o  ./obj/gui_ellip.o  ./obj/gui_explode.o  ./obj/gui_export.o  ./obj/gui_file.o  ./obj/gui_find.o  ./obj/gui_hatch.o  ./obj/gui_image.o  ./obj/gui_info.o  ./obj/gui_insert.o  ./obj/gui_lay.o  ./obj/gui_line.o  ./obj/gui_loop.o  ./obj/gui_ltype.o  ./obj/gui_measure.o  ./obj/gui_mirror.o  ./obj/gui_move.o  ./obj/gui_mtext.o  ./obj/gui_paste.o  ./obj/gui_pline.o  ./obj/gui_plugins.o  ./obj/gui_point.o  ./obj/gui_print.o  ./obj/gui_prop.o  ./obj/gui_rect.o  ./obj/gui_rotate.o  ./obj/gui_scale.o  ./obj/gui_script.o  ./obj/gui_select.o  ./obj/gui_spline.o  ./obj/gui_text.o  ./obj/gui_toolbox.o  ./obj/gui_tstyle.o  ./obj/gui_txt_prop.o  ./obj/gui_vertex.o  ./obj/gui_xy.o  ./obj/gui_zoom.o  ./obj/hatch_pat.o  ./obj/hershey.o  ./obj/i_svg_media.o  ./obj/list.o  ./obj/ltype.o  ./obj/main.o  ./obj/miniz.o  ./obj/pdfgen.o  ./obj/rref.o  ./obj/script.o  ./obj/shape.o  ./obj/shp_font.o  ./obj/sqlite3.o  ./obj/tt_graph.o  ./obj/util.o  ./obj/yxml.o `sdl2-config --cflags --libs` -llua -lm -lGL -lGLU -lGLEW -o cadzinho
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGL: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLU: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLEW: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGL: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLU: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLEW: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:31: cadzinho] Error 1

I have to edit makefile to replace -lGL -lGLU with -lopengl32 and -lGLEW with -lglew32.

p/s: Why could I know it's -lglew32 but not -lGLEW? You could read information about any MSYS2 packages online.

This is the information of the mingw-w64-x86_64-glew package: https://packages.msys2.org/package/mingw-w64-x86_64-glew

Btw, you could use pkg-config, too: pkg-config --libs glew.

MacOS build segfaults

I haven't yet figured out the exact line or reason why my build broke, but I was able to bisect the exact commit that introduced the regression: 659d762

I will investigate the issue further and post the updates here.

lua panic when using latest 5.4.3 release

Today, When I try to use Lua 5.4.3 ,
CadZinho cannot bootstrap on both windows and linux.
same message:

PANIC: unprotected error in call to Lua API (attempt to index a userdata value)

Lua 5.4.0 runs well on both platform.

Here is a short test case, it will panic when use Buffer method:
`#include <stdio.h>
#include <stdlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#ifdef _MSC_VER
#pragma comment(lib, "lua.lib")
#endif
void
setLuaPathBuffer(lua_State* L)
{
luaL_Buffer b;
luaL_buffinit(L, &b);
luaL_addstring(&b, "/etc/init.lua");

lua_getglobal( L, "package");
luaL_pushresult(&b);
lua_setfield( L, -2, "path"); 
lua_pop( L, 1 );

}
void
setLuaPathString( lua_State* L )
{
lua_getglobal( L, "package" );
lua_pushstring( L, "/etc/init.lua" );
lua_setfield( L, -2, "path" );
lua_pop( L, 1 );
}

int
main(int argc, char** argv)
{
lua_State* L = luaL_newstate();
luaL_openlibs(L);
if (argc == 2 && !strcmp(argv[1],"string")) {
setLuaPathString(L);
} else if (argc == 2 && !strcmp(argv[1],"buffer")) {
setLuaPathBuffer(L);
}

lua_getglobal( L, "package" );
lua_getfield( L, -1, "path" );
const char* cur_path = lua_tostring( L, -1 );
printf("%s\n", cur_path);

lua_close(L);
printf("bye\n");
}
`

best regards.

Getting in touch

Hi there - I'd love it if you could join us on the community.osarch.org forum so we chat about your great little application for 2D CAD

We really need some good options in the FOSS world so it's great to see this here. FOr now I've added the project to https://wiki.osarch.org/index.php?title=Getting_started_with_2D_CAD_drafting but haven't yet had time to make software page for it, you're very welcome to make one yourself. A good template is https://wiki.osarch.org/index.php?title=Inkscape

I hope to see you soon on our forum, maybe in this thread https://community.osarch.org/discussion/815/new-2d-cad-application-cadzinho/

0.6.0 appimage doesn't work on Ubuntu 24.04

On Ubuntu 24.04
CadZinho appimage starts but the tools on the top toolbar do not work. The same in Wayland or X sessions.
The .deb installation fails saying that it has not installable dependencies: sdl2, glew, sdl2-net.

Compiled in Linux , but executable is crashing

I have compiled the "master" in Fedora Linux 28 :

[s@localhost ~]$ uname -a
Linux localhost.localdomain 4.19.8-200.fc28.x86_64 #1 SMP Mon Dec 10 15:43:40 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

[s@localhost ~]$ gcc --version
gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[s@localhost ~]$

with the following changes :

Makefile :

LINKER_FLAGS = -lSDL2main -lSDL2 -lcomdlg32 -lole32 -lmingw32 -llua

LINKER_FLAGS = -lSDL2main -lSDL2 -llua -lm

EXE=teste9.exe

EXE=teste9.x

When the compiled program is executed , it is producing a
"Segmentation fault" ,
crashing KDE KWin windows manager .

I have made the following change to
config.lua :

-- font_path = "C:\Windows\Fonts\"
font_path = "/usr/share/fonts/"

It did not make any effect .

( The fonts are in different sub-directories . )

I searched "int main ..." in some possible source files , but I could find it with difficulty .
( It is within interface.c ) .
Can it be made a different source file with "traditional name" main.c ?

There are some conditional compilation statements such as

#ifdef linux

Is there a possibility to collect such words into an included file with statements such as

#define linux

#undef _WIN32
#undef WIN32
#undef CYGWIN
#undef MINGW32

to be able to modify them with respect to OS ?

Thank you very much .

Mehmet Erol Sanliturk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.