Windows Icon (.ico) datatype

mmartinka · 5071

mmartinka

  • Newbie
  • *
    • Posts: 48
    • Karma: +4/-0
on: October 16, 2018, 08:33:05 AM
The Windows Icon (.ico) datatype for AROS  ;)
Please test...
Uploaded to AROS archives

« Last Edit: October 16, 2018, 08:41:13 AM by mmartinka »



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #1 on: October 16, 2018, 03:09:52 PM
could you guys also share your sources via aros archives? ideally building with aros build system, in order to be able to compile them fo all aros target platforms. only this will keep aros portable and future proof.



mmartinka

  • Newbie
  • *
    • Posts: 48
    • Karma: +4/-0
Reply #2 on: October 16, 2018, 03:53:27 PM
could you guys also share your sources via aros archives? ideally building with aros build system, in order to be able to compile them fo all aros target platforms. only this will keep aros portable and future proof.

The each archive include a source.



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #3 on: October 16, 2018, 04:12:52 PM
ah, i missed that, i might provide aros mmakefiles to include with your sources, maybe.



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #4 on: October 17, 2018, 03:30:27 PM
ok, here is the content of mmakefile.src to be placed within src_ico subdir, to be able to build this datatype for any aros platform with aros toolchain:
Code: [Select]
#   $Id: mmakefile.src

include $(SRCDIR)/config/aros.cfg

USER_LDFLAGS := -static

FILES := icoclass

#MM workbench-datatypes-ico : includes linklibs

USER_CFLAGS   := -DMYDEBUG $(NOWARN_UNUSED_VARIABLE)

%build_module mmake=workbench-datatypes-ico \
    modname=ico modtype=datatype \
    files=$(FILES)

$(NOWARN_UNUSED_VARIABLE) flag is because of apparently superfluous
Code: [Select]
struct Library *libBase = (struct Library *)cl->cl_UserData;in lines 81, 260, 337 and 377 of icoclass.c
« Last Edit: October 17, 2018, 04:15:11 PM by wawa »



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #5 on: October 17, 2018, 03:33:14 PM
you should be able to deliver such a simple mmakefile for each of your datatypes for easy compilation with aros toolchain.

i have not been able to succesfully read an .ico file with zuneview on i386 abi v1 hosted, but i have not yet tried very hard, i admit.



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #6 on: October 17, 2018, 04:14:25 PM
likewise here is the content of mmakefile.src for the info datatype:
Code: [Select]
#   $Id: mmakefile.src

include $(SRCDIR)/config/aros.cfg

USER_LDFLAGS := -static

FILES := infoclass

#MM workbench-datatypes-info : includes linklibs

USER_CFLAGS   := -DMYDEBUG $(NOWARN_UNUSED_VARIABLE) $(NOWARN_SEQUENCE_POINT)

%build_module mmake=workbench-datatypes-info \
    modname=info modtype=datatype \
    files=$(FILES)

however id think that its probably worth to take care of that sequence point warning i have silenced above:
Code: [Select]
/home/wawa/AROS-source/AROS/local/src_info/./infoclass.c: In function 'Complement':
/home/wawa/AROS-source/AROS/local/src_info/./infoclass.c:232:7: error: operation on 'mem' may be undefined [-Werror=sequence-point]
   *mem++ = ~(*mem);
    ~~~^~



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 3729
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #7 on: October 18, 2018, 02:30:27 AM
with ABIv0 no problem with ZunePaint to see icons .ico, while with ABIv1 Zunepaint just run crash
« Last Edit: October 18, 2018, 02:44:09 AM by AMIGASYSTEM »



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #8 on: October 18, 2018, 02:43:49 AM
if you use datatype binary compiled for abi v0 with abi v1, no wonder it crashes.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 3729
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #9 on: October 18, 2018, 10:35:40 AM
if you use datatype binary compiled for abi v0 with abi v1, no wonder it crashes.

No I used one "Nightly Build ABI-v1 Standard" with nothing more, and ZunePaint it crashes as soon as you run, see screenshot?

Where it is possible to download "OdysseyWebBrowser ABI-v1" i can not find the link anymore!


wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #10 on: October 18, 2018, 05:02:36 PM
i have just compiled and ran zunepaint. it didnt crash.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 3729
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #11 on: October 19, 2018, 07:13:12 PM
I downloaded the latest Nightly Build ABIv1, also downloaded a new copy of ZunePaint but I always get a Crash as soon as I run ZunePaint, probably this only happens on my version of VMware Player. 
As per screenshot posted above no problem for the AROS ABIv0.


wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #12 on: October 20, 2018, 03:48:34 AM
perhaps, maybe your vm could miss some instruction the compile expects, but even though im running different targets on different setups among others hosted and vmware and have not yet observed that. you might have modified your setup in a way that causes crash, as it happened before. alas i cannot debug that for you remotely.



salass00

  • Newbie
  • *
    • Posts: 19
    • Karma: +25/-0
    • A500.org
Reply #13 on: October 20, 2018, 04:55:25 AM
however id think that its probably worth to take care of that sequence point warning i have silenced above:
Code: [Select]
/home/wawa/AROS-source/AROS/local/src_info/./infoclass.c: In function 'Complement':
/home/wawa/AROS-source/AROS/local/src_info/./infoclass.c:232:7: error: operation on 'mem' may be undefined [-Werror=sequence-point]
   *mem++ = ~(*mem);
    ~~~^~

Change it to:
*mem = ~(*mem); mem++;

and it should get rid of the warning.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 3729
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #14 on: October 20, 2018, 11:01:52 AM
perhaps, maybe your vm could miss some instruction the compile expects, but even though im running different targets on different setups among others hosted and vmware and have not yet observed that. you might have modified your setup in a way that causes crash, as it happened before. alas i cannot debug that for you remotely.

I've been using WMware for many years. always the same version 6.0.7, last compatible with a 32Bit system and I have never had problems, I tried to do a new installation several times and the result does not change. Probably my old WMWare does not support this system well, no problem with many other OS installed, i wait for someone else to do some tests with WMWare.