AROS Exec

Distros => Icaros Desktop => Topic started by: miker1264 on October 01, 2019, 05:54:07 PM

Title: Icaros Viewer
Post by: miker1264 on October 01, 2019, 05:54:07 PM
This is the first release of my "Icaros Viewer".

I updated it to display 32bit BMPX files with Alpha Transparency.
It can also Load and Display several other picture types.

In the next few weeks I will add a small context menu.
It will then be able to additionally Save As, Save As IFF, Save As PNG.

In the next version I will also disable the message at startup with dimensions.
It will be part of the "About" information instead. Pictures will then open directly. :-)
Title: Re: Icaros Viewer
Post by: paolone on October 01, 2019, 09:07:02 PM
Good! I will download ASAP.
Title: Re: Icaros Viewer
Post by: miker1264 on October 01, 2019, 09:33:36 PM
Good! I will download ASAP.

@paolone
Here is the revised viewer. I changed line #250 to not display the dimensions on open.

I used: gcc viewer.c -o "Icaros Viewer"

That is a simple compiling. It uses datatypes.
I assume it's the same for compiling x64.

Double-Click the App Icon to open Picture Files.
Title: Re: Icaros Viewer
Post by: ilBarbax on October 02, 2019, 09:51:59 AM
Miker,

why not to put your finger on the Multiviewer. Current version has some menu disabled and some functionality still missing.
Title: Re: Icaros Viewer
Post by: miker1264 on October 02, 2019, 10:27:28 AM
Miker,

why not to put your finger on the Multiviewer. Current version has some menu disabled and some functionality still missing.
I

I was thinking about that but I have to be able to recompile it after making changes. I'm one step closer now with paolone's Ubuntu x64. The disabled menu items result because MultiView checks for DTM_WRITE for ILBM which is currently incomplete so it's disabled.

MultiView uses a display method where it Adds Datatypes to a window as a gadget. So it relies completely on datatypes. But it could use some improvement.
Title: Re: Icaros Viewer
Post by: salvo on October 02, 2019, 11:27:38 AM
Well Miker :D
Title: Re: Icaros Viewer
Post by: paolone on October 02, 2019, 11:53:06 AM

@paolone
Here is the revised viewer. I changed line #250 to not display the dimensions on open.

I used: gcc viewer.c -o "Icaros Viewer"

That is a simple compiling. It uses datatypes.
I assume it's the same for compiling x64.


Well, yes and no.


Yes, because viewer on x64 compiles and runs well.

No, because gcc on aros x64 does not work, so I had to use a metamake file as many times explained on icarosdesktop.org

to be precise, I put your viewer.c file into ~/sources/icaros/viewer/

then I created a mmakefile.src like the following:

Code: [Select]
clude $(SRCDIR)/config/aros.cfg


#MM local-icaros-viewer : includes linklibs


FILES := viewer
EXEDIR := $(AROS_CONTRIB)/$(AROS_DIR_DEVELOPER)/Build
NOWARN_FLAGS := $(NOWARN_FORMAT)
USER_CFLAGS := $(NOWARN_FLAGS)


%build_prog mmake=local-icaros-viewer \
    progname=viewer targetdir=$(EXEDIR) \
    files=$(FILES)


%common

then I launched build with:

Code: [Select]
make local-icaros-viewer
and this created the 'viewer' executable in Extras/Developer/Build. I copied it from there, added your icon, and everything went fine.




PS: avoid giving names with spaces to executables, even though AROS can handle them, people can always forget to use quotes in their paths.
Title: Re: Icaros Viewer
Post by: miker1264 on October 02, 2019, 12:58:59 PM
@paolone

Very good to know as far as metamake. Following your very good example I can now put together a few metamake files including the one for the bmp datatype you asked for earlier.

Is this method also used to compile Magellan and Multiview and other modules for 64 bit?

The file naming makes sense now that you mention it. Thanks for pointing that out for me.
Title: Re: Icaros Viewer
Post by: miker1264 on October 02, 2019, 01:26:00 PM
The viewer is a work in progress. In lieu of a simple menu I could instead use two simple keyboard shortcuts - Ctrl + S for "Save As PNG" and Ctrl + Q to "Quit Program".

