Rewrite windows exe to ubuntu program?

okppko

Distinguished
Nov 6, 2009
347
0
18,790
This may be difficult, because I get no answers in forums. It is not wine I am asking about. I have read, that ubuntu 12.04 is mainly written in c. What does it take to transform a windows exe to a program, that will run on ubuntu 12.04? What qualifications must a person solving, that task have? Where do you find such a coder?
Thanks.
 
For your information, Windows is also mainly written in C. That has no effect to how it runs executables.

Unless you have the source code for the exe, you're likely to reverse engineer it. Ubuntu can run any code written in any language. The problem isn't in the language itself, but the exe being a compiled binary file instead of a code file.
 

okppko

Distinguished
Nov 6, 2009
347
0
18,790
So the problem is to decompile a windows exe, and then recompile it for ubuntu use? And the windows exe binary compiler coders have made that a diificult or impossible task, because they want to protect the source code? That is the reason why ubuntu computer users in generel do not buy a windows program and compile it for ubuntu themselves? Or you can say, if you have a program's source code, you can get it to run on any system? Is it something like this you would use to decompile http://www.backerstreet.com/rec/rec.htm ? When you say source code, in ubuntu 12.04 is that what you may see listed in software sources other software? Do you know recommended forums for these questions? Thanks.
 
You cannot decompile a binary. Not you in general, but anyone. There is currently no known way to easily decompile a binary. Problem with doing so is that there are so many ways to write code that will be compiled into the same binary. Windows binary are not always to protect the source code. Moreover than not, it's for the ease of distribution. If they were released via source code, do you really think that most Windows users would understand how to compile it properly?

Yes; if you have the source code, you can almost always compile it in any operating system provided that it has all the required libraries in their respective versions.

To do what you want, you'll have to reverse-engineer it like I said earlier.
 
Its probably just easier, if you do not have the source code, to try running your program via WINE.
http://www.winehq.org/

This is what the source code of a C program looks like:
http://git.videolan.org/?p=x264.git;a=tree
Code:
 static int encode_frame( x264_t *h, hnd_t hout, x264_picture_t *pic, int64_t *last_dts )
 {
     x264_picture_t pic_out;
     x264_nal_t *nal;
     int i_nal;
     int i_frame_size = 0;
     i_frame_size = x264_encoder_encode( h, &nal, &i_nal, pic, &pic_out );
     FAIL_IF_ERROR( i_frame_size < 0, "x264_encoder_encode failed\n" );
     if( i_frame_size )
     {
         i_frame_size = cli_output.write_frame( hout, nal[0].p_payload, i_frame_size, &pic_out );
         *last_dts = pic_out.i_dts;
     }
     return i_frame_size;
}
 


Understand, but really what is the alternative is source is not available...
ReWrite from scratch? run in windows/VM? Wine?
 
I would like to know what the program does. Maybe there's a Linux alternative. The other way is to reverse engineer it, which is a different subject. Depending on the program, it may be copyrighted and is protected by the copyright law.
 

randomizer

Champion
Moderator
The biggest problem will be if the application uses Windows libraries. Even if you could reverse engineer the application, these libraries are OS-specific.

What is the application you want to run on Ubuntu? We're just talking about hypothetical scenarios here and that's hardly going to provide you with any value. It seems that you have your mind set on a solution to a problem that you have not explained and you are wanting advice on how to go about this. It's much better if you explain the problem instead.
 

okppko

Distinguished
Nov 6, 2009
347
0
18,790
Thank you for all the answers. I must have got an email notification about new answers. In that case I did not see it. Therefore I am posting now.
I do not now about this subject. I am just trying to find out where I can post to find out who knows about this subject.
As I am informed, if you have the license for a software, then European law says, you are allowed to modify the software in order to make it compatible for your use.
I have a windows sapi5 exe English voice. If you know ubuntu 12.04, the default text to voice is of spectacular poor quality. I have not found any matching fx windows voice Anna. I want to get the sapi5 exe voice to run on ubuntu. Or get a linux voice that has the same level of quality.
 

okppko

Distinguished
Nov 6, 2009
347
0
18,790

Is this the path?
You cannot install the sapi5 exe voice tts on wine? You can install sapi server exe on wine and then install the sapi5 exe voice tts in sapi server? Could you state where to get the sapi server? Thanks.
 

okppko

Distinguished
Nov 6, 2009
347
0
18,790


It could be, that they have made a solution to install sapi tts on linux, ubuntu. But the website has not been updated for a while. I have posted an email to an address, I found on the site, to find out how it works. You have not tested it? I do not remember, that I found the website when I made searches. Thanks.
 

okppko

Distinguished
Nov 6, 2009
347
0
18,790

I have now installed the msi file. And a sapi5 tts voice.
But I have no idea to verify that anything works, or how to use it. You wrote, you launched it in wine. What did you mean by that? Thanks.