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

Multi-language support in Windows resources: #17

Open
bitRAKE opened this issue May 8, 2023 · 0 comments
Open

Multi-language support in Windows resources: #17

bitRAKE opened this issue May 8, 2023 · 0 comments

Comments

@bitRAKE
Copy link

bitRAKE commented May 8, 2023

Present resource macros do not support multiple resources with the same ID:

macro resource dir,definitions&
iterate <id,lang,label>, definitions
dir dd 0,%t,0,%% shl 16
local total,current,next,counter
total = %%
current = -1
next = 0
while current < next
current = next
counter = 0
repeat total
indx %
if id = current
if counter = 0
dd id,80000000h+label.directory-root@resource
end if
counter = counter + 1
label.count = counter
else if id > current & ( next = current | next > id )
next = id
end if
end repeat
end while
current = -1
next = 0
while current < next
current = next
counter = 0
repeat total
indx %
if id = current
if counter = 0
label.directory dd 0,%t,0,label.count shl 16
dd lang,label-root@resource
label.resid = id
else
dd lang,label-root@resource
end if
counter = counter + 1
else if id > current & ( next = current | next > id )
next = id
end if
end repeat
end while
break
end iterate
end macro

It's best to use an external resource editor and load the RES file with:

section '.rsrc' resource from 'my_resource.res' data readable

The resource macros also lack support for named resources.

Some resource editors on github ...
https://github.com/katahiromz/RisohEditor

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

1 participant