Author Topic: Windows Icon (.ico) datatype  (Read 354 times)

mmartinka

  • Newbie
  • *
  • Posts: 3
    • View Profile
Windows Icon (.ico) datatype
« on: October 16, 2018, 03:33:05 PM »
The Windows Icon (.ico) datatype for AROS  ;)
Please test...
Uploaded to AROS archives

« Last Edit: October 16, 2018, 03:41:13 PM by mmartinka »

wawa

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #1 on: October 16, 2018, 10: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: 3
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #2 on: October 16, 2018, 10: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

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #3 on: October 16, 2018, 11:12:52 PM »
ah, i missed that, i might provide aros mmakefiles to include with your sources, maybe.

wawa

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #4 on: October 17, 2018, 10: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, 11:15:11 PM by wawa »

wawa

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #5 on: October 17, 2018, 10: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

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #6 on: October 17, 2018, 11: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

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #7 on: October 18, 2018, 09: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, 09:44:09 AM by AMIGASYSTEM »

wawa

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #8 on: October 18, 2018, 09:43:49 AM »
if you use datatype binary compiled for abi v0 with abi v1, no wonder it crashes.

AMIGASYSTEM

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #9 on: October 18, 2018, 05:35:40 PM »
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

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #10 on: October 19, 2018, 12:02:36 AM »
i have just compiled and ran zunepaint. it didnt crash.

AMIGASYSTEM

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #11 on: October 20, 2018, 02:13:12 AM »
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

  • Junior Member
  • **
  • Posts: 71
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #12 on: October 20, 2018, 10: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: 1
    • View Profile
    • A500.org
Re: Windows Icon (.ico) datatype
« Reply #13 on: October 20, 2018, 11: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

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Windows Icon (.ico) datatype
« Reply #14 on: October 20, 2018, 06:01:52 PM »
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.