Page 1 of 1

Tool for Info.plist, UPX

Posted: Thu Jul 12, 2012 8:52 pm
by jamirokwai
Hi there,

I was struggling about the need to copy the Info.plist to the compiled-bundle manually every time...
This Tool for the Tools-menu does the same. Use at own risk! :-)

1. Just create the Info.plist according to your needs, and save it in the same directory as the source, like
mysource.pb
info.plist

2. Add this Tool:
Commandline: cp
Arguments: "%PATH/info.plist" "%EXECUTABLE/Contents"
Working Directory: %PATH
Name: Copy List (or as you like)
Event to trigger: After Create Executable

That's it. Everytime, you create the executable of your App-Bundle, the Info.plist gets copied to the bundle automagically ... It doesn't even matter, where you want to put the App-Bundle.



If you like to compress the executable inside the .App-Bundle, you can use this:

1. PureBasic-Code, compile to /Users/joe/makeupx in Console-format

Code: Select all

file$ = ProgramParameter(0)
part$ = GetFilePart(file$)
path$ = GetPathPart(file$) + part$ + "/Contents/MacOS/" + Left(part$,Len(part$)-4)
RunProgram("/usr/bin/upx","-9 --lzma " + path$,"") ; --lzma is optional, since I use the custom lzma-build for Mac OS X from www.idrix.fr
2. Add this Tool:
Commandline: /Users/joe/makeupx
Arguments: "%EXECUTABLE"
Working Directory:
Name: UPXer or as you like)
Event to trigger: After Create Executable

For the Mac, you need to get UPX from here: http://www.idrix.fr/Root/content/category/7/26/46/

Re: Tool for Info.plist

Posted: Fri Jul 13, 2012 4:22 am
by WilliamL
Thanks jamirokwai!

I struggled with this a while back and couldn't seem to find the right combination.

This works perfectly! I thought %PATH or %EXECUTABLE would have to be replaced with my info but that is not the case. I just used the text as shown!.

Re: Tool for Info.plist, UPX

Posted: Wed Jul 18, 2012 3:10 pm
by jamirokwai
Added how-to to UPX your executables after compilation. See first post.

Re: Tool for Info.plist, UPX

Posted: Sat Apr 05, 2014 10:30 pm
by Wolfram
jamirokwai wrote:Hi there,

I was struggling about the need to copy the Info.plist to the compiled-bundle manually every time...
This Tool for the Tools-menu does the same. Use at own risk! :-)

1. Just create the Info.plist according to your needs, and save it in the same directory as the source, like
mysource.pb
info.plist

2. Add this Tool:
Commandline: cp
Arguments: "%PATH/info.plist" "%EXECUTABLE/Contents"
Working Directory: %PATH
Name: Copy List (or as you like)
Event to trigger: After Create Executable

That's it. Everytime, you create the executable of your App-Bundle, the Info.plist gets copied to the bundle automagically ... It doesn't even matter, where you want to put the App-Bundle.
I think there is a mistake in "Arguments: "%PATH/info.plist" "%EXECUTABLE/Contents""
On my MAc it works only if I remove the slash after %PATH
Arguments: "%PATHinfo.plist" "%EXECUTABLE/Contents"

Re: Tool for Info.plist, UPX

Posted: Sun Apr 06, 2014 6:29 am
by wilbert
jamirokwai wrote:I was struggling about the need to copy the Info.plist to the compiled-bundle manually every time...
This Tool for the Tools-menu does the same. Use at own risk! :-)
There's also another tool to work with Info.plist I created together with Joe Baker.
http://www.purebasic.fr/english/viewtop ... 27&t=53905

Re: Tool for Info.plist, UPX

Posted: Sun Apr 06, 2014 1:48 pm
by jamirokwai
wilbert wrote:
jamirokwai wrote:I was struggling about the need to copy the Info.plist to the compiled-bundle manually every time...
This Tool for the Tools-menu does the same. Use at own risk! :-)
There's also another tool to work with Info.plist I created together with Joe Baker.
http://www.purebasic.fr/english/viewtop ... 27&t=53905
Hi wilbert,
thanks for the hint!