17
SONDI Mikael Raphael | Steve Jobs Project Cameroon | September 1, 2014 EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE

EDITING IMAGES/ICONS IN OPENBRAVO POS · PDF fileSTEVE-JOBS PROJECT CAMEROON OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

Embed Size (px)

Citation preview

Page 1: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

SONDI Mikael Raphael | Steve Jobs Project Cameroon | September 1, 2014

EDITING IMAGES/ICONS IN OPENBRAVO POS

SOURCE CODE

Page 2: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

TECHNICAL DOCUMENTATION

EDITING IMAGES/ICONS IN OPENBRAVO POS

SOURCE CODE

SONDI Mikael Raphael | Steve Jobs Project Cameroon | September 2014

Page 3: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

STEVE-JOBS PROJECT CAMEROON

http://wiki.idempiere.org/wiki/Steve_Jobs_Project

OPENBRAVO POS

EDITING IMAGES/ICONS IN OPENBRAVO POS

SOURCE CODE

SONDI MIKAEL RAPHAEL

http://wiki.idempiere.org/wiki/User:Ralph

September 2014

Page 4: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

This page was intentionally left blank.

Page 5: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 1

Introduction:

This document is made for novices in the IT world, so that they can have their own

contribution in open source projects. The case study here is the Openbravo POS project

run at the Steve Jobs Project Cameroon. This document will give a detailed explanation

on how to change icons or images displayed in the openbravo pos software. This is done

by accessing the source code of openbravo pos.You should be asking yourself whether it

is legal to access the source code of such a software, and how we are going to do it.

Well, Openbravo is an open source software. Below is an explanation of open source

software got from;

http://opensource.org/osd and http://en.wikipedia.org/wiki/Open-source_software.

Open-source software (OSS) is computer software with its source code made available

with a license in which the copyright holder provides the rights to study, change and

distribute the software to anyone and for any purpose.[1] Open-source software is very

often developed in a public, collaborative manner. Open-source software is the most

prominent example of open-source development and often compared to (technically

defined) user-generated content or (legally defined) open-content movements.

Open source doesn't just mean access to the source code. The distribution terms of open-

source software must comply with the following criteria:

1. Free Redistribution

The license shall not restrict any party from selling or giving away the software as a

component of an aggregate software distribution containing programs from several

different sources. The license shall not require a royalty or other fee for such sale.

2. Source Code

The program must include source code, and must allow distribution in source code as

well as compiled form. Where some form of a product is not distributed with source code,

there must be a well-publicized means of obtaining the source code for no more than a

reasonable reproduction cost preferably, downloading via the Internet without charge.

The source code must be the preferred form in which a programmer would modify the

program. Deliberately obfuscated source code is not allowed. Intermediate forms such as

the output of a preprocessor or translator are not allowed.

3. Derived Works

The license must allow modifications and derived works, and must allow them to be

distributed under the same terms as the license of the original software.

4. Integrity of the Author's Source Code

The license may restrict source-code from being distributed in modified form only if the

license allows the distribution of "patch files" with the source code for the purpose of

modifying the program at build time. The license must explicitly permit distribution of

software built from modified source code. The license may require derived works to carry

a different name or version number from the original software.

Page 6: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 2

5. No Discrimination against Persons or Groups

The license must not discriminate against any person or group of persons.

6. No Discrimination against Fields of Endeavor

The license must not restrict anyone from making use of the program in a specific field of

endeavor. For example, it may not restrict the program from being used in a business, or

from being used for genetic research.

7. Distribution of License

The rights attached to the program must apply to all to whom the program is redistributed

without the need for execution of an additional license by those parties.

8. License Must Not Be Specific to a Product

The rights attached to the program must not depend on the program's being part of a

particular software distribution. If the program is extracted from that distribution and

used or distributed within the terms of the program's license, all parties to whom the

program is redistributed should have the same rights as those that are granted in

conjunction with the original software distribution.

9. License Must Not Restrict Other Software

The license must not place restrictions on other software that is distributed along with the

licensed software. For example, the license must not insist that all other programs

distributed on the same medium must be open-source software.

10. License Must Be Technology-Neutral

No provision of the license may be predicated on any individual technology or style of

interface.

The above highlights the fact that we can edit the source to suit our needs. Openbravo is

also licensed. You can have a look at openbravo public license for more information.

Now that you know everything about the ethical status of this document, let’s know how

we are going to modify the code.

Page 7: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 3

Code structure: Openbravo pos is coded in Java. Part of the GUI is coded in xml. To be able to edit the

code, we need to use an IDE such as eclipse. Then we import the downloaded source

code into the IDE for possible editing.

Page 8: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 4

Nothing great! Just explore: If you love what we are doing here, then you will dive into searching and exploring the

directories of the source code to know what is where. So, let’s search for the images that

appear as icons for the Openbravo pos.

Let us start by searching the source code for .png files.

Page 9: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 5

Or rather, we can locate the icon images here:

Page 10: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 6

Now we proceed by selecting/choosing the file we want to modify.

Page 11: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 7

It is observed that this is the file that is displayed in the header of openbravo pos.This is

also indicated by its name, “poweredby.png”.

Page 12: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 8

Next, we identify the image that will replace the one selected above.

Page 13: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 9

Don't mind the long filename. It is going to be useful. Copy this image and paste it in the

directory of images:

Page 14: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 10

Copy the name of the file to be changed, move the file out of the images directory and

paste the copied filename as the name of the file above.

Page 15: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 11

This is going to be your result:

Page 16: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 12

Observe that the filename has changed. It is now “poweredby.png”.

What you have to do now is to run your modified source code!

Page 17: EDITING IMAGES/ICONS IN OPENBRAVO POS  · PDF fileSTEVE-JOBS PROJECT CAMEROON   OPENBRAVO POS EDITING IMAGES/ICONS IN OPENBRAVO POS SOURCE CODE SONDI MIKAEL RAPHAEL

PAGE 13

And observe the results:

The design might not be so cool, but the results are what was expected.

Keep playing with these images and have your own personalized set of images for

Openbravo POS, images you will rightly understand.

Hope you enjoyed.

Send comments at [email protected].