I've worked out a way to use Save As PNG to quickly assemble PNG Icon Files. Open the first image and use Ctrl + S. Then a file requester appears. Save the File to a location in the format "File.info".

Then open the second image but when selecting the file name to save choose the recently saved .info file instead. It will prompt that the File Exists. Overwrite? Select Yes. It then notices the .info file extension and prompts again before saving "PNG File Exists. Would you like to Append?" If you choose Yes it will append the second image to the first to make a nice new png icon file in just a few seconds.

Also, using the INFO and ICO datatypes the Viewer can load and display icon files. It may be possible to use Arrow Keys to toggle multiple images. When you find one you like choose "Save As PNG" (Ctrl + S) and save the current image. Arrow keys may alao be used to display multiple images in a folder such as jpeg or even raw (dcraw) images, but I haven't gotten that far yet. Do we yet have a RAW Datatype?

The same method can be used for any Save As PNG menu item. If MultiView had a Save As PNG menu option, could it save png icon files as well?

BTW - Here are two 32bit images to test the viewer, one original 32bit png and the corresponding 32bit bmpx, both with alpha transparency.
Title: Re: Icaros Viewer
Post by: paolone on October 02, 2019, 03:07:07 PM
@paolone

Very good to know as far as metamake. Following your very good example I can now put together a few metamake files including the one for the bmp datatype you asked for earlier.

Is this method also used to compile Magellan and Multiview and other modules for 64 bit?


I'm happy my example helped you understanding how the logic of metamake works. However, I suggest you to take some time and look for other mmakefile.src files included with AROS sources (in my development VM, just look for them in ~/sources), you will notice that they can be very different from each others. Some will be very simple, basic ones like mine, but others can be very, very complex, exacly like it happens with common 'makefile'.


We surely have a mmakefile.src for MultiView, since it's part of AROS programs. But unluckily we haven't anything similar for Magellan, which is not available for 64bit AROS.


The problem with bigger, 3rd party programs, is that they might use different tools to compile, they might have their own toolchain and we simply can't force everyone to use metamake files as we'd wish. Everyone must be free to use whatever they like. Unluckily, this also means that they will have to keep their AROS headers and files as much updated as possible, because otherwise their binaries wouldn't run on current system.


Just to be clear: except the ones I personally released, NO OTHER x86-64 PROGRAM ever released on The Archives is working on Icaros 64. Neither various MCC zune libraries, nor MuiMapparium or the recent Leu, nor fpc. That's simply because the ABI slightly changed between the time their authors compiled the binaries, and today. AND they are also using a older x86-64 AROS base to compile. This 'moving target' nature of AROS 64 is the main motivation why I waited for so much, before even trying to make a 64bit distribution. And I simply CAN'T ask several people to rebuild their programs every time AROS changes. If they used metamake files, however, thir effort would be little: just updating AROS sources and rebuild would be enough.
Title: Re: Icaros Viewer
Post by: miker1264 on October 02, 2019, 03:23:15 PM
@paolone

Yes. I understand that the mmake files may be different. Thanks for the example file. I actually made one for the bmp datatype just now.

"This 'moving target' nature of AROS 64 is the main motivation why I waited for so much, before even trying to make a 64bit distribution. And I simply CAN'T ask several people to rebuild their programs every time AROS changes. If they used metamake files, however, thir effort would be little: just updating AROS sources and rebuild would be enough."

The last part is very true. Any way possible to streamline the build process would be beneficial to everyone.
Title: Re: Icaros Viewer
Post by: miker1264 on October 04, 2019, 03:35:13 PM
Now that I have the Preconfigured Development Environment for Linux set up and working I'd like to make a few Unofficial changes to MultiView.

Until ILBM datatype is complete with Save-ILBM I'd like to add save functions for IFF and PNG.
Title: Re: Icaros Viewer
Post by: salvo on October 04, 2019, 04:38:25 PM
when you working at multiview again miker?
Title: Re: Icaros Viewer
Post by: miker1264 on October 04, 2019, 06:55:35 PM
when you working at multiview again miker?

