Problem installing native Linux version

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Problem installing native Linux version

Post by wjstarck » Sat Aug 18, 2007 9:33 am

Hello-

I am trying to install the native Linux version of 4.7 as per the instructions detailed here:

http://opendental.carlier-online.be/ubuntu.htm

Mono installs OK, but when I try to install OD, I get

E: /var/cache/apt/archives/libgdiplus_1.2.3.50-0opendental1_i386.deb: trying to overwrite `/usr/lib/libmono-profiler-aot.so.0.0.0', which is also in package libmono0

???

Cheers,

Bill Starck, DDS

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sat Aug 18, 2007 9:36 am

Sorry, that URL should be

http://opendental.carlier-online.be/ubuntu.html

Cheers,

Bill Starck, DDS

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sat Aug 18, 2007 9:46 am

I totally removed mono, and then tried to install OD.

Now I get

opendental:
Depends: libmono-system2.0-cil but it is not going to be installed
Depends: libmono-winforms1.0-cil but it is not going to be installed
Depends: libmono2.0-cil but it is not going to be installed

Cheers,

Bill Starck, DDS

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Sat Aug 18, 2007 5:34 pm

Just keep updating your mono daily tarball and the delete your od source and recheckout with subversion to download the newest version of od, compile it on VS2005, and one day mono will be able to execute the mono, rather it be a new feature of mono, or a bugfix in od. Patience.. I waited for 2-3 years just to get to run Open Dental on linux, and though it was for a short time, in reality I understand that mono has a long way to go to keep up with the bastards at microsoft. But you cant hold it against jordan for wanting to use new functions in .net that arent in mono yet. It makes open dental better, and since 99% of the people who use it, run with windows, I would rather see more functionality with the software itself, instead of having to hold back features and code just because mono doesnt support it yet. One day mono will, and well, lets just hope we dont see any .net 3.0 code in open dental anytime soon...

8) Just being honest here... but I am just a user, not the author.

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Tue Aug 21, 2007 2:54 am

The current development version of Mono (which is soon to be released as Mono 1.2.5), is able of running Open Dental on Linux.

However, there exist no Ubuntu packages for this version of Mono (expect it in Ubuntu 8.04). That's why installing Open Dental using Ubuntu packages doesn't quite work yet.

A way of installing Open Dental on any Linux machine is doing the following (you'll need some advanced skills).

First, you'll need to bootstrap Mono from a released package:

Code: Select all

wget http://go-mono.com/sources/mono/mono-1.2.4.tar.bz2
tar -xvjf mono-1.2.4.tar.bz2
cd mono-1.2.4.tar.bz
./configure
make
sudo make install
cd..
Then, you can get the latest version of Mono:

Code: Select all

svn co svn://anonsvn.mono-project.com/source/libgdiplus
svn co svn://anonsvn.mono-project.com/source/mono
svn co svn://anonsvn.mono-project.com/source/mcs
Compile it:

Code: Select all

cd libgdiplus
./autogen.sh
make
sudo make install
cd ..
cd mono
make
sudo make install
cd ..
Next, you'll need to install nant:

Code: Select all

cvs -d :pserver:anonymous@nant.cvs.sf.net:/cvsroot/nant co nant
cd nant
make
sudo make install
cd ..
Finally, you can compile Open Dental:

Code: Select all

svn co https://70.90.133.65:23793/svn/opendental/head/ opendental
cd opendental
make
sudo make install
After that, you'll need to install mysql on your local computer, and execute this script: http://www.open-dent.com/opendental.sql.

Obviously, this is all just for testing purposes. Don't try this on your main computer! The goal of the Ubuntu packages is to simplify this process to:

Code: Select all

apt-get install opendental
but that's a work in progress.

Good luck!
Frederik Carlier

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Cool!

Post by Justin Shafer » Thu Aug 23, 2007 10:17 pm

fcarlier wrote:The current development version of Mono (which is soon to be released as Mono 1.2.5), is able of running Open Dental on Linux.

However, there exist no Ubuntu packages for this version of Mono (expect it in Ubuntu 8.04). That's why installing Open Dental using Ubuntu packages doesn't quite work yet.

A way of installing Open Dental on any Linux machine is doing the following (you'll need some advanced skills).

First, you'll need to bootstrap Mono from a released package:

Code: Select all

wget http://go-mono.com/sources/mono/mono-1.2.4.tar.bz2
tar -xvjf mono-1.2.4.tar.bz2
cd mono-1.2.4.tar.bz
./configure
make
sudo make install
cd..
Then, you can get the latest version of Mono:

Code: Select all

svn co svn://anonsvn.mono-project.com/source/libgdiplus
svn co svn://anonsvn.mono-project.com/source/mono
svn co svn://anonsvn.mono-project.com/source/mcs
Compile it:

Code: Select all

cd libgdiplus
./autogen.sh
make
sudo make install
cd ..
cd mono
make
sudo make install
cd ..
Next, you'll need to install nant:

Code: Select all

cvs -d :pserver:anonymous@nant.cvs.sf.net:/cvsroot/nant co nant
cd nant
make
sudo make install
cd ..
Finally, you can compile Open Dental:

Code: Select all

svn co https://70.90.133.65:23793/svn/opendental/head/ opendental
cd opendental
make
sudo make install
After that, you'll need to install mysql on your local computer, and execute this script: http://www.open-dent.com/opendental.sql.

Obviously, this is all just for testing purposes. Don't try this on your main computer! The goal of the Ubuntu packages is to simplify this process to:

Code: Select all

apt-get install opendental
but that's a work in progress.

Good luck!

Trying mono 1.2.5 preview5 and opendental latest revision tonight!

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Fri Aug 24, 2007 9:17 am

Hmmm....

I still get

[nant] /home/wjs/opendental/ODR/ODR.build build
Buildfile: file:///home/wjs/opendental/ODR/ODR.build
Target framework: Mono 2.0 Profile
Target(s) specified: build


build:

[csc] Compiling 16 files to '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin/ODR.dll'.
[resgen] Error: Invalid ResX input.
[resgen] Inner exception: A null reference or invalid value was found [GDI+ status: InvalidParameter] Line 116, position 5.

BUILD FAILED

External Program Failed: /tmp/tmp32210956.tmp/resgen.exe (return code was 1)

Total time: 6.4 seconds.


BUILD FAILED

Nested build failed. Refer to build log for exact reason.

Total time: 21 seconds.

make: *** [all] Error 1


when I try to build open dental

???

Bill Starck, DDS

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Fri Aug 24, 2007 9:21 am

I'm not quite sure why people are even trying to build on Linux. It's so much easier just to copy your whole Open Dental folder from a working Windows machine over to your Linux machine. But that's just me.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Fri Aug 24, 2007 10:12 am

"Because it is there."

George Mallory (1886-1924), answer to the question 'Why do you want to climb Mt. Everest ?'

;)

Bill Starck, DDS

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Sat Aug 25, 2007 4:55 am

Try creating a file with this content (call it test.cs):

using System.Windows.Forms;

public class Program
{
public static void Main()
{
using(Form form = new Form())
{
form.ShowDialog();
}
}
}

then do

gmcs test.cs /r:System.Windows.Forms

and

mono test.exe

What does it say?
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sat Aug 25, 2007 11:15 am

Thanks, it just opens a blank window with a menu in the upper left hand corner with

Minimize
Maximize
Move
Resize

etc

Cheers,

Bill Starck, DDS

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Sat Aug 25, 2007 12:51 pm

Okay, that means that your libgdiplus is working correctly. Sometimes there is an issue with mono not finding libgdiplus. If that is the case, you don't get to see the blank window, either.

Not sure yet what the issue is. Can you try to run NAnt with the verbose flag?
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sat Aug 25, 2007 3:29 pm

Sure:

$nant -v


NAnt 0.86 (Build 0.86.2792.0; dev; 8/24/2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///home/wjs/opendental/opendental.build
Target framework: Mono 2.0 Profile
Base Directory: /home/wjs/opendental.
Target(s) specified: build

[tstamp] Saturday, August 25, 2007 5:27:03 PM.
[tstamp] build.date = 2007-08-25.

init:


debug:


set-framework-configuration:


set-mono-2.0-framework-configuration:


build:

[echo] Build Directory is /home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug
[nant] /home/wjs/opendental/CodeBase/CodeBase.build build
Buildfile: file:///home/wjs/opendental/CodeBase/CodeBase.build
Target framework: Mono 2.0 Profile
Base Directory: /home/wjs/opendental/CodeBase.
Target(s) specified: build


build:

[copy] Copying 0 files to '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin'.

BUILD SUCCEEDED

Total time: 0.2 seconds.

[nant] /home/wjs/opendental/OpenDentBusiness/OpenDentBusiness.build build
Buildfile: file:///home/wjs/opendental/OpenDentBusiness/OpenDentBusiness.build
Target framework: Mono 2.0 Profile
Base Directory: /home/wjs/opendental/OpenDentBusiness.
Target(s) specified: build


build:

[copy] Copying 0 files to '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin'.

BUILD SUCCEEDED

Total time: 0.3 seconds.

[nant] /home/wjs/opendental/ODR/ODR.build build
Buildfile: file:///home/wjs/opendental/ODR/ODR.build
Target framework: Mono 2.0 Profile
Base Directory: /home/wjs/opendental/ODR.
Target(s) specified: build


build:

[csc] Doc file '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin/ODR.xml' does not exist, recompiling.
[csc] Compiling 16 files to '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin/ODR.dll'.
[resgen] Output file '/home/wjs/opendental/ODR/ComboBoxMulti.resources' does not exist, rebuilding.
[resgen] Output file '/home/wjs/opendental/ODR/FormParameterInput.resources' does not exist, rebuilding.
[resgen] Output file '/home/wjs/opendental/ODR/ValidDate.resources' does not exist, rebuilding.
[resgen] Output file '/home/wjs/opendental/ODR/ValidDouble.resources' does not exist, rebuilding.
[resgen] Output file '/home/wjs/opendental/ODR/ValidNumber.resources' does not exist, rebuilding.
[copy] Copying 10 files to '/tmp/tmp39822716.tmp'.
[copy] Copying '/usr/local/lib/mono/2.0/System.Windows.Forms.dll' to '/tmp/tmp39822716.tmp/System.Windows.Forms.dll'.
[copy] Copying '/usr/local/lib/mono/2.0/System.Xml.dll' to '/tmp/tmp39822716.tmp/System.Xml.dll'.
[copy] Copying '/usr/local/lib/mono/2.0/System.Data.dll' to '/tmp/tmp39822716.tmp/System.Data.dll'.
[copy] Copying '/usr/local/lib/mono/2.0/System.Drawing.dll' to '/tmp/tmp39822716.tmp/System.Drawing.dll'.
[copy] Copying '/usr/local/lib/mono/2.0/resgen.exe.mdb' to '/tmp/tmp39822716.tmp/resgen.exe.mdb'.
[copy] Copying '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin/CodeBase.dll' to '/tmp/tmp39822716.tmp/CodeBase.dll'.
[copy] Copying '/home/wjs/opendental/Required dlls/MySql.Data.dll' to '/tmp/tmp39822716.tmp/MySql.Data.dll'.
[copy] Copying '/usr/local/lib/mono/2.0/resgen.exe' to '/tmp/tmp39822716.tmp/resgen.exe'.
[copy] Copying '/usr/local/lib/mono/2.0/System.dll' to '/tmp/tmp39822716.tmp/System.dll'.
[copy] Copying '/home/wjs/opendental/build/mono-2.0.unix/opendental-5.1-debug/bin/OpenDentBusiness.dll' to '/tmp/tmp39822716.tmp/OpenDentBusiness.dll'.
[resgen] Starting '/usr/local/bin/mono ("/tmp/tmp39822716.tmp/resgen.exe" /useSourcePath /compile "/home/wjs/opendental/ODR/ComboBoxMulti.resx,/home/wjs/opendental/ODR/ComboBoxMulti.resources" "/home/wjs/opendental/ODR/FormParameterInput.resx,/home/wjs/opendental/ODR/FormParameterInput.resources" "/home/wjs/opendental/ODR/ValidDate.resx,/home/wjs/opendental/ODR/ValidDate.resources" "/home/wjs/opendental/ODR/ValidDouble.resx,/home/wjs/opendental/ODR/ValidDouble.resources" "/home/wjs/opendental/ODR/ValidNumber.resx,/home/wjs/opendental/ODR/ValidNumber.resources" )' in '/tmp/tmp39822716.tmp'
[resgen] Error: Invalid ResX input.
[resgen] Inner exception: A null reference or invalid value was found [GDI+ status: InvalidParameter] Line 116, position 5.

BUILD FAILED

External Program Failed: /tmp/tmp39822716.tmp/resgen.exe (return code was 1):
NAnt.Core.BuildException: External Program Failed: /tmp/tmp39822716.tmp/resgen.exe (return code was 1)
at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask () [0x00000]

Total time: 4.1 seconds.


BUILD FAILED

Nested build failed. Refer to build log for exact reason.:
NAnt.Core.BuildException: Nested build failed. Refer to build log for exact reason.
at NAnt.Core.Tasks.NAntTask.RunBuild (System.IO.FileInfo buildFile) [0x00000]
at NAnt.Core.Tasks.NAntTask.ExecuteTask () [0x00000]
at NAnt.Core.Task.Execute () [0x00000]

Total time: 4.9 seconds.


Cheers,

Bill Starck, DDS

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Sat Aug 25, 2007 4:51 pm

Based on your last post, I committed a possible fix just now.
Jordan Sparks, DMD
http://www.opendental.com

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Sun Aug 26, 2007 3:29 am

Which version of Linux are you using? You are using NAnt from CVS, right?
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sun Aug 26, 2007 6:35 am

Jordan: was that build 688? If so, it fails the same way. :(

Frederik: Linux is Ubunto 7.04, nant is from CVS

I googled and ran across this:

http://www.mail-archive.com/nant-develo ... 07305.html


Thanks guys,

Bill Starck, DDS

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Sun Aug 26, 2007 6:52 am

Try running

Code: Select all

resgen /useSourcePath /compile "/home/wjs/opendental/ODR/ComboBoxMulti.resx"
and repeat that for each file you get the error message on. The error is because resgen fails, but it is know to be rather sparse on details when it fails. If you try it file-by-file, you should be able to pin-point the issue to one particular file. That should make it easier to reproduce (and fix) the issue.

Good luck.
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sun Aug 26, 2007 11:35 am

If I run that command on ComboBoxMulti.resx, I get the same error:

wjs@ubu:~/opendental$ resgen2 -usesourcepath -compile /home/wjs/opendental/ODR/ComboBoxMulti.resx
Error: Invalid ResX input.
Inner exception: A null reference or invalid value was found [GDI+ status: InvalidParameter] Line 116, position 5.

Cheers,

Bill Starck, DDS

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Sun Aug 26, 2007 2:20 pm

You are getting an error compiling a resource file. Line 116 is where a System.Drawing.Bitmap is being declared. Mono is trying to load this bitmap into memory. You get a libgdiplus exception.

This leads me to believe that you may have a missing codec on your system. Can you please try to run ./configure (or ./autogen.sh) in your libgdiplus source folder? Your output should be:

Code: Select all

fcarlier@col-clt-05:~/development/mono/libgdiplus$ ./autogen.sh 
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.

<more output here>

---
Configuration summary

   * Installation prefix = /usr/local
   * Cairo = internal
   * Text = cairo
   * EXIF tags = yes
   * Codecs supported:

      - TIFF: yes
      - JPEG: yes
      - GIF: yes
      - PNG: yes
      NOTE: if any of the above say 'no' you may install the
            corresponding development packages for them, rerun
            autogen.sh to include them in the build.

---
Now type `make' to compile

