1. Is there any chance of a .deb file for wxEuphoria?

Is there any chance that someone will make a .deb file for wxEuphoria so it can be in the synaptic package manager in linux?

Making a .deb file is explained here:
https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html

I don't have the smarts to be able to do it.

If it was done:
- It would be a major accomplishment for wxEuphoria.
- It would be a major accomplishment for Euphoria.
- I could get back to programming in Euphoria.

new topic     » topic index » view message » categorize

2. Re: Is there any chance of a .deb file for wxEuphoria?

I never built a .deb file either. I use a simple .tar.gz All-in-One archive as I did for Windows.

It is unarchived in /usr/local/euphoria-4.1.0.

3 lines in /etc/bash.bashrc for the environnment and it's done.

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/euphoria-4.1.0/bin 
export EUDIR=/usr/local/euphoria-4.1.0 
export EUINC=/usr/local/euphoria-4.1.0/include/ 

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

3. Re: Is there any chance of a .deb file for wxEuphoria?

Here is a small OpenEuphoria program which could do the job if compiled. It takes to additional files:

  • dependencies.txt, the list of packages needed to do the job
  • the archive, here named eu41.tgz

I could provide 2 archives, one for 32 bits and one for 64 bits. Not the latest ones, but the ones which work for me.

include std/filesys.e 
include std/error.e 
include std/io.e 
include std/pipeio.e as pipe 
 
object   void = 0 
sequence InitialDir 
integer  f_debug 
 
------------------------------------------------------------------------------ 
 
public function execCommand(sequence cmd) 
  sequence s = "" 
  object z = pipe:create() 
  object p = pipe:exec(cmd, z) 
  if atom(p) then 
    printf(2, "Failed to exec() with error %x\n", pipe:error_no()) 
    pipe:kill(p) 
	return -1 
  end if 
  object c = pipe:read(p[pipe:STDOUT], 256) 
  while sequence(c) and length(c) do 
    s &= c 
    if atom(c) then 
	  printf(2, "Failed on read with error %x\n", pipe:error_no()) 
      pipe:kill(p) 
	  return -1 
    end if 
    c = pipe:read(p[pipe:STDOUT], 256) 
  end while 
  --Close pipes and make sure process is terminated 
  pipe:kill(p) 
  return s 
end function 
 
------------------------------------------------------------------------------ 
 
function isInstalled(sequence package) 
  sequence s = execCommand("dpkg-query -s " & package & " | grep Status") 
  if length(s) and match("ok installed", s) then 
    return 1 
  else 
    return 0 
  end if 
end function 
 
------------------------------------------------------------------------------ 
 
procedure installIfNot(sequence package) 
  if isInstalled(package) then 
    puts(2, package & " already installed\n") 
  else 
    puts(2, "apt-get install -y " & package & "\n") 
    sequence s = execCommand("apt-get install -y " & package) 
    puts(2, s & "\n") 
  end if 
end procedure 
 
------------------------------------------------------------------------------ 
 
  sequence cmd = command_line() 
  integer lg = length(cmd) 
  if lg>2 then 
    puts(1, "Usage: eui install_AIO.ex\n") 
  end if 
  sequence info = pathinfo(cmd[2]) 
  void = chdir(info[PATH_DIR]) 
  InitialDir = current_dir() 
  f_debug = open(InitialDir&SLASH&info[PATH_BASENAME]&".log", "w") 
  crash_file(InitialDir&SLASH&info[PATH_BASENAME]&".err") 
 
  sequence s = read_lines(InitialDir&SLASH&"dependencies.txt") 
  for i = 1 to length(s) do 
    installIfNot(s[i]) 
  end for 
 
  s = execCommand("tar -xf "&InitialDir&SLASH&"eu41.tgz -C /usr/local/euphoria-4.1.0") 
   
  if append_lines("/etc/bash.bashrc", { 
    "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/euphoria-4.1.0/bin",  
    "export EUDIR=/usr/local/euphoria-4.1.0", 
    "export EUINC=/usr/local/euphoria-4.1.0/include/" 
  }) = -1 then 
    puts(2, "Failed to append lines to /etc/bash.bashrc\nAre you connected as root?\n") 
  end if 
 
  close(f_debug) 

