A usable DraftSight Debian package

Update (2014-07-08): I found easier, better ways to handle DWG files on GNU/Linux and other free-as-in-freedom platforms and/or using gratis software.

The proprietary DWG file format is so widespread that dealing with it is almost non avoidable; those who like to use GNU/Linux and other free-as-in-freedom OSes have in recent years appreciated Dassaoult Systems: even if they kept their entry-level CAD DrafSight proprietary CAD ((I will write about the status of DWG one of these days ))  they offer it for download without requiring any payment, for GNU/Linux, Windows and MacOS. It’s not like having a public repository for the sources released under GPL but at least it’s not a step directly opposed to freedom in IT (which has almost nothing related to monetary prices).

When I switched to 64 bit machines I found that the binary package does not install “out of the box”. Yet it is possible to install it on 64 bits machines making some changes to package following the instructions found in the post “DraftSight and Ubuntu 12.04 LTS 64bit” in Linux Aided Design blog.

Since DraftSight license expires each and every year you may find a little script of mine quite useful. I put it on GitHub at fix-drafsight. It will automatically fix the uninstallable package provided creating a new version of the package that will install flawlessly on 64 bit machines. I tried it on Ubuntu 12.04 and 13.10. Please let me know if it works or not on other distributions. Any feedback is wellcome.

It currently require you to download separately the Debian/Ubuntu package from 3ds.com.

Here’s you can read it in all its glory, updated on 2014-02-05 as suggested by Francesco Guerricchio.

There are some things missing:

  • automating download of current release
  • automatic installation
  • make the code easier to read, explaining better what each command do.

13 Responses

  1. Eli says:

    Looks like a good script, but when I click download, all I get is a page that says “No input file specified.”

    • Thank you for your notice. I discovered that the plugin I’m using for this (WP-Syntax Download Extension) has some glitches that I haven’t been able to hammer out. Nevertheless you can easily download the scripWP-Syntax Download Extensiont from the github repository

  2. Sadly things are much more difficult on an x64 Debian 7

  3. lusmo says:

    Great idea, but no more worked. But thank You for Your work!

  4. Hi Paolo,
    I have updated our script as suggested by Lusmo. Here the script:

    #!bin/sh

    ## Fix a DraftSight Debian package to make it installable on a 64bit machine.

    ## Last known realease is http://dl-ak.solidworks.com/nonsecure/draftsight/V1R4.0/draftSight.deb

    ORIGINAL=draftSight.deb
    PACKAGE=fixed-$ORIGINAL

    if ! test -f $ORIGINAL
    then
    echo $ORIGINAL file does not exist.
    PACKAGE=$(zenity –file-selection –filename=draftSight.deb –file-filter=deb)
    fi

    echo Copying $ORIGINAL into $PACKAGE
    cp $ORIGINAL $PACKAGE || exit 5;

    echo Extracting control.tar.gz
    ar x $PACKAGE control.tar.gz || exit 5;

    echo Unpacking control.tar.gz into control directory
    mkdir –parent control || exit 5;
    tar -zxf control.tar.gz –directory control || exit 5;
    mv control.tar.gz control.tar.gz.orig

    echo “Removing wrong dependency (xdg-utils)”
    if sed –in-place -e “s/ xdg-utils,//” control/control
    then
    echo Repacking contents of ‘control’ directory into control.tar.gz
    (cd control; tar –create –file ../control.tar *) || exit 5;
    gzip –best –no-name control.tar
    echo Storing patched control.tar.gz back into $PACKAGE;
    ar r $PACKAGE control.tar.gz || exit 5;
    echo Draftsight original package $ORIGINAL patched into $PACKAGE

  5. Someone says:

    Please do write about DWG. There is not a lot of solid information on the current status of DWG + open source at this time. I stumbled across your article, and would be intrigued as to what the methods you suggest actually are.

    What I’ve looked at so far
    * lx-viewer – not tried, but seems abandoned (QT3? – we are up to QT5 now…)
    * dwg2dxf – not actually open source, and wont work on 64 bit systems, due to precompiled lib.
    * librecad – no DWG support at this time. BSD licence constraint means they wont work with openDWG, which is GPLd. IMHO, they could switch to GPL, as no-one will re-use their code as a lib.
    * Freecad : – doesn’t work in debian : “Teigha File Converter not found, DWG support is disabled”

    so… nice to know how it is done these days!

  1. 4 May 2014

    […] A usable DraftSight Debian package ::: Monodes […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: