WinPenPack's X-Launcher updated

If you are currently developing portable freeware or planning to do so, use this forum to discuss technical implementation, seek out like-minded developers for partnership, or solicit interested users for beta testing.
Message
Author
User avatar
rbon
Posts: 398
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: WinPenPack's X-Launcher update?

#31 Post by rbon »

sl23 wrote: Thu May 30, 2024 10:44 am I have found the website, linked above, that explained how to use Aut2Exe to compile a 64bit program. It seems to work ok, but there is an error on closing the launched app:
X-Launcher x64 - Error.png
I have no idea why?
The question is: what is a launcher for?
A launcher works like a 'runtime' of a program and executes, line by line, the instructions contained in its .INI.

The rule is:
1. after creating a launcher, for example X-SteamRoller.exe (do not use the name compiler.exe because it is a launcher and NOT a compiler), you must immediately create its configuration file
2. the configuration file must have the same name as the launcher, i.e. X-SteamRoller.ini and must to be placed near at X-SteamRoller.exe
3. the simplest method to create X-SteamRoller.ini is to double click on the name of the launcher.exe.
-> If the launcher.ini:
- does not exist: a new .ini file will be created next to launcher.exe using the default parameters
- if it already exists (because already created and modified): it will be overwritten
4. after the creation of file X-SteamRoller.ini You must you must check it carefully and enter:
-- a. where the program to be portabilized is located (obviously inside the \Bin subfolder)
-- b. the other boot options
-- c. Environment parameters (like %Appdata%)
-- d. whether to display the splash screen
-- e. other specific settings
5. see examples of other portabilized programs:
- website: www.winPenPack.com
- Forums
- discussion: X-Software development

Please see inside folder '_x-launcher\x-launcher.au3'' of X-LibreOffice
see from row 119 to row 128: the tile of this section is '; Warning messages'
; Warning messages
_SystemLanguage($Lang)
Select
Case $Lang = 'it'
$NoIni = 'Il file di configurazione "' & $ScriptIni & '" non esiste.' & @CRLF & @CRLF & 'Ne verrà creato uno con le opzioni predefinite.'
$PleaseCheck = 'Si prega di controllare le impostazioni prima di proseguire.'
Case Elses
$NoIni = 'The configuration file "' & $ScriptIni & '" does not exist.' & @CRLF & @CRLF & 'One with the default options will be created.'
$PleaseCheck = 'Please check the settings before continue.'
EndSelect
You can see this warning message show by X-LibreOffice.exe (my launcher)

Image

The question you asked me: does the 64-bit launcher work?
I think the answer is YES.
As soon as I have time I'll try it too (but I have no doubt that it works)

In conclusion:
X-Launcher's operation is no different from AutoRunLWMenu:
1. You have the 'engine': AutoRun_x64.exe
2. You have the configuration file: AutoRun.inf
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#32 Post by sl23 »

Thanks for the info. It's really good of you to explain all that. :)
I have used X-Launcher for many years. I learnt the basics of how to set up the installation directory of the portable app and all the AppData, that, I'm pretty sorted on. I do fully realise how it works and how to use it. Though I leave the registry alone.

The error wasn't to do with a missing INI file, it was an error on closing the app. Using the newly compiled X-Launcher, I run StemRoller with it, and it runs fine, portable too. But upon closing StemRoller window, I would then receive a window tiled AutoIT error or similar.

But, I tried compiling again and changed LibreOffice to Launcher through out the scripts, and the compiled X-Launcherx64.exe works fine now. It was a success.

The only thing I would like to sort is the SplashScreen no longer shows. I looked at the manual and there is a SplashScreen section in the INI file. But adding the text from the manual, with the graphics from the source code still doesn't show the splash screen. It's an integral part of the 32bit version, so I don't understand why it doesn't compile in the X-LibreOffice version you supplied.

In fact, the X-LibreOffice source you supplied has a JPG file with zero bytes! Why is that?