Here is the content of dependencies.txt:

libwxbase2.8-0 
libwxbase2.8-dev 
libwxgtk-media2.8-0 
libwxgtk-media2.8-dev 
libwxgtk2.8-0 
libwxgtk2.8-dev 
libwxsmithlib0 
libwxsqlite3-2.8-0 
libwxsqlite3-2.8-dev 
wx2.8-doc 
wx2.8-examples 
wx2.8-headers 
wx2.8-i18n 
wxformbuilder 
wxsqlite3-doc 

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

4. Re: Is there any chance of a .deb file for wxEuphoria?

I uploaded an All-in-One package with an installer for 32-bit Debian-based Linux systems (16 MB).

I hope it helps switching to Linux.

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

5. Re: Is there any chance of a .deb file for wxEuphoria?

What I need is wxEuphoria in Synaptic. I'm not interested in tar gz files or modifying files.

The modern way to install software is some kind of packaging system, deb or rpm or whatever. The reason why I quit using wxEuphoria was I got tired of users of my programs complaining that they couldn't install wxEuphoria and I couldn't help them. Half of the time I had difficulty re-installing it myself. Maybe conflicts with previous versions. Putting wxEuphoria in the synaptic package manager would solve this problem.

Read the wiki article on Synaptic.
https://en.wikipedia.org/wiki/Synaptic_%28software%29

With Synaptic, you don't need to type anything; it's all mouse clicks.

Synaptic has tens of thousands of software packages. I don't install anything except if it's on Synaptic. If it's not on Synaptic, I usually assume it's probably garbage.

I understand that putting something in Synaptic is techy and probably a lot of work to do and to maintain. But I figure the Euphoria community has some mega powerful smart people. And maybe they could work together with an expert on .deb files.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Is there any chance of a .deb file for wxEuphoria?

Jerry_Story said...

What I need is wxEuphoria in Synaptic. I'm not interested in tar gz files or modifying files.

Are you sure that's what you need? Being "in Synaptic" really means there is a repo (repository) somewhere that is being maintained by a group of people interested in hosting and maintaining said repository. Or, you can host your own repository. Going this route means you expect your users to know how to configure apt-get (the program powering Synaptic) to use your custom repository. This also assumes that your users probably have Debian based Linux distro in the first place.

Jerry_Story said...

The modern way to install software is some kind of packaging system, deb or rpm or whatever. The reason why I quit using wxEuphoria was I got tired of users of my programs complaining that they couldn't install wxEuphoria and I couldn't help them. Half of the time I had difficulty re-installing it myself. Maybe conflicts with previous versions. Putting wxEuphoria in the synaptic package manager would solve this problem.

With Synaptic, you don't need to type anything; it's all mouse clicks.

For sure, getting your software in a Debian (or Ubuntu, etc) repository is a nice to have feature for your software. But it isn't the only way to make things easy for your users. WEE is actually a nice example of easy to install software. One "git clone" command on the command line and I had what I needed. He also has a nice script that you can use if git clone isn't your thing.

Jerry_Story said...

Synaptic has tens of thousands of software packages. I don't install anything except if it's on Synaptic.

Would your software be packaged, maintained, and hosted in an official repository? If your software is going to be distributed that way, maybe you can help get OpenEuphoria and common things like WxEuphoria in the repo too.

Jerry_Story said...

If it's not on Synaptic, I usually assume it's probably garbage.

Sourceforge, GitHub, and similar have been hosting quality software for many years. Tons of high quality software will not make it to an official repo.

Jerry_Story said...

