7

I have implemented a few changes in Jitsi and trying to generate a windows installer file but I am not getting any information regarding how can I do it using Ubuntu/Windows. I am using Ubuntu 19.10.

Tried?
I've tried implementing using this guide but not finding the same directory structure.
Update
I've tried using this guide but it causes a number of issues. Some of which is like :

  1. Error: File not found named as config.h
    I know that the file is missing from the specified path provided at the time of the error. But this file is neither specified is JITSI's official repository nor anywhere else.

  2. EXE created using this method doesn't work out of the folder it was created. It doesn't copy the dependencies to the EXE rather it copies in a folder which I need to keep wherever I need to run the EXE file which isn't a good practice.

  3. This method works only on Windows PC. I always don't have access to a Windows PC, so it is really problematic for me to get through this method too.

Question
Do I need to compile the EXE file using Windows Only? If so, how can I achieve that? Or, otherwise, how can I create it using Ubuntu. Exe File must be installed like any other executable file to Program Files. Thanks

Explanation of the Problem

What am I trying to do?
- Create Jitsi Installer for Windows (either using Ubuntu or Windows).
- The installer should install like the installer of Netbeans or any other installer.
- The installer should manage the Installation of JDK/JRE by itself. (It shouldn't ask the user to install JDK/JRE).
- It should create a directory structure like the installation of Netbeans etc.
What I got?
- Using this guide, I am to create a runnable EXE file on Windows. (I didn't try wine on Ubuntu for this purpose) with a bunch of other files in the same folder. Following is the directory structure.

C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows
-> tmp/
-> versionupdate.properties
tmp/
enter image description here
light/
enter image description here

How it works when I run the EXE file?
- It directly runs the application.
- Gives the Java error if it's not installed.
- EXE file doesn't work at all, when copied outside this location.

Errors I got while creating EXE?

define-ant-contrib-task:
build-installation-wix-base:
[propertyfile] Creating new property file: C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\versionupdate.properties
    [mkdir] Created dir: C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\light
     [exec] process_begin: CreateProcess(NULL, rm.exe -f ../../../../resources/install/windows/config.h, ...) failed.
     [exec] make (e=2): The system cannot find the file specified.
     [exec] rm.exe -f ../../../../resources/install/windows/config.h
     [exec] Makefile:60: recipe for target 'C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h' failed
     [exec] make.exe: [C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h] Error 2 (ignored)
     [exec] echo #define PRODUCTNAME "PAM7000" > C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] echo #define COMPANYNAME "jitsi.org" >> C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] echo #define PRODUCTBUILDVERSION "2.11.1" >> C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] echo #define PRODUCTBUILDVERSION_COMMA 2,11,1,0 >> C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] echo #define TARGET_BASENAME "PAM7000" >> C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] echo #define TARGET_BASENAME_EXE "PAM7000.exe" >> C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] C:/mingw/x64/bin/windres.exe -I ../../../../resources/install/windows -I C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light run.rc -O coff -o C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light\\run.res
     [exec] C:/mingw/x64/bin/gcc.exe  -Wall -Wreturn-type -DPSAPI_VERSION=1 -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -IC:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light -I"C:\Program Files\Java\jdk1.8.0_241/include" -I"C:\Program Files\Java\jdk1.8.0_241/include/win32" registry.c run.c C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/run.res ../setup/nls.c -mwindows -o C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/PAM7000.exe -ladvapi32 -lpsapi
     [exec] C:/mingw/x64/x86_64-w64-mingw32/bin/strip.exe C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/PAM7000.exe       

unzip-windows-jre:
    [unzip] Expanding: C:\InstallJRE\jre-8u152-windows-x64.zip into C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\light
     [copy] Copying 1 file to C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\light
     [xslt] Processing C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\heat.wxs to C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\component-defines.wxi
     [xslt] Loading stylesheet C:\Users\iqbal\Downloads\UPdate5\jitsi\resources\install\windows\heat-component-defines.xsl
     [xslt] Processing C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\heat.wxs to C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\component-refs.wxi
     [xslt] Loading stylesheet C:\Users\iqbal\Downloads\UPdate5\jitsi\resources\install\windows\heat-component-refs.xsl
     [xslt] Processing C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\heat.wxs to C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp\lib-dir-id.properties
     [xslt] Loading stylesheet C:\Users\iqbal\Downloads\UPdate5\jitsi\resources\install\windows\heat-component-libsearch.xsl
     [copy] Copying 1 file to C:\Users\iqbal\Downloads\UPdate5\jitsi\release\windows\tmp
     [exec] process_begin: CreateProcess(NULL, rm.exe -f ../../../../../resources/install/windows/config.h, ...) failed.
     [exec] make (e=2): The system cannot find the file specified.
     [exec] rm.exe -f ../../../../../resources/install/windows/config.h
     [exec] make.exe: [C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h] Error 2 (ignored)
     [exec] Makefile:71: recipe for target 'C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h' failed
     [exec] echo #define PRODUCTNAME "PAM7000" > C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] echo #undef PACKAGECODE >> C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/config.h
     [exec] C:/mingw/x64/bin/windres.exe -I../../../../../resources/install/windows -IC:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light cleansweep.rc -O coff -o C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/lightcleansweep.res
     [exec] C:/mingw/x64/bin/gcc.exe -O2 -Wall -Wreturn-type -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -IC:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light cleansweep.c C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/cleansweep.res -mwindows -o C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/cleansweep.exe -lshell32
     [exec] gcc.exe: error: C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/cleansweep.res: No such file or directory
     [exec] make.exe: *** [C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/cleansweep.exe] Error 1
     [exec] Makefile:65: recipe for target 'C:\Users\iqbal\Downloads\UPdate5\jitsi/release/windows/tmp/light/cleansweep.exe' failed

BUILD FAILED
C:\Users\iqbal\Downloads\UPdate5\jitsi\resources\install\build.xml:340: The following error occurred while executing this line:
C:\Users\iqbal\Downloads\UPdate5\jitsi\resources\install\build.xml:690: exec returned: 2
the busybee
  • 5,650
  • 2
  • 9
  • 25
Jamshaid
  • 202
  • 5
  • 26
  • Did you try to use Wine to run EXEs? – the busybee Feb 24 '20 at 17:45
  • @thebusybee I tried running the exe on Windows operating system – Jamshaid Feb 24 '20 at 17:47
  • Do you know what [Wine](https://www.winehq.org/) is? You can run EXEs with it on other OS, namely Linux. It resembles a Windows environment without the need to set up a virtual machine. What will be another option for you, BTW. However, you will need a Windows license for such a virtual machine. – the busybee Feb 24 '20 at 17:56
  • I know what Wine is. I don't really need to run exe in wine. I am currently running the generated exe in Windows and I am having problems with that. Once the exe runs on windows, It can run anywhere wherever the exe is supported – Jamshaid Feb 24 '20 at 18:02
  • My question was about generating the exe file. Running is easier. Using Wine, I can't create it – Jamshaid Feb 24 '20 at 18:03
  • That's what I ment, sorry for being not so clear: to run the tools on Wine for building the installer. Why does that not work? – the busybee Feb 24 '20 at 19:20
  • The above-mentioned tool works on windows but it throws a few errors as mentioned above. There's one more problem with the generated installer that it needs all the copied files to the desired folder to run it. It doesn't install like the regular installer but runs directly. – Jamshaid Feb 24 '20 at 19:50
  • I want the installer to run and installer like regular installer and manage all the files by itself – Jamshaid Feb 24 '20 at 19:50
  • Let's repeat what we have right now: 1) You're able to build the installer on Windows, but not on Linux with Wine and the same tools and commands. 2) The installer built on Windows works and installs your Jitsi correctly. 3) If you try to build the installer on Linux without Wine using Linux tools, depending on the method: 3.1) The build reports error 1 shown in your question. 3.2) The installer does not work as shown in case 2 in your question. – the busybee Feb 24 '20 at 20:23
  • Please [edit] your question: 1) Provide the errors you get when building the installer on Linux with Wine. 2) If I understood your descriptions wrong, please elaborate, for example with showing the steps you take, the output you get, and the output you expect. -- Until then, have a good night. – the busybee Feb 24 '20 at 20:26
  • @thebusybee please have a look at the question – Jamshaid Feb 24 '20 at 21:07
  • @thebusybee any suggestions please? – Jamshaid Mar 02 '20 at 16:31
  • 1
    No, I'm sorry. I never used Jitsi and don't want to download and install a lot of stuff just for you. You might need to wait for someone having a similar setup as you. anyway, some ideas. -- 1) Did you join [Jitsi's mailing lists](https://jitsi.org/Development/MailingLists), search them, or ask there? Those should be the people with the knowledge. -- 2) Since your log shows that some build tools are involved, try to follow their logic. Do the steps manually to see where and why they might fail. -- Good luck! – the busybee Mar 02 '20 at 17:51

0 Answers0