I'm going to compile my "Hello 64bit AROS World" program (Icaros Viewer). Then do a test compiling of MultiView. Then I can make a few unofficial changes to allow it to save.

It will be my own temporary version until the datatype save functions are all working well.

Save As will be a direct copy of the original to the destination. Save As IFF will use built in save functions for ILBM. And Save As PNG will use picture datatypes to save. Supply any supported basename for the last one to save as any picture type. In theory at least. We'll see.
Title: Re: Icaros Viewer
Post by: salvo on October 04, 2019, 07:25:08 PM
there is support for postscript printers you can add this :D

hi
Title: Re: Icaros Viewer
Post by: AMIGASYSTEM on October 04, 2019, 09:55:30 PM
@miker1264
Will there be a 68k OS3 version?
Title: Re: Icaros Viewer
Post by: miker1264 on October 04, 2019, 11:32:45 PM
@miker1264
Will there be a 68k OS3 version?

If we are talking about the viewer then yes. It requires picture datatypes and Cybergraphx.
Title: Re: Icaros Viewer
Post by: AMIGASYSTEM on October 04, 2019, 11:36:52 PM
Yes i meant OS3 RTG as AfA One, picture datatypes there is, Cybergraph do not know if UAE Zorro III or Picasso IV could go?
Title: Re: Icaros Viewer
Post by: miker1264 on October 05, 2019, 02:52:36 AM
Yes i meant OS3 RTG as AfA One, picture datatypes there is, Cybergraph do not know if UAE Zorro III or Picasso IV could go?

The display functions from Cybergraphics are just READPIXELARRAY and WRITEPIXELARRAY. There is an alternate method to display that is BltBitMapRastPort. It's the same method that Magellan uses when it displays png icon images for "Icon Information". It has been used successfully in the past by many other programs.

If I can use that instead I won't need Cybergraphics Library, just picture datatypes. So that would be more compatible with Amiga OS 3.x systems and AfA One.
Title: Re: Icaros Viewer
Post by: miker1264 on October 05, 2019, 05:43:17 AM
@paolone

Could you please post the compiled 64bit Viewer file. I can't seem to compile it correctly.

Do I have to completely compile AROS first before compiling locally? I'm not sure what's wrong.
Title: Re: Icaros Viewer
Post by: paolone on October 05, 2019, 04:53:33 PM
@paolone

Could you please post the compiled 64bit Viewer file. I can't seem to compile it correctly.

Do I have to completely compile AROS first before compiling locally? I'm not sure what's wrong.
I will do that ASAP, maybe on monday. However, have you added the initial include line in your mmakefile.src? This should have fixed your issues.
Title: Re: Icaros Viewer
Post by: miker1264 on October 05, 2019, 08:59:19 PM
@paolone

Could you please post the compiled 64bit Viewer file. I can't seem to compile it correctly.

Do I have to completely compile AROS first before compiling locally? I'm not sure what's wrong.
I will do that ASAP, maybe on monday. However, have you added the initial include line in your mmakefile.src? This should have fixed your issues.

Actually, I did add that line but there is another problem.

jman and wawa have been trying to help me configure then make AROS. See screenshot:

Did you compile Viewer on your own Arosdev setup environment? Or did you open the virtual machine you set up for us and compile it there?

There may be  a problem with the build system in the Arosdev VMDK.

I did a Configure for target=pc-x86_64 as well. The error was with workbench-popupmenu.
Title: Re: Icaros Viewer
Post by: paolone on October 06, 2019, 11:31:23 PM
@paolone

Could you please post the compiled 64bit Viewer file. I can't seem to compile it correctly.

Do I have to completely compile AROS first before compiling locally? I'm not sure what's wrong.
I will do that ASAP, maybe on monday. However, have you added the initial include line in your mmakefile.src? This should have fixed your issues.

Actually, I did add that line but there is another problem.

jman and wawa have been trying to help me configure then make AROS. See screenshot:

Did you compile Viewer on your own Arosdev setup environment? Or did you open the virtual machine you set up for us and compile it there?

There may be  a problem with the build system in the Arosdev VMDK.

