Skip to content

Commit 8f87170

Browse files
committed
fixed: compilation error on Linux
1 parent 5c6aef7 commit 8f87170

15 files changed

Lines changed: 125 additions & 156 deletions

File tree

.github/workflows/linux.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Linux OS(Ubuntu) Nim 2.2.4 compilation
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
11+
jobs:
12+
build_linux:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: jiro4989/setup-nim-action@v2
17+
with:
18+
nim-version: '2.2.4'
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
- run: |
21+
sudo apt-get update
22+
sudo apt-get install --fix-missing libopengl-dev libgl1-mesa-dev libglfw3 libglfw3-dev
23+
- run: |
24+
nimble build
25+
make

.github/workflows/windows.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Windows OS Nim 2.2.4 compilation
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
11+
jobs:
12+
build_windows:
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: jiro4989/setup-nim-action@v2
17+
with:
18+
nim-version: '2.2.4'
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
- name: Set up MSYS2
21+
uses: msys2/setup-msys2@v2
22+
with:
23+
update: true
24+
install: >-
25+
base-devel
26+
mingw-w64-x86_64-toolchain
27+
git
28+
cmake
29+
- name: Build
30+
shell: msys2 {0}
31+
run: |
32+
pacman -S --needed --noconfirm mingw-w64-x86_64-glfw
33+
nimble build
34+
make
35+
env:
36+
MSYSTEM: MINGW64
37+
MSYS2_PATH_TYPE: inherit

