Jump to content

Clover Theme Manager


blackosx
 Share

589 posts in this topic

Recommended Posts

This is the modified source code:CloverThemeManager.zip
Actually does nothing because you need to do additional steps like:
 
1 - choose where to publish your appcast.xml and get the link. This is the file I used to make the updates working: CTM_AppCast.xml.zip
2 - choose which repository where updates is published and get the link
3 - sign the new updated and zipped build
---
1 - CTM_AppCast.xml is an RSS feed with some extra information for Sparkle’s purposes (like the link to itself or the link to the zipped file that contains the last update of CloverThemeManager), so must be reachable online. Also contains the heaviness in bytes (lenght) of the  zipped file, the changes in html form (enclosed in the <description><![CDATA[ html code here ]]> tag). Not least, it contains the *DSA signature of the zipped update that was previously signed (the project automatically do that in the Build Phases).

 

I 'have already inserted in CTM_AppCast.xml credible links that you should be use (or wherever you want):

 

http://sourceforge.net/p/cloverefiboot/themes/ci/master/tree/CloverThemeManagerApp/Updates/CTM_AppCast.xml // where to place CTM_AppCast.xml, but also must be written in CloverThemeManager-Prefix.pch inside the source:

#define kCTM_SUFeedURL @"http://sourceforge.net/p/cloverefiboot/themes/ci/master/tree/CloverThemeManagerApp/Updates/CTM_AppCast.xml"

and

 

http://sourceforge.net/p/cloverefiboot/themes/ci/master/tree/CloverThemeManagerApp/Updates/CloverThemeManager.app.zip // where to place CloverThemeManager.zip (or wherever you want)

 

 

3 - You have to Sign the update made (a zipped app), so you need to create the certificates (dsa_priv.pem and dsa_pub.pem)

go here: https://sparkle-project.org and push on "Download v1.13.1" to get Sparkle-1.13.1.tar.bz2. It contains the Sparkle framenwork (no need for that since I have alredy include in the project.. also the "sign_update" is now there), but what we are looking for is "generate_keys" command:

 

firstly cd to a new folder and then dowble click on "generate_keys" and dsa_priv.pem and dsa_pub.pem will be generated inside. 

Now copy the new dsa_pub.pem and replace the one inside CloverThemeManager project. This public certificate will be embedded in the app and used to compare signatures from the actual app and the future updates.

Copy  dsa_priv.pem outside the project directory in a secure place because this certificate now its unique and will be used to sign all future updates. Losing it, all older apps will not longer be able to receive updates. Also since this is a opensource project, dsa_priv.pem identify you as a good or bad developper (mean that no one can publish updates for app made and released by you). Consider  that anyone can publish their CTM release where he pleases (with malicius code), but not update your app, so your reputation is saved by your private certificate: please secure it and don't share!!

 

BTW dsa_priv.pem must be found by Xcode to sign the new build, so there is a script under "Build Phases" called "Generate Sparkle update", here you have to replace what was mine path to the certificate from:

 

PRIVATE_KEY="/Users/Micky1979/CTM_PRIVATE_KEY/dsa_priv.pem" # place it where you want..

to

PRIVATE_KEY="/Volume/YourVolume/sub dir you prefear/dsa_priv.pem" # place it where you want..

 

Now you should be able to compile your new build already signed and ready to be pushed on source forge among the updated CTM_AppCast.xml containing new lenght (bytes) and the DSA signature under sparkle:dsaSignature="MC0CFQCovZzd0z+kjPdcACBWukiOkxKB9gIUUEQ+tVifJcNa5oAjtig/zqYwr9E=" (for example).

*You can get the lenght and the DSA signature inside the Build folder in a generated file called Instruction.txt

 

Now you are able to remotely update CloverThemeManager.app! :D

 

EDIT

IMPORTANT:

of course, you have to increase the version of the app before compile it. Otherwise nothing will be done.