I understand that putting something in Synaptic is techy and probably a lot of work to do and to maintain. But I figure the Euphoria community has some mega powerful smart people. And maybe they could work together with an expert on .deb files.

I think you're on the right path here and it looks like you have a full grasp of the challenge. But the thing is, we have consider that there is no "they".

new topic     » goto parent     » topic index » view message » categorize

7. Re: Is there any chance of a .deb file for wxEuphoria?

I think it would benefit OpenEuphoria in terms of user base if we could get Euphoria in the package managers of the major distributions. This is a kind of Linux only problem, hundreds of distributions and several distinct packaging systems. Now, that is not the worst of it. Often binaries on one Linux distribution will not work on another distribution (something to do with libc).

Now, suppose for Slackware we had euphoria-base.tgz, euphoria-wx.tgz, euphoria-gtk.tgz, etc... I would just type "installpkg euphoria-*.tgz". In other words, I would just install everything. Like I do for the c library packages. Maybe getting it in the top three distros with everything in one package (our package, wxwidgets, gtk, etc) would be a lot less work than making a package for each one. Although the upgrade path would be horrible!

Python and Perl come with their own distro mechanisms.

I am not saying which one is better, because I don't think I know. I am just laying out issues involved that one has to think about in creating distribution packages.

We already have this for the base package of euphoria for Debian by the way which might encorage other distribution maintainers to include it.

SDPringle

new topic     » goto parent     » topic index » view message » categorize

8. Re: Is there any chance of a .deb file for wxEuphoria?

SDPringle said...

Now, suppose for Slackware we had euphoria-base.tgz, euphoria-wx.tgz, euphoria-gtk.tgz, etc... I would just type "installpkg euphoria-*.tgz". In other words, I would just install everything. SDPringle

In the piece of garbage I wrote for Jerry smile, you type install_AIO with or without a target folder and all is done. The executable does everything a package installer does but works only on Debian-based systems because it calls "apt-get install".

It could be updated to work with different linux distributions if someone knows a reliable way to identify the target architecture.

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

9. Re: Is there any chance of a .deb file for wxEuphoria?

jmduro said...

In the piece of garbage I wrote for Jerry smile, you type install_AIO with or without a target folder and all is done. The executable does everything a package installer does but works only on Debian-based systems because it calls "apt-get install".

It could be updated to work with different linux distributions if someone knows a reliable way to identify the target architecture.

Regards

Jean-Marc

Jean-Marc, Does it install more than the OpenEuphoria standard package or does it install everything? Looking at distrowatch.org, I see the top three distributions use apt-get (Mint, Ubuntu, and Debian). This is encouraging for me.

SDPringle

new topic     » goto parent     » topic index » view message » categorize

10. Re: Is there any chance of a .deb file for wxEuphoria?

jmduro said...

In the piece of garbage I wrote for Jerry smile, you type install_AIO with or without a target folder and all is done. The executable does everything a package installer does but works only on Debian-based systems because it calls "apt-get install".

It could be updated to work with different linux distributions...

If nobody gets to it before me, I can add to your script to detect yum and dnf I think. But, it will have to wait until tonight. Maybe 12 hours from now.

The user of the script would still be responsible for building the dependencies file. (Of course)

new topic     » goto parent     » topic index » view message » categorize

11. Re: Is there any chance of a .deb file for wxEuphoria?

OK, so looking at this, really there are 3 problems in this domain.

Problem Domains

  1. The first one is installing Euphoria in the first place. This problem is already solved using the standard Euphoria installers.
  2. Installing Euphoria libs (or other programs) written in Euphoria.
  3. Installing stuff (shared objects/dlls, utility programs, etc) needed for your Euphoria program to work. The original post is in this domain.

Looking at this list, we can see how you solved all of them with your AIO installer. But, if we were to factor out just the third one, I think you'll find a worthy project. What if we could write a simple dependency file and a program that could use whatever package manager it finds on the target machine to go get what it needs? If you can then write a tool that can generate the dependency list, you might have something that the Linux community could use in general. Software developers could simply focus on writing their software and not have to worry to much about building package after package for each Linux distro they are interested in targeting.

