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.
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
Sadly things are much more difficult on an x64 Debian 7
Great idea, but no more worked. But thank You for Your work!
PS: There is a little change only:
xdg-utils, must be removed instead of libdirectfb-extra (>=1.2.7-2),
and everything works fine!
Have a nice day! 🙂
Thanks for the hint, I’ll update my script ASAP.
These days I’ve been quite busy; among the other things I’ve been trying to build a package for Debian but it’s harder than I thought.
I see. But, good work! 🙂
I have updated our script as suggested by Lusmo. Here the script:
## 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
if ! test -f $ORIGINAL
echo $ORIGINAL file does not exist.
PACKAGE=$(zenity –file-selection –filename=draftSight.deb –file-filter=deb)
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
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
Thanks! I updated the post.
BTW, there were a “fi” missing at the end, I’m sure it remained stuck in the mouse pointer… 🙂
You’re right a line missile in the cut and paste.
Damn proofing tools! 🙂
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!