Difference between revisions of "Third-party software integration: Acme CAD Converter"

From OpenKM Documentation
Jump to: navigation, search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
This utility is used to manage AutoCAD preview and conversion. This configuration has been tested with Acme CAD Converter 2011 v8.2.2.
+
This utility is used to manage AutoCAD preview and conversion. This configuration has been tested with '''Acme CAD Converter 2011 v8.2.5'''.
  
 
As this is a Windows application, you need to install '''wine''' in Linux to be used. A tip in Linux is making a soft link to ease the application execution:
 
As this is a Windows application, you need to install '''wine''' in Linux to be used. A tip in Linux is making a soft link to ease the application execution:
Line 10: Line 10:
 
   $ ln -s drive_c/Program\ Files/Acme\ CAD\ Converter ACC
 
   $ ln -s drive_c/Program\ Files/Acme\ CAD\ Converter ACC
  
This way, the configuration of the '''Bold text''' property is:
+
This way, the configuration of the '''system.dwg2dxf''' property is:
  
 
   wine /home/openkm/.wine/ACC/AcmeCADConverter.exe
 
   wine /home/openkm/.wine/ACC/AcmeCADConverter.exe
Line 16: Line 16:
 
If the server does not have the X-Window system, is necessary to install a Virtual Framebuffer 'fake' X server:
 
If the server does not have the X-Window system, is necessary to install a Virtual Framebuffer 'fake' X server:
  
   $ sudo aptitude install xvfb
+
   $ sudo apt-get install xvfb
  
And modify the startup JBoss script:
+
And modify the startup Tomcat script:
  
  DIRNAME=`dirname $0`
+
<source lang="bash">
  PROGNAME=`basename $0`
+
start() {
  GREP="grep"
+
    # Wine stuff
  JAVA_OPTS="-Xms256m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true"
+
    $ECHO "Starting Xvfb"
 
+
    Xvfb :1 &
  # Wine stuff
+
    export DISPLAY=:1
  echo "Starting Xvfb"
+
 
  Xvfb :1 &
+
    $ECHO -n "Starting Tomcat"
  export DISPLAY=:1
+
    su - $TOMCAT_USER -c "$TOMCAT_START_SCRIPT &"
 
+
    $ECHO "."
  # Use the maximum available, or set MAX_FD != -1 to use that
+
}
  MAX_FD="maximum"
+
 
 +
stop() {
 +
    # Wine stuff
 +
    $ECHO "Stopping Xvfb"
 +
    killall Xvfb
 +
 
 +
    $ECHO -n "Stopping Tomcat"
 +
    su - $TOMCAT_USER -c "$TOMCAT_STOP_SCRIPT 60 -force &"
 +
    while [ "$(ps -fu $TOMCAT_USER | grep java | grep tomcat | wc -l)" -gt "0" ]; do
 +
        sleep 5; $ECHO -n "."
 +
    done
 +
    $ECHO "."
 +
}
 +
</source>
 +
 
 +
Or JBoss script:
 +
 
 +
<source lang="bash">
 +
DIRNAME=`dirname $0`
 +
PROGNAME=`basename $0`
 +
GREP="grep"
 +
JAVA_OPTS="-Xms256m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true"
 +
 +
# Wine stuff
 +
echo "Starting Xvfb"
 +
Xvfb :1 &
 +
export DISPLAY=:1
 +
 
 +
# Use the maximum available, or set MAX_FD != -1 to use that
 +
MAX_FD="maximum"
 +
</source>
  
 
If you see an error like this:
 
If you see an error like this:
Line 39: Line 69:
 
Try to set this environment variables (In that case will be needed to add to the startup JBoss script):
 
Try to set this environment variables (In that case will be needed to add to the startup JBoss script):
  
  $ export LIBGL_DRIVERS_PATH=/usr/lib32/dri
+
<source lang="bash">
 +
export LIBGL_DRIVERS_PATH=/usr/lib32/dri
 +
</source>
  
 
If you see this error:
 
If you see this error:
Line 49: Line 81:
 
   $ sudo aptitude install fontforge libgl1-mesa-glx
 
   $ sudo aptitude install fontforge libgl1-mesa-glx
  
See also [[Autocad preview]].
+
See also [[AutoCAD Preview]].
  
 
[[Category: Installation Guide]]
 
[[Category: Installation Guide]]

Latest revision as of 19:20, 24 March 2014

This utility is used to manage AutoCAD preview and conversion. This configuration has been tested with Acme CAD Converter 2011 v8.2.5.

As this is a Windows application, you need to install wine in Linux to be used. A tip in Linux is making a soft link to ease the application execution:

 .wine/ACC -> .wine/drive_c/Program\ Files/Acme\ CAD\ Converter/

To achieve this, run these commands:

 $ cd .wine
 $ ln -s drive_c/Program\ Files/Acme\ CAD\ Converter ACC

This way, the configuration of the system.dwg2dxf property is:

 wine /home/openkm/.wine/ACC/AcmeCADConverter.exe

If the server does not have the X-Window system, is necessary to install a Virtual Framebuffer 'fake' X server:

 $ sudo apt-get install xvfb

And modify the startup Tomcat script:

start() {
    # Wine stuff
    $ECHO "Starting Xvfb"
    Xvfb :1 &
    export DISPLAY=:1

    $ECHO -n "Starting Tomcat"
    su - $TOMCAT_USER -c "$TOMCAT_START_SCRIPT &"
    $ECHO "."
}

stop() {
    # Wine stuff
    $ECHO "Stopping Xvfb"
    killall Xvfb

    $ECHO -n "Stopping Tomcat"
    su - $TOMCAT_USER -c "$TOMCAT_STOP_SCRIPT 60 -force &"
    while [ "$(ps -fu $TOMCAT_USER | grep java | grep tomcat | wc -l)" -gt "0" ]; do
        sleep 5; $ECHO -n "."
    done
    $ECHO "."
}

Or JBoss script:

DIRNAME=`dirname $0`
PROGNAME=`basename $0`
GREP="grep"
JAVA_OPTS="-Xms256m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true"
 
# Wine stuff
echo "Starting Xvfb"
Xvfb :1 &
export DISPLAY=:1

# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"

If you see an error like this:

 X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly

Try to set this environment variables (In that case will be needed to add to the startup JBoss script):

export LIBGL_DRIVERS_PATH=/usr/lib32/dri

If you see this error:

 Error initialising GL driver, check that the file 'opengl32.dll' exists

Try to install these packages:

 $ sudo aptitude install fontforge libgl1-mesa-glx

See also AutoCAD Preview.