If not, you'll need to install the required -dev package from Ubuntu. These should be the required packages.
  • TIFF: libtiff4-dev
    JPEG: libjpeg62-dev
    GIF: libgif-dev
    PNG: libpng12-dev
Let me know how it goes

Frederik.
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sun Aug 26, 2007 4:38 pm

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!


http://www.tigernet.net/od_ubuntu.png


Thank you for Frederik and Jordan ;)

One more thing - I have copied over my database but I get a "Table 'preference' is read only"

Thanks again,

Bill Starck, DDS

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Mon Aug 27, 2007 1:00 am

Can you open a new thread with more information on when you get this error message? Does it happen when importing the data, or when running Open Dental itself?
Frederik Carlier

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Fri Aug 31, 2007 11:29 pm

I caught up to you guys tonight....

Image

sudo apt-get install build-essential
sudo apt-get install bison
sudo apt-get install automake1.9
sudo apt-get install libgif4
sudo apt-get install libgif-dev
sudo apt-get install libtiff4-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libpng12-dev
sudo apt-get install subversion
sudo apt-get install libtool
sudo apt-get install libx11-dev
sudo apt-get install libfreetpye6-dev
sudo apt-get install libcairo2-dev
sudo apt-get install libglitz1
sudo apt-get install libglitz1-dev
sudo apt-get install cvs
wget http://go-mono.com/sources/mono/mono-1.2.5.tar.bz2
tar -xvjf mono-1.2.5.tar.bz2
cd mono-1.2.5
sudo ./configure
sudo make
sudo make install
cd..
svn co svn://anonsvn.mono-project.com/source/trunk/libgdiplus libgdiplus
svn co svn://anonsvn.mono-project.com/source/trunk/mono mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs mcs
cd libgdiplus
sudo ./autogen.sh --enable-glitz
sudo make
sudo make install
cd ..
cd mono
sudo ./autogen.sh
sudo make
sudo make install
cd ..
cvs -d :pserver:anonymous@nant.cvs.sf.net:/cvsroot/nant co nant
cd nant
sudo make
sudo make install
cd ..
svn co https://70.90.133.65:23793/svn/opendental/head/ opendental
cd opendental
sudo make
sudo make install
then perhaps find . -name OpenDental.exe to figure out where it is!

