Creating a Windows Installer for Jitsi Desktop using Ubuntu

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

Building the installers for windows is really a tricky one … till not it always is being build by sshing to a cygwin running ssh server and using tdm-gcc to build everything from a shell script executing in that ssh-de session.

is there any method defined for it somewhere? I didn’t find it anywhere. I searched a lot in old mailing list as well.

What do you mean by method? Everything is in the ant build file. We have a windows build machine which is pretty old and we will retire it soon, so probably windows builds will stop at some point.
On that machine the versions of tdm-gcc and everything is pretty old and have not been updated … old as 7 years and more maybe …
So probably, I’m not of big help here. But there should be some emails from the mailinglist here in the forum explaining how we were configuring it … but that is all we have.
I was thinking and testing some github actions of producing installers. The debian packages were produced without a problem, than I got blocked on producing the dmg as the macosx machines used by github actions miss SetFile executable (missing Xcode command line tools …) and my next steps were to try testing the windows build … but I think this is the way to go, if that works then you can contribute it to the project so we can build the binaries for windows for Jitsi Desktop.

Right. Thanks for updating about that. Would you please share something about how you tried it on GitHub actions. I may be able to produce something. I am asking it as I’ve never worked with GitHub actions before. That’s why your help would be really helpful in getting started with that regarding this specific problem.

Well it was same here. I had never used Github actions, but there are a lot of examples how to do that and I came to this one: https://gist.github.com/damencho/8c13613e491a1a4b58f109378b014d0c