Also now you have to use "CFBundleVersion" key to increase the version, and yes, must be an integer number, ie no dots or letters in the middle. Also that must be specified in the CTM_AppCast.xml under: sparkle:version="763" 

 

I hope I was clear ... if I talk too much, my English goes down the drain :hysterical:.

New code inside main.m, CloverThemeManager-Prefix.pch, AppDelegate.h, AppDelegate.m and needed adjustment in CloverThemeManager-Info.plist

  • Like 1
Link to comment
Share on other sites

Code comes from Pandora v1.xxx , and initially was implemented by Marchrius. Also the html code... and after make it work, you can decide to write the "Changelog" in the app cast or redirect it to a web page. I had to adapt that code for CTM because the top bar menu is attatched to the Window.xib instead of MainMenu.xib (like you do for "showlog")

Later in v2.xxx I've implement "Delta Updates" also, ie, Pandora is able to Download only bytes to updates from an old version, and not the entire new app. BTW is useless for CTM because the compressed file is only 1,8 Mega Byets (Pandora is almost 60). In CTM I made things a little different to my own understanding.

Also you can customize the script in the "Build Phases" to entirely write the CTM_AppCast.xml already updated in each part... but I think you have fun in doing this by yourself after you decide if, when and where :)

Link to comment
Share on other sites

Thanks for your help here Micky1979. Updates are now setup and working from SF. :)

I just need to make changes to the main app to disable the old update mechanism and make any other tweaks that I think I need, then I can issue an update.

 

 

  • Like 1
Link to comment
Share on other sites

Good  :thumbsup_anim:


Hi blackosx, an error in the code:

 

this must be changed:

[NSApp beginSheet:self.SparkleWindow  modalForWindow:(NSWindow *)_window modalDelegate:self didEndSelector:nil contextInfo:nil];

to

[NSApp beginSheet:self.SparkleWindow  modalForWindow:(NSWindow *)[NSApp mainWindow] modalDelegate:self didEndSelector:nil contextInfo:nil];

should already have been done,....I forgot it sorry. _window is not used because is attached to the MainMenu.xib, but the CTM window is referenciated in window.xib

 

 

EDIT

the new change log is cool :lol:

  • Like 1
Link to comment
Share on other sites

Thanks Micky1979. I've made that change.

 

Also, for ref, I noticed that the zip -r command used in your post compile bash script created a 4.5MB .zip archive, where as manually compressing to a .zip using right-click in the finder created a 1.8MB archive. The reason was down to the symlinks in the Sparkle framework and the -r option replaced the symlinks with the files, effectively enlarging the directory. I found adding -y to the command (so zip -ry) retains the symlinks so this now also creates a 1.8MB archive.

  • Like 1
Link to comment
Share on other sites

Thanks Micky1979. I've made that change.

 

Also, for ref, I noticed that the zip -r command used in your post compile bash script created a 4.5MB .zip archive, where as manually compressing to a .zip using right-click in the finder created a 1.8MB archive. The reason was down to the symlinks in the Sparkle framework and the -r option replaced the symlinks with the files, effectively enlarging the directory. I found adding -y to the command (so zip -ry) retains the symlinks so this now also creates a 1.8MB archive.

Oh, I need to check it for Pandora  :P, thanks for the tip! :)

 

 

@blackosx, I have one request..... 

I've updated Pandora to support El Capitan (no problem in this), but the news is that have a new Clover installer (Enoch too) that can update to a new revision when is available...(also is completely scriptless, use only code to do all the needed....a big job (almost 80,000 lines of code)) and... have a full config editor:

only a theme manager is missing.....  .... ..... ... 

 

the request is..can I include CloverThemeManager.app in Pandora? I've already made a test and Pandora can call it automatically when requested, and is cool..

at least now users have to no worry about latest revision since can update itself..

do you agree? I can send you a build to see what I'm talking about.. 

Link to comment
Share on other sites

Hey blackosx this is the Sparkle log: 

