How to Deploy .Net Applications to the Linux Platform With Confidence Using Mono With Delphi Prism
Method 1 of 3:
Setting Up
- Install Delphi Prism XE after downloading, in the same manner you would install any Windows Application.
- Set up the VM. Launch VMware Player / VirtualBox and create an OpenSuSe based VM. Install the ISO that you downloaded from the location.
- Boot off the Live CD then choose Install. The recommended install is to have a Swap Space of twice your Physical Memory and the remaining can be allocated to / (root) partition.
- Once installed, reboot the VM and login with your credentials.
Method 2 of 3:
Building a Simple Notepad Application in Delphi Prism and Deploying it to the Mono Appliance
- Launch Delphi Prism by clicking on Start --> All Programs --> Delphi Prism in Visual Studio 2010. Ensure that you run Visual Studio as an Administrator.
- Click on File --> New Project and choose Windows Forms Applications (Mono), under the Mono section.
- From the Toolbox --> Drag and Drop the following controls onto the Form:
- MenuStrip
- ToolStrip
- StatusStrip
- StatusStrip
- ContextMenuStrip
- RichTextBoxControl
- For the MenuStrip and ToolStrip controls, set to insert standard items. Dock the Rich Textbox Control.
- For the ContextStrip Menu, add the following three items:
- Cut
- Copy
- Paste
- Write some code to implement a simple Cut, Copy and Paste functionality.
[Cut Action]
method Mainform.cutToolStripMenuItem1_Click(sender: System.Object; e:
System.EventArgs);
begin
richTextBox1.Cut;
end;
[Copy Action]
method MainForm.copyToolStripMenuItem1_Click(sender: System.Object; e:
System.EventArgs);
begin
richTextBox1.Copy;
end;
[Paste Action]
method MainForm.pasteToolStripMenuItem1_Click(sender: System.Object; e:
System.EventSrgs);
begin
richTextBox1.Paste;
end;
end. - Bind the ContextMenuStrip to the Rich Textbox and copy and paste the above code for the respective actions, in the ContextMenu Strip.
- Press F5 and run the Application.
- Type some text and right click to launch the Context Menu.
- Verify that you are able to perform the required functions, and close the application.
Method 3 of 3:
Deploying the SimpleNotepad to Linux
- As you have the Mono Appliance running, ensure that VMWare Tools are installed on it.
- Navigate to the Debug folder of your project. The path would be similar to something as shown below:
C:UsersUsernameDocumentsvisual studio 2010ProjectsSimple NotepadSimple NotepadbinDebug - Copy the Simple_Notepad.exe to the Mono Appliance Desktop.
- Ensure that the Application does not have any dependencies in running successfully within the Mono Environment. To test this, click on Computer, and choose MOMA - Mono Migration Analyzer.
- Click Next to continue.
- Click on the (+) button and add the Simple_Notepad.exe to the Analyzer.
- Click Next to continue. It will start scanning the assemblies, needed for a successful launch.
- You would be able to see whether the MOMA tool has found any errors or success rate.
- Launch a Terminal window, and run the following command:
mono Simple_Notepad.exe - After running, you can see the application running without any problems.
4 ★ | 1 Vote
You should read it
- How to convert to Mono audio on Android phones
- Method in HTTP
- Apple updates XProtect to block 'Windows' malware on a Mac
- Learn about Gutmann data deletion method
- How to Restart Windows 8
- How to Clean Up Your PC Before Shut Down
- Top 4 Auto Click apps for Android do not need root
- How to open icons with one click on Windows 10
May be interested
- How to Encrypt Files in Linuxyou may not want people to see important files on your computer, particularly if it has multiple users. there are several different ways to restrict access to a particular file in the system, but unfortunately, most of them consume a lot...
- How to Use KUserkuser is an application used in many linux distros to create, delete, or manage user accounts. these instructions assume you are using the kde 4 version (the more recent version). click the 'add' button on the top toolbar.
- How to Change the Position of the Wbar Dock in AV Linuxin the latest av linux version, the wbar dock is located at the top of the screen. this can be quite annoying to those who are use to using it from the bottom. this small problem can be quickly solved by following the steps below. open...
- How to Set up Php on Apache 2.2.3 on CentOS 5.3this article is aimed at people who have centos 5.3 and apache 2.2.3. it may also work on rhel (but you have to pay for rhel). connect to your vps using ssh to get a command line (unless its being installed on your local machine). your...
- How to Send Mail in Linuxthis wikihow teaches you some basic ways to send email on your linux desktop system. if you're using a desktop version of linux like debian or ubuntu, the operating system comes with a built-in graphical mail app called thunderbird. if you...
- How to Start a Prboom Multi Player Game in Linuxthis is how to start a prboom multi-player game in linux from the terminal inside of the gui. this tutorial is for playing over a local area network (lan) with up to 4 players. make sure you do it from the terminal from inside the gui. if...