AutoRun.exe seems to use the same syntax as SyMenu to make apps portable. X-Launcher seems to work differently because it works and the other two don't. Strange. But that was why I was so determined to get it upgraded to x64.

AutoRun and SyMenu either don't use the fake AppData path, or won't run the app at all when you set up the EnvVar's. X-Launcher has no issues in using the Fake AppData path and runs the perfectly fine. I've tried both with a few apps and the same result, X-Launcher works where the other two don't.
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
rbon
Posts: 398
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: WinPenPack's X-Launcher update?

#33 Post by rbon »

sl23 wrote: Fri May 31, 2024 1:00 pm In fact, the X-LibreOffice source you supplied has a JPG file with zero bytes! Why is that?
In fact I found it like this when I downloaded it years ago (that is, with the file x-splash.jpg wit 0 (zero) bytes.
But I tried to solve it.
On LibreOffice I found a group of splash screens, but all in .svg format. With the help of the online service offered by Convertio.io https://convertio.co I converted the .svg file into .jpg and renamed it to x-splash.jpg.
At that point I modified the source of X-LibreOffice.au3 as follows:

Code: Select all

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=Y
#AutoIt3Wrapper_Icon=graphics\x-icon.ico
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg
#AutoIt3Wrapper_Outfile=X-LibreOffice.exe
#AutoIt3Wrapper_UseUpx=N
#AutoIt3Wrapper_Res_Comment=X-Launcher allows you to change at will the options for initiating programs undertaken in order to make them portable.
#AutoIt3Wrapper_Res_Description=winPenPack X-LibreOffice Launcher
#AutoIt3Wrapper_Res_Fileversion=1.6.1.0
#AutoIt3Wrapper_Res_LegalCopyright=GNU General Public License
#AutoIt3Wrapper_Res_Language=1040
#AutoIt3Wrapper_Res_requestedExecutionLevel=None
#AutoIt3Wrapper_Res_Field=ProductName|winPenPack X-LibreOffice
#AutoIt3Wrapper_Res_Field=ProductVersion|Ini Rev 23 x64
#AutoIt3Wrapper_Res_Field=OriginalFilename|X-LibreOffice.exe
#AutoIt3Wrapper_Res_Field=InternalName|X-LibreOffice
#AutoIt3Wrapper_Res_Field=CompanyName|www.winpenpack.com
#AutoIt3Wrapper_Res_Field=Authors|tittoproject - winPenPack Team & winPenPack community
#AutoIt3Wrapper_Res_Field=LegalTrademarks|winPenPack
#AutoIt3Wrapper_Res_Field=eMail|winpenpack@gmail.com
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;   winPenPack X-LibreOffice Launcher

#Region

;** AUT2EXE settings

;** AUTOIT3 settings
#AutoIt3Wrapper_Run_Debug_Mode=N

;** Target program Resource info

#EndRegion

;** Include X-Launcher's source code
#include "..\_x-launcher\x-launcher.au3"
#include "files\x-install.au3"
Also I have added the instruction:
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg
after Icon instruction.
Then I have recompiled as x64 bit.
The file X-LibreOffice.exe has switched from 1.172.480 bytes to 1.225.728 bytes (with splash screen).

Can you explain to me what you need the splash screen for since it isn't displayed?

Anyway I have refreshed my archive on MediaFire with Splash screen source code (file X-LibreOffice.au3) instructions:
X-LibreOffice_launcher_x64_updated.zip https://www.mediafire.com/file/ds9lyv5n ... d.zip/file
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#34 Post by sl23 »

Not sure what's happening, but I did try your suggestion with my current X-Launcher64.exe:

Code: Select all

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=Y
#AutoIt3Wrapper_Icon=graphics\x-icon.ico
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg
I changed the x-splash.jpg to the default X-Launcher one and then added this in the INI file after compiling:

Code: Select all

[SplashScreen]
Image=$Lib$\Graphics\x-splash.jpg
Title=$AppName$
TimeOut=1500
I'll give your updated version a try and see if that resolves the issue with it. Thanks for the information. :)

My reason for wanting the splash screen, is partly that I'd like to have it, because I'm a perfectionist and partly because it provides acknowledgement the app has been launched. So If the app doesn't start, It tells me there's an issue with the INI file, admin privileges or AppData info. In my experience, these are the only reason the launcher starts but the app doesn't.
Last edited by sl23 on Sat Jun 01, 2024 3:11 am, edited 1 time in total.
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#35 Post by sl23 »

I tried recompiling with your latest update. Which is pretty much what I had setup anyway.

This is the latest compiled version with all the changes for SplashScreen.
Changes:
1. Renamed any X-LibreOffice files to X-Launcher.
2. All references of LibreOffice changed to X-Launcher in X-LibreOffice.au3
3. Changed file x-default to the default empty one.
4. Changed file x-launcher.ini to the default one and set Java=false.
5. Changed the JavaGet Variables code in x-launcher.au3 from:

Code: Select all

Global $sJGUnpackDir, $sJavaURL

;Global $sJGUnpackDir = "jre1.8.0_381"
Global $sJGAppName = "winPenPack Java Installer"
;Global $sJavaURL = "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=248773_8c876547113c4e4aab3c868e9e0ec572"
;~ $sJavaURL = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=35684"
Global $iMsgBoxAnswer
Global $sJBak
to the default:

Code: Select all

Global $sJGAppName = "winPenPack Java Installer"
Global $sJavaURL = "http://www.winpenpack.com/main/request.php?956"
;~ $sJavaURL = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=35684"
Global $iMsgBoxAnswer
Global $sJBak
Use with caution. Works but may have bugs.
x-launcher_x64.zip
Includes all source from X-LibreOffice_launcher_x64_updated, with my edits and My compiled X-Launcher x64.
(730.27 KiB) Downloaded 120 times
The Splash still doesn't show. I have no idea what the issue is, but it's just so strange that compiling this doesn't add it into the launcher. It's also strange how the original X-Launcher source can't be compiled without errors.

If you can help, that would be great, but I get it if you're not interested. But I thank you greatly for what you've done so far. It's a fairly trivial thing to get the splash working. Would be nice, but least it works. :)
Last edited by sl23 on Thu Jun 06, 2024 11:56 am, edited 2 times in total.
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#36 Post by sl23 »

After opening the x-launcher.au3 script in X-SciTE4AutoIt3, and then checking syntax, I get 7 errors in the original x-launcher source code, is this due to the code being made using older versions of AutoIT?

Errors:

Code: Select all

>"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Bin\AutoIt\3.3.16.1\SciTE\..\Au3Check.exe" -q "E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-launcher.au3"
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-udf.au3"(938,22) : error: undefined macro.
	While @InetGetActive
	~~~~~~~~~~~~~~~~~~~~^
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-udf.au3"(939,37) : error: undefined macro.
		$iCount = Round(@InetGetBytesRead /
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-udf.au3"(943,23) : error: undefined macro.
	If @InetGetBytesRead =
	~~~~~~~~~~~~~~~~~~~~~^
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-udf.au3"(944,23) : error: undefined macro.
	If @InetGetBytesRead <>
	~~~~~~~~~~~~~~~~~~~~~^
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-udf.au3"(1242,35) : error: AdlibEnable(): undefined function.
	AdlibEnable("_TrayTipOff", $time)
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-udf.au3"(1255,16) : error: AdlibDisable(): undefined function.
	AdlibDisable()
	~~~~~~~~~~~~~~^
"E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-launcher.au3"(415,30) : error: _DefaultInstall(): undefined function.
_DefaultInstall($Temp, $Lang)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Documents\- Archived Apps\X-SciTE4AutoIt3_4.4.6_rev6_work\X-SciTE4AutoIt3_4.4.6_rev6_work\Backups\X-Launcher_source\x-launcher.au3 - 7 error(s), 0 warning(s)
>Exit code: 2    Time: 0.1376
x-launcher.au3 and x-udf.au3 code in the zip file:
x-launcher.au3 and x-udf.au3.zip
(19.79 KiB) Downloaded 115 times
When I run a syntax check on x-udf.au3 I get 16 errors and 3 warnings! :shock:
Any idea how to fix? Or any idea why the errors?
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
rbon
Posts: 398
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: WinPenPack's X-Launcher update?

#37 Post by rbon »

rbon wrote: Fri May 31, 2024 2:43 pm Also I have added the instruction:
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg
after Icon instruction.
This instruction don't works because the code for manage Splash screen is missing inside file '_x-launcher\x-launcher.au3'.
I have removed the instruction of splash screen (#AutoIt3Wrapper_Splash=graphics\x-splash.jpg[) from my uploaded archive on MediaFire.

I have downloaded from winPenPack the archive X-Launcher_source_1.5.4.zip and I immediately realized that the files had been placed in randomly.
I recreated the same file structure used for X-LibreOffice and compiled in 64 bit:
1. during compilation I specified that the resulting file should be called x-launcher.exe
2. I changed the version number of X-Launcher to 1.5.5
3. I updated the current version of AutoIt (3.3.16.1) in the description of files contained in '_x-launcher' folder.
The archive that I uploaded to MediaFire also includes the 64-bit x-Launcher.exe file.

MediaFire:
X-Launcher_1.5.5_x64_sources.zip https://www.mediafire.com/file/y5u8ezr7 ... s.zip/file

The problem of Splash screen not displaying is very old (about 12 years old):
if you really want to solve it you have to go to Google and type the command:
'splash missing autoit'
the other day I saw a post on AutoIt with some code to insert in '_x-launcher\x-launcher.au3'. If I find it again I'll let you know.

I can't do anything else for the moment.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#38 Post by sl23 »

That' brilliant, thank you!
I did manage to create the x64 Launcher though I don't know if it works ok with everything, ie registry, functions, options. But it works for the little that I use, so far at least. But will look at your v1.5.5 code and try it out as well as the Launcher.

Can't believe that's why it wasn't working! I probably would never have known that the folder structure was wrong. Thought there was something going on in there. Oh well, glad that's fixed. Perhaps you should upload your new version to WinPenPack? :)

I'll try searching for answers re splash screen. see what I can come up with. I have asked on the AutoIT forum too, but I expect they are fed up with newbie's keep requesting stuff?! :oops: Must get annoying!

Thanks, you've been a great help.

EDIT:
Unfortunately, you're launcher is giving an error on closing the app. I'm guessing that the original source code for X-Launcher is at fault here as the LibreOffice code works when compiled. Very odd!

Code: Select all

AutoIT Error
Line 4396 (D:\pathtolauncher\x-launcher.exe:
Error: Unknown function name.
Perhaps the code you removed needs to stay? Or maybe the original code is just faulty? Who knows! :roll:
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
rbon
Posts: 398
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: WinPenPack's X-Launcher update?

#39 Post by rbon »

sl23 wrote: Sat Jun 01, 2024 12:55 pm Perhaps the code you removed needs to stay? Or maybe the original code is just faulty? Who knows! :roll:
I didn't remove anything, I just changed version number from 1.5.4 to 1.5.5 (not a great idea).
But I had changed in the x-compiler.au3 file in line #6 and put:
'#AutoIt3Wrapper_OutFile=X-launcher.exe' instead of
'#AutoIt3Wrapper_OutFile=X-compiler.exe'
.. and this causes conflict between internal Output name and 'x-compiler.exe' file name.

Corrected and refreshed my previous upload on MediaFire: https://www.mediafire.com/file/y5u8ezr7 ... s.zip/file

I'm sorry for this inconvenience.
Please try again. Thanks.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#40 Post by sl23 »

You have no need to apologise for helping me out :)
Thanks for the correction though! ;)

EDIT:

Still gives error on closing. No worries, I managed to compile an x64 EXE with the LibreOffice source that you updated. It gives no errors in use and appears to work. I have even added several Functions and EnvVar's to it for deleting unused files and folders in several apps. It all works.

I think now, it is just the splash screen that is not working. But I'll live with that if I can keep this working! :)
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
Midas
Posts: 6785
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: WinPenPack's X-Launcher update?

#41 Post by Midas »

sl23 wrote: No worries, I managed to compile an x64 EXE with the LibreOffice source that you updated. It gives no errors in use and appears to work. I have even added several Functions and EnvVar's to it for deleting unused files and folders in several apps. It all works. I think now, it is just the splash screen that is not working.
IMHO, since your 64-bit X-Launcher version has the least errors, it would be useful if you could share it somewhere... :|

BTW, as for the splash screen error, I'm betting this is a path to file issue -- sadly, I don't know enough about the particular file system arrangement to point to a solution.

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#42 Post by sl23 »

It's literally a few posts up above :D
Please read the list of changes, just in case something is wrong with what I have changed.
If you wish to test it that may help to make sure things work that I don't use.

After checking the X-Launcher manual and finding a list of System Variables, I managed to come up with this code:

Code: Select all

[Setup]
AppName=DriverBooster

[FileSystem]
Root=@ScriptDir@
Bin=.\Bin
Lib=.\Lib
Backup=.\Backups

[FileToRun]
PathToExe=$Bin$\$AppName$\$AppName$.exe

[Options]
DeleteTemp=true
MultipleIstances=false
FixAppData=true
RunWait=true
ShowSplash=true
WriteLog=false

[SplashScreen]
Image=$Lib$\Graphics\x-splash.jpg
;Title=$AppName$
TimeOut=1500

[Environment]
USERPROFILE=$Lib$\
LOCALAPPDATA=$Lib$\
PROGAMFILES(x86)=$Lib$\
PROGRAMDATA=$Lib$\

[RunBefore]
DirCopy=$Lib$\AppData|C:\Users\%USERNAME%\AppData|o
DirCopy=$Lib$\Program Files (x86)|C:\|o
DirCopy=$Lib$\ProgramData|C:\o

[RunAfter]
DirRemove=$Lib$\Microsoft|
DirRemove=C:\ProgramData\iTop|
DirMove=C:\Users\%USERNAME%\AppData\LocalLow\IObit|$Lib$\AppData\LocalLow\|o
DirMove=C:\Users\%USERNAME%\AppData\Roaming\IObit|$Lib$\AppData\Roaming\|o
DirMove=C:\Program Files (x86)\Common Files\IObit|$Lib$\Program Files (x86)\Common Files\|o
DirMove=C:\ProgramData\IObit|$Lib$\ProgramData\|o
You have to run the X-Launcher.exe as admin for this to move the files though once the app is closed. But, it works. Tried it with IObit DriverBooster and IObit Uninstaller.
Feel free to add this to PortableFreeware repository or do whatever is in line with the original license.

Re: SplashScreen - In the source code, I found this:

Code: Select all

1. In file ROOT\X-Launcher\X-Launcher.au3
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg


2. In file ROOT\_x-launcher\x-launcher.au3:
	;Options
	;--$ShowSplash = _IniReadPlus($ScriptIni, 'Options', 'ShowSplash', $ShowSplash)
	;--$ShowTrayTip = _IniReadPlus($ScriptIni, 'Options', 'ShowTrayTip', $ShowTrayTip)
==========================
; Defaults
$DeleteTemp = 'true'
$FixAppData = 'false'
$MultipleIstances = 'true'
$RunWait = 'true'
$WriteLog = 'false'
$HideShellWindow = 'false'
$FirstRun = 'false'
$ShowSplash='false'
$ShowTrayTip='false'
==========================
; Image
$Image = _IniReadPlus($ScriptIni, 'SplashScreen', 'Image', '')
$Image = _FullPath($Image, $Root)

; Title
$Title_SS = _IniReadPlus($ScriptIni, 'SplashScreen', 'Title', '')

; Timeout
$TimeOut_SS = _IniReadPlus($ScriptIni, 'SplashScreen', 'TimeOut ', '')
Select
	Case StringIsDigit($TimeOut_SS)
	Case Else
		$TimeOut_SS = '1500'
EndSelect
===========================
; Show Splash Screen
If $ShowSplash = 'true' And $IsRunning <> 'true' Then
	_DebugWrite("[SplashScreen] : executing")
	_SplashScreen($Title_SS, $Image, $TimeOut_SS, $Temp, $Root)
EndIf
===========================
Func _XClose()
	; Close Splash Screen
	_SplashScreenOff()

	; Close TrayTip
	_TrayTipOff()

	; RunAfter
	Local $_runafter = IniReadSection($ScriptIni, 'RunAfter')
	If Not @error Then
		_DebugWrite("[RunAfter] : about to execute ")
		For $ra = 1 To $_runafter[0][0]
			_DebugWrite("--> " & $_runafter[$ra][0] & "=" & $_runafter[$ra][1])
			Select
				Case $_runafter[$ra][1] = ''
				Case $_runafter[$ra][0] = 'DirCopy'
					_DirCopy($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'DirMove'
					_DirMove($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'DirRemove'
					_DirRemove($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'FileCopy'
					_FileCopy($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'FileDelete'
					_FileDelete($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'FileMove'
					_FileMove($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'RunFile'
					_RunWait($_runafter[$ra][1], $Root)
			EndSelect
		Next
		_DebugWrite("[RunAfter] : executed")
	EndIf


3. In file ROOT\_x-launcher\x-udf.au3:
Func _SplashScreen($title, $img, $time, $tempdir, $rootdir)
	If $img <> '' Then $img = _FullPath($img, $rootdir)
	If $img = '' Or Not FileExists($img) Then
		$img = $tempdir & "\x-splash.jpg"
		FileInstall('graphics\x-splash.jpg', $img, 1)
	EndIf
	If Not FileExists($img) Then Return SetError(1, 0, False)
	Local $width = -1, $height = -1, $opt = 1
	Local $aSize = _ImageGetSize($img)
	If @error Then Return SetError(2, 0, False)
	$width = $aSize[0]
	$height = $aSize[1]
	$time = Number($time)
	If $time < 500 Then $time = 3000
	If $title <> '' Then $opt = -1
	SplashImageOn($title, $img, $width, $height, -1, -1, $opt)
	Sleep($time)
	SplashOff()
EndFunc   ;==>_SplashScreen
========================
Func _SplashScreenOff()
	SplashOff()
EndFunc   ;==>_SplashScreenOff
1. The file path to the image is ROOT\X-Launcher\graphics\x-splash.jpg, which looks correct to me.
2. This file has various sections assigned to the functioning of the splash screen.
Options: Not sure if these are meant to be uncommented? If so, does it matter how far they are indented?
Image,Title,Timeout: Can't see anything wrong, but then I don't know AutoIT!
Defaults: I can't imagine this is meant to be set to true as it can be defined in the user options of the X-Launcher.INI file.
Show Splash Screen: Again, nothing looks wrong to me or jumps out at me that could be wrong.
Close Splash, Tray and RunAfter: Just looks like the code for closing splash etc, so see nothing wrong here.
3. The path to the image is mentioned and is the same as before.

Although I know nothing of AutoIT, the path to the image looks ok, except the last one. This appears to show the correct path, but as this file is in a different directory from the 'graphics' folder, maybe that's the issue? EDIT: After checking all of the source code, I found that all files are referenced correctly using #include. The only thing I'm wondering is if I need to add an #include "graphics\x-splash.jpg" line into the file ROOT\X-Launcher\X-Launcher.au3? But then, surely not as the icon has been inserted into the compiled EXE!
Last edited by sl23 on Mon Jun 03, 2024 12:02 pm, edited 3 times in total.
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#43 Post by sl23 »

In the file ROOT\_x-launcher\x-udf.au3, there are a few lines:

Code: Select all

#include-once
#include 'image_get_size.au3'
#include <INet.au3>
#Include <File.au3>
The first file: 'image_get_size.au3' exists. The other two files do not. What are they? Why is it they are to be included but don't exist? I just checked and found out these are a part of AutoIT. So these files are kind of templates, the basis for how the Launcher code works.
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

User avatar
rbon
Posts: 398
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: WinPenPack's X-Launcher update?

#44 Post by rbon »

sl23 wrote: Mon Jun 03, 2024 4:22 am Re: SplashScreen - In the source code, I found this:

Code: Select all

1. In file ROOT\X-Launcher\X-Launcher.au3
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg
I don't really understand where you found this instruction, although I agree (I had inserted it and then removed it from the X-LibreOffice.au3 file)

Code: Select all

2. In file ROOT\_x-launcher\x-launcher.au3:
	;Options
	;--$ShowSplash = _IniReadPlus($ScriptIni, 'Options', 'ShowSplash', $ShowSplash)
	;--$ShowTrayTip = _IniReadPlus($ScriptIni, 'Options', 'ShowTrayTip', $ShowTrayTip)
==========================
; Defaults
$DeleteTemp = 'true'
$FixAppData = 'false'
$MultipleIstances = 'true'
$RunWait = 'true'
$WriteLog = 'false'
$HideShellWindow = 'false'
$FirstRun = 'false'
$ShowSplash='false'
$ShowTrayTip='false'
==========================
; Image
$Image = _IniReadPlus($ScriptIni, 'SplashScreen', 'Image', '')
$Image = _FullPath($Image, $Root)

; Title
$Title_SS = _IniReadPlus($ScriptIni, 'SplashScreen', 'Title', '')

; Timeout
$TimeOut_SS = _IniReadPlus($ScriptIni, 'SplashScreen', 'TimeOut ', '')
Select
	Case StringIsDigit($TimeOut_SS)
	Case Else
		$TimeOut_SS = '1500'
EndSelect
===========================
; Show Splash Screen
If $ShowSplash = 'true' And $IsRunning <> 'true' Then
	_DebugWrite("[SplashScreen] : executing")
	_SplashScreen($Title_SS, $Image, $TimeOut_SS, $Temp, $Root)
EndIf
===========================
Func _XClose()
	; Close Splash Screen
	_SplashScreenOff()

	; Close TrayTip
	_TrayTipOff()

	; RunAfter
	Local $_runafter = IniReadSection($ScriptIni, 'RunAfter')
	If Not @error Then
		_DebugWrite("[RunAfter] : about to execute ")
		For $ra = 1 To $_runafter[0][0]
			_DebugWrite("--> " & $_runafter[$ra][0] & "=" & $_runafter[$ra][1])
			Select
				Case $_runafter[$ra][1] = ''
				Case $_runafter[$ra][0] = 'DirCopy'
					_DirCopy($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'DirMove'
					_DirMove($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'DirRemove'
					_DirRemove($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'FileCopy'
					_FileCopy($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'FileDelete'
					_FileDelete($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'FileMove'
					_FileMove($_runafter[$ra][1])
				Case $_runafter[$ra][0] = 'RunFile'
					_RunWait($_runafter[$ra][1], $Root)
			EndSelect
		Next
		_DebugWrite("[RunAfter] : executed")
	EndIf
As I had previously said I am not familiar with programming in AutoIt.

Having said this, I would calmly do an experiment:
1. in ;Options
I would uncomment the line:
;--$ShowSplash = _IniReadPlus($ScriptIni, 'Options', 'ShowSplash', $ShowSplash)
(in practice I would only remove the first semicolon, from left)
2. in ;Defaults
I would change
$ShowSplash='false' to $ShowSplash='true'

In practice the default parameters in the x-launcher.ini file are changed.

I wouldn't change anything else, but I would add:
in X-Launcher\X-Launcher.au3
#AutoIt3Wrapper_Splash=graphics\x-splash.jpg

Code: Select all

3. In file ROOT\_x-launcher\x-udf.au3:
Func _SplashScreen($title, $img, $time, $tempdir, $rootdir)
	If $img <> '' Then $img = _FullPath($img, $rootdir)
	If $img = '' Or Not FileExists($img) Then
		$img = $tempdir & "\x-splash.jpg"
		FileInstall('graphics\x-splash.jpg', $img, 1)
	EndIf
	If Not FileExists($img) Then Return SetError(1, 0, False)
	Local $width = -1, $height = -1, $opt = 1
	Local $aSize = _ImageGetSize($img)
	If @error Then Return SetError(2, 0, False)
	$width = $aSize[0]
	$height = $aSize[1]
	$time = Number($time)
	If $time < 500 Then $time = 3000
	If $title <> '' Then $opt = -1
	SplashImageOn($title, $img, $width, $height, -1, -1, $opt)
	Sleep($time)
	SplashOff()
EndFunc   ;==>_SplashScreen
========================
Func _SplashScreenOff()
	SplashOff()
EndFunc   ;==>_SplashScreenOff
the file x-udf.au3: 'udf' stands for User Defined Functions, in practice the customization of the program.
I will not change anything in this file.

After these changes I would try to recompile as x64.
sl23 wrote: Mon Jun 03, 2024 4:22 am 1. The file path to the image is ROOT\X-Launcher\graphics\x-splash.jpg, which looks correct to me.
2. This file has various sections assigned to the functioning of the splash screen.
Options: Not sure if these are meant to be uncommented? If so, does it matter how far they are indented?
Image,Title,Timeout: Can't see anything wrong, but then I don't know AutoIT!
Defaults: I can't imagine this is meant to be set to true as it can be defined in the user options of the X-Launcher.INI file.
Show Splash Screen: Again, nothing looks wrong to me or jumps out at me that could be wrong.
Close Splash, Tray and RunAfter: Just looks like the code for closing splash etc, so see nothing wrong here.
3. The path to the image is mentioned and is the same as before.

Although I know nothing of AutoIT, the path to the image looks ok, except the last one. This appears to show the correct path, but as this file is in a different directory from the 'graphics' folder, maybe that's the issue? EDIT: After checking all of the source code, I found that all files are referenced correctly using #include.
I agree with everything.
sl23 wrote: Mon Jun 03, 2024 4:22 am The only thing I'm wondering is if I need to add an #include "graphics\x-splash.jpg" line into the file ROOT\X-Launcher\X-Launcher.au3? But then, surely not as the icon has been inserted into the compiled EXE!
I had already done this experiment, and the compiler gave me errors.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
sl23
Posts: 84
Joined: Fri Jan 02, 2015 6:25 am

Re: WinPenPack's X-Launcher update?

#45 Post by sl23 »

I meticulously read and put your comments into practise, then recompiled.
Still no splash screen!
Time to face the inevitable, doesn't seem likely this will ever work unless someone who knows AutoIT can help?
I may keep looking at the tutorials and try learning what little I can from their website. Maybe I'll be able to fix it in 20 years or so! :lol:
Latest X-Launcher_x64 update - Compiled with Aut2exe_x64.exe v3.3.16.1
Latest X-Launcher_x64 v1.5.4 update - Compiled with Aut2exe_x64.exe v3.2.12.1

Post Reply