You are here

GNUAccounting instruction is confusing

17 posts / 0 new
Last post
foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
GNUAccounting instruction is confusing

The README file for GNUAccounting (which I found on sourceforge.net while looking for an older version of OpenOffice Portable) was written by a programmer who seems to think everyone knows his language... The application comes in a tar.gz file, and it's easy enough to uncompress it to my USB key, but I have a couple of questions.

What does "run" mean in this instruction: Now change into the directory gnuaccounting and run "./gnuaccounting.sh".

How do I "run" a .sh file? What is this file?

Also, under "Additional Features" in that Readme file is this:
To use gnuaccounting portable, use change the shell script/batch file to make use
of the new command line option MainWindow --configPath="PATH".

I'm not sure I understand what this means, and would be grateful for a more detailed description of exactly what I need to do here.

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Running...

An .sh file is for Linux really. Pretty sure.

______________________
Signature...What Signature?

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 10 months ago
Developer
Joined: 2006-12-06 18:07
yup _________________________

yup
_________________________
I don't believe in signatures

The developer formerly known as ZGitRDun8705

foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
OK, thanks. But, but....

... the system requirements on its main page in sourceforge claims it runs on all 32-bit Windows versions as well as Linux, and the download page says "platform independent." I'm confused now about how to run it.

But thank you very much for that information! At least I know what .sh is for.

Cheers!
---Fox

Cheers!
---Fox

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 16 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Nope: *NIX only

Platform-Independent in SourceForge terms means it works on multiple architectures (x86, PowerPC, etc). It does not mean anything in relation to operating systems. It's about the code.

The release is .SH files which are *NIX shell scripts. These do not work on Windows.

Sometimes, the impossible can become possible, if you're awesome!

SamK
Offline
Last seen: 15 years 2 months ago
Joined: 2007-07-06 07:04
Portable Version

It seems that someone is working on a (Windows) portable version of GNUCash. Have a look at this thread: https://portableapps.com/node/8987

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 5 months 3 hours ago
Joined: 2006-11-18 10:26
As stated in the other thread...

GNUCash != GNUAccounting

If you read the GNUAccounting page, it's written in Java and requires OO or mySQL. In theory, you could get it running on Windows from a flash drive...good luck coding a batch file to launch it all (might end up being easy...who knows).

http://gnuaccounting.sourceforge.net/

GnuAccounting is a open source java accounting software that creates and administrates e.g. invoices and credit notes. It embeds OpenOffice to design templates and output invoices and uses MySQL or OpenOffice's HSQLDB to store transactional metadata on a central server or on the client computer.

OOo	OpenOffice.org 2.x
Java	recommended 1.4.2 or higher, NOT 1.3.1 or 1.4 (due to Transparent Use of Office UNO Components)
MySQL	

    * 4.0
    * Connector/J required for MySQL use

EDIT: I DLed the file. There's a .bat file already coded for ya in there...take a look at that.

EDIT2: Did you read the README all the way? The coder gives a tip on how to get it running on Windows along with a shoutout to PA.com

Also, I ran the .bat file with no edits and the program launches and asks you to point at the OO directory. Try to put a relative path in the text box (eg: ..\..\OpenOfficePortable\ (or something like that)).

Additional features
____________________________________

To use gnuaccounting portable, use change the shell script/batch file to make use
of the new command line option MainWindow --configPath="PATH". This seems 
particularly useful if you already have a portable OpenOffice.org like  
https://portableapps.com/apps/office/openoffice_portable.

EDIT3: This program forces you to point to the /App/openoffice directory of OO and that's not a portable way of running OO. Maybe you can sort this out in the .bat file or by emailing the author and asking for their help.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
But I thought I made it clear I'm all ignorant...

"If you read the GNUAccounting page, it's written in Java and requires OO or mySQL."

That didn't concern me at all. I was looking at that package specifically because it does use OOo, which I have and which I run portably, and which uses Java 1.6.0. There are instructions somewhere (probably on the OpenOffice Portable home page) for including Java on the USB drive so it can be used by OOo, which I have done and which works just fine. So that's not an issue for me.

"EDIT: I DLed the file. There's a .bat file already coded for ya in there...take a look at that."

I only know I can run a .bat file from the command prompt window. I thought I'd be able to open it with a text editor to see what's in it, but that option is not available, so I have no idea how to look at it... I'm and old mainframe programmer who learned a little C+ in its very first appearance in our tech-college classroom 20 years ago, and that's the last time I worked with .bat files. You see how much I remember.

"EDIT2: Did you read the README all the way? The coder gives a tip on how to get it running on Windows along with a shoutout to PA.com"

Are we reading the same README?? I didn't see any tip on how to get it running in Windows, unless you mean the .bat file, nor anything about PA.com unless you gave that as an oblique reference to something else in the file. That file is written for someone who already knows what they're doing and who could probably code the program themselves. I am neither of these. Sorry, I don't have the tools to understand those instructions... nor yours...

Cheers!
---Fox

Cheers!
---Fox

alanbcohen
Offline
Last seen: 5 years 3 months ago
Joined: 2006-01-04 10:47
Hi Fox,

Hi Fox,

