Changes in the way the application is set up

72 views
Skip to first unread message

Jad Kik

unread,
Jan 21, 2013, 8:13:31 PM1/21/13
to coinb...@googlegroups.com
Hey everyone!

I just made 2 big improvements in the way the application is set up! :)

You can now have a Windows installer and there is an integration with setuptools. This means 2 things: it will make it easier for you to install it, and it will make it easier for developers to develop.

BUT there will be some things you have to change if you already have it set up on your machine. I'll update the guides on the website shortly, but for now this is roughly the steps you have to take to make it work:
  1. Create a directory for all of this: mkdir coinbox; cd coinbox
  2. Clone coinbox-core: git clone https://github.com/coinbox/coinbox-core.git core
  3. Create a directory for the modules: mkdir mod; cd mod
  4. Clone any module you need (e.g. base, ...) (call it XXXX): git clone https://github.com/coinbox/coinbox-mod-XXXX.git XXXX
  5. Then install each one: cd XXXX; python setup.py develop; cd ..
  6. Go back to core: cd ../core
  7. Run the configuration: python coinbox.py config
  8. Configure database (let's say default)
  9. Run it! python coinbox.py
There are much more innovations this setup allows, but I'll leave it here for now. And I'll upload the windows installer tomorrow.

In the meantime, if you want to build it yourself:
  1. Install pyinstaller
  2. cd to the core directory
  3. python /path/to/pyinstaller tools/coinbox.spec
  4. Install NSIS
  5. Right-click on coinbox.spec (on Windows of course) and press compile
  6. You'll find a file called "coinbox-installer". And that's it.
That's it for now!

Jonathan Aquilina

unread,
Jan 22, 2013, 12:39:45 AM1/22/13
to coinb...@googlegroups.com
Why not use Cmake as its a cross compilation make setup? It will make compiling for mac and linux easier as well


--
You received this message because you are subscribed to the Google Groups "Coin Box POS" group.
To post to this group, send email to coinb...@googlegroups.com.
Visit this group at http://groups.google.com/group/coinboxpos?hl=en.
 
 



--
Jonathan Aquilina

Jad Kik

unread,
Jan 22, 2013, 8:20:47 AM1/22/13
to coinb...@googlegroups.com
There are tools which are tailored to the needs of Python applications (like PyInstaller and cx_Freeze) which make it easier for the developers to cross compile, without having to worry about compiling Python itself and setting up the appropriate environment. If we were to use cmake, we would have to worry about compiling Python, which is really not worth it and a project on its own. There are much more convenient ways to use Python on many platforms, and that's part of why we used Python in the first place.

Jonathan Aquilina

unread,
Jan 22, 2013, 8:39:53 AM1/22/13
to coinb...@googlegroups.com

Why not make it web based from the start and we use the django python web framework. easy to setup and an all platform solution

Benjamin Burt

unread,
Jan 22, 2013, 9:08:57 AM1/22/13
to Coin Box POS - Main Mailing list
>>Jad: Then install each one: cd XXXX; python setup.py develop; cd ..

you forgot to mention that you my need to use sudo command for this part of the setup

>>Jonathan: Why not make it web based from the start and we use the django python web framework. easy to setup and an all platform solution

:) , This was one of the BIG question in the very beginning of development because Miguel had been working on a django project at the time. The reason we did not do that was because of dependancies. We wanted to create a program that had the least amount of dependancies but with the most flexibility. So that is how we came up with Python + SqlAlchemy. Django has a ORM but because it was not as flexible as SqlAlchemy we dropped that idea. One of the goals with the code is to make it clean MVC (model, view, controller) so that the Python part is the model that can be used with many view/controller setups.

I am still planning on sending some of the old emails from Miguel, Jad and I's conversations from the early stages of "development" (when we first started talking). But that is a good question Jonathan. :)

-Ben


Jad Kik

unread,
Jan 22, 2013, 11:52:58 AM1/22/13
to coinb...@googlegroups.com
Well, it **already** is an all platform solution :)

But if we want to bundle it as a Windows installer, you will have to compile it somehow. Or let users install Python and run Coinbox on it (all the dependencies will be handled with setuptools or pip), kind of similar to the Java Runtime Environment...

The application did not start as a web project. If we were to make it web based, we would have chosen django. But then again, how would you make it easy for users to install it? Will you let them set up a web server on their own? Or compile it in some way for Windows users? Here you are with the same problem :)

Jonathan Aquilina