Be sure /usr/local/lib exists in /etc/ld.so.conf! ran ldconfig yet?
Add this to the mono config for reports... be sure to add a printer.
<dllmap dll="libcups" target="libcups.so.2"/>

then I guess
sudo apt-get install mysql-server
sudo apt-get install mysql-administrator

either use myql or mysql-admin to restore/create the open dental database.

By the way, frank it happens after a successful database conversion. Thanks!!!!!! :D
Last edited by Justin Shafer on Wed Sep 05, 2007 11:47 pm, edited 9 times in total.

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Sat Sep 01, 2007 2:34 am

Hi,

Glad to see more people manage to build & start Open Dental on Linux! Just for the record: what you're seeing now is a know issue in Mono:
http://bugzilla.ximian.com/show_bug.cgi?id=82620 .

There isn't an ETA for a fix yet, but I think you can expect it pretty soon (as the same bug affects GTK# as well).

Frederik.
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Sat Sep 01, 2007 9:14 am

Justin
svn co svn://anonsvn.mono-project.com/source/trunk/libgdiplus libgdiplus
svn co svn://anonsvn.mono-project.com/source/trunk/mono mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs mcs
Once you get these 3 installed, you can use the easier command

sudo svn up mono mcs libgdiplus

Saves on some typing :wink:

