How to install freelancer.com desktop app on arch linux

The first step, of course, is to download the deb package. In my case I downloaded Ubuntu 64 bit.

Freelancer Desktop App on Arch Linu

To extract the package you will have to install dpkg and lsb-release.

[amado@gravedigger ~]$ sudo pacman -S lsb-release
[amado@gravedigger ~]$ yaourt -S dpkg

Unpack the archive

http://www.practicalweb.co.uk/blog/2008/06/08/how-to-manually-unpack-a-deb-file/

[amado@gravedigger install-freelancerapp]$ mkdir temp
[amado@gravedigger install-freelancerapp]$ dpkg -x freelancer-desktop-app_ubuntu-amd64.deb ./temp/

Navigate to temp/opt/freelancer-desktop-app/:

[amado@gravedigger opt]$ cd temp/opt/freelancer-desktop-app/
[amado@gravedigger freelancer-desktop-app]$ ls
total 824
drwxr-xr-x 4 amado amado   4096 Oct  2 03:27 .
drwxr-xr-x 3 amado amado   4096 Oct  2 03:27 ..
drwxr-xr-x 4 amado amado   4096 Oct  2 03:27 base
drwxr-xr-x 6 amado amado   4096 Oct  2 03:27 runtime
-rw-r--r-- 1 amado amado      6 Oct  2 03:27 app.version
-rwxr-xr-x 1 amado amado 818215 Oct  2 03:27 freelancer-desktop-app
-rw-r--r-- 1 amado amado      6 Oct  2 03:27 runtime.version

Execute the App

According to: https://bbs.archlinux.org/viewtopic.php?id=204766 we have to launch the app, unpack some jar files, rename them.

[amado@gravedigger freelancer-desktop-app]$ ./freelancer-desktop-app --skip-update
Executable: "/home/amado/t/install-freelancerapp/temp/opt/freelancer-desktop-app/freelancer-desktop-app"
Copying base files ...
Base files copied.
Acquiring lock for app ...
Launching application: app
Working dir: "/home/amado/.freelancer-desktop-app/install"
Exception in thread "main" java.lang.NoClassDefFoundError: com/freelancer/gemini/launcher/Main
Caused by: java.lang.ClassNotFoundException: com.freelancer.gemini.launcher.Main
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Now, its time to fix a few things. According to the solution posted on the arch forums, you must unpack the following jar files contained in ~/.freelancer-desktop-app/install/.