unread,
Jan 22, 2013, 1:45:25 PM1/22/13
to coinb...@googlegroups.com
Think of it this way alot of advantages there are in terms of using the django python web framework.

1) interfaces with my database servers, and the database design is done from the django project itself.
2) can run on local host or a remote server to allow easy connection of multiple point of sales systems to a single remote machine regardless of the os.
3) installation can be scripted.

Python you can download the executable or we bundle python with the project.

Jad Kik

unread,
Jan 22, 2013, 2:07:26 PM1/22/13
to coinb...@googlegroups.com


On Tuesday, January 22, 2013 8:45:25 PM UTC+2, eagles051387 wrote:
Think of it this way alot of advantages there are in terms of using the django python web framework.

1) interfaces with my database servers, and the database design is done from the django project itself.

The database can be on any host as long as it is accessible from the client machine.
 
2) can run on local host or a remote server to allow easy connection of multiple point of sales systems to a single remote machine regardless of the os.

Why do you need a web framework for that feature? If only the database is on a host machine, the same applies. If anything, a web framework will require some form of an REST API, which adds more complexity for no added benefit. And if you are thinking of some other kind of server (not an HTTP server), then this is irrelevant to Django, and can be implemented separately.
 
3) installation can be scripted.

Installation can be scripted here too. The executable and installer for Windows are just an added convenience, you can just install Windows and it rolls out nicely, without much change (if any).
 

Jonathan Aquilina

unread,
Jan 23, 2013, 1:19:59 AM1/23/13
to coinb...@googlegroups.com
What do you mean by REST API?

Jad Kik

unread,
Jan 23, 2013, 7:57:20 AM1/23/13
to coinb...@googlegroups.com
Just for example a page where you can add/delete/edit things. Similar to the Facebook API, and most APIs usually. See this answer on Stackoverflow:

http://stackoverflow.com/a/671132/1043456

Jonathan Aquilina

unread,
Jan 23, 2013, 8:15:36 AM1/23/13
to coinb...@googlegroups.com
Here is some serious food for thought.

What hard ware are we going to support in terms of receipt printers etc that is necessary in a point of sales systems like cash drawer etc? 

Benjamin Burt

unread,
Jan 23, 2013, 9:32:17 AM1/23/13
to Coin Box POS - Main Mailing list
That is a good question Jonathan, but it does not go with the "Subject" of this email. So I made a new email that will helps us all answer this question, because we have not talked about it yet. The code is still in an early stage, but thank you for asking this question.  :)

-Ben

Jonathan Aquilina

unread,
Jan 23, 2013, 9:35:46 AM1/23/13
to coinb...@googlegroups.com
No problem. Just to clarify what language and frame work if any has been decided?

Benjamin Burt

unread,
Jan 23, 2013, 10:20:04 AM1/23/13
to Coin Box POS - Main Mailing list
:)

Well what we have decided is to use...

Python with SqlAlchemy - frame work, this we are building from nothing, because what we needed we could not find.

1. Python for main functions and calculations

2. SqlAlchemy for accessing the database information

The UI can be anything, but we are using Qt4 because Miguel was familiar with it and Jad picked it up easily.

Our main focus right now is to build a workable "basic" application. The definition of "basic" is taken from my experience from working at my families ~31 year old convenience store (about 14 years working at it ~2 year running it) and remodeling a part of it into a restaurant (about 1 year running).

-Ben

Jonathan Aquilina

unread,
Jan 23, 2013, 10:28:06 AM1/23/13
to coinb...@googlegroups.com
UI why not keep it web based as it woudl greatly make things easier imho in terms of portability especially if we are wanting ot target mobile devices as well

Benjamin Burt

unread,
Jan 23, 2013, 10:53:10 AM1/23/13
to Coin Box POS - Main Mailing list
>>UI why not keep it web based as it woudl greatly make things easier imho in terms of portability especially if we are wanting ot target mobile devices as well

We are targeting desktops/laptops first, and the reason for that is because most people already have one of those.

-Ben

eagles051387

unread,
Jun 22, 2014, 3:50:42 AM6/22/14
to coinb...@googlegroups.com
Hey Guys,

Sorry to bump this thread again are the steps below still accurate or have things changed.

If they have changed could we get a thread with step by step setup instructions. Reason for asking is since we do not have a website where you can just point people to, I was thinking it woudl be a good idea to have a thread with the steps for now.

Regards
Jonathan
Reply all
Reply to author
Forward
0 new messages