Cheers,

Bill Starck, DDS

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Sat Sep 01, 2007 10:52 am

wjstarck wrote:Justin
svn co svn://anonsvn.mono-project.com/source/trunk/libgdiplus libgdiplus
svn co svn://anonsvn.mono-project.com/source/trunk/mono mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs mcs
Once you get these 3 installed, you can use the easier command

sudo svn up mono mcs libgdiplus

Saves on some typing :wink:

Cheers,

Bill Starck, DDS
Yeah yeah yeah! :roll: :lol:

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Sun Sep 02, 2007 9:00 am

YAY IT RUNS IF YOU COMPILE IT IN VS2005!!!!!! I am now curious why OD5.1 wont even compile in VS but OD will compile in VS and actually run under mono...

OpenDental5.0 throws some error....

Whats the difference in these versions related to Mono?

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Yay and Nay

Post by Justin Shafer » Sun Sep 02, 2007 12:40 pm

OpenDental5.2 compiled on VS2005 and ran in mono. If compiled in mono you get the error.
Image



OpenDental5.1 wont compile on VS2005 or mono for me right now

OpenDental 5.0
Unhandled Exception: System.ArgumentException: SelectionStart cannot be less than MinDate
at System.Windows.Forms.MonthCalendar.set_SelectionRange (System.Windows.Forms.SelectionRange value) [0x00000]
at System.Windows.Forms.MonthCalendar.SetSelectionRange (DateTime date1, DateTime date2) [0x00000]
at System.Windows.Forms.MonthCalendar.SetDate (DateTime date) [0x00000]
at (wrapper remoting-invoke-with-check) System.Windows.Forms.MonthCalendar:SetDate (System.DateTime)
at OpenDental.ContrAppt.RefreshPeriod () [0x00000]
at OpenDental.ContrAppt.ModuleSelected (Int32 patNum) [0x00000]
at OpenDental.ContrAppt.comboView_SelectedIndexChanged (System.Object sender, System.EventArgs e) [0x00000]
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged (System.EventArgs e) [0x00000]
at System.Windows.Forms.ComboBox.set_SelectedIndex (Int32 value) [0x00000]
at OpenDental.ContrAppt.FillViews () [0x00000]
at (wrapper remoting-invoke-with-check) OpenDental.ContrAppt:FillViews ()
at OpenDental.FormOpenDental.RefreshLocalData (InvalidTypes itypes, Boolean isStartingUp) [0x00000]
at OpenDental.FormOpenDental.FormOpenDental_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000]
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000]
at System.Windows.Forms.Form.OnCreateControl () [0x00000]
at System.Windows.Forms.Control.CreateControl () [0x00000]
at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00000]
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000]
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000]
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool)
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000]
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000]
at OpenDental.FormOpenDental.Main () [0x00000]

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Mon Sep 03, 2007 10:07 am