I did a Configure for target=pc-x86_64 as well. The error was with workbench-popupmenu.
Hi. I have compiled on my own dev system, which is very similar (but not 1:1 equal) to the released one. The only difference is that I am compiling from the same directory of sources, which is considered 'limiting' by many developers. If you have any suggestion on how to workaround any issue, just tell me.

PS: AROS sources on the released development VM are 2 months newer than the ones I have.
Title: Re: Icaros Viewer
Post by: miker1264 on October 06, 2019, 11:52:56 PM
@paolone

Thank you for clarifying. I suspected you had compiled on your own build system.
There seems to be a problem with the "newer" sources in the VMDK image. It keeps stopping at "workbench-popupmenu".
I have sources from ABIv1 from early 2019 I might try replacing the VMDK sources. Or I could download new sources.

I wonder if I'm the only one having problems building AROS with the Arosdev disk image? Maybe it's user error on my part.

BTW - I have updated the Icaros Viewer with a small project menu system. It can now save as, save as png, and save png icon files.
I don't know of any icon apps that are working for Icaros 64bit. Have you tried a 64bit version of IconPoser? The requester has issues.

I'm currently testing it to make sure it all works correctly, especially the logic involved in using save as png to save png icon files.
Open the first png image then save as png as "FILE.info" where FILE is the output icon file name.
Open the second png image then save as png again. When selecting a filename to save choose the FILE.info saved previously.
Answer YES-YES when prompted that "File Exists. Overwrite" then "INFO File Exists. Append?" It then appends the images.
That process will produce a new png icon file from two png images of "normal" and "selected" icon images.

That may be too much information to put in a simple Help message as I intended. Maybe I'll include a ReadMe.txt instead.
Title: Re: Icaros Viewer
Post by: miker1264 on October 07, 2019, 01:02:49 AM
It's interesting how things come together.

I can now use Icaros Viewer to make a Special App Icon that has three png images like my ShowPicture icon.

The next update for Icaros Viewer will include Resize To Fit and a method to blit a bitmap to a rasterport that is common to many Amiga like operating systems. It's the same method used by Magellan to display icon images.

I can also use INFO datatype to enumerate the images to export the third png image to be used in a fancy About Box for my programs. They will consist of a small 100x100 pixel image on the left and IntuiText to give a description about programs.

There's probably an easier way but I like a challenge.

******************************************

Here is the newest version of Icaros Viewer from this weekend. It can Save As, Save As PNG, Save PNG Icons. (See previous instructions).

In the next version I will add Resize To Fit, Use BltBitMapRastPort, and I may add Save As IFF to the menu to allow to save ILBM images.

Now that SaveAsDatatype is in place with all the supporting functions it is actually possible to save as any supported picture datatype. With that in mind I may change the menu slightly to File,Save,Save As,etc. such that Save will save a copy and Save As will allow adding your own file extension. For example, Save As... FILE.bmp, where FILE is the filename. The program will compare the file extension and if valid save using bmp datatype. Save As could be very useful.
Title: Re: Icaros Viewer
Post by: salvo on October 07, 2019, 09:33:04 AM
well miker :D
Title: Re: Icaros Viewer
Post by: miker1264 on October 07, 2019, 07:08:52 PM
well miker :D

To further complicate matters I'm working on a method for Icaros Viewer to use INFO Datatype to open png icon files and iff icon files then use left and right arrow keys to show each icon image. When you find the one you like then Save As IFF or Save As PNG.

When I get to that point I will do a save as for the viewer as the start point of Icon Factory. Very quickly after that I will bring over all the icon functions to complete Icon Factory.
Title: Re: Icaros Viewer
Post by: salvo on October 07, 2019, 07:31:18 PM
ok i understand :D
Title: Re: Icaros Viewer
Post by: miker1264 on October 12, 2019, 07:05:09 PM
Making some new png icons for my Icaros Desktop.

I'd like to have a Blue Theme & Green Theme.
Title: Re: Icaros Viewer
Post by: miker1264 on October 13, 2019, 04:18:34 PM
Using Icaros Viewer to assemble PNG Icon Files!