2016-02-08 20:09:22 +0000: ===== CloverThemeManager.app =====2016-02-08 20:09:22 +0000: Error: An error occurred in retrieving update information. Please try again later. The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. (URL http://sourceforge.net/p/cloverefiboot/themes/ci/master/tree/CloverThemeManagerApp/Updates/CTM_AppCast.xml)

Seem that you have removed this :

<key>NSAppTransportSecurity</key>
<dict>
	<key>NSAllowsArbitraryLoads</key>
	<true/>
</dict>

EDIT

Ok, browsing the code appear to be there, but the zipped update that I downloaded does not have it.

Link to comment
Share on other sites

Yeah. That .zip was just for testing and is now obsolete. I will remove it soon.

 

I had to add the NSAppTransportSecurity dict as your original plist only had the NSAllowsArbitraryLoads key without the dict.

 

My plan is to create a new release (v0.73) which the existing v0.72 will update to using the previous update code. v0.73 will then update to future versions (v0.74 and onwards) using Sparkle.

  • Like 1
Link to comment
Share on other sites

v0.76.2_update_18 -> v0.76.3

 

- Integrated Sparkle framework for handling updates (Credit Micky1979).
- Removed previous update code.
- updateID no longer used.
- Message box link colour changed to lighter blue.
- bootlog trim action changed to better handle large data.
- Workaround issue where additional update buttons could appear for themes with spaces in their name when toggling show all view.
 
Future updates should now be available using the 'Check for Updates' option.
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Thanks for letting me know Nonta72.

 
It looks like the bare repo had become corrupt so I’ve re-uploaded the latest files for the BGO theme to the repo. Before you can install it though you will need to manually remove the local copy on your computer.
 
From the Finder, navigate to /Users/<USERNAME>/Library/Application\ Support/CloverThemeManager/ and delete the BGO.git directory.
 
Reload CloverThemeManager and it will update it’s index.
Link to comment
Share on other sites

  • 3 months later...

@blackosx

Clover theme manager is a very successful app but,

It mounted a directory named 'ctmTempMpqNY7VUOY5' and now i can't unmount it or access to my original EFI partition.

I can mount my EFI partition but i can't see any files in the EFI partition or in the ctmTempMpqNY7VUOY5 directory

Please help i want to change my theme.

Link to comment
Share on other sites

Hi Loller Mann

 
I’m not sure why you see any issue with this.
 
Clover Theme Manager will allow you to download, install and designate a theme which will be active on your next boot when you boot using the device you selected in Clover Theme Manager.
 
If Clover Theme Manager is to operate on an EFI System Partition then it creates a temporary mountpoint named ctmTemp followed by a random string before mounting the EFI System Partition to that mountpoint. You should not need to install/set a theme for next boot outside of Clover Theme Manager unless of course if you want to. In which case is perfectly fine.
 
You can see the mountpoint used in Terminal using the df command:
$ df /Volumes/ctmTempMp82sOXYla9/
Filesystem   512-blocks   Used Available Capacity iused ifree %iused  Mounted on
/dev/disk0s1     409160 178880    230280    44%     512     0  100%   /Volumes/ctmTempMp82sOXYla9
 
If you wanted to manually see the contents of that EFI System Partition on that mountpoint in Terminal:
$ ls -al /Volumes/ctmTempMp82sOXYla9/
 
Or to see the clover themes dir on that EFI System Partition on that mountpoint in Terminal:
$ ls -al /Volumes/ctmTempMp82sOXYla9/EFI/CLOVER/themes/
 
If you want to unmount this manually in terminal you would do:
$ sudo umount /Volumes/ctmTempMp82sOXYla9/
  • Like 2
Link to comment
Share on other sites

  • 2 months later...

Hi All,

I installed Clover Theme Manager on OS X 10.11.3 El Capitan (legacy mode) but on the bottom of the application window warning appears:
"Launch Daemon & RC scripts not operational. Direct NVRAM will not be retained next boot. Clover Run Installer to fix."
It can be a problem? What should I do to rectify this situation?

Thanks in advance

Link to comment
Share on other sites

 Share

×
×
  • Create New...