The issue you see in Open Dental 5.0 is because of different behaviour on MS.NET and Mono. On the .NET Framework, the MontlyCalendar does not completely adhere to the specs, Mono does. I filed a bug with Microsoft to inform them of the difference between the specs and the behaviour. I expect them to fix the code or the specs.

The fix should be easily backported. The patch is below. Note that you'll encounter the same Mono bug (Invalid IL). As support for Open Dental on Mono isn't 100% there, yet, I don't see the value of backporting this fix. Nothing stops you from trying it on your own!

Code: Select all

Modified: head/OpenDental/Main Modules/ContrAppt.cs
===================================================================
--- head/OpenDental/Main Modules/ContrAppt.cs   2007-08-28 09:39:43 UTC (rev 698)
+++ head/OpenDental/Main Modules/ContrAppt.cs   2007-08-28 13:20:55 UTC (rev 699)
@@ -1349,16 +1349,15 @@
                        if(ContrApptSheet.IsWeeklyView) {
                                startDate=WeekStartDate;
                                endDate=WeekEndDate;
-                               Calendar2.SetSelectionRange(startDate,endDate);
                        }
                        else {
                                startDate=Appointments.DateSelected;
                                endDate=Appointments.DateSelected;
-                               Calendar2.SetDate(startDate);
                        }
                        if(startDate.Year<1880 || endDate.Year<1880) {
                                return;
                        }