README.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,39 @@
1212
- [implot_jp.nim](#implot_jpnim)
1313
- [jpFont.nim](#jpfontnim)
1414
- [IME for Japanese / 日本語入力(IME)について](#ime-for-japanese--%E6%97%A5%E6%9C%AC%E8%AA%9E%E5%85%A5%E5%8A%9Bime%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6)
15+
- [Referrence](#referrence)
1516
- [My tools version](#my-tools-version)
16-
- [参考](#%E5%8F%82%E8%80%83)
17+
- [Other ImGui / CImGui project](#other-imgui--cimgui-project)
18+
- [SDL game tutorial Platfromer](#sdl-game-tutorial-platfromer)
1719

1820
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1921

2022
### Nimgl / ImGui demo program
2123

24+
![alt](https://github.com/dinau/nimgl_test/actions/workflows/windows.yml/badge.svg)
25+
![alt](https://github.com/dinau/nimgl_test/actions/workflows/linux.yml/badge.svg)
26+
2227
**Note**: Using **ImGui v1.89.9** (2023/09) [https://github.com/dinau/nimgl-imgui](https://github.com/dinau/nimgl-imgui)
2328
forked from https://github.com/daniel-j/nimgl-imgui .
2429

2530
#### Prerequisite
2631

2732
---
2833

29-
- OS: Windows10 or later, Debian 12 Bookworm (Linux)
30-
- nim-1.6.20 or later
34+
- nim-2.2.4 or later
35+
- OS: Windows10 or later
3136
- Download
3237

3338
```sh
3439
$ git clone https://github.com/dinau/nimgl_test
3540
$ cd nimgl_test
3641
```
3742

38-
- For Linux Debian 12 Bookworm or later
43+
- For Linux Debian13 or later
3944

4045
```sh
41-
$ sudo apt install xorg-dev libopengl-dev libgl1-mesa-dev
46+
$ sudo apt install libopengl-dev libgl1-mesa-dev libglfw3-dev
4247
```
43-
44-
4548
#### Install dependencies
4649

4750
---
@@ -167,21 +170,52 @@ switch "passC","-DIMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS"
167170
switch "passL","-limm32"
168171
```
169172

173+
#### Referrence
174+
175+
---
176+
177+
[Dear ImGuiで日本語入力時のIMEの位置をいい感じにする](https://qiita.com/babiron_i/items/759d80965b497384bc0e)
178+
[Viewport, Platform: Fixed IME positioning for multi-viewport. Moved API from...](http://dalab.se.sjtu.edu.cn/gitlab/xiaoyuwei/imgui/-/commit/cb78e62df93732b64afcc9d4cd02e378730b32af)
179+
[ImGui で日本語と記号♥と絵文字😺の表示](https://zenn.dev/tenka/articles/display_japanese_symbols_and_emoji_with_imgui)
180+
170181
#### My tools version
171182

172183
---
173184

174-
- Nim Compiler Version 2.0.6
175-
- gcc.exe (Rev2, Built by MSYS2 project) 13.2.0-2
176-
- gcc-libs 13.2.0-2
177-
- binutils 2.41-3
178-
- git version 2.41.0.windows.3
179-
- make: GNU Make 4.2.1
185+
- Windows
186+
- Nim Compiler Version 2.2.4
187+
- gcc.exe 15.2.0
188+
- git version 2.46.0.windows.1
189+
- make: GNU Make 4.4.1
190+
191+
192+
#### Other ImGui / CImGui project
193+
194+
---
195+
196+
197+
| Language | | Project |
198+
| -------------------: | :---: | :----------------------------------------------------------------: |
199+
| **Lua** | Script | [LuaJITImGui](https://github.com/dinau/luajitImGui) |
200+
| **NeLua** | Compiler | [NeLuaImGui](https://github.com/dinau/neluaImGui), [NeLuaImGui2](https://github.com/dinau/neluaImGui2) |
201+
| **Nim** | Compiler | [ImGuin](https://github.com/dinau/imguin), [Nimgl_test](https://github.com/dinau/nimgl_test), [Nim_implot](https://github.com/dinau/nim_implot) |
202+
| **Python** | Script | [DearPyGui for 32bit WindowsOS Binary](https://github.com/dinau/DearPyGui32/tree/win32) |
203+
| **Ruby** | Script | [igRuby_Examples](https://github.com/dinau/igruby_examples) |
204+
| **Zig**, C lang. | Compiler | [Dear_Bindings_Build](https://github.com/dinau/dear_bindings_build) |
205+
| **Zig** | Compiler | [ImGuinZ](https://github.com/dinau/imguinz) |
206+
180207

181-
#### 参考
208+
#### SDL game tutorial Platfromer
182209

183210
---
184211

185-
[Dear ImGuiで日本語入力時のIMEの位置をいい感じにする](https://qiita.com/babiron_i/items/759d80965b497384bc0e)
186-
[Viewport, Platform: Fixed IME positioning for multi-viewport. Moved API from...](http://dalab.se.sjtu.edu.cn/gitlab/xiaoyuwei/imgui/-/commit/cb78e62df93732b64afcc9d4cd02e378730b32af)
187-
[ImGui で日本語と記号♥と絵文字😺の表示](https://zenn.dev/tenka/articles/display_japanese_symbols_and_emoji_with_imgui)
212+
![ald](https://github.com/dinau/nelua-platformer/raw/main/img/platformer-nelua-sdl2.gif)
213+
214+
215+
| Language | | SDL | Project |
216+
| -------------------: | :---: | :---: | :----------------------------------------------------------------: |
217+
| **LuaJIT** | Script | SDL2 | [LuaJIT-Platformer](https://github.com/dinau/luajit-platformer)
218+
| **Nelua** | Compiler | SDL2 | [NeLua-Platformer](https://github.com/dinau/nelua-platformer)
219+
| **Nim** | Compiler | SDL3 / SDL2 | [Nim-Platformer-sdl2](https://github.com/def-/nim-platformer)/ [Nim-Platformer-sdl3](https://github.com/dinau/sdl3_nim/tree/main/examples/platformer) |
220+
| **Ruby** | Script | SDL3 | [Ruby-Platformer](https://github.com/dinau/ruby-platformer) |
221+
| **Zig** | Compiler | SDL3 / SDL2 | [Zig-Platformer](https://github.com/dinau/zig-platformer) |

config.nims

Lines changed: 0 additions & 79 deletions
This file was deleted.

examples/config.nims

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/config.nims.common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ switch "path","../../src"
22
switch "hint","User:off"
33
switch "hint","Name:off"
44
switch "hint","XDeclaredButNotUsed:off"
5-
#switch "hint","HoleEnumConv:off"
65

7-
#switch "app","gui" # dismiss background Window
6+
switch "warning","HoleEnumConv:off"
7+
88

99
#switch "passC","-std=c++17"
1010

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2-
ADDED_COMMAND = make -C res
2+
ifeq ($(OS),Windows_NT)
3+
ADDED_COMMAND = make -C res
4+
endif
35

46
include ../makefile.common.mk

examples/glfw_opengl3_image_load/glfw_opengl3_image_load.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import stb_image/read as stbi
77
import ../utils/loadImage
88

99
include ../utils/setupFonts
10-
include ./res/resource
10+
when defined(windows):
11+
include ./res/resource
1112
include ../utils/simple
1213

1314

examples/implot_jp/config.nims

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
### Common settings
23
include "../config.nims.common"
34

@@ -9,4 +10,3 @@ include "../config.nims.end"
910

1011
### Other options
1112
switch "passC","-DIMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS"
12-
switch "passL","-limm32"

examples/jpFont/config.nims

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ include "../config.nims.end"
99

1010
### Other options
1111
switch "passC","-DIMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS"
12-
switch "passL","-limm32"

0 commit comments

Comments
 (0)