diff --git a/checkin_notes b/checkin_notes
index 01160df527..7f6c2b8843 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -6833,3 +6833,33 @@ Charlie 5 Aug 2011
release_boinc.sh
uninstall.cpp
WaitPermissions.cpp
+
+Charlie 8 Aug 2011
+ - Changes for Charity Engine Desktop.
+
+ clientgui/
+ mac/
+ CE_ss_logo.tiff (new)
+ res/
+ CE_Install.icns (new)
+ CharityEngine.icns (new)
+ CE_Uninstall.icns (new)
+ MacCEPkgIcon.zip (new)
+ skins/
+ Charity Engine/ (new)
+ graphics/ (new)
+ (many new files)
+ skin.xml (new)
+ clientscr/
+ mac_saver_module.cpp
+ res/
+ CE_ss_logo.png (new)
+ CE_ss_logo.jpg (new)
+ ss_app.cpp
+ mac_installer/
+ CE-Branding (new)
+ CE-ReadMe.rtf (new)
+ CharityEngine/ (new)
+ acct_mgr_url.xml (new)
+ make_CharityEngine.sh (new)
+ PostInstall.cpp
diff --git a/clientgui/res/MacCEPkgIcon.zip b/clientgui/res/MacCEPkgIcon.zip
new file mode 100644
index 0000000000..649d70f685
Binary files /dev/null and b/clientgui/res/MacCEPkgIcon.zip differ
diff --git a/clientgui/skins/Charity Engine/graphic/arwLeft.png b/clientgui/skins/Charity Engine/graphic/arwLeft.png
new file mode 100755
index 0000000000..76bd693252
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/arwLeft.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/arwLeftClick.png b/clientgui/skins/Charity Engine/graphic/arwLeftClick.png
new file mode 100755
index 0000000000..76bd693252
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/arwLeftClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/arwRight.png b/clientgui/skins/Charity Engine/graphic/arwRight.png
new file mode 100755
index 0000000000..2861625b53
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/arwRight.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/arwRightClick.png b/clientgui/skins/Charity Engine/graphic/arwRightClick.png
new file mode 100755
index 0000000000..2861625b53
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/arwRightClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnAddProject.png b/clientgui/skins/Charity Engine/graphic/btnAddProject.png
new file mode 100755
index 0000000000..df9c8596f3
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnAddProject.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnAddProjectClick.png b/clientgui/skins/Charity Engine/graphic/btnAddProjectClick.png
new file mode 100755
index 0000000000..df9c8596f3
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnAddProjectClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnAdvancedView.png b/clientgui/skins/Charity Engine/graphic/btnAdvancedView.png
new file mode 100755
index 0000000000..f1341a6c54
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnAdvancedView.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCancel.png b/clientgui/skins/Charity Engine/graphic/btnCancel.png
new file mode 100755
index 0000000000..25e3616916
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCancel.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCancelClick.png b/clientgui/skins/Charity Engine/graphic/btnCancelClick.png
new file mode 100755
index 0000000000..25e3616916
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCancelClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnChange.png b/clientgui/skins/Charity Engine/graphic/btnChange.png
new file mode 100755
index 0000000000..f9498c611f
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnChange.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnChangeClick.png b/clientgui/skins/Charity Engine/graphic/btnChangeClick.png
new file mode 100755
index 0000000000..f9498c611f
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnChangeClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnClear.png b/clientgui/skins/Charity Engine/graphic/btnClear.png
new file mode 100755
index 0000000000..16d707d711
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnClear.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnClearClick.png b/clientgui/skins/Charity Engine/graphic/btnClearClick.png
new file mode 100755
index 0000000000..16d707d711
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnClearClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnClose.png b/clientgui/skins/Charity Engine/graphic/btnClose.png
new file mode 100755
index 0000000000..3f9cdccd60
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnClose.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCloseClick.png b/clientgui/skins/Charity Engine/graphic/btnCloseClick.png
new file mode 100755
index 0000000000..3f9cdccd60
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCloseClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCopy.png b/clientgui/skins/Charity Engine/graphic/btnCopy.png
new file mode 100755
index 0000000000..848c97e009
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCopy.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCopyAll.png b/clientgui/skins/Charity Engine/graphic/btnCopyAll.png
new file mode 100755
index 0000000000..a59cc70bd1
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCopyAll.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCopyAllClicked.png b/clientgui/skins/Charity Engine/graphic/btnCopyAllClicked.png
new file mode 100755
index 0000000000..a59cc70bd1
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCopyAllClicked.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnCopyClicked.png b/clientgui/skins/Charity Engine/graphic/btnCopyClicked.png
new file mode 100755
index 0000000000..848c97e009
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnCopyClicked.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnHelp.png b/clientgui/skins/Charity Engine/graphic/btnHelp.png
new file mode 100755
index 0000000000..7a0369c9a2
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnHelp.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnHelpClicked.png b/clientgui/skins/Charity Engine/graphic/btnHelpClicked.png
new file mode 100755
index 0000000000..7a0369c9a2
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnHelpClicked.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnMessages.png b/clientgui/skins/Charity Engine/graphic/btnMessages.png
new file mode 100755
index 0000000000..63cd4560a5
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnMessages.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnMessagesAlert.png b/clientgui/skins/Charity Engine/graphic/btnMessagesAlert.png
new file mode 100755
index 0000000000..28c19cc13a
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnMessagesAlert.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnPreferences.png b/clientgui/skins/Charity Engine/graphic/btnPreferences.png
new file mode 100755
index 0000000000..b766fd1c3a
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnPreferences.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnResume.png b/clientgui/skins/Charity Engine/graphic/btnResume.png
new file mode 100755
index 0000000000..a148be3ff5
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnResume.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnSave.png b/clientgui/skins/Charity Engine/graphic/btnSave.png
new file mode 100755
index 0000000000..93f0d0126f
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnSave.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnSaveClick.png b/clientgui/skins/Charity Engine/graphic/btnSaveClick.png
new file mode 100755
index 0000000000..93f0d0126f
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnSaveClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnSnooze.png b/clientgui/skins/Charity Engine/graphic/btnSnooze.png
new file mode 100755
index 0000000000..2964db1e91
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnSnooze.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnSynchronize.png b/clientgui/skins/Charity Engine/graphic/btnSynchronize.png
new file mode 100755
index 0000000000..96deb069a4
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnSynchronize.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/btnSynchronizeClick.png b/clientgui/skins/Charity Engine/graphic/btnSynchronizeClick.png
new file mode 100755
index 0000000000..96deb069a4
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/btnSynchronizeClick.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_about.ico b/clientgui/skins/Charity Engine/graphic/ce_about.ico
new file mode 100755
index 0000000000..350ab5c2e7
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_about.ico differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_background.png b/clientgui/skins/Charity Engine/graphic/ce_background.png
new file mode 100755
index 0000000000..a71f437de8
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_background.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_icon_play.gif b/clientgui/skins/Charity Engine/graphic/ce_icon_play.gif
new file mode 100755
index 0000000000..38f1f3ec13
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_icon_play.gif differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_icon_play.png b/clientgui/skins/Charity Engine/graphic/ce_icon_play.png
new file mode 100644
index 0000000000..cc8a0f7cc5
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_icon_play.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_pause.png b/clientgui/skins/Charity Engine/graphic/ce_pause.png
new file mode 100755
index 0000000000..12d50949bb
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_pause.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_play.png b/clientgui/skins/Charity Engine/graphic/ce_play.png
new file mode 100755
index 0000000000..78c6cb63f2
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_play.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_stop.png b/clientgui/skins/Charity Engine/graphic/ce_stop.png
new file mode 100755
index 0000000000..891f9fa9e9
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_stop.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ce_wizard_bar.png b/clientgui/skins/Charity Engine/graphic/ce_wizard_bar.png
new file mode 100755
index 0000000000..b76550760c
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ce_wizard_bar.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/conn_ind.png b/clientgui/skins/Charity Engine/graphic/conn_ind.png
new file mode 100755
index 0000000000..481c32aa2c
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/conn_ind.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/default_stat_icon.png b/clientgui/skins/Charity Engine/graphic/default_stat_icon.png
new file mode 100755
index 0000000000..6cc97af580
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/default_stat_icon.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/dlgBackground.png b/clientgui/skins/Charity Engine/graphic/dlgBackground.png
new file mode 100755
index 0000000000..c466c4d60b
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/dlgBackground.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/error_image.png b/clientgui/skins/Charity Engine/graphic/error_image.png
new file mode 100755
index 0000000000..9ca6d49e71
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/error_image.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/gauge_bg.png b/clientgui/skins/Charity Engine/graphic/gauge_bg.png
new file mode 100755
index 0000000000..4f342f89b0
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/gauge_bg.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/gauge_progress_indicator.png b/clientgui/skins/Charity Engine/graphic/gauge_progress_indicator.png
new file mode 100755
index 0000000000..1c48d5c1d7
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/gauge_progress_indicator.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ico_workWU.png b/clientgui/skins/Charity Engine/graphic/ico_workWU.png
new file mode 100755
index 0000000000..0113f4f70b
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ico_workWU.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/ico_workWU_sus.png b/clientgui/skins/Charity Engine/graphic/ico_workWU_sus.png
new file mode 100755
index 0000000000..4981ed250b
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/ico_workWU_sus.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/proj_bg.png b/clientgui/skins/Charity Engine/graphic/proj_bg.png
new file mode 100755
index 0000000000..2489cbe4e4
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/proj_bg.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/project_image.png b/clientgui/skins/Charity Engine/graphic/project_image.png
new file mode 100755
index 0000000000..2c29a2a401
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/project_image.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/simplegui_bg.png b/clientgui/skins/Charity Engine/graphic/simplegui_bg.png
new file mode 100644
index 0000000000..7af0281af6
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/simplegui_bg.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/spacer.png b/clientgui/skins/Charity Engine/graphic/spacer.png
new file mode 100755
index 0000000000..5ce14ed5b2
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/spacer.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/state_ind_bg.png b/clientgui/skins/Charity Engine/graphic/state_ind_bg.png
new file mode 100755
index 0000000000..fa2548e191
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/state_ind_bg.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/tabArea_bg.png b/clientgui/skins/Charity Engine/graphic/tabArea_bg.png
new file mode 100755
index 0000000000..3931223168
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/tabArea_bg.png differ
diff --git a/clientgui/skins/Charity Engine/graphic/wu_bg.png b/clientgui/skins/Charity Engine/graphic/wu_bg.png
new file mode 100755
index 0000000000..6900f14e6b
Binary files /dev/null and b/clientgui/skins/Charity Engine/graphic/wu_bg.png differ
diff --git a/clientgui/skins/Charity Engine/skin.xml b/clientgui/skins/Charity Engine/skin.xml
new file mode 100755
index 0000000000..7d1a7bac52
--- /dev/null
+++ b/clientgui/skins/Charity Engine/skin.xml
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+ graphic/simplegui_bg.png
+ 153:153:153
+
+
+
+
+ graphic/spacer.png
+
+
+ 51:51:51
+
+
+ graphic/state_ind_bg.png
+
+
+
+
+ graphic/conn_ind.png
+
+
+
+
+ graphic/error_image.png
+
+
+
+
+ graphic/ico_workWU.png
+ 89:89:89
+ 89:89:89
+ 128:128:128
+
+
+
+
+ graphic/ico_workWU_sus.png
+ 128:128:128
+ 128:128:128
+ 178:178:178
+
+
+
+
+ graphic/tabArea_bg.png
+
+
+
+
+ graphic/wu_bg.png
+
+
+
+
+ graphic/project_image.png
+
+
+
+
+ graphic/ce_background.png
+
+
+
+
+ graphic/gauge_bg.png
+
+
+
+
+ graphic/gauge_progress_indicator.png
+
+
+
+
+ graphic/proj_bg.png
+
+
+
+
+ graphic/default_stat_icon.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ graphic/btnMessages.png
+
+
+
+
+ graphic/btnMessagesAlert.png
+
+
+
+
+ graphic/btnSnooze.png
+
+
+
+
+ graphic/btnResume.png
+
+
+
+
+ graphic/btnPreferences.png
+
+
+
+
+ graphic/btnAdvancedView.png
+
+
+
+
+ graphic/dlgBackground.png
+
+
+
+
+
+
+ Charity Engine Desktop
+ Charity Engine
+
+
+
+ graphic/ce_icon_play.png
+ 255:255:255
+
+
+
+
+
+ graphic/ce_stop.png
+ 255:255:255
+
+
+
+
+
+ graphic/ce_pause.png
+ 255:255:255
+
+
+
+ graphic/ce_about.ico
+
+ Charity Engine
+
+ http://www.charityengine.org
+ mailto:support@charityengine.org
+
+
+ 0
+ This will shut down Charity engine and its tasks entirely
+ until Charity Engine Desktop is run again.
+
+ In most cases, it is better to avoid exiting the program. Instead
+ simply close the Charity Engine Desktop Window.
+
+
+
+
+
+ Charity Engine Desktop - Attach to Project
+
+ graphic/ce_wizard_bar.png
+
+
+
+
+
+ graphic/ce_wizard_bar.png
+
+
+
+
+
+
\ No newline at end of file
diff --git a/clientscr/mac_saver_module.cpp b/clientscr/mac_saver_module.cpp
index 0834667365..ab7fb64ea2 100644
--- a/clientscr/mac_saver_module.cpp
+++ b/clientscr/mac_saver_module.cpp
@@ -256,10 +256,13 @@ OSStatus CScreensaver::initBOINCApp() {
brandId = GetBrandID();
switch(brandId) {
case 1:
- m_BrandText = "GridRepublic";
+ m_BrandText = "GridRepublic Desktop";
break;
case 2:
- m_BrandText = "Progress Thru Processors";
+ m_BrandText = "Progress Thru Processors Desktop";
+ break;
+ case 3:
+ m_BrandText = "Charity Engine Desktop";
break;
default:
m_BrandText = "BOINC";
diff --git a/clientscr/res/CE_ss_logo.jpg b/clientscr/res/CE_ss_logo.jpg
new file mode 100644
index 0000000000..eeca169120
Binary files /dev/null and b/clientscr/res/CE_ss_logo.jpg differ
diff --git a/clientscr/res/CE_ss_logo.png b/clientscr/res/CE_ss_logo.png
new file mode 100644
index 0000000000..179f495e88
Binary files /dev/null and b/clientscr/res/CE_ss_logo.png differ
diff --git a/clientscr/ss_app.cpp b/clientscr/ss_app.cpp
index ee601c6b9c..11f65b9141 100644
--- a/clientscr/ss_app.cpp
+++ b/clientscr/ss_app.cpp
@@ -66,6 +66,20 @@ double next_connect_time = 0.0;
CC_STATE cc_state;
CC_STATUS cc_status;
+// Possible values of iBrandId:
+#define BOINC_BRAND_ID 0
+#define GRIDREPUBLIC_BRAND_ID 1
+#define PROGRESSTHRUPROCESSORS_BRAND_ID 2
+#define CHARITYENGINE_BRAND_ID 3
+
+#ifdef _GRIDREPUBLIC
+static long iBrandId = GRIDREPUBLIC_BRAND_ID;
+#elif defined(_CHARITYENGINE)
+static long iBrandId = CHARITYENGINE_BRAND_ID;
+#else
+static long iBrandId = BOINC_BRAND_ID; // Default value for BOINC
+#endif
+
// set up lighting model
//
static void init_lights() {
@@ -136,26 +150,32 @@ void show_project(unsigned int index, float alpha) {
void show_disconnected() {
float x=.3, y=.3;
-#ifdef _GRIDREPUBLIC
+ if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "GridRepublic is not running.");
-#else
+ } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
+ txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Charity Engine is not running.");
+ } else {
txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "BOINC is not running.");
-#endif
+ }
}
void show_no_projects() {
float x=.2, y=.3;
-#ifdef _GRIDREPUBLIC
+ if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "GridRepublic is not attached to any projects.");
-#else
+ } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
+ txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Charity Engine is not attached to any projects.");
+ } else {
txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "BOINC is not attached to any projects.");
-#endif
+ }
y = .25;
-#ifdef _GRIDREPUBLIC
+ if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Attach to projects using the GridRepublic Desktop.");
-#else
+ } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
+ txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Attach to projects using the Charity Engine Desktop.");
+ } else {
txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Attach to projects using the BOINC Manager.");
-#endif
+ }
}
#define MAX_JOBS_DISPLAY 4
@@ -204,11 +224,13 @@ void show_jobs(unsigned int index, double alpha) {
case SUSPEND_REASON_NO_RECENT_INPUT:
p = "Computing suspended while computer not in use"; break;
case SUSPEND_REASON_INITIAL_DELAY:
-#ifdef _GRIDREPUBLIC
+ if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
p = "Computing suspended while GridRepublic is starting up"; break;
-#else
+ } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
+ p = "Computing suspended while Charity Engine is starting up"; break;
+ } else {
p = "Computing suspended while BOINC is starting up"; break;
-#endif
+ }
case SUSPEND_REASON_EXCLUSIVE_APP_RUNNING:
p = "Computing suspended while exclusive application running"; break;
}
@@ -365,10 +387,16 @@ void boinc_app_key_release(int, int){}
void app_graphics_init() {
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
txf_load_fonts(".");
-#ifdef _GRIDREPUBLIC
- logo.load_image_file("gridrepublic_ss_logo.jpg");
+#ifdef _WCG
+ logo.load_image_file("wcg.bmp");
#else
- logo.load_image_file("boinc_logo_black.jpg");
+ if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
+ logo.load_image_file("gridrepublic_ss_logo.jpg");
+ } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
+ logo.load_image_file("CE_ss_logo.jpg");
+ } else {
+ logo.load_image_file("boinc_logo_black.jpg");
+ }
#endif
init_lights();
}
@@ -396,6 +424,16 @@ int main(int argc, char** argv) {
}
exit(ERR_CONNECT);
}
+
+#ifdef __APPLE__
+ // For GridRepublic, the installer put a branding file in our data directory
+ FILE *f = fopen("/Library/Application Support/BOINC Data/Branding", "r");
+ if (f) {
+ fscanf(f, "BrandId=%ld\n", &iBrandId);
+ fclose(f);
+ }
+#else
+#endif
boinc_graphics_loop(argc, argv, "BOINC screensaver");
boinc_finish_diag();
diff --git a/mac_installer/CE-Branding b/mac_installer/CE-Branding
new file mode 100644
index 0000000000..257fa2f185
--- /dev/null
+++ b/mac_installer/CE-Branding
@@ -0,0 +1 @@
+BrandId=3
diff --git a/mac_installer/CE-ReadMe.rtf b/mac_installer/CE-ReadMe.rtf
new file mode 100644
index 0000000000..cacc4bb37b
--- /dev/null
+++ b/mac_installer/CE-ReadMe.rtf
@@ -0,0 +1,165 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red2\green87\blue173;}
+\margl1440\margr1440\vieww9000\viewh9000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+
+\f0\b\fs28 \cf0 Macintosh Charity Engine Desktop Version Release Notes\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\b0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc
+\cf0 http://gridrepublic.org\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\b \cf0 Installing
+\fs28 Charity Engine
+\fs24 Desktop may take several minutes; please be patient.
+\b0 \
+\
+
+\b Dual GPU Macbook Pros:
+\b0 Some newer Macbook Pros have dual graphics processors, one that is more powerful and another that is more energy-efficient, and they switch between them automatically. This can cause your screensaver to flash on and off frequently, and can prevent Charity Engine Desktop from detecting the more powerful GPU which is needed to process some applications. You can force selection either {\field{\*\fldinst{HYPERLINK "http://support.apple.com/kb/HT4110"}}{\fldrslt \cf2 permanently}} or temporarily using a {\field{\*\fldinst{HYPERLINK "http://codykrieger.com/gfxCardStatus/"}}{\fldrslt \cf2 third-party utility}}. But be aware that forcing the use of the NVIDIA GPU may cause faster battery drain; this of course is not an issue when running on AC power.\
+\
+If you are upgrading from a version earlier than 6.8.0, you may see a message "Failed to convert file Charity Engine Desktop Preferences to Unicode." This is due to our addition of full Unicode support to the Charity Engine Desktop. If you get this message, you may need to readjust your column widths and other Charity Engine Desktop view options, but no other problems will result. When you quit Charity Engine Desktop, these settings will be saved in the new Unicode format.\
+\
+Due to new restrictions imposed by OS 10.6 Snow Leopard, there has been a change in Charity Engine Desktop's security implementation. Non-administrative users can no longer run Charity Engine Desktop unless they are added to group boinc_master. As of Charity Engine Desktop 6.8.29, the Charity Engine Desktop installer asks whether or not you wish to allow this.\
+\
+For more options, please see the BOINC Macintosh administrator tools at:\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+{\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X"}}{\fldrslt \cf0 http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X}}\
+\
+Charity Engine Desktop on the Mac now supports processing with your graphics card, or GPU. Please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/gpu.php"}}{\fldrslt http://boinc.berkeley.edu/gpu.php}} for more information. If you have a CUDA-capable NVIDIA GPU, you will need to download and install the CUDA driver and libraries for your system from {\field{\*\fldinst{HYPERLINK "http://www.nvidia.com/object/mac-driver-archive.html"}}{\fldrslt http://www.nvidia.com/object/mac-driver-archive.html}}.\
+\
+Starting with version 5.5.4, this software features new, stricter security measures. See the
+\b Security
+\b0 section below for important information.\
+\
+This is a
+\b universal binary
+\b0 which will run natively on both Intel and PowerPC Macs. Charity Engine Desktop requires Macintosh OS X version 10.3.9 or greater. \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\b \cf0 Upgrade warning: You may lose unreported results
+\b0 if you are running on an
+\b Intel Mac
+\b0 and upgrading from a version of Charity Engine or BOINC earlier than 5.3.21 on an Intel Mac, or if you are transferring Charity Engine or BOINC Data from a PowerPC Mac to an Intel Mac, or from an Intel Mac to a PowerPC Mac. To prevent this, open Charity Engine Desktop's window, select the
+\i Projects
+\i0 tab, select each project and press the
+\i Update
+\i0 button. Then select the
+\i Tasks
+\i0 tab and make sure there are no tasks "Ready to report."\
+\
+
+\b Setting Charity Engine as your screen saver:
+\b0 This installer adds the Charity Engine screen saver to your system, and optionally changes your screen saver settings to use the Charity Engine screen saver. You can also select Charity Engine as your screen saver later, using the Screen Saver or Screen Effects panel in the System Preferences (accessible from the Apple menu). \
+\
+It may take a minute after the screen saver starts before the science application graphics appear. \
+\
+Note: on some versions of the Mac OS, you may not be able to exit the Charity Engine screen saver by moving the mouse; you may need to press the mouse button or press any key on the keyboard to exit. \
+\
+
+\b Security:\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
+
+\b0 \cf0 Version 5.5.4 of Charity Engine Desktop for the Macintosh features new, stricter security measures. This additional security helps protect your computer data from potential theft or accidental or malicious damage by limiting Charity Engine projects' access to your system and data. \
+\
+If you experience problems with this software, you can re-install a version of Charity Engine or BOINC prior to 5.5.4; this will automatically revert ownership and permissions to the earlier implementation.\
+\
+Once we have tested this security implementation on the Mac, we plan to extend it to other computer platforms, including Linux and Windows.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+\cf0 The installer sets special permission for the Charity Engine Desktop and Client, which allows them to write to the shared BOINC Data regardless of which user is logged in. If you
+\b copy
+\b0 Charity Engine Desktop or the Charity Engine core client without using the installer, it will not run properly. \
+\
+However, you can safely
+\b move
+\b0 the Charity Engine Desktop within the same disk drive or partition. If you need multiple copies, run the installer again after moving Charity Engine Desktop; this will create a fresh copy in the
+\b /Applications
+\b0 folder.\
+\
+Charity Engine verifies that ownership and permissions are set properly each time it is launched. It will tell you to re-install Charity Engine if there is a problem.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
+\cf0 \
+The new safeguards use the basic security protections built into UNIX (the base underlying Mac OS X): permissions and ownership.\
+\
+The administrator (usually the owner) of each computer creates one or more users who can log in, can create private files, and can share other files. Some of these users are given administrative privileges, some may not have these privileges.\
+\
+There are also groups, which have one or more users as members. For example, users with administrative privileges are usually members of the "admin" group.\
+\
+In addition to these "visible" users and groups, the operating system contains a number of "hidden" users and groups which are used for various purposes. A person cannot log in as one of these "hidden" users. \
+\
+This structure of users and groups is used to provide security by restricting what data and operations each person or application can use. For example, many files belong to user "system" (also called "root") and group "wheel" so that non-privileged users can't modify them, thus protecting the computer system from accidental or malicious harm.\
+\
+Starting with version 5.5.4 of the Charity Engine Desktop for the Macintosh, the Charity Engine installer creates 2 new "hidden" users
+\b boinc_master
+\b0 and
+\b boinc_project
+\b0 , and two new "hidden" groups, also named
+\b boinc_master
+\b0 and
+\b boinc_project
+\b0 (unless they were created by a previous installation of Charity Engine or BOINC.)\
+\
+The installer automatically gives administrators (users who are members of the "admin" group) membership in the two new groups, so that they can easily manipulate Charity Engine files. Non-admin users are denied direct access to these files (except through Charity Engine Desktop), protecting Charity Engine and its projects files. This is particularly useful where many people have access to the computer, as in a school computer lab.\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+\cf0 Charity Engine projects are given permission to access only project files, protecting your computer in the event someone downloads bad software from a bogus project, or in the unlikely case that a legitimate project's server is infiltrated by a cracker.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
+\cf0 \
+The Charity Engine Desktop also blocks non-admin users' access to certain functions, such as Attach, Detach, Reset Project. Charity Engine permits a non-admin user to override this restriction by entering an administrator user name and password.\
+\
+For technical details of the implementation, please see {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/trac/wiki/SandboxUser"}}{\fldrslt http://boinc.berkeley.edu/trac/wiki/SandboxUser}} and {\field{\*\fldinst{HYPERLINK "http://boinc.berkeley.edu/sandbox.php"}}{\fldrslt http://boinc.berkeley.edu/sandbox.php}}\
+\
+\
+As of Version 5.5.4, the installer now sets Charity Engine Desktop as a Login item for
+\b all
+\b0 users, not just the user who ran the installer. You can add or remove Login Items by using the Accounts Pane in the System Preferences (accessible from the Apple menu). (These items are called "Login Items" in OS 10.4 or "Startup Items" in OS 10.3.)\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+\cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+
+\b \cf0 Other useful information:
+\b0 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
+
+\b \cf0 Troubleshooting tip:
+\b0 If you are upgrading from a version of Charity Engine or BOINC prior to 5.5.4 and the installer refuses to let you install, trash the file
+\b /Library/Receipts/Charity Engine.pkg
+\b0 or
+\b /Library/Receipts/BOINC.pkg
+\b0 and try again.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
+\cf0 \
+The installer places two items onto your hard drive: Charity Engine Desktop.app in your
+\b /Applications
+\b0 folder and Charity Engine.saver in your
+\b /Library/Screen Savers
+\b0 folder. \
+\
+The installer creates the BOINC Data folder in your
+\b /Library/Application Support
+\b0 folder. If you have previously been running Charity Engine or BOINC in a different folder, copy your data into this folder. \
+\
+All users who log in on the same Macintosh will share one set of BOINC data, ensuring that work units are processed in the most timely manner. \
+\
+You can move (
+\b not
+\b0 copy) Charity Engine Desktop to any folder you wish on the same disk drive or partition. If you do so, you will need to update the information in each user's Login Items. In most cases, the Charity Engine screen saver should still work properly. If it does not, move Charity Engine Desktop back to the
+\b /Applications
+\b0 folder.\
+\
+\pard\pardeftab720\ql\qnatural
+\cf0 To completely remove (
+\b uninstall
+\b0 ) Charity Engine Desktop from your Macintosh, run the
+\b Uninstall Charity Engine
+\b0 application which is included with the installer.\
+}
\ No newline at end of file
diff --git a/mac_installer/CharityEngine/acct_mgr_url.xml b/mac_installer/CharityEngine/acct_mgr_url.xml
new file mode 100644
index 0000000000..81d0243616
--- /dev/null
+++ b/mac_installer/CharityEngine/acct_mgr_url.xml
@@ -0,0 +1,18 @@
+
+ Charity Engine
+ http://www.charityengine.com/
+
+ http://www.charityengine.com/forgot
+
+1024
+9c3af22a230f1eb122b8eab256e5e46b49f6d357e65d00e414cf6af105aef217
+1de0793353097bbbb918413f79cb5bfaa4532daf061ece07b63f209690a3e1b1
+8906a9ae4f521ec25e6fb79b8679dd4c18c0f022dcb95baefeca091d572c7738
+e1b1d542bbec94552e0e37c698427f4538b947b79072d112ebcf4d9c509b16d9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010001
+.
+
+
diff --git a/mac_installer/make_CharityEngine.sh b/mac_installer/make_CharityEngine.sh
new file mode 100644
index 0000000000..08b11dd865
--- /dev/null
+++ b/mac_installer/make_CharityEngine.sh
@@ -0,0 +1,350 @@
+#!/bin/csh
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2008 University of California
+#
+# BOINC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# BOINC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with BOINC. If not, see .
+
+##
+# Script to convert Macintosh BOINC installer to Charity Engine Desktop installer
+# updated 8/8/11 by Charlie Fenton for BOINC 6.8.29 and later
+##
+
+## Usage:
+## First put the following files into a working directory:
+## the BOINC installer to be converted
+## the Uninstall BOINC application to be converted
+## CE_ReadMe.rtf
+## CharityEngine.icns
+## MacCEPkgIcon.zip
+## CE_uninstall.icns
+## COPYING
+## COPYING.LESSER
+## COPYRIGHT
+## skins directory containing Charity Engine skin (optional)
+## acct_mgr_url.xml (to have BOINC automatically connect to Account Manager)
+## CE_ss_logo.png (for screensaver coordinator)
+## CE_ss_logo.tiff (for screensaver coordinator)
+## CE_saver directory containing Charity Engine default screensaver (if non-standard)
+## and associated files, including:
+## CE_ss_logo.png
+##
+## NOTE: This script uses PackageMaker, which is installed as part of the
+## XCode developer tools. So you must have installed XCode Developer
+## Tools on the Mac before running this script.
+##
+## NOTE: PackageMaker may write 3 lines to the terminal with "Setting to : 0 (null)"
+## and "relocate: (null) 0". This is normal and does not indicate a problem.
+##
+## cd to the working directory:
+##
+## Invoke this script with the three parts of version number as arguments.
+## For example, if the version is 3.2.1:
+## sh [path_to_this_script] 3 2 1
+##
+## This will create a directory "BOINC_Installer" in the parent directory of
+## the current directory
+##
+## For different branding, modify the following 9 variables:
+PR_PATH="CE_Pkg_Root"
+IR_PATH="CE_Installer_Resources"
+SCRIPTS_PATH="CE_Installer_Scripts"
+NEW_DIR_PATH="New_Release_CE_$1_$2_$3"
+README_FILE="CE-ReadMe.rtf"
+## BRANDING_FILE="CE-Branding"
+BRANDING_INFO="BrandId=3"
+ICNS_FILE="CharityEngine.icns"
+INSTALLER_ICNS_FILE="MacCEPkgIcon.zip"
+UNINSTALLER_ICNS_FILE="CE_uninstall.icns"
+SAVER_DIR="CE_saver"
+SAVER_SYSPREF_ICON="CE_ss_logo.tiff"
+SAVER_LOGO="CE_ss_logo.png"
+BRAND_NAME="Charity Engine"
+MANAGER_NAME="Charity Engine Desktop"
+LC_BRAND_NAME="Charity Engine"
+SOURCE_PKG_PATH="BOINC Installer.pkg/Contents"
+
+if [ $# -lt 3 ]; then
+echo "Usage:"
+echo " cd working_directory"
+echo " sh [path_to_this_script] major_version minor_version revision_number"
+echo ""
+echo "See comments at start of script for more info."
+echo ""
+exit 1
+fi
+
+pushd ./
+
+## Make sure sed uses UTF-8 text encoding
+unset LC_CTYPE
+unset LC_MESSAGES
+unset __CF_USER_TEXT_ENCODING
+export LANG=en_US.UTF-8
+
+if [ -f /Developer/usr/bin/packagemaker ]; then
+ PACKAGEMAKER_VERSION=3
+else
+ PACKAGEMAKER_VERSION=2
+fi
+
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+mkdir -p "${IR_PATH}"
+mkdir -p "${PR_PATH}"
+
+sudo rm -dfR "${NEW_DIR_PATH}/"
+
+mkdir -p "${NEW_DIR_PATH}/"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal"
+mkdir -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras"
+
+cp -fp "${SOURCE_PKG_PATH}/Archive.pax.gz" "${PR_PATH}/"
+cd "${PR_PATH}"
+sudo gunzip ./Archive.pax.gz
+sudo pax -r -pe -f Archive.pax
+rm -df "Archive.pax"
+cd ..
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/License.rtf" "${IR_PATH}/"
+cp -fp "${README_FILE}" "${IR_PATH}/ReadMe.rtf"
+# Update version number
+sed -i "" s/""/"$1.$2.$3"/g "${IR_PATH}/ReadMe.rtf"
+
+if [ "$PACKAGEMAKER_VERSION" = "3" ]; then
+ mkdir -p "${SCRIPTS_PATH}"
+else
+ SCRIPTS_PATH=${IR_PATH}
+fi
+
+# Create the installer's preinstall and preupgrade scripts from the standard preinstall script
+cp -fp "${SOURCE_PKG_PATH}/Resources/preinstall" "${SCRIPTS_PATH}/"
+
+sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${SCRIPTS_PATH}/preinstall"
+
+cp -fp "${SCRIPTS_PATH}/preinstall" "${SCRIPTS_PATH}/preupgrade"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/postinstall" "${SCRIPTS_PATH}/"
+cp -fp "${SOURCE_PKG_PATH}/Resources/postupgrade" "${SCRIPTS_PATH}/"
+
+cp -fpR "${SOURCE_PKG_PATH}/Resources/PostInstall.app" "${IR_PATH}/"
+
+cp -fp "${SOURCE_PKG_PATH}/Resources/all_projects_list.xml" "${IR_PATH}/"
+
+##### We've decided not to customize BOINC Data directory name for branding
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data"
+#### mkdir -p "${PR_PATH}/Library/Application Support/${BRAND_NAME} Data/locale"
+
+mkdir -p "${PR_PATH}/Library/Application Support/BOINC Data"
+
+## If skins folder is present. copy it into BOINC Data folder
+if [ -d "skins" ]; then
+ sudo cp -fR "skins" "${PR_PATH}/Library/Application Support/BOINC Data/"
+fi
+
+## Normally, we would put the account manager URL file into the Package Root folder
+## for delivery to the BOINC Data folder. But if the user later installs standard
+## BOINC (without this file), the Apple installer would then delete the file.
+## So we "hide" it in the installer's resources, and have the PostInstall script copy
+## it into the BOINC Data folder
+##
+## If account manager URL file is present, copy it into installer resources for
+## eventual delivery into the BOINC Data folder
+if [ -f "acct_mgr_url.xml" ]; then
+## sudo cp -fR "acct_mgr_url.xml" "${PR_PATH}/Library/Application Support/BOINC Data/acct_mgr_url.xml"
+ sudo cp -fR "acct_mgr_url.xml" "${IR_PATH}/"
+fi
+
+## Modify for Charity Engine
+# Rename the Manager's bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Applications/BOINCManager.app/" "${PR_PATH}/Applications/${MANAGER_NAME}.app/"
+sudo mv -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/BOINCManager" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/MacOS/${MANAGER_NAME}"
+
+# Update the Manager's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCManager/"${MANAGER_NAME}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/BOINCMgr.icns/"${ICNS_FILE}"/g "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Info.plist"
+# InfoPlist.strings file uses UTF-16 encoding
+sudo chmod a+w "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo iconv -f UTF-16 -t UTF-8 "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings" > "${PR_PATH}/tempUTF81"
+sudo sed -i "" s/BOINC/"${MANAGER_NAME}"/g "${PR_PATH}/tempUTF81"
+sudo iconv -f UTF-8 -t UTF-16 "${PR_PATH}/tempUTF81" > "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo rm -f "${PR_PATH}/tempUTF81"
+
+# Replace the Manager's BOINCMgr.icns file
+sudo cp -fp "${ICNS_FILE}" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/${ICNS_FILE}"
+sudo rm -f "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/BOINCMgr.icns"
+
+# Put Branding file in both Installer Package and Application Bundle
+sudo echo ${BRANDING_INFO} > "${IR_PATH}/Branding"
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Applications/${MANAGER_NAME}.app/Contents/Resources/Branding"
+
+## Put Branding file into BOINC Data folder to make it available to screensaver coordinator
+sudo cp -fp "${IR_PATH}/Branding" "${PR_PATH}/Library/Application Support/BOINC Data/Branding"
+
+# Rename the screensaver coordinator bundle and its executable inside the bundle
+sudo mv -f "${PR_PATH}/Library/Screen Savers/BOINCSaver.saver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver"
+sudo mv -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/BOINCSaver" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/MacOS/${BRAND_NAME}"
+
+# Update screensaver coordinator's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINCSaver/"${BRAND_NAME}"/g "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Info.plist"
+# InfoPlist.strings file uses UTF-16 encoding
+sudo chmod a+w "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo iconv -f UTF-16 -t UTF-8 "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings" > "${PR_PATH}/tempUTF82"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/tempUTF82"
+sudo iconv -f UTF-8 -t UTF-16 "${PR_PATH}/tempUTF82" > "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo rm -f "${PR_PATH}/tempUTF82"
+
+# Replace screensaver coordinator's boinc.tiff or boinc.jpg file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.jpg"
+sudo cp -fp "${SAVER_SYSPREF_ICON}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc.tiff"
+
+# Replace screensaver coordinator's boinc_ss_logo.png file
+sudo rm -f "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+sudo cp -fp "${SAVER_LOGO}" "${PR_PATH}/Library/Screen Savers/${BRAND_NAME}.saver/Contents/Resources/boinc_ss_logo.png"
+
+# Delete the BOINC default screensaver and its associated files
+sudo rm -f "${PR_PATH}/Library/Application Support/BOINC Data/boinc_logo_black.jpg"
+
+# Copy the Charity Engine default screensaver files into BOINC Data folder
+sudo cp -fR "${SAVER_DIR}/" "${PR_PATH}/Library/Application Support/BOINC Data/"
+
+# Copy and rename the Uninstall application's bundle and rename its executable inside the bundle
+sudo cp -fpR "Uninstall BOINC.app" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app"
+sudo mv -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall BOINC" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/MacOS/Uninstall ${BRAND_NAME}"
+
+# Update Uninstall application's info.plist, InfoPlist.strings files
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+sudo sed -i "" s/MacUninstaller.icns/"${UNINSTALLER_ICNS_FILE}"/g "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Info.plist"
+# InfoPlist.strings file uses UTF-16 encoding
+sudo chmod a+w "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo iconv -f UTF-16 -t UTF-8 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings" > "${PR_PATH}/tempUTF83"
+sudo sed -i "" s/BOINC/"${BRAND_NAME}"/g "${PR_PATH}/tempUTF83"
+sudo iconv -f UTF-8 -t UTF-16 "${PR_PATH}/tempUTF83" > "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+sudo rm -f "${PR_PATH}/tempUTF83"
+
+# Replace the Uninstall application's MacUninstaller.icns file
+sudo cp -fp "${UNINSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/${UNINSTALLER_ICNS_FILE}"
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/MacUninstaller.icns"
+# Remove the Uninstall application's resource file so it will show generic "Are you sure?" dialog
+sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app/Contents/Resources/Uninstall BOINC.rsrc"
+
+sudo chown -R root:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app"
+sudo chmod -R 755 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/Uninstall ${BRAND_NAME}.app"
+
+## Fix up ownership and permissions
+sudo chown -R root:admin "${PR_PATH}"/*
+sudo chmod -R u+rw,g+rw,o+r-w "${PR_PATH}"/*
+sudo chmod 1775 "${PR_PATH}/Library"
+
+sudo chown -R 501:admin "${PR_PATH}/Library/Application Support"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${PR_PATH}/Library/Application Support"/*
+
+sudo chown -R root:admin "${IR_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${IR_PATH}"/*
+sudo chown -R root:admin "${SCRIPTS_PATH}"/*
+sudo chmod -R u+rw,g+r-w,o+r-w "${SCRIPTS_PATH}"/*
+
+sudo cp -fp "${IR_PATH}/ReadMe.rtf" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/ReadMe.rtf"
+sudo cp -fp "COPYING" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.txt"
+sudo cp -fp "COPYRIGHT" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYRIGHT.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYRIGHT.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYRIGHT.txt"
+
+# COPYING.LESSER is part of GNU License v3
+sudo cp -fp "COPYING.LESSER" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.LESSER.txt"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.LESSER.txt"
+sudo chmod -R 644 "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/extras/COPYING.LESSER.txt"
+
+# Make temporary copies of Pkg-Info.plist and Description.plist for PackageMaker and update for this branding
+sudo cp -fp "${SOURCE_PKG_PATH}/Info.plist" "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Pkg-Info.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Pkg-Info.plist"
+if [ -f "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" ]; then
+ sudo cp -fp "${SOURCE_PKG_PATH}/Resources/English.lproj/Description.plist" "${NEW_DIR_PATH}"
+else
+ sudo cp -fp "${SOURCE_PKG_PATH}/Resources/en.lproj/Description.plist" "${NEW_DIR_PATH}"
+fi
+sudo chown -R 501:admin "${NEW_DIR_PATH}/Description.plist"
+sudo chmod -R 666 "${NEW_DIR_PATH}/Description.plist"
+
+# Update Pkg-Info.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Pkg-Info" "CFBundleGetInfoString" "$BRAND_NAME $1.$2.$3"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Pkg-Info.plist"
+
+# Update Description.plist name and ensure it is in XML format
+defaults write "`pwd`/${NEW_DIR_PATH}/Description" "IFPkgDescriptionTitle" "$MANAGER_NAME"
+plutil -convert xml1 "`pwd`/${NEW_DIR_PATH}/Description.plist"
+
+# Build the installer package
+if [ "$PACKAGEMAKER_VERSION" = "3" ]; then
+ # Packagemaker Version 3
+## /Developer/usr/bin/packagemaker -r ../BOINC_Installer/Pkg_Root -e ../BOINC_Installer/Installer\ Resources/ -s ../BOINC_Installer/Installer\ Scripts/ -f mac_build/Pkg-Info.plist -t "BOINC Manager" -n "$1.$2.$3" -b -o ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_universal/BOINC\ Installer.pkg
+ /Developer/usr/bin/packagemaker -r "${PR_PATH}" -e "${IR_PATH}" -s "${SCRIPTS_PATH}" -f "${NEW_DIR_PATH}/Pkg-Info.plist" -t "${MANAGER_NAME}" -n "$1.$2.$3" -b -o "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg"
+ # Remove TokenDefinitions.plist and IFPkgPathMappings in Info.plist, which would cause installer to find a previous copy of ${MANAGER_NAME} and install there
+ sudo rm -f "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg/Contents/Resources/TokenDefinitions.plist"
+ defaults delete "`pwd`/${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg/Contents/Info" IFPkgPathMappings
+else
+ # Packagemaker Version 2
+## /Developer/Tools/packagemaker -build -p ../BOINC_Installer/New_Release_$1_$2_$3/boinc_$1.$2.$3_macOSX_universal/BOINC\ Installer.pkg -f ../BOINC_Installer/Pkg_Root -r ../BOINC_Installer/Installer\ Resources/ -i mac_build/Pkg-Info.plist -d mac_Installer/Description.plist -ds
+ /Developer/Tools/packagemaker -build -p "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg" -f "${PR_PATH}" -r "${IR_PATH}" -i "${NEW_DIR_PATH}/Pkg-Info.plist" -d "${NEW_DIR_PATH}/Description.plist" -ds
+fi
+
+# Add our custom icon to installer package
+ditto -xk "${INSTALLER_ICNS_FILE}" "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg"
+SetFile -a CE "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg"
+SetFile -a V "${NEW_DIR_PATH}/${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal/${BRAND_NAME} Installer.pkg/"Icon*
+
+## for debugging
+## if [ $? -ne 0 ]; then
+## echo ""
+## echo "********** /Pkg-Info.plist File contents: *************"
+## echo ""
+## cp "${NEW_DIR_PATH}/Pkg-Info.plist" /dev/stdout
+## echo ""
+## echo "********** End /Pkg-Info.plist File contents *************"
+## echo ""
+## fi
+
+# Remove temporary copies of Pkg-Info.plist and Description.plist
+sudo rm ${NEW_DIR_PATH}/Pkg-Info.plist
+sudo rm ${NEW_DIR_PATH}/Description.plist
+
+# Remove temporary directories
+sudo rm -dfR "${IR_PATH}"
+sudo rm -dfR "${PR_PATH}"
+sudo rm -dfR "${SCRIPTS_PATH}"
+
+# Compress the products
+cd ${NEW_DIR_PATH}
+## Use ditto instead of zip utility to preserve resource forks and Finder attributes (custom icon, hide extension)
+ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal" "${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal.zip"
+##### We've decided not to create branded command-line executables; they are identical to standard ones
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin" "${LC_BRAND_NAME}_$1.$2.$3_universal-apple-darwin.zip"
+##### We've decided not to create branded symbol table file; it is identical to standard one
+#### ditto -ck --sequesterRsrc --keepParent "${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables" "${LC_BRAND_NAME}_$1.$2.$3_macOSX_SymbolTables.zip"
+
+# Force Finder to recognize changed icons by deleting the uncompressed products and expanding the zip file
+sudo rm -dfR "${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal"
+open "${LC_BRAND_NAME}_$1.$2.$3_macOSX_universal.zip"
+
+popd
+exit 0