B4J Question Built in B4J Packager - Change Icon

AKJammer

Active Member
Licensed User
Love the built in Standalone B4J Packager. Much easier to use than going to a separate project. But I've got a question. Using the B4Packager11 I had access to process_globals where I could set the IconFile as such;
Private IconFile As String = "D:\B4J_Dev\Projects\MMEvent\Files\mtmagiclogo.ico"

I tried this, but that wasn't it: just killed the process.
#PackagerProperty: iconfiles = "D:\B4J_Dev\Projects\MMEvent\Files\mtmagiclogo.ico"


Using the built in Packager I can't see where I can set the icon file. Can it still be done?

Thanks,
Jim
 

stevel05

Expert
Licensed User
Longtime User
Reading at the code, it looks like it should be:

B4X:
#PackagerProperty: IconFile = "D:\B4J_Dev\Projects\MMEvent\Files\mtmagiclogo.ico"

No 's'. Looks like capitalization is important too.
 
Upvote 0

AKJammer

Active Member
Licensed User
Hmmm, Ok, at least it's looking for it now, but getting this error. File is there, correct case even.

java.lang.RuntimeException: java.io.FileNotFoundException: "D:\B4J_Dev\Projects\Main\Files\mtmagiclogo.ico" (The filename, directory name, or volume label syntax is incorrect)

1662248154133.png
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
As a test I created a directory D:\Test_1 and put a text file inside. Then tried File.Copy("D:\Test_1\Test.txt","",File.DirTemp,"Test.txt") (which is basically what the packager does with the file)

It failed with file not found exception even though Log(File.Exists("D:\Test_1\Test.txt","")) returns true..

Did the same with: D:\Test1 put a text file in it and tried File.Copy("D:\Test1\Test.txt","",File.DirTemp,"Test.txt") and it works.

I can only think that it is something to do with the underscore in the folder name. It does seem strange, but as I have never used them, I hadn't come across this before.

Someone else may have more insight.
 
Upvote 0

AKJammer

Active Member
Licensed User
I moved it to another location, but got the same error, then I took the quotes out in the new location and it worked!!!

That's pretty weird, but it's working. Thanks a lot!!
 
Upvote 0

teddybear

Well-Known Member
Licensed User
I moved it to another location, but got the same error, then I took the quotes out in the new location and it worked!!!

That's pretty weird, but it's working. Thanks a lot!!
See there the correct usage is #PackagerProperty: IconFile = your icon file, it does not contain quotes
 
Upvote 0

AKJammer

Active Member
Licensed User
Thanks everyone. As an additional tip, whenever I had the IconFile property set the error I was getting was a Timeout error. The message tells you how to correct it, but I wasn't seeing it. Go into Tools->IDE Options->Configure Process Timeout and change it from the default 60 up to 90 or so. This is also based on your computer processor speed of course, so if you're running a faster system you shouldn't have a problem with the default settings. Till next time....
 
Upvote 0
Top