Skip to content

Commit

Permalink
Merge pull request #47 from zecruel/framebuffer
Browse files Browse the repository at this point in the history
Improve user experience - no more lags in interface
  • Loading branch information
zecruel authored May 20, 2024
2 parents f4a7589 + bd293f1 commit e4c1df8
Show file tree
Hide file tree
Showing 18 changed files with 919 additions and 156 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CadZinho_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: workflow_dispatch

env:
MAJOR: 0
MINOR: 5
MINOR: 6
MAN: 0
YEAR: 2024
LUA_V: 5.4.6
Expand Down Expand Up @@ -371,6 +371,8 @@ jobs:
cp ./SDL2-${{ env.SDL_V }}/include/* ./glew-${{ env.GLEW_V }}/include/SDL2/
mv ./SDL2-${{ env.SDL_V }} ./SDL2
cp ./SDL2_net-${{ env.SDL_NET_V }}/include/* ./src/
cp ./SDL2_net-${{ env.SDL_NET_V }}/include/* ./SDL2/include/
cp ./SDL2_net-${{ env.SDL_NET_V }}/include/* ./glew-${{ env.GLEW_V }}/include/SDL2/
cp ./SDL2_net-${{ env.SDL_NET_V }}/lib/x64/* ./SDL2/
mv ./SDL2_net-${{ env.SDL_NET_V }}/lib ./lib
mv ./glew-${{ env.GLEW_V }} ./glew
Expand Down Expand Up @@ -469,7 +471,7 @@ jobs:
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: softprops/action-gh-release@v0.1.15
- uses: softprops/action-gh-release@v2.0.5
with:
tag_name: ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.MAN }}
draft: true
Expand Down
113 changes: 36 additions & 77 deletions .github/workflows/test2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,94 +4,53 @@ on: workflow_dispatch

env:
MAJOR: 0
MINOR: 4
MINOR: 5
MAN: 0
YEAR: 2023
YEAR: 2024
LUA_V: 5.4.6
MESA_V: 23.1.1
GLEW_V: 2.2.0
SDL_V: 2.30.0
SDL_NET_V: 2.2.0

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: configure
run: |
sudo apt-get update
sudo apt-get install --yes libsdl2-dev libglvnd-dev libglew-dev fuse libfuse2 libarchive-tools
sudo gem install fpm
steps:

- uses: actions/[email protected]
- name: configure SDK
uses: mymindstorm/setup-emsdk@v14
- name: download lua source
run: curl -R -O http://www.lua.org/ftp/lua-5.4.4.tar.gz
uses: suisei-cn/[email protected]
with:
url: "http://www.lua.org/ftp/lua-${{ env.LUA_V }}.tar.gz"
target: .
- name: extract lua
run: tar zxf lua-5.4.4.tar.gz
run: tar zxf lua-${{ env.LUA_V }}.tar.gz
- name: remove main in lua
run: rm lua-5.4.4/src/lua.c lua-5.4.4/src/luac.c
run: rm lua-${{ env.LUA_V }}/src/lua.c lua-${{ env.LUA_V }}/src/luac.c
- name: copy lua sources
run: cp lua-5.4.4/src/* ./src/
- name: get make file
run: cp linux/Makefile ./Makefile
- name: make
run: make
- name: configure for fpm
run: cp lua-${{ env.LUA_V }}/src/* ./src/
- name: clear samples
run: |
mkdir pkg
mkdir pkg/usr
mkdir pkg/usr/bin
mkdir pkg/usr/share
mkdir pkg/usr/share/cadzinho
cp ./cadzinho ./pkg/usr/bin/
cp -r ./linux/CadZinho/share/ ./pkg/usr/share/
cp ./LICENSE.txt ./pkg/usr/share/cadzinho/
cp -r ./lang/ ./pkg/usr/share/cadzinho/
- name: Debian linux package
rm samples/*.pdf
rm samples/*.svg
rm samples/*.ps
rm samples/*.jpg
- name: get make and resources files
run: |
cd ./pkg
fpm -s dir -t deb \
--name cadzinho \
--license MIT \
--version $MAJOR.$MINOR.$MAN \
--architecture native \
--depends sdl2 --depends glew \
--description "CadZinho - Minimalist computer aided design (CAD) software" \
--url "https://github.com/zecruel/CadZinho" \
--maintainer "Ezequiel Rabelo de Aguiar <[email protected]>" ./
cd ..
mv ./pkg/*.deb ./
dpkg -c cadzinho_${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.MAN }}_amd64.deb
- name: RedHat linux package
run: |
cd ./pkg
fpm -s dir -t rpm \
--name cadzinho \
--license MIT \
--version $MAJOR.$MINOR.$MAN \
--architecture native \
--depends sdl2 --depends glew \
--description "CadZinho - Minimalist computer aided design (CAD) software" \
--url "https://github.com/zecruel/CadZinho" \
--maintainer "Ezequiel Rabelo de Aguiar <[email protected]>" ./
cd ..
mv ./pkg/*.rpm ./
- name: Arch linux package
cp emscripten/Makefile ./Makefile
cp emscripten/shell_minimal.html ./shell_minimal.html
- name: make
run: make
- name: create archive
run: |
cd ./pkg
fpm -s dir -t pacman \
--name cadzinho \
--license MIT \
--version $MAJOR.$MINOR.$MAN \
--architecture native \
--depends sdl2 --depends glew \
--description "CadZinho - Minimalist computer aided design (CAD) software" \
--url "https://github.com/zecruel/CadZinho" \
--maintainer "Ezequiel Rabelo de Aguiar <[email protected]>" ./
cd ..
mv ./pkg/*.zst ./
- name: List files
run: ls
zip -r emscripten cadzinho.js cadzinho.wasm cadzinho.html cadzinho.data
- name: Upload the result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.0
with:
name: uploads
path: |
cadzinho-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.MAN }}-1-x86_64.pkg.tar.zst
cadzinho_${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.MAN }}_amd64.deb
cadzinho-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.MAN }}-1.x86_64.rpm
name: emscripten
path: emscripten.zip
retention-days: 5
2 changes: 1 addition & 1 deletion emscripten/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SRC_PATH=./src/
CC=emcc
COMPILER_FLAGS = -c
LINKER_FLAGS = -s USE_SDL=2 -s TOTAL_MEMORY=200MB -s STACK_SIZE=10MB -s ALLOW_MEMORY_GROWTH --preload-file lang --preload-file script --preload-file samples --shell-file shell_minimal.html
LINKER_FLAGS = -s USE_SDL=2 -s TOTAL_MEMORY=200MB -sFULL_ES2 -s STACK_SIZE=10MB -s ALLOW_MEMORY_GROWTH -s OFFSCREEN_FRAMEBUFFER --preload-file lang --preload-file script --preload-file samples --shell-file shell_minimal.html
INCLUDE_PATHS = -I. -I./src/ -s USE_SDL=2
LIBRARY_PATHS = -L.
EXE=cadzinho.html
Expand Down
4 changes: 2 additions & 2 deletions macos/CadZinho.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.5.0</string>
<string>0.6.0</string>
<key>CFBundleSpokenName</key>
<string>cad zinho</string>
<key>CFBundleVersion</key>
<string>0.5.0</string>
<string>0.6.0</string>
<key>NSHumanReadableCopyright</key>
<string>CadZinho 2024 by Zecruel - MIT Licence</string>
</dict>
Expand Down
Loading

0 comments on commit e4c1df8

Please sign in to comment.