realbasic-nug
[Top] [All Lists]

Re: Post-Compile Packaging (was: Proper Leopard Icons)

To: REALbasicNUGlist Network Users Users <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Post-Compile Packaging (was: Proper Leopard Icons)
From: Carlo Rubini <osb at bttb dot net dot bd>
Date: Tue, 30 Oct 2007 17:55:11 +0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
> Thom McGrath <lists at thezaz dot com> said:
>
> This comment has sparked my interest in working on a new project.
>
> Basically, it would be an app which would take the compiled app and
> allow you to modify it...

Meantime, for RB 5.5.5 users (if there are still any around), I put  
together a mini app that inserts into the Info.plist the missing  
CFBundleInfoDictionaryVersion.

There is a popupMenu populated with the names of the applications and  
with the rowTag containing the name-to-be-added. And in the OK button  
the following code is executed:


dim f as folderItem
dim n as integer

   f = getOpenFolderItem("any")
   if f = nil or not f.exists then return
   if f.displayName <> popupMenu1.list(popupMenu1.listIndex) then
     n = msgBox("FileName does not match selection.",48)
     return
   end if
   f = f.child("Contents")
   if f = nil or not f.exists then
     n = msgBox("Contents folder not found.",48)
     return
   end if
   f = f.child("Info.plist")
   if f = nil or not f.exists then
     n = msgBox("Info.plist file not found.",48)
     return
   end if

   dim b as binaryStream
   b = f.openAsBinaryFile(true)

   dim s as string = b.read(b.length)

  //insert CFBundleIdentifier before the theCatch string
   dim theCatch as string = "<key>CFBundleInfoDictionaryVersion</key>"

   dim pos as integer
   if instrB(s, theCatch) > 0 then
     pos = instrB(s, theCatch)-1
   else
     n = msgBox("Catch string not found.",48)
     return
   end if

   b.position = pos
   dim theEnd as string = b.read(b.length)
   b.position = pos
   b.write bundleStr + theEnd
   b = nil

   msgBox "CFBundleIdentifier succesfully added."

So, the job is not auto, in that I have to select the application;  
yet if anybody wants the ready-made file, drop me a line (8K zipped).


Carlo



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>
  • Re: Post-Compile Packaging (was: Proper Leopard Icons), Carlo Rubini <=