launch4j, converting jar file to exe file - launch4j

Error traceback:
net.sf.launch4j.ExecException: Exec failed (1):
C:\Program Files (x86)\Launch4j\bin\windres.exe
--preprocessor=type -J rc -O coff -F pe-i386 C:\Users
\User\AppData\Local\Temp\launch4j6197845955225217799rc
C:\Users\User\AppData\Local\Temp\launch4j10399698512419771437o
I am having this kind of error while converting jar file to exe file.
I could not fix it. Any ideas?

Related

Can't create file in Bash on MinGW64

Having an executable file in a directory, let's say named hello.exe:
$ ls
hello.exe*
The file name is colored green and an asterisk is appended.
Listing the file explicitly by giving its name but without extension, it is listed without extension:
$ ls hello
hello*
Until here it looks just like a funny feature for Win freaks that like to omit the .exe extension.
But now, when you try to create a file without any extension, Bash complains:
$ echo hello > hello
bash: hello: Permission denied
The same problem arises when you try to copy a folder structure recursively which contains a folder hello/ and an executable hello.exe in the same folder:
It cannot be copied using cp -r when (by accident) the file hello.exe is copied first and the folder hello/ is copied second; the creation of the folder is denied in this case:
cp: cannot overwrite non-directory './hello' with directory './hello'
Now my question is:
Is this a bug or a feature? If it is a feature, how can I disable it?
The system I'm using is a MINGW64 Bash on Windows 10.

Launch4J, Windres preprocessing failed

I had an error when I use the plugin-maven of launch4j to convert jar into exe.
This error : net.sf.launch4j.ExecException: Exec failed (1).
When I see the log, i see this error : ...windres.exe: preprocessing failed.
So, I've downloaded Launch4J bundle and i've used the windres with the same command (with verbose) :
bin\windres.exe --preprocessor type -J rc -v -O coff -F pe-i386 test\rc test\out
I wrote a rc file with the minimal configuration (test\rc).
Result :
Using popen to read preprocessor output bin\windres.exe: preprocessing failed.
Same error.
I used Windows 10 to run this command. But when I use windows 7...no error the output was created.
May be the GNU windres had a problem with the preprocessor type inside windows 10 ?
Any idea ?
thx.

unzip .bin file programatically in ruby

I have a .bin which i am trying to unzip programatically. The directory is a temp directory in which the.bin file is saved.
I have tried to the following
change the permission of bin files by typing.
chmod -c 777 filenam.bin.
now run the bin file by typing
here is a ruby code which i have
%x(gunzip #{label_path})
using above gunzip gives me this error
unknown suffix -- ignored
I shows error as illegal option c.
Can anyone help. Thanks.
gunzip has an option -S to specify a suffix of the file to be unzipped:
gunzip -S .bin filenam.bin
The above will produce file filenam in the same directory.

In JetBrains IDEs (e.g. CLion, IntelliJ), external tools cannot use globbing patterns

I added an external tool to CLion with the following details:
Program: zip
Parameters: asm.zip *.cc *.h
Working directory: $ProjectFileDir$
When I run this external tool as part of my build command, it says:
zip asm.zip *.cc *.h
zip warning: name not matched: *.cc
zip warning: name not matched: *.h
zip error: Nothing to do! (asm.zip)
Process finished with exit code 12
But when I replace the details with:
Program: ls
Parameters:
Working directory: $ProjectFileDir$
Then the output is the list of files in the project folder (which includes .cc and .h files) and the build completes successfully. What am I doing wrong?
Clion invokes the command you run directly, without expanding globs (* character).
Modify the settings to, eg.:
Program: sh
Parameters: -c "zip asm.zip *.cc *.h"
This way, the sh shell will correctly expand the arguments.

gfortran returns `*.f90: No such file or directory` when compiling multiple files

I have a folder with 354 .f90 modules (and the main file). In the readme this is suggested:
The best approach is to unzip the archive source.zip extracting all
354 program files into a directory of your choice. Then you can
compile with the command
gfortran *.f90 -o app.exe
I'm on Mac so i installed gfortran but doing the command written above doesn't work:
gfortran: *.f90: No such file or directory
So I suppose that a bash script is needed (or at least a makefile).
I'm not used to doing this so what should I do? Does there exist some automatic makefile generator?
It was just a stupidity issue. The extension of the files was .F90 and not .f90. With:
gfortran -o app *.F90
it worked.

Resources