yab | yet another Basic for HAIKU
Preparing yab apps for distribution. - Printable Version

+- yab | yet another Basic for HAIKU (http://yab.orgfree.com/forum)
+-- Forum: General discussion (http://yab.orgfree.com/forum/forumdisplay.php?fid=8)
+--- Forum: yab stuff (http://yab.orgfree.com/forum/forumdisplay.php?fid=10)
+--- Thread: Preparing yab apps for distribution. (/showthread.php?tid=9)



Preparing yab apps for distribution. - bbjimmy - 07-03-2015

When packaging a yab-app for distribution it is best to give your app its own app Application Signature.

From the IDE, replace application/x-vnd.yab-app with application/x-vnd.uourappname when using the Buildfactory.

From the command-line., use:

Code:
BuildFactory.yab  outputfile inputfile application/x-vnd.uourappname

This will allow your app to not be hidden in the Deskbar application listing by another yab-app.


Make an RDEF file for your app.

This is a plane text file that defines resources for an application. In this case, we want to add an icon and application version information as shown in the FileType tracker add-on applet.


An example rdef file:


Code:
resource vector_icon {
    $"6E6369660E0500020006023C43C6B9E5E23A85A83CEE414268F44A445900C6D7"
    $"F5FF6B94DD03EC66660200060238C5F1BB105D3DFDC23B9CD045487847B50700"
    $"FFFFFFFFC1CCFF020006023B3049396B0ABA90833C646E4A101543299500FFFF"
    $"FFFFEBEFFF020006023C71E33A0C78BA15E43C7D2149055549455700E3EDFFFF"
    $"9EC2FF03FFACAC0200060239D53438FFCBBBC1973C666F4ADC3246DC6C00C1CC"
    $"FFFFFFFFFF03003CB0020006023C0AE63B3927BC611E3D03FF4C25624A1A9600"
    $"A3043CFFFF90AF03C93B3B030D296402000602BD498B3E1159BF219BBE7D2F4C"
    $"1B8F4A331300BD0F0FFFE98484040174100A08325E385E40564E5E545E605058"
    $"4C3E510A062E2C2E3E3E454A3C4A2A3A250A042E2C2E3E3E453E320A042E2C3E"
    $"324A2A3A250A043E323E454A3C4A2A0A0338423C4D3C440A0622422254325C3E"
    $"513E402E3A0A0422422254325C32490A04224232493E402E3A0A043249325C3E"
    $"513E400A063E423E544E5C5A505A3F4A390A04C222C20F4E495A3F523C0A043E"
    $"42C222C20F523C4A390A054151C08BC8834E5C4E49C22AC2130A053E423E54C0"
    $"8BC8834151C22AC2130A044E494E5C5A505A3F110A0D0100000A0001061815FF"
    $"01178400040A00010618001501178600040A010107000A080109000A0B010520"
    $"20210A050108000A00010A1001178400040A02010D000A0A010E000A0902040F"
    $"000A06010B000A0C010C000A0001011001178400040A030102000A040103000A"
    $"07010400"
};


resource app_signature "application/x-vnd.yab-IDE";

resource app_version {
    major  = 2,
    middle = 2,
    minor  = 5,

    variety = B_APPV_FINAL,
    internal = 0,

    short_info = "yab IDE",
    long_info = "An integrated development environment for yab."
};

resource app_flags 1;

The vector icon info is generated by Icon-O-Matic when an icon is exported as "HVIF RDef"

Replace "resource(<your resource id here>) #'VICN' array" with "resource vector_icon"

The resource app_signature should match your "application/x-vnd.uourappname"

resource app_version is the version number information.

resource app_flags is the launch flag, Single launch, Multiple launch, etc.


Use the RdefApply yab script included in the /boot/home/yab_work/BuildFactory directory.

Usage:

Code:
RdefApply <RdefFilename> <yourappbinary>
This will apply the Rdef to your compiled binary.


RE: Preparing yab apps for distribution. - clasqm - 07-03-2015

Seems complicated. How is this different from right-clicking on the binary, opening it in FileType, and filling in all the details there?


RE: Preparing yab apps for distribution. - bbjimmy - 07-04-2015

(07-03-2015, 09:14 PM)clasqm Wrote: Seems complicated. How is this different from right-clicking on the binary, opening it in FileType, and filling in all the details there?

There is not much if you are packaging your ap in an .hpkg file. However if this is done, it doesn't matter if the file is unzipped or copied to a filesystem that doesn't support attributes, the attributes, version launch flag and icon, are resources of the binary and applied to it by the os when the file is launched.


RE: Preparing yab apps for distribution. - lelldorin - 07-14-2015

(07-04-2015, 12:52 AM)bbjimmy Wrote:
(07-03-2015, 09:14 PM)clasqm Wrote: Seems complicated. How is this different from right-clicking on the binary, opening it in FileType, and filling in all the details there?

There is not much if you are packaging your ap in an .hpkg file. However if this is done, it doesn't matter if the file is unzipped or copied to a filesystem that doesn't support attributes, the attributes, version launch flag and icon, are resources of the binary and applied to it by the os when the file is launched.


Why this option is not a part of the Build Process of the yabIDE?


RE: Preparing yab apps for distribution. - lelldorin - 08-17-2015

Will be fine to see this tutorial in the besly knowledge base too. Can i add it?


RE: Preparing yab apps for distribution. - bbjimmy - 08-18-2015

(08-17-2015, 06:06 PM)lelldorin Wrote: Will be fine to see this tutorial in the besly knowledge base too. Can i add it?

I see no reason not to. It is more of a heads-up than a tutorial though.


Free Web Hosting