Code signing certificate for windows

We encounter several problems when we tried to deploy our new version of ORM Designer – Skipper to our new web site skipper18.com. Although new Skipper installer is very simmilar to ORM Designer installer, when downloading this exe-file from the new site  we are getting this error:

installer.exe is not commonly downloaded and could harm your computer

IE_No_Digital_Signature

 

The problem is somewhere in chrome/IE when evaluating downloaded file. Probably combination of new site, new executable and new name of product is the problem.

To fix this issue, we decided to sign-in installer and application executable by Code-signing certificate. There are a lot of certificate providers and the costs are very different. A lot of providers are selling these certificate for around $500/year. Fortunately it’s possible to found certificates also for $75 – $95/year. The cheapest one is from tucows.com but based on the site and additional tools I decided for ksoftware.net, The price $95/year isn’t so different but they offer also command line and GUI signing tool for their certificates called kSign.

Order process

Fill your company details, pay with paypal and wait until someone from Comodo will contact you with additional details. It’s necessary to have the same contact information on the domain registration as on certificate registration. It is also necessary to have company registered in one of publicly available lists with the same company information as on certificate registration.

Next step is a validation through phone call. It is a quick call when you confirm registration info through the call in order to verify your phone number. Phone call is the last necessary step and then you receive email with certificate:

Windows developer certificate

Usage

Signing of the application and installer is pretty easy. K-Software offers two applications for this purposes. The first one is with GUI, second one is command line based. Both applications need only few parameters like where the certificate is stored, certificate password, application description, link and executable location:

kSign

Command line application is executed through following command:

kSignCMD.exe /d "Skipper application" /du "http://www.skipper18.com" /f PATH\certificate.pfx /p PASSWORD PATH\Skipper.exe

And that’s all. Now if you checked your executable through properties in Windows explorer, you see that your application is correctly signed:

Signed application

External links

How to solve problem “version `GLIBC_2.14′ not found”

Simpliest solution

There is a several ways how you can deal with this problem. I think the easiest (and solution I choose) is compile application on the most oldest version of OS you want support. Here is the reason:


For dynamic linking, Linux (and most other UNIXes) support backward compatibility: an old binary continues to work on newer systems. But they don’t support forward compatibility (a binary built on a newer system will generally not run on an older one).

External links:

Another solutions

Here is a nice list how can be this issue solved (source here):

  • You could copy ld-2.14.so (the target of /lib/ld-linux symlink) to the target system, and invoke it explicitly: /path/to/ld-2.14.so –library-path /path/to/your/executable. This generally works, but can confuse an application that looks at argv[0], and breaks for applications that re-exec themselves.
  • You could build on an older system.
  • You could use appgcc.
  • You could set up a chroot environment matching the target system, and build inside that chroot.
  • You could build yourself a Linux-to-olderLinux crosscompiler

One more solution

You can also try following way, but I don’t test it

#include <limits.h>
#include <stdlib.h>
#include <stdio.h>

__asm__(".symver realpath,realpath@GLIBC_2.2.5");
int main()
{
   char* unresolved = "/lib64";
   char  resolved[PATH_MAX+1];

   if(!realpath(unresolved, resolved))
      { return 1; }

   printf("%s\n", resolved);

   return 0;
}

How to create .DEB package for Unix Debian-like systems

This guide isn’t complete. Create valid .DEB file is a much harder than I thought. So I will create .DEB file (and update this article) when I will have a more free time.

This is how now looks lintian result ;-( :

dev@user-virtual-machine:~/dev/Applications/AtomixDevelopment/DeployInfo/Ubuntu$ lintian ormdesigner.deb 
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/OrmDesigner2
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/OrmDesigner2
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libQtCore.so.4
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libQtGui.so.4
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_chrono.so
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_chrono.so
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_chrono.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_chrono.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_date_time.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_date_time.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_regex.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_regex.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_system.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_system.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_thread.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_thread.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libexslt.so.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libxml2.so.2
E: orm-designer: embedded-library usr/share/orm-designer/libs/libxml2.so.2: libxml2
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libxslt.so.1
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libyaml-cpp.so.0.2
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libyaml-cpp.so.0.2
W: orm-designer: unknown-control-file control~
E: orm-designer: control-file-has-bad-permissions postinst 0775 != 0755
E: orm-designer: control-file-has-bad-owner postinst dev/dev != root/root
W: orm-designer: unknown-control-file postinst~
E: orm-designer: control-file-has-bad-permissions postrm 0775 != 0755
E: orm-designer: control-file-has-bad-owner postrm dev/dev != root/root
W: orm-designer: unknown-control-file postrm~
E: orm-designer: no-copyright-file
W: orm-designer: extended-description-line-too-long
W: orm-designer: package-relation-with-self breaks: orm-designer (<< 2.0.1)
E: orm-designer: wrong-file-owner-uid-or-gid usr/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/share/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/share/orm-designer/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/OrmDesigner2 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/OrmDesigner2 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/share/orm-designer/libs/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libQtCore.so.4 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libQtGui.so.4 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_chrono.so 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_chrono.so 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_chrono.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_chrono.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_date_time.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_date_time.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_regex.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_regex.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_system.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_system.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_thread.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_thread.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libexslt.so.0 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libxml2.so.2 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libxslt.so.1 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libyaml-cpp.so.0.2 1001/1001
W: orm-designer: maintainer-script-ignores-errors postinst
W: orm-designer: maintainer-script-ignores-errors postrm~
W: orm-designer: maintainer-script-ignores-errors postrm
W: orm-designer: maintainer-script-ignores-errors postinst~
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_chrono.so 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_chrono.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_date_time.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_regex.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_system.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_thread.so.1.49.0 0775

Prerequisities

sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder

Commands

#creates .deb file
dpkg -b ormdesigner-2.0.1 ormdesigner.deb

#validate .deb file
lintian ormdesigner

How to add screenshot to .DEB file

http://screenshots.debian.net/
http://stackoverflow.com/questions/4776624/how-to-create-deb-package-with-screenshot-for-ubuntu

Errors

E: orm-designer: wrong-file-owner-uid-or-gid usr/ 1001/1001
...

External links

http://www.ibm.com/developerworks/linux/library/l-debpkg/index.html
How to create DEB from source files
How to remove some litian errors

Linux c++ linker – “ld terminated with signal 9”

The linker error “ld terminated with signal 9” is caused by low amount of memory for link process. There are two ways how to fix it.

  • First way is increase computer / virtual machine memory.
  • Second way is by increasing swap file size.

How to increase swap file size

#create new swap file 512x1M size filled with zeros
sudo dd if=/dev/zero of=/extraswap bs=1M count=512

#setup file as a swap file
sudo mkswap /extraswap

#enable created swapfile
sudo swapon /extraswap

If you want to use this swap file also after your computer reboot, you have to do also following steps:

#edit fstab
sudo nano /etc/fstab

#add following line to /etc/fstab
/extraswap           swap                    swap    defaults        0 0

[/sourcecode]

Additional swap-file commands

Here is a list of additional commands which can be useful when working with swap file


#show memory information in KB
free -k

#show existing swap file sizes in KB
swapon -s

External articles about this subject:

http://www.thegeekstuff.com/2010/08/how-to-add-swap-space/

https://www.linux.com/learn/tutorials/442430-increase-your-available-swap-space-with-a-swap-file

http://www.saicharan.in/blog/2009/06/30/ld-terminated-with-signal-9/

SandyBridge

CPU

http://www.alza.cz/intel-core-i7-2600k-quad-core-sandy-bridge-d201345.htm

http://www.alfacomp.cz/php/product.php?eid=1051400830984YJ12YG

http://interlink.tsbohemia.cz/intel-core-i7-2600k-3-40ghz-8mb-box-lga1155-sandy-bridge-s-integrovanou-grafikou-odemceny-nasobic_d116932.html

http://www.czechcomputer.cz/product.jsp?artno=85286

http://www.mironet.cz/intel-core-i72600k-quad-core–34-ghz–8mb-cache–1155–box–overclocking+dp117723/

MB

http://interlink.tsbohemia.cz/komponenty-it-zakladni-desky-desktopove-intel-bez-vga-socket-1155_c10856.html

http://www.alfacomp.cz/php/product.php?eid=10514008M0984YC12H4

http://www.czechcomputer.cz/product.jsp?artno=84646

http://www.alza.cz/asus-p8p67-pro-d202981.htm

RAM

http://interlink.tsbohemia.cz/dimm-ddr3-4096mb-2000-dc-kit-2×2048-transcend-9-9-9-24-axeram_d94573.html

http://interlink.tsbohemia.cz/dimm-ddr3-4096mb-2400-dc-kit-2×2048-transcend-9-11-9-28-axeram_d109507.html

http://www.alza.cz/a-data-4gb-kit-ddr3-1600mhz-cl7-xpg-series-d214745.htm

MONITOR

http://www.alza.cz/lcd-monitory/24-a-vetsi-lcd/18843375.htm#CatId=18843375&limit=&prod=1396,1287,&pn=&Pg=0


Another example from application logic

Here is one more example which I think is interested ;-).

Imagine that Alice makes a party and pays some money. One of this operation can look like this. Alice pays $200 for some purchase which is for her and next three person. Then application will counts, that each of these three people owes $50 to Alice.

Pretty nice, right? 😉

Party cash application diagram

As the first thing in Part-cash application development we brainstormed an application diagram. I think that during time some screens will be extended or modified, but major part of the app will be the same. And here is a screenshot of our whiteboard after three hours of drawing and erasing 😉

Party money – what it might be

Few years ago I created a simple small application for windows mobile, which we used with our friends to track our group expenses during our life at campus. Those days we called the application “Blbnik”, what in english means something like “Dummier” 🙂 We used the application about two years until we had changed windows mobile phones to symbian phones. After that, we have forgotten this app and there hasn’t been any plans to develop a new version. Until now 😉 Because I want to try another project, and mobile projects have currently a great potential, I decided to reborn this idea and create it for mobile devices.

Because I’ve always worked in Visual C++, I searched for a project which would enable me to create an iPhone app using this environment. After reading lot of websites and reviews, I decided to give a try to Airplay SDK project. They promise multiplatform framework, when I create one application using Visual C++ and then compile the final executable application to several platforms like iOs, Symbian, Badu, Windows Mobile, etc (list of all platforms here). Looks promissing, we will see if everything will be so simply 😉

Welcome to my blog

Hi, I greet everybody who came to this blog 😉

My name is Ludek Vodicka and I’m a C++ developer.

I have created this blog because till now I have worked on many projects, but none of them has any history log or screenshots from its development. My previous and still active project ORM Designer has also a blog, but I started blogging just after majority of work has been done. And after two years of development it is a shame that I don’t have any screenshots from the first aplha version or don’t have any notes from the first days of development.

So I decided to start this blog where I will put all my notes, alpha screenshots and piece of knowledge about my next project – Party money. I suppose and hope that I will add to this blog all relevant informations about this and maybe about my next projects. So maybe after few months or years this blog would become a usefull logbook of all work made on projects of mine.