Getting Started - Linux: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=Before You Start...=
==Step 1: Download ans Install the LDraw Library==


These instructions assume you have some tools installed on your
* Go to the [http://www.ldraw.org/Topic26.html LDraw.org Update page] and download the latest complete.zip
system. Here is a list:
* Unzip complete.zip in the directory of your choice


<dl>
==Step 2: Install LDCad==
<dt>[http://wget.sunsite.dk/ <code>wget</code>]


<dd>
* Go to [http://www.melkert.net/LDCad http://www.melkert.net/LDCad] and download the Linux version of LDCad
You can check if you have <code>wget</code> installed with the
* Unzip the package into the directory of your choice
command:
* Run LDCad
<pre>
* When asked for the location of the LDraw Library, use the directory you unzipped complete.zip into.
wget --version
</pre>
If you don't have it, you may download it from [http://wget.sunsite.dk/ http://wget.sunsite.dk/].


 
==Step 3: Making Building Instructions==
<dt>[http://www.perl.org/ Perl]
 
<dd>
You can check if you have Perl installed with the command:
<pre>
perl --version
</pre>
If you don't have it, you may download it from [http://www.perl.org/ http://www.perl.org/].
 
 
<dt>[http://sources.redhat.com/bzip2/ <code>bzip2</code>]
 
<dd>
You can check if you have <code>bzip2</code> installed with the
command:
<pre>
bzip2 --version
</pre>
If you don't have it, you may download it from [http://sources.redhat.com/bzip2/ http://sources.redhat.com/bzip2/].
 
 
<dt>[http://gcc.gnu.org/ GNU Compiler Collection]
 
<dd>LDraw tools for Linux come in source code form, so you need the GNU
Compiler collection (at least <code>gcc</code> and <code>make</code>)
to translate the programs to executable form. These tools usually come
in the &quot;development&quot; section of your Linux distribution.
</dl>
 
=Step 1 (latest update 2006-01-06):=
 
Download and install the LDraw Parts Library.
<pre>
user$ cd /tmp
user$ wget [http://www.ldraw.org/files/unix-complete.tgz http://www.ldraw.org/files/unix-complete.tgz]
...
user$ su -
Password:
root# cd /usr/local/share/
root# tar xzf /tmp/unix-complete.tgz &amp;&amp; echo OK
...
OK
root# mkdir -p ldraw/bitmap
root# chmod a+w ldraw/bitmap
root# chown -R root.root ldraw
root# exit
exit
user$
</pre>
 
=Step 2 (latest update 2006-01-06):=
 
To view ldraw model use [http://ldview.sf.net LDView].
You can install RPM or tar.gz version (available on
[http://sourceforge.net/project/showfiles.php?group_id=120592&package_id=131411 sf.net]),
or build from source.
To install LDView3.tgz (root permission is not required):
<pre>
user$ tar zxvf LDView3.tgz
user$ cd LDView3
user$ ./LDView
</pre>
To install from RPM (root privilege is required):
<pre>
root# rpm -i ldview-3.0-1.i386.rpm
</pre>
To build from source:
<pre>
user$ su -
root# cvs -z3 -d:pserver:[email protected]/cvsroot/ldview co LDView
root# cd LDView/QT
root# ./makeall
root# make install
root# exit
user$ LDView
</pre>
 
=Step 3 (latest update 2002-05-23):=
 
Install LDGLite. LDGLite is a rather
efficient tool for showing building instructions &quot;on the fly&quot;, when you
download them as &quot;<code>.dat</code>&quot;, &quot;<code>.ldr</code>&quot; or
&quot;<code>.mpd</code>&quot; files from the web.
<pre>
user$ cd /tmp
user$ wget [http://ldglite.sourceforge.net/ldglitesrc0_9_5.zip http://ldglite.sourceforge.net/ldglitesrc0_9_5.zip]
...
user$ unzip -uoa ldglitesrc0_9_5.zip
...
user$ cd ldglite
user$ make -f makefile.linux &amp;&amp; echo OK
...
OK
</pre>
 
There is a small risk that you may run into errors at this point, if
your system lacks some libraries. These errors will probably be of the
form <code>.../bin/ld: cannot find -lX11</code>. If you don't know how to
handle this, please contact an experienced Linux system
administrator.
<pre>
user$ su
Password:
root# chown root.root l3glite l3gledit ldglite readme.txt
root# mv l3glite l3gledit ldglite /usr/local/bin
root# mv readme.txt /usr/local/share/ldraw/ldglite.readme
root# exit
exit
user$ cd ..
user$ rm -rf ldglite
</pre>
 
Now you should be ready to run LDGLite - as the command ldglite - but
since the LDraw library has been placed differently from what LDGLite
expects, you have to set the environment variable LDRAWDIR to that
directory (/usr/local/share/ldraw). You can do that in your runtime
configuration scripts, just before you run ldglite, or you can create a
script that sets LDRAWDIR and then calls ldglite. I have chosen the last
of these three solutions (where I also make sure that there is no limits
on the stack size):
<pre>
user$ su
Password:
root# cat &gt; /usr/local/bin/ldglite-run &lt;&lt; THE-END
? #!/bin/tcsh
? setenv LDRAWDIR /usr/local/share/ldraw
? limit stacksize unlimited
? /usr/local/bin/ldglite \$*
? THE-END
root# chmod a+x /usr/local/bin/ldglite-run
root# cat &gt;&gt; /etc/mailcap &lt;&lt; THE-END
? application/x-ldraw;/usr/local/bin/ldglite-run -mc %s
? application/x-multi-part-ldraw;/usr/local/bin/ldglite-run -mc %s
? THE-END
root# exit
exit
user$
</pre>
 
=Step 4 (latest update 2002-05-23):=
 
Now your browser should be ready to open LEGO building instructions
directly in LDGLite, when you click on links to them on the internet. You
can test it by clicking on [http://jacob.sparre.dk/LEGO/Byggevejledninger/Tux/tux.dat tux.dat],
which should open a window with building instructions for a penguin (Tux,
the mascot of Linux). You may have to restart your browser to make it
recognise the existence of LDGLite.
 
=Step 5:=
 
[[File:Leocad.png|link=http://www.leocad.org/|right]]


There are currently two ways to create LEGO building instructions on
There are currently two ways to create LEGO building instructions on
Line 173: Line 18:
on the screen. If you chose the former method, you should just use your
on the screen. If you chose the former method, you should just use your
usual text editor and skip this step. If you would like to try the latter
usual text editor and skip this step. If you would like to try the latter
method, you should install the program LeoCAD.
method, you should use LDCad.
 
LeoCAD is a great 3D editor for Linux (and Windows) which has offered
several improvements to the straight LDraw .dat format. It supports some
basic animation (via keyframing) and can also export to 3DStudioMax,
POV-Ray, and Alias Wavefront.
 
To compile: (last update 2006-01-06)
<pre>
user$ svn co http://svn.gerf.org/svn/leocad/tags/leocad-0-74 leocad
user$ cd leocad
user$ make
user# strip bin/leocad
user$ su -
Password:
root# cp bin/leocad /usr/local/bin/
</pre>


LeoCAD has different part database, what is available at [http://www.leocad.org/files http://www.leocad.org/files]
==Step 4: Dive in==
<pre>
root# cd /tmp
root# wget [http://www.leocad.org/files/pieces.zip http://www.leocad.org/files/pieces.zip]
root# wget [http://www.leocad.org/files/update18.zip http://www.leocad.org/files/update18.zip]
root# mkdir /usr/local/share/leocad
root# cd /usr/local/share/leocad
root# unzip /tmp/pieces.zip
root# unzip /tmp/update18.zip
root#
root# leocad -l /usr/local/share/leocad


</pre>
Learning how to use your new editor or understanding the LDraw file
 
=Step 6:=
 
'''Dive In!'''
Learning how to use your new editor or understanding the LDraw file
format may be a challenge, but with a little practice you will get the
format may be a challenge, but with a little practice you will get the
hang of it. The [http://www.leocad.org/manual/index.htm LeoCAD Manual]
hang of it.
by Leonardo Zide will help you getting started.
 
=Step 7:=
 
'''[http://www.ldraw.org/article/140 Introduction to LDraw Utilities]'''
 
There is a lot you can do with LDraw files beyond just creating LEGO
models! Many contributors have developed utilities to make the most of
the LDraw file format. Check out a brief introduction to a few utilities,
and then move on to download them.
 
=Step 8:=
 
=[http://www.ldraw.org/modules.php?op=modload&amp;name=Downloads&amp;file=index Download Software]=
 
Check out LDraw.org's (incomplete) list of software packages to
download which supplement the standard editors. Download programs like
L3P, POV-Ray, various file format converters and rendering tools.


=Help!=
=Help!=


Need help with any of this? Check out [http://www.ldraw.org/article/7 LDraw.org's Help Section], pr check out the [http://news.lugnet.com/cad/ Lugnet CAD]
Need help with any of this? Check out [http://www.ldraw.org/article/7 LDraw.org's Help Section], or visit the [http://forums.ldraw.org LDraw.org Forums] and ask a large group of users for help.
discussion groups and ask a large group of users for help.

Revision as of 00:48, 19 December 2011

Step 1: Download ans Install the LDraw Library

  • Go to the LDraw.org Update page and download the latest complete.zip
  • Unzip complete.zip in the directory of your choice

Step 2: Install LDCad

  • Go to http://www.melkert.net/LDCad and download the Linux version of LDCad
  • Unzip the package into the directory of your choice
  • Run LDCad
  • When asked for the location of the LDraw Library, use the directory you unzipped complete.zip into.

Step 3: Making Building Instructions

There are currently two ways to create LEGO building instructions on your computer. You can either write/edit the raw text LDraw files or you can use an interactive drawing program, where you can move pieces around on the screen. If you chose the former method, you should just use your usual text editor and skip this step. If you would like to try the latter method, you should use LDCad.

Step 4: Dive in

Learning how to use your new editor or understanding the LDraw file format may be a challenge, but with a little practice you will get the hang of it.

Help!

Need help with any of this? Check out LDraw.org's Help Section, or visit the LDraw.org Forums and ask a large group of users for help.