07.08.2020

Dev C++ Para Debian

76

This portal talks about development and programming tools. Technical words can be used but explained. The following editors are available through DebianPackageManagement, the preferred way to install applications on Debian:. Vim - Vim is an almost compatible version of the UNIX editor Vi. Emacs - GNU Emacs is the extensible self-documenting text editor. Dec 11, 2017  icon type='linux'I need to compile an application with ncurses library and header files. How do I install install ncurses libs and header files on a Linux operating system? How do I write a simple hello world program using the ncurses and compile it on a Linux? Fedora, Mandriva, SuSE, RHEL etc supports.rpm packages meanwhile Debian, Ubuntu, Linux Mint etc have.deb packages for software installation. In this article I will explain about creating a debian (.deb) package for a helloworld application written in C#. Packin is a small application to create debian. Linux/Unix resources Here is a list of useful links about Linux and Unix. Dev-C 4 CD version Dev-C 4.01 update Dev-Pascal 1.9 QuickInstall 2.0 Avi Creator 1.0 Dev-C 4 sources Dev-Pascal 1.9 sources Multibox 4.0 Fast Cleaner 1.0 LaserWar LaserWar sources for Delphi.

Home >> Articles >> How to create a debian package for mono application



Inlinux most softwares comes in the form of packages. Packages differin the file format and file extension depending on the linuxdistribution. Fedora, Mandriva, SuSE, RHEL etc supports .rpm packagesmeanwhile Debian, Ubuntu, Linux Mint etc have .deb packages forsoftware installation.


Inthis article I will explain about creating a debian (.deb) packagefor a helloworld application written in C#.


Packinis a small application to create debian packages. Download the latestversion of Packin from


Inthis article I will explain steps to create a debian package for a C#application.

TH-U is able to load rig models created from real setups. The Overloud proprietary technology allows our engineers to capture the response of an entire rig, including the nonlinear and dynamic response of the amplifier, the cabinet, the microphones, the mic preamplifier and the room sound.Rig To Model technology allows to capture both analog and digital setups. Overloud th3 download.


1. First of all let us compile a HelloWorld program in C#. Enter the following code in your favourite text editor and save with file name HelloWorld.cs.

using System;

classHello
staticvoid Main()
Console.WriteLine('hello,world');

Console.ReadLine();

}

}

Launch Terminal from Applications > Accessories > Terminal. Change the directory to directory containing HelloWorld.cs and enter 'gmcs HelloWorld.cs' in the terminal window.'HelloWorld.exe' is created in the same directory where the source file exists.

2. The debian package we are going to build should contain following files
  • The main executable file which is copied to /usr/lib/HelloWorld/HelloWorld.exe.
  • A launch script a start your application which is usually located in /usr/bin/HelloWorld.
  • A desktop entry file which is copied to /usr/share/applications/my_desktop_entry.desktop. According to GNOME Desktop System Administration Guide a desktop entry file is
“a data file that provides information about an item in a menu. The desktop entry file specifies the details for the item such as a name, a command to run, an icon, and so on. It also contains keywords which determine the location of the item in the menu hierarchy.”
  • An image file (preferably in PNG format) my_icon.png to be used as icon in the GNOME menu. The image file is copied to /usr/share/pixmaps.


FileLocation
HelloWorld.exe (main application)/usr/lib/HelloWorld

HelloWorld (this is our launch script)

/usr/bin
my_desktop_entry.desktop /usr/share/applications
my_icon.png/usr/share/pixmaps


Pleasevisit http://www.mono-project.com/Guidelines:Application_Deploymentto know more about deploying applications on Mono.

3. Firstof all create a folder in home folder with name'my_first_debian_package'. You are free name of your choice but Ithink my_first_debian_package is a good name. Now create a directorystructure under “my_first_debian_package” according to the chartgiven below.


Click the image to enlarge

4. Copythe main application file(HelloWorld.exe) to'my_first_debian_package/usr/lib/HelloWorld'.

5. Now let us create a launch script for our program. A launch script actually helps to launch the program easily via the command line. Also the destop entry file points to the launch script and the launch script starts our program. Contents of the launching script is as follows
execmono /usr/lib/HelloWorld/HelloWorld.exe

Nowsave this file with name HelloWorld under the folder'my_first_debian_package/usr/bin'.Launchscript need not have any file extension but the script must madebeexecutable.Tomake the script the executable, open the properties window for thelaunch script, go to 'Permissions' tab and make sure that'Allowexecuting file as program' option is checked.


6. Forlaunching the application from the menu, a desktop entry file must beincluded within the package. Soin this I will explain how to create the desktop entry file.


Weare going to create 'my_desktop_entry.desktop' filewhichis our desktop entry file.Choose GIF or PNG filesforicon. Open yourfavourite text editorand enter the following text.


[DesktopEntry]

Name=HelloWorldapplication

Comment=Ahelloworld application written in C#.

Exec=/usr/bin/HelloWorld

Icon=/usr/share/pixmaps/my_icon.png

Terminal=true

Type=Application

Categories=GNOME;Utility


Save the file with name 'my_desktop_entry.desktop' in 'my_first_debian_package/usr/share/applications/my_desktop_entry.desktop'.

The 'Name' field will be displayed as the menu text. 'Comment' field is the tooltip text displayed when mouse pointer is hovered over the menu entry. 'Exec' field is command which gets executed when the menu entry is selected(in our case the launch script is executed). 'Terminal=true' implies that the application is a console / terminal application. 'Type=Application' specifies that the menu entry refers to an application instead of a link to a web page or a directory. 'Categories=GNOME;Utility' specifies the menu item will be displayed only in GNOME desktop manager only in the 'Utility' or 'Accessories' submenu in the 'Applications' main menu.

Dev C++ Para Linux

7. Now choose an image file for displaying icon in the main menu. Copy this image file to 'my_first_debian_package/usr/share/pixmaps'.Rename the file to 'my_icon.png'.


Click the image to enlarge

Beforestarting Packin make sure that directory structure is as follows



Click the image to enlarge

8. Sowe are now going to build the application using Packin. Select'Applications'> 'Programming' > ' Packin Creator'.Click 'Next' button to goto the 'General' tab.



9. Inthis tab, enter the publisher's information and package details. Forthis application, we select the option 'all' as the architecture ofthe application since a mono application can run in both 32 and 64bit processors. Click 'Next' to go to the 'Parameters' tab.

Click the image to enlarge
10. Inthe 'Parameters' tab, enter the location of 'my_first_debian_package'directory in the 'Root Packages Files Folder' entry ie it must looklike '/home/USERNAME/my_first_debian_package'. Please do not add anextra slash after the path and also make sure to enter the pathwithout using characters like '~'.


Dev C++ For Debian

Inthe 'Dependencies & Misc' section, enter the package names onwhich the program depends to run properly. In our case 'mono-runtime'is entered in the 'Pre-Depends:' entry. Pre-Depends packages arethose which are required to be installed and configured properlybefore installing the program itself. For Visual Basic .NETapplication, enter 'mono-runtime' and'libmono-microsoft-visualbasic8.0-cil' separated by a comma.

Dev-c++ For Linux

Click'Next' to reach the 'Build' tab.


11. As you have guessed this is the last step. Clickthe 'Build Package' button to build the package. Now the packageis built in 'my_first_debian_package'folder.

Dev C++ Debian

Ihope this article might have helped you to create package forapplications written in C#, VB.NET and other languages easily andalso to deploy them on ubuntu.

Visit http://sourceforge.net/projects/packin/ for more information.