Something I can help with!
You can open a .bat file with a text editor with the following procedure, at least in XP:
-list the directory/folder containing the .bat file in Windows Explorer or another file manager, like xplorer2.
-RIGHT click your mouse on the .bat file, which brings up the context-sensitive menu,
-the 'Edit' menu entry (#2 in my list) opens the .bat file in your default text editor (usually Windows Notepad).
You can then read the file, change it, save it, or exit without making any changes.

foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
Cool! I think I'm piecing it together at last...

... with the help of re-reading BuddhaChu's comments. I never saw an Edit option in the right-click menu before but I might have been so zoned in on expecting an "open with" option that I didn't see it. I'm like that sometimes.

So, thanks to you all, I edited (after making a copy for safekeeping) the .bat file and added exactly that format for configPath after MainWindow... that is, the space and two hyphens, configPath with that exact capitalization pattern and the full path to the OpenOfficePortable directory. Then I just ran the .bat file with the Run command in the start menu... didn't bother with the command prompt. It took a while to open the program but it did eventually open (and I think I might have been too impatient at this step in earlier tries, expecting a quicker response). Then on the Config tab I did have to navigate to the OpenOfficePortable/App/OpenOffice folder. Seems to be working so far. Now I just need to translate the accounts in the template into English. Wink

Thanks, everyone, for all your comments---especially BuddhaChu and alanbcohen.

Cheers!
---Fox

Cheers!
---Fox

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 5 months 3 hours ago
Joined: 2006-11-18 10:26
Cool beans.

Please post the contents of the .bat file here so other could use what you changed (I can't follow your description).

Post the command line(s) using the HTML tags please.

If I read your post correctly, you're pointing directly to the OO application directory withing the OpenOfficePortable directory structure. Launching OO this way may work, but I'm not 100% convinced it's "really" portable since it bypasses the OO launcher(s) in the root of OpenOfficePortable directory (That's what I was saying above in Edit3. Those launchers do all the heavy lifting on setting up the registry and whatnot to make OO portable. You could leave registry entries on the computers you use this app on. (This is being overly cautious...yiou'll need to investigate what is actually happening...try using the program regshot.)

BTW: I'm with ya on the old skewl programmer tip as I took Pascal freshman year of college 21 years ago. Wink

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

alanbcohen
Offline
Last seen: 5 years 3 months ago
Joined: 2006-01-04 10:47
Lots of old skewlers here.

Lots of old skewlers here. My first programming class (also in college) was Fall '68 and the language was CUPL; punch cards, paper tape, and RJE HASP! I don't know if there is still a copy of that compiler in storage anywhere.

BTW, I'm an accountant!

foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
.bat file

Here's the entire content of my gnuaccounting.bat file (with some line breaks inserted because when I previewed this, the content went to all one line, so I wasn't sure if it would post that way or actually wrap lines):

@echo off
java -Djava.library.path=. -cp ".\swt.jar;.\org.eclipse.core.commands_3.2.0.I20060605-1400.jar;
.\org.eclipse.equinox.common_3.2.0.v20060603.jar;.\org.eclipse.jface_3.2.1.M20060908-1000.jar;
.\org.eclipse.swt_3.2.1.v3235e.jar;.\noa-2.0.jar;.\unoil.jar;.\ridl.jar;.\hsqldb.jar;
.\bion_officebean-2.0.jar;.\juh.jar;.\bion_jurt-2.0.jar;." 
GUI/MainWindow --configPath="F:\PortableApps\OpenOfficePortable"

All I did to this file was add that last bit after MainWindow (starting with --configPath).

Works like a charm.

(This is being overly cautious...yiou'll need to investigate what is actually happening...try using the program regshot.)
Thanks, I'll try that and let you know if I find anything.

Cheers!
---Fox

Cheers!
---Fox

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 5 months 3 hours ago
Joined: 2006-11-18 10:26
not portable

So you're using a drive letter on the commmand line? That's not very "portable". Have you tried using a relative path like ..\..\PortableApps\OpenOfficePortable (or whatever it works out to be?)

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
Not very "portable"

It took me a bit to figure out what you meant by that. I believe you meant that the drive letter for the portable device could be different on different machines, which of course is true. It happens to be the same on the three machines I use, so I didn't give it a second thought.

I'm not sure what's involved in relative paths. What do each of the ..\ account for? (Well, obviously one is for the current device's drive.) What I mean is, wouldn't the relative path for the example I gave be just --configPath="..\PortableApps\OpenOfficePortable" and if not, why not?

Cheers!
---Fox

Cheers!
---Fox

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 5 months 3 hours ago
Joined: 2006-11-18 10:26
Each "..\" points to the

Each "..\" points to the directory higher up the directory tree toward the root of the drive. You can use multiple ..\..\ to drill back to the root of the drive and then back down into another directory.

Example:

If you're "in" the F:\PortableApps\GnuAccountingPortable\App\GnuAccounting directory and you want to point to the F:\PortableApps\OpenOfficePortable directory

"..\..\..\" points to the PortableApps directory (up three directories)

Navigate "back down" the directory tree to the directory you want to point to.

..\..\..\OpenOfficePortable is the answer.

(Modify the above for your exact setup and file/directory locations).

Note: the trailing slash isn't really necessary as 'dir ..\..\' and 'dir ..\..' do the same thing. I just do it for consistency because a lot of times you'll be pointing to a filename and not a directory in a batch/config/HTML file.

A good way to practice to get the hang of it and tell where you're at in the directory tree is running a command prompt, drilling down to some directory in the \PortableApps structure, and then execute a command like 'dir ..\' or 'dir ..\..\' (drop the single quotes naturally).

Info for HTML coding, but it's the same exact idea only in a command prompt I'm talking about or running a program in another directory from the current one or pointing to a certain directory: http://web.bentley.edu/empl/c/rcrooks/toolbox/basics/b_1_1a.html

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

foxcole
Offline
Last seen: 2 months 2 days ago
Joined: 2007-05-26 16:30
What an excellent reply!

Wow. Thank you for that clear, concise, thorough and thoughtful reply, BuddhaChu! I can't express how much I appreciate your helping me learn (or probably, in my case, re-learn) something so useful.

Cheers!
---Fox

Cheers!
---Fox

Log in or register to post comments