+                       Calendar2.SetSelectionRange(startDate, endDate);
                        if(PatCurNum==0){
                                //there cannot be a selected appointment if no patient is loaded.
                                ContrApptSingle.SelectedAptNum=-1;//fixes a minor bug.
Frederik Carlier

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Mon Sep 03, 2007 10:27 am

So if I applied the patch but then compile dit in Visual Studio, I wonder if it would run on mono.... Hmmm..... Thanks, your smart!

The reason I want to do this is to be able to run OD on the linux server or portable linux servers that I made for a guy. That and it beats mowing the lawn today. 8)

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Mon Sep 03, 2007 4:04 pm

fcarlier wrote:The issue you see in Open Dental 5.0 is because of different behaviour on MS.NET and Mono. On the .NET Framework, the MontlyCalendar does not completely adhere to the specs, Mono does. I filed a bug with Microsoft to inform them of the difference between the specs and the behaviour. I expect them to fix the code or the specs.

The fix should be easily backported. The patch is below. Note that you'll encounter the same Mono bug (Invalid IL). As support for Open Dental on Mono isn't 100% there, yet, I don't see the value of backporting this fix. Nothing stops you from trying it on your own!

Code: Select all

Modified: head/OpenDental/Main Modules/ContrAppt.cs
===================================================================
--- head/OpenDental/Main Modules/ContrAppt.cs   2007-08-28 09:39:43 UTC (rev 698)
+++ head/OpenDental/Main Modules/ContrAppt.cs   2007-08-28 13:20:55 UTC (rev 699)
@@ -1349,16 +1349,15 @@
                        if(ContrApptSheet.IsWeeklyView) {
                                startDate=WeekStartDate;
                                endDate=WeekEndDate;
-                               Calendar2.SetSelectionRange(startDate,endDate);
                        }
                        else {
                                startDate=Appointments.DateSelected;
                                endDate=Appointments.DateSelected;
-                               Calendar2.SetDate(startDate);
                        }
                        if(startDate.Year<1880 || endDate.Year<1880) {
                                return;
                        }