Be warned though, the idea seems simple but I'm sure there are dragons hiding in those shadows.

From the problem domain list above, the second one I think can be solved using git. The idea would be to create something like a distributed CPAN. I say distributed because instead of hosting in one place, like CPAN does, Euphoria community would simply need to share a git URL in a common place. Close examination of these 2 projects would be a good place to start if we want to solve this problem.

I'm going to work on a tool chain (written in Euphoria) and documenting a workflow, that I hope solves problem 2 from the above list of problem domains.

new topic     » goto parent     » topic index » view message » categorize

12. Re: Is there any chance of a .deb file for wxEuphoria?

SDPringle said...

[Jean-Marc, Does it install more than the OpenEuphoria standard package or does it install everything? Looking at distrowatch.org, I see the top three distributions use apt-get (Mint, Ubuntu, and Debian). This is encouraging for me.

SDPringle

Hi Shawn,

It does following:

  • check that user is connected as root
  • install all packages listed in file dependencies.txt
  • create the target directory (only one level, no mkdir -p but this could be changed)
  • untar the archive containing a preinstalled OpenEuphoria 4.1 plus wxEuphoria include file and libraries, plus my own include files
  • update and apply environment variables (PATH, EUDIR, EUINC)

Here is the code of the version I used for the 32-bit package installer:

include std/filesys.e 
include std/error.e 
include std/io.e 
include std/pipeio.e as pipe 
 
object   void = 0 
sequence InitialDir 
integer  f_debug 
 
------------------------------------------------------------------------------ 
 
public procedure logMsg(sequence msg) 
  puts(f_debug, msg & "\n") 
  flush(f_debug) 
  puts(1, msg & "\n") 
end procedure 
 
------------------------------------------------------------------------------ 
 
public function execCommand(sequence cmd) 
  sequence s = "" 
  object z = pipe:create() 
  object p = pipe:exec(cmd, z) 
  if atom(p) then 
    printf(2, "Failed to exec() with error %x\n", pipe:error_no()) 
    pipe:kill(p) 
	return -1 
  end if 
  object c = pipe:read(p[pipe:STDOUT], 256) 
  while sequence(c) and length(c) do 
    s &= c 
    if atom(c) then 
	  printf(2, "Failed on read with error %x\n", pipe:error_no()) 
      pipe:kill(p) 
	  return -1 
    end if 
    c = pipe:read(p[pipe:STDOUT], 256) 
  end while 
  --Close pipes and make sure process is terminated 
  pipe:kill(p) 
  return s 
end function 
 
------------------------------------------------------------------------------ 
 
function isInstalled(sequence package) 
  sequence s = execCommand("dpkg-query -s " & package & " | grep Status") 
  if length(s) and match("ok installed", s) then 
    return 1 
  else 
    return 0 
  end if 
end function 
 
------------------------------------------------------------------------------ 
 
procedure installIfNot(sequence package) 
  if isInstalled(package) then 
    logMsg(package & " already installed") 
  else 
    logMsg("apt-get install -y " & package) 
    sequence s = execCommand("apt-get install -y " & package) 
    logMsg(s) 
  end if 
end procedure 
 
------------------------------------------------------------------------------ 
 
  sequence cmd = command_line() 
  sequence targetDirectory = "/usr/local/euphoria-4.1.0" 
  integer lg = length(cmd) 
  if lg < 3 then 
    logMsg("Usage: install_AIO [<target directory>]") 
    logMsg("Using default target directory: /usr/local/euphoria-4.1.0") 
  else 
    targetDirectory = cmd[3] 
  end if 
  sequence info = pathinfo(cmd[2]) 
  void = chdir(info[PATH_DIR]) 
  InitialDir = current_dir() 
  f_debug = open(InitialDir&SLASH&info[PATH_BASENAME]&".log", "w") 
  crash_file(InitialDir&SLASH&info[PATH_BASENAME]&".err") 
 
  -- verify user is root 
  sequence s = execCommand("id") 
  logMsg(s) 
  if not match("uid=0(root) gid=0(root) groupes=0(root)", s) then 
    logMsg("Need to be run as root") 
    close(f_debug) 
    abort(1) 
  end if 
 
  -- install dependencies 
  s = read_lines(InitialDir&SLASH&"dependencies.txt") 
  for i = 1 to length(s) do 
    installIfNot(s[i]) 
  end for 
 
  -- install OpenEuphoria 4.1 
  s = execCommand("mkdir "&targetDirectory) 
  logMsg(s) 
  s = execCommand("tar -xvf "&InitialDir&SLASH&"eu41.tgz -C "&targetDirectory) 
  logMsg(s) 
 
  -- update environment variables 
  if append_lines("/etc/bash.bashrc", { 
    "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:"&targetDirectory&"/bin",  
    "export EUDIR="&targetDirectory, 
    "export EUINC="&targetDirectory&"/include/" 
  }) = -1 then 
    logMsg("Failed to append lines to /etc/bash.bashrc") 
    close(f_debug) 
    abort(1) 
  end if 
 
  -- apply environment variables 
  s = execCommand(". "&SLASH&"/etc/bash.bashrc") 
  logMsg(s) 
   
  close(f_debug) 

Regards

Jean-Marc


Forked into: AIO installer problem

new topic     » goto parent     » topic index » view message » categorize

13. Re: Is there any chance of a .deb file for wxEuphoria?

xecronix said...

Looking at this list, we can see how you solved all of them with your AIO installer. But, if we were to factor out just the third one, I think you'll find a worthy project. What if we could write a simple dependency file and a program that could use whatever package manager it finds on the target machine to go get what it needs? If you can then write a tool that can generate the dependency list, you might have something that the Linux community could use in general. Software developers could simply focus on writing their software and not have to worry to much about building package after package for each Linux distro they are interested in targeting.

Be warned though, the idea seems simple but I'm sure there are dragons hiding in those shadows.

Hi Ronald,

That is what the code already does. All that is listed in "dependencies.txt" is installed via apt-get install. It can be easily adapted to detect whatever installer is available but what if more than one is available: yum and apt-get or yum and rpm.

One could say take one of them and do the job, but it ain't that easy. On my Mint distribution, I'm sure apt-get is working, but I can also install yum and yum can be present but it's database not initialized. Using yum in such a context would lead to problems. So detecting available installers is not enough.

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

14. Re: Is there any chance of a .deb file for wxEuphoria?

jmduro said...

Hi Ronald,

That is what the code already does.

Jean-Marc,

Do you mind if I take the code you wrote, modify it, and then put it on github under this BSD license?

new topic     » goto parent     » topic index » view message » categorize

15. Re: Is there any chance of a .deb file for wxEuphoria?

Jerry_Story said...

Is there any chance that someone will make a .deb file for wxEuphoria so it can be in the synaptic package manager in linux?

I'll tell you that the primary reason we don't have .deb and .rpm packages for most Euphoria stuff is that building and maintaining them requires time we don't have.

xecronix said...

I'm going to work on a tool chain (written in Euphoria) and documenting a workflow, that I hope solves problem 2 from the above list of problem domains.

Jeremy had started work a while ago on something called eupack. You might want to check it out.

-Greg

new topic     » goto parent     » topic index » view message » categorize

16. Re: Is there any chance of a .deb file for wxEuphoria?

xecronix said...

Jean-Marc,

Do you mind if I take the code you wrote, modify it, and then put it on github under this BSD license?

I would be pleased if it was helpful to someone. It is public domain with no restriction at all. I would even be one of the first persons to use your package with this modified code, so please do it!

Best Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu