Portable APP

Hi there, we (Ranan) are a touring Christian Worship Band. On occasions we have to use venue projection systems and a portable version of Quelea would be great to have. I was wondering if anyone has made a Quelea Portable App? I have been trying several applications to create such a portable version but with no success. Any help appreciated!

John for Ranan

What exactly do you mean by a “portable” version? Do you mean one that doesn’t have to be “installed” on the machine, but loaded/run off a USB key, or something like that? I presume you mean for a Windows machine as well. I know that for the Mac version, you certainly don’t have to copy into the Applications folder, and can just download and open it.

Thanks
Paul

As Paul wrote, you should be able to install Quelea itself on a USB drive. When it comes to the user directory/database you could either go for creating a symbolic link to the user directory or (preferably) add a runtime argument to Quelea.

What operating system do you think you will run it on? The easiest version to do this on is the cross-platform version, but then you’d have to rely on them having Java installed. What you should add is the option --userhome=/path/to/usb/drive/ when you run Quelea, but I can help you with further instructions depending on which version of Quelea you’ll run.

Hi Paul

Thanks for your quick reply. I am sorry for not getting back to you sooner but I have been helping my son with a house move.

Yes I do mean a version that runs off a USB key on a Windows environment. We take our own projection equipment with us to be independant of facilities at venues but sometimes we have to use the local equipment which may not have a suitable projection system and certainly not with our songs.

I have tried Enigma Virtual Box to create a portable version but kept getting Java and specified path errors. Arvid has also replied with some things to try, so over the next day or so I will try your solutions.

I have tried another Projection application which did provide a portable version which did work but the functionality was not what I have been looking for which is available in Quelea.

I thank you for your input and will feed back my findings.

Thanks again
John (Located in Aberdeen, Scotland)

Hi Arvid

Thanks for your reply to my enquiry about running a portable version on a USB drive. I have replied to Paul and you will see from that reply the issues I have been having.

I will get time to try both your suggestions and that of Paul and get back to you on results.

I am hoping to run the USB system in parallel to my Windows version as a just in case senario.

You did mention a cross platform version I dont think that would work for me as I will not know what the venue will have installed and will not be able to add to their system, but thanks for the head up on that one.

Thanks again for your input and support.

Regards
John

Arvid

I am not sure that I understand where the option --userhome/to/usb/drive/ you mention is used.

I have installled Quelea on the USB drive but when I open Quelea it creates a “.quelea” folder on the local drive and not the USB key! Is this because the userhome is not set?

Regards
John

Exactly, that’s what the option will change. I was intentionally vague since the instructions would look a bit different depending on which OS you were using. Unfortunately I’d say that the Windows version is the trickiest to manipulate this way. If you know you have Java installed, you could just add a file called quelea.bat to the installation folder which you will then use to launch Quelea. In that file you would add the following content (with the path of your choice of course):

java -Dfile.encoding=UTF-8 -Dprism.dirtyopts=false -jar Quelea.jar --userhome=D:/Quelea/Database

If you use the Windows installer, it bundles Java inside of the Quelea.exe file and adds the above line (apart from the --userhome part that is). That file is hard to manipulate after it’s been created as far as I know, so then it would be better to download the source code, change the line to the above, and then build your own installer.

With that said, unless you have some previous knowledge in that area, in this situation I’d say that you might be better off trying to add a portable version of Java to your USB key. A quick internet search indicates that should be possible.

Good luck! Let me know how it goes and just ask again if I can help you more.

Arvid

Arvid

I have tried what you suggested and did get some progress. It did create the .quelea directory on the USB but also created it on the laptop in the Users home folder at the same time. I was running java from the USB key and Portable Apps java!

I have downloaded the cross-platform version now and added the --userhome to the Quelea.bat but it does not create a working directory on the USB key.

I must be doing something silly at my end, so any help appreciated.

John

Glad to hear you’re making progress! Tried setting the --userhome variable on my end and was not able to recreate the issue. Would you mind posting the content of your bat file (or send it to me in a private message) so I could take a look at if there might be any problems there?

Hi Arvid

I am really sorry to bother you with all of this. Not sure how PM works here.

I tried the Quelea64 windows installer to the USB with the Bat file as shown below calling the Quelea64.exe

It created a new .quelea (data) folder to the key and to the C:Drive for the USER at same time

BAT FILE 1.

java -Dfile.encoding=UTF-8 -Dprism.dirtyopts=false -jar Quelea.jar
–userhome=D:/.quelea

quelea64.exe

I the removed the windows installer version and installed the cross-platform version to the USB key

I edited the insalled Quelea.bat to include the userhome it did not create any folders

BAT FILE 2.

java -Dfile.encoding=UTF-8 -Dprism.dirtyopts=false -jar Quelea.jar
–userhome=D:/.quelea

I both of the above cases I ran jportable from Portable apps and inserted the Quelea.jar as the JAR file to use.

I hope the above makes sense and thanks again for your input.

Best regards

John

No worries, you perhaps don’t have the rights to send PM’s here yet.

First of all, I think you need to keep everything on the same line. It should in other words look like this:

java -Dfile.encoding=UTF-8 -Dprism.dirtyopts=false -jar Quelea.jar –userhome=D:/.quelea

Secondly, I don’t think you actually need to add .quelea at the end of it. If I’m not mistaking, the folder is automatically created in the path you enter (so in the above case the actual path for the database directory would probably result in D:/.quelea/.quelea).

Hope that helps!

Hi Arvid

my apologies again, have had grandchildren syaing for a few days so this is the fisrts time on computer.

Putting the userhome in the same line does in fact solve the issue i was having and it does create the .quelae user folder. I do think that making Quelea truly portable is possibly a big ask as I have now discovered a few other issues.

  1. USB drive letter changes depending on which computer it is used on and the quelea.properties file would need to change to suit. Since this is copied over from the programme directory user defined preferences would be overwritten.

  2. Powerpoint application would also be required to be portable at the moment no PPT portable. Open office is listed as a possible allternative but is experimantal and LibreOffice is not mentioned.

I will persevere with this and if i come up with any answers/solutions I will let you know.

Many, many thanks for your help so far it is truly appreciated.

Thanks and Blessings

John

Hi John,

Happy to hear you managed to get it to work! I’ll try to answer your other questions below:

You’re right, the drive letter might change. However, I’m really not sure if I understand what you mean with

Do you mean that if the paths set in different settings are not found, new values will be set from the default file? If so, that’s probably true as well. Other than that, the quelea.properties files should not be overwritten in any way I think.

As I see it, there are two parts in your question:

  1. A) Finding the new volume letter can be done by editing the bat file. If you assign a label to your USB drive (like MYUSB) you can search for that label and fetch the drive letter. Your bat file could then look something like this instead. I’ve added comments in the code to explain what it does and what you need to edit. The comment lines start with :: and are ignored by the system when running the bat file if you want to keep them there.
@echo off

:: Fetch USB volume name, replace MYUSB with the label of your USB
:: The value is stored in the variable %myDrive%
for /f %%a in ('wmic logicaldisk get caption^,volumename^| find "MYUSB"') do set myDrive=%%a
	if "%myDrive%"=="" (echo Cannot find volume)
	else (
	:: Load Quelea with the automatically fetched volume name
	java -Dfile.encoding=UTF-8 -Dprism.dirtyopts=false -jar Quelea.jar --userhome=%myDrive%\PATHTOYOURQUELEADIRECTORY
)
  1. B) The second part, about updating the quelea.properties file is also possible to do through the bat file. I haven’t properly tested it and I’m not 100% sure it’s working properly, but if it’s needed you should probably be able to write something like this instead. Note that you will need to edit it yourself for it to suit your needs in that case.
Summary
@echo off

:: Fetch USB volume name, replace MYUSB with the label of your USB
:: The value is stored in the variable %myDrive%
for /f %%a in ('wmic logicaldisk get caption^,volumename^| find "MYUSB"') do set myDrive=%%a
	if "%myDrive%"=="" (echo Cannot find volume)
	else (

	:: NOTE: This part is probably not even needed, I think Quelea should run anyways.
		:: If found, search the properties file for any old volume names to replace with the new name we found.
		:: Replace PATHTOYOURQUELEADIRECTORY with any subdirectories on your USB (otherwise it should just be %myDrive%\.quelea\quelea.properties)
		for /f "tokens=1,* delims=]" %%A in ('"type %myDrive%\PATHTOYOURQUELEADIRECTORY\.quelea\quelea.properties|find /n /v """') do (
			set "line=%%B"
			if defined line (
				:: This should perhaps be called for each potential name or the old value should be fetched somehow, 
				:: otherwise just check the properties file yourself and then manually replace C: with the old labels
				call set "line=echo.%%line:C:=%myDrive%%%"
				for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X
			) ELSE echo.
		:: Save the result to a file called quelea.properties in the current directory
		)>quelea.properties
		
		:: Replace the original quelea.properties with the edited copy you just created
		xcopy /y quelea.properties %myDrive%\PATHTOYOURQUELEADIRECTORY\.quelea\

		:: Remove the copy
		del quelea.properties

	:: Finally load Quelea with the automatically fetched volume name
	java -Dfile.encoding=UTF-8 -Dprism.dirtyopts=false -jar Quelea.jar --userhome=%myDrive%\PATHTOYOURQUELEADIRECTORY
)
  1. I’m not sure if PowerPoint could be made portable, but personally I doubt it. LibreOffice should work however. I have a feeling I tested it a few years ago with no real issues (other than the usual formatting issues when opening PowerPoint presentations in another software).

Good luck! Do let me know if you manage to find a working solution.

Arvid

Hi Arvid

thanks for the info on finding the USB drive have put that into my batch file and it seems to work correctly.

I now realise that “logo.image.location” and “global.song.theme” are not updating in the “.quelea\quelea. properties” file to reflect the new drive letter. I can edit this manually before starting Quelea or re-select them when I open Quelea which will then write to the properties file. This is not a hardship and then Quelea is working ok.

I do get an error window opening on startup saying that “There was a problem opening the schedule. Perhaps it’s corrupt or not a schedule saved by Quelea”. I can dismiss the window and it does not stop Quelea opening or functioning as far as I can report.

LibreOffice impress is working ok for presentations!

Thanks again for you assistance and input.

Blessings
John

Hi John,

Glad to hear it’s working for you. Strange that you get the schedule warning, I thought that was only for Mac computer. If you want, you could try the latest beta and see if that resolves the issue for you.

As for the properties that you have to edit manually, that could be resolved with some further polishing to the second bat code I sent in my previous post, but unless you feel like you want to dig into that, manually editing (or re-setting) them shouldn’t be that hard either.

Good luck on tour!

Arvid

Arvid

Thanks for all your help, I will have a look at editing the bat code to suit. Manually editing will not be a hardship for the few entries required.

I will also look at the latest beta to see if it resolves the schedule warning.

Many thanks for your help with this matter, I hope it helps others too!

Blessings
John (for Ranan)