+                       Calendar2.SetSelectionRange(startDate, endDate);
                        if(PatCurNum==0){
                                //there cannot be a selected appointment if no patient is loaded.
                                ContrApptSingle.SelectedAptNum=-1;//fixes a minor bug.
Strange I was going to try this but it seems its already in the svn for open dental 5.0.19.... it compiled fine but mono threw this same error. Weird???? Maybe I need to go back and look at it again....

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

BackPort Successful!

Post by Justin Shafer » Mon Sep 03, 2007 4:33 pm

Cool I just replaced the ContrAppt.cs file from 5.2 and stuck it in 5.0 and compiled in Visual Studio... that did the trick.

http://www.dentalcom.net/OpenDental-5.0.19.patched.zip

Here it is....

Image

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Tue Sep 04, 2007 9:50 am

I noticed a problem with my special build, when the date changed to tuesday, a da y with appointments, and you hovered the mouse over hte appointment it crashed. This was because itw as looking for an Appointment Bubble preference which was missing so I changed it too...

if (DateTime.Now.AddMilliseconds(-280) > DateTime.Now.AddMilliseconds(-300)){

and that did the trick.

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Tue Sep 04, 2007 12:31 pm

Mono sources indicate the "Invalid IL" message should be fixed. If you re-compile using the latest version of Mono, you should be able to run Open Dental "natively" on Linux.
Frederik Carlier

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Tue Sep 04, 2007 1:13 pm

Frederik-

It's still bombing for me and throwing the same exception. I check out the latest mono mcs and OD sources about 3:00 PM CST (21:00 GMT)

Cheers,

Bill Starck, DDS

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Tue Sep 04, 2007 8:18 pm

Hey Dr. Stark, I built it with nant after rebuilding from scratch and it worked for me. Try removing your directories or make clean before rebuilding, or uhh... something, n stuff.

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Wed Sep 05, 2007 6:05 am

Justin-

It's still bombing...

Which directories are you removing? Mono or OD?

Cheers,

Bill Starck, DDS

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Wed Sep 05, 2007 10:26 am

OK, I trashed my mono and mcs folders, then re-subversioned and recompiled:

Image

Cool!

Bill Starck, DDS

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Cool!

Post by Justin Shafer » Wed Sep 05, 2007 10:52 pm

Hey guys I didnt know it but if you setup an actual printer with cups, and add

<dllmap dll="libcups" target="libcups.so.2"/> that to the mono config file then you can run reports, and even PRINT. :lol: 8)

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Thu Sep 06, 2007 12:44 am

How can we get Hardware Acceleration working with OpenGL? I recompiled libgdiplus with --enable-glitz and I added these to mono config

<dllmap dll="opengl32.dll" target="libGL.so.1" />
<dllmap dll="glu32.dll" target="libGLU.so.1" />

Does OpenDental have to call Mono.Cairo Directly to get cairo to use glitz? Otherwise we are using System.Drawing without Cairo? If so, that means we will need two seperate branches of code? One for Cairo and the other for System.Drawing? Yuck

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Sep 06, 2007 7:18 am

I spoke directly to Miguel Icaza last year about the possibility of using OpenGL in Mono. It's not going to happen any time soon. It's not an issue of "hardware acceleration". We can't use OpenGL at all. Period. And to be honest, I have no idea what glitz is, and only limited familiarity with Cairo.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Post by Justin Shafer » Thu Sep 06, 2007 8:47 am

Wow dude... where did you meet him? http://en.wikipedia.org/wiki/Miguel_de_Icaza

Post Reply