[amado@gravedigger freelancer-desktop-app]$ cd ~/.freelancer-desktop-app/install/
[amado@gravedigger install]$ pwd
/home/amado/.freelancer-desktop-app/install
[amado@gravedigger install]$ ls
total 16
drwxrwx--- 4 amado amado 4096 Dec  9 15:33 .
drwxrwx--- 3 amado amado 4096 Dec  9 15:33 ..
drwxrwx--- 3 amado amado 4096 Dec  9 15:33 app
drwxrwx--- 3 amado amado 4096 Dec  9 15:33 updater
[amado@gravedigger install]$ tree
.
|-- app
|   `-- lib
|       |-- autoconfig-0.2.1.jar.pack.gz
|       |-- commons-beanutils-1.8.3.jar.pack.gz
|       |-- commons-collections-3.2.1.jar.pack.gz
|       |-- commons-compiler-2.6.1.jar.pack.gz
|       |-- commons-digester-1.8.1.jar.pack.gz
|       |-- commons-logging-1.2.jar.pack.gz
|       |-- commons-validator-1.4.1.jar.pack.gz
|       |-- controlsfx-8.20.8.jar.pack.gz
|       |-- dagger-1.2.2.jar.pack.gz
|       |-- dev-2.4.3.jar.pack.gz
|       |-- domain-2.4.3.jar.pack.gz
|       |-- easybind-1.0.3.jar.pack.gz
|       |-- event-2.4.3.jar.pack.gz
|       |-- extension-2.4.3.jar.pack.gz
|       |-- flowless-0.4.4.jar.pack.gz
|       |-- frontend-2.4.3.jar.pack.gz
|       |-- gson-2.3.jar.pack.gz
|       |-- guava-18.0.jar.pack.gz
|       |-- imgscalr-lib-4.2.jar.pack.gz
|       |-- jackson-core-asl-1.9.13.jar.pack.gz
|       |-- jackson-mapper-asl-1.9.13.jar.pack.gz
|       |-- janino-2.6.1.jar.pack.gz
|       |-- javatuples-1.2.jar.pack.gz
|       |-- javax.inject-1.jar.pack.gz
|       |-- jetty-io-9.1.5.v20140505.jar.pack.gz
|       |-- jetty-util-9.1.5.v20140505.jar.pack.gz
|       |-- joda-time-2.5.jar.pack.gz
|       |-- jsr305-1.3.7.jar.pack.gz
|       |-- logback-classic-1.1.2.jar.pack.gz
|       |-- logback-core-1.1.2.jar.pack.gz
|       |-- main-2.4.3.jar.pack.gz
|       |-- okhttp-2.1.0.jar.pack.gz
|       |-- okhttp-urlconnection-2.1.0.jar.pack.gz
|       |-- okio-1.0.1.jar.pack.gz
|       |-- openjfx-dialogs-1.0.2.jar.pack.gz
|       |-- pandafx-2.4.3.jar.pack.gz
|       |-- reactfx-2.0-M4.jar.pack.gz
|       |-- retrofit-1.8.0.jar.pack.gz
|       |-- rxjava-1.0.0.jar.pack.gz
|       |-- slf4j-api-1.7.7.jar.pack.gz
|       |-- websocket-api-9.1.5.v20140505.jar.pack.gz
|       |-- websocket-client-9.1.5.v20140505.jar.pack.gz
|       `-- websocket-common-9.1.5.v20140505.jar.pack.gz
`-- updater
    `-- lib
        |-- aopalliance-1.0.jar.pack.gz
        |-- app.jar.pack.gz
        |-- asm-3.1.jar.pack.gz
        |-- async-http-client-1.8.9.jar.pack.gz
        |-- cglib-2.2.1-v20090111.jar.pack.gz
        |-- commons-compiler-2.6.1.jar.pack.gz
        |-- commons-compress-1.7.jar.pack.gz
        |-- controlsfx-8.0.5.jar.pack.gz
        |-- core.jar.pack.gz
        |-- env.jar.pack.gz
        |-- guava-17.0.jar.pack.gz
        |-- guice-3.0.jar.pack.gz
        |-- jackson-annotations-2.3.0.jar.pack.gz
        |-- jackson-core-2.3.3.jar.pack.gz
        |-- jackson-databind-2.3.3.jar.pack.gz
        |-- janino-2.6.1.jar.pack.gz
        |-- javax.inject-1.jar.pack.gz
        |-- logback-classic-1.1.2.jar.pack.gz
        |-- logback-core-1.1.2.jar.pack.gz
        |-- netty-3.9.1.Final.jar.pack.gz
        |-- slf4j-api-1.7.7.jar.pack.gz
        |-- truezip-driver-file-7.7.6.jar.pack.gz
        |-- truezip-driver-tar-7.7.6.jar.pack.gz
        |-- truezip-file-7.7.6.jar.pack.gz
        |-- truezip-kernel-7.7.6.jar.pack.gz
        |-- truezip-path-7.7.6.jar.pack.gz
        `-- xz-1.4.jar.pack.gz

4 directories, 70 files

Now, the trick is to unpack and rename all the jar files.

You do that with the following commands:

[amado@gravedigger install]$ find -type f -name '*.jar.*' -exec unpack200 -r {} {}.jar \;
[amado@gravedigger install]$ for f in `find -type f -name '*.jar'`; do [[ $f =~ (.*).jar.pack.gz.jar$ ]] && mv "$f" "${BASH_REMATCH[1]}.jar"; done;

So that you end up with this:

[amado@gravedigger install]$ tree
.
|-- app
|   `-- lib
|       |-- autoconfig-0.2.1.jar
|       |-- commons-beanutils-1.8.3.jar
|       |-- commons-collections-3.2.1.jar
|       |-- commons-compiler-2.6.1.jar
|       |-- commons-digester-1.8.1.jar
|       |-- commons-logging-1.2.jar
|       |-- commons-validator-1.4.1.jar
|       |-- controlsfx-8.20.8.jar
|       |-- dagger-1.2.2.jar
|       |-- dev-2.4.3.jar
|       |-- domain-2.4.3.jar
|       |-- easybind-1.0.3.jar
|       |-- event-2.4.3.jar
|       |-- extension-2.4.3.jar
|       |-- flowless-0.4.4.jar
|       |-- frontend-2.4.3.jar
|       |-- gson-2.3.jar
|       |-- guava-18.0.jar
|       |-- imgscalr-lib-4.2.jar
|       |-- jackson-core-asl-1.9.13.jar
|       |-- jackson-mapper-asl-1.9.13.jar
|       |-- janino-2.6.1.jar
|       |-- javatuples-1.2.jar
|       |-- javax.inject-1.jar
|       |-- jetty-io-9.1.5.v20140505.jar
|       |-- jetty-util-9.1.5.v20140505.jar
|       |-- joda-time-2.5.jar
|       |-- jsr305-1.3.7.jar
|       |-- logback-classic-1.1.2.jar
|       |-- logback-core-1.1.2.jar
|       |-- main-2.4.3.jar
|       |-- okhttp-2.1.0.jar
|       |-- okhttp-urlconnection-2.1.0.jar
|       |-- okio-1.0.1.jar
|       |-- openjfx-dialogs-1.0.2.jar
|       |-- pandafx-2.4.3.jar
|       |-- reactfx-2.0-M4.jar
|       |-- retrofit-1.8.0.jar
|       |-- rxjava-1.0.0.jar
|       |-- slf4j-api-1.7.7.jar
|       |-- websocket-api-9.1.5.v20140505.jar
|       |-- websocket-client-9.1.5.v20140505.jar
|       `-- websocket-common-9.1.5.v20140505.jar
`-- updater
    `-- lib
        |-- aopalliance-1.0.jar
        |-- app.jar
        |-- asm-3.1.jar
        |-- async-http-client-1.8.9.jar
        |-- cglib-2.2.1-v20090111.jar
        |-- commons-compiler-2.6.1.jar
        |-- commons-compress-1.7.jar
        |-- controlsfx-8.0.5.jar
        |-- core.jar
        |-- env.jar
        |-- guava-17.0.jar
        |-- guice-3.0.jar
        |-- jackson-annotations-2.3.0.jar
        |-- jackson-core-2.3.3.jar
        |-- jackson-databind-2.3.3.jar
        |-- janino-2.6.1.jar
        |-- javax.inject-1.jar
        |-- logback-classic-1.1.2.jar
        |-- logback-core-1.1.2.jar
        |-- netty-3.9.1.Final.jar
        |-- slf4j-api-1.7.7.jar
        |-- truezip-driver-file-7.7.6.jar
        |-- truezip-driver-tar-7.7.6.jar
        |-- truezip-file-7.7.6.jar
        |-- truezip-kernel-7.7.6.jar
        |-- truezip-path-7.7.6.jar
        `-- xz-1.4.jar

4 directories, 70 files
[amado@gravedigger install]$ pwd
/home/amado/.freelancer-desktop-app/install

Execute the app!

Finally, go back to where we extracted the deb archive, and execute the app one more time:

[amado@gravedigger install]$ cd ~/t/install-freelancerapp/
[amado@gravedigger install-freelancerapp]$ ./temp/opt/freelancer-desktop-app/freelancer-desktop-app --skip-update
Executable: "/home/amado/t/install-freelancerapp/temp/opt/freelancer-desktop-app/freelancer-desktop-app"
Current: 1.3.1 Installed: 1.3.1
Acquiring lock for app ...
Launching application: app
Working dir: "/home/amado/.freelancer-desktop-app/install"

Boom! You’re done!

installed