Author Topic: Revisit Chameleon's package builder  (Read 109089 times)

0 Members and 1 Guest are viewing this topic.

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #120 on: October 29, 2010, 06:06:52 PM »
It's taken me a little while to find time to read and learn how the existing code in the scripts work. And from my research I've made some changes, tweaks and additions to the excellently written scripts. They've been great with helping me understand how it all works.

I have so far, only concentrated on two scripts for installing the Chameleon boot files. One for EFI and for not EFI. The main additions are they aim to:
• install boot0 or boot0hfs depending on whether or not it detects a Windows disk signature in the MBR.
• detect if a Windows bootloader is in the MBR and if so, install boot0hfs.
• detect if either boot0 or boot0hfs is already installed and change accordingly if it also finds a Windows disk signature in the MBR.
• EFI script will install boot1h or boot1f2 depending on the format of the EFI partition.
• Activate selected partition if it meets two conditiions: A - it's not already the active partition, B Windows is NOT installed

Only the Standard install has been tested so far on GPT and GPT/MBR testbeds with OSX and with and without Windows7.
I'll hopefully get some time to test the EFI install this weekend but I will have to change the buildpkg first, but those two scripts should be all we are going to need now for installing the bootloader files.

If anybody spots any issue with what I have been doing and thinks I need to make any changes etc. then please post. TIA
Link to scripts: Standard, EFI
« Last Edit: October 29, 2010, 06:12:23 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #121 on: October 30, 2010, 01:42:12 AM »
 ;D
I will try it Blackosx... Thx in advance.

Fabio
Soon I update the language... with the missed translation strings for some language

EDIT:
Question.
for doc "building"

yours (in buildpkg)
      # build package for Documentation
         mkdir -p "${1}/Documentation/Root"
         cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root
         cp -f ${pkgroot}/doc/README ${1}/Documentation/Root
         cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root
         echo "Building Documentation package"
         buildpackage "${1}/Documentation" "/Documentation/Chameleon2RC5" "" "start_selected=\"false\""
      # End build package for Documentation

mine (in buildpkg)
# build package for Documents
   mkdir -p "${1}/Documents/Root"
   cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documents/Root
   cp -f ${pkgroot}/doc/README ${1}/Documents/Root
   cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documents/Root
   echo "Building Documents package"
   buildpackage "${1}/Documents" "/Documents/Chameleon2RC5" "" "start_selected=\"false\""
# End build package for Documents

the name of the correct folder is??? /Documents/ or /Documentation/

other things...
Is better hidden and auto install the doc and the bdmesg? (out of the Extra package)

      # build package for bdmesg
         mkdir -p "${1}/bdmesg/Root"
         ditto --noextattr --noqtn "${1%/*}/i386/bdmesg" "${1}/bdmesg/Root"
         echo "Building bdmesg package"
         buildpackage "${1}/bdmesg" "/usr/sbin" "" "start_visible=\"false\" start_selected=\"true\""
      # End build package for bdmesg
« Last Edit: October 30, 2010, 07:10:57 PM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #122 on: October 30, 2010, 08:08:24 PM »
is not important the name you use there. Also "Documenti" will work. It's a folder used to store all the package contents before building it.

I think that, like fdisk440, bdmesg and doc are to be installed without any choice to avoid confusion to noobs (and also to be sure that a lot of user have installed bdmesg to check the problems)

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #123 on: October 30, 2010, 08:15:07 PM »
is not important the name you use there. Also "Documenti" will work. It's a folder used to store all the package contents before building it.

I think that, like fdisk440, bdmesg and doc are to be installed without any choice to avoid confusion to noobs (and also to be sure that a lot of user have installed bdmesg to check the problems)
?

buildpackage "${1}/Documentation" "/Documentation/Chameleon2RC5" "" "start_selected=\"false\""
buildpackage "${1}/Documents" "/Documents/Chameleon2RC5" "" "start_selected=\"false\""

Documentation or Documents (marked in red) is the pkg name inside the main package
Documentation or Documents (marked in blue) is the destination folder for that package
scrax are you sure about the "destination" folder is standard???

Fabio
« Last Edit: October 30, 2010, 09:22:22 PM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #124 on: October 31, 2010, 02:06:35 AM »
no. You are right it's not correct there is an error in my branch

this is the apple standard documentations folder:
/Library/Documentation

sorry, this is good i think

buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\""

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #125 on: October 31, 2010, 03:25:06 PM »
no. You are right it's not correct there is an error in my branch

this is the apple standard documentations folder:
/Library/Documentation

sorry, this is good i think

buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\""

THX scrax!

Blackosx very good works!
I wait you complete the scripting fix job :P and I merge the cosmetics feature like icon background and language

Fabio

EDIT
A working way to add "ugly" icon to the pkg after build is
Code: [Select]
DeRez -only icns "${pkgroot}/Icon.icns" > tempicns.rsrc
Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}-Standard.pkg"
SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}-Standard.pkg"
Where Icon.icns is prebuild with a apps like Img2icns
Info about this metod was found here --> http://hintsforums.macworld.com/archive/index.php/t-70769.html
credits to the authors of that posts.
« Last Edit: October 31, 2010, 09:57:43 PM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #126 on: November 01, 2010, 10:47:09 AM »
Question.
for doc "building"
sorry, this is good i think
buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\""
Hi Fabio/Scrax

Well done for spotting and providing a fix for the 'Documentation' issue. I have only really been working on the standard and EFI scripts to make sure the Chameleon bootloader files are installed correctly and have yet to try to understand the buildpkg script  ;D  You guys are well ahead of me there ;)

Having said that, I have updated the buildpkg in my branch to include the EFI script. So I am now happy that the standard script and EFI script will correctly install the Chameleon files to HDD with a GPT and to complement that I have also changed the English localized.strings to better describe the standard and EFI procedure (I might change it still at a later date).

I've removed the 'Configuration' folder of scripts and have changed the EFI Mounter applescript to use the same code from the EFI script for identifying the EFI partition format.

As I get time, I will work through the whole package and see what else I can change etc..

Blackosx very good works!
I wait you complete the scripting fix job :P and I merge the cosmetics feature like icon background and language
Thanks for testing it out and I think now we need to test the standard and EFI scripts with a larger audience. Maybe you could merge the changes I have made with your branch and release the package in your InsanelyMac thread, but add a note to stress that this is a test for revised scripts for installing to GPT disks..

Do think that's a good idea or shall we wait for more testing? as the last thing we want to do is release something that messes someone's setup.

As I still want to do tests at my end for installing to drives with an MBR partition scheme which show up in diskutil as FDisk_partition_scheme.
« Last Edit: November 01, 2010, 03:22:19 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #127 on: November 01, 2010, 03:29:22 PM »

Thanks for testing it out and I think now we need to test the standard and EFI scripts with a larger audience. Maybe you could merge the changes I have made with your branch and release the package in your InsanelyMac thread, but add a note to stress that this is a test for revised scripts for installing to GPT disks..

Do think that's a good idea or shall we wait for more testing? as the last thing we want to do is release something that messes someone's setup.

As I still want to do tests at my end for installing to drives with an MBR partition scheme which show up in diskutil as FDisk_partition_scheme.

Yep I do it today later...
I compile your branch on last chameleon trunk (no add language or icon and background) your "virgin" branch with last trunk code
a opinion of large audience for "find" faster the good and bad things..

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #128 on: November 01, 2010, 03:50:52 PM »
Great. In that case, let me change some of the wording in the English resources to reflect that it's a test installer, and it's a work in progress. I'll post back when I'm ready. Thanks :)
« Last Edit: November 01, 2010, 05:33:16 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #129 on: November 01, 2010, 05:15:23 PM »
Great. In that case, let me change some of the wording in the English resources to reflect that it's a test installer, and it's a work in progress. I'll post back when I'm ready. Thanks :)
;) when you are ready...
Can you write here what you wont I will write in IM trend about this "test" package... (sorry but my english is not so clean)
Just a Note to copy&paste near the download package...
thx

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #130 on: November 01, 2010, 05:34:17 PM »
Okay - I've amended the Welcome.rtfd for the English language to reflect the package is a trial and listed what's been changed.

The English Welcome.rtfd reads:
Code: [Select]
This package installer uses updated versions of the original Chameleon scripts and this trial reflects it's current state. I've conducted numerous tests with it using OSX and Windows 7 on a disk with a GPT and GPT/MBR and feel it's ready for wider testing.
Please only use this if you are confident.

The changes made (so far) are:
• Only two bootloader choices (Standard and EFI).
• boot0 or boo0hfs are automatically written depending on whether or not a Windows disk signature exists in the MBR of the selected disk.
• EFI script will install boot1h or boot1f32 depending on the format of the EFI partition.
• If you currently have boot0hfs installed but without a Windows installation then it will be replaced with boot0 (and vice-versa).
• Activate selected partition if it meets two conditions: A) it's not already the active partition, B) Windows is NOT installed
• Only English language. Note: other languages will be added back once the words have been finalised.
• EFI Mounter applescript updated to mount EFI partition.

There will be more changes in the future to the whole package.

I am happy now that the 'package' folder from my branch (commit 206) is good for a trial at your InsanelyMac topic. Though I haven't updated the main Chameleon files to match the current Chameleon trunk. I'll try to find some time for that later this evening..  unless you can add that for now at your end when you build the package?
« Last Edit: November 01, 2010, 05:36:25 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #131 on: November 01, 2010, 06:25:09 PM »
ok I post it...
look if is ok

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #132 on: November 11, 2010, 01:07:11 AM »
commit 214

Update my branch to match with chameleon trunk 630 also the Package folder are the same as Blackosx folder,

I add in the buildpkg script the "command" listed some post ago for make the icon on the builded pkg, I place that command between
the name of pkg and the MD5 info.

Also add the strigs for the mint theme inside the unique localizable.strings in the Resouce folder (English).

NOTE: I see some problem if I add a lot of language.. can the text format inside the file cause random crash in builded package?
With only english the pkg builded is stable! Strange no?

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #133 on: November 11, 2010, 01:46:35 PM »
Hi Fabio

commit 214
Update my branch to match with chameleon trunk 630 also the Package folder are the same as Blackosx folder,
As far as I can remember, the code in my branch was working apart from the creation of the com.apple.Boot.plist as I changed the way it was done - so I recommend you test it thoroughly at your end before you think about releasing an installer based on it. I am busy learning shell scripting and re-working a local version on my branch - which now looks a lot different to what I have on the SVN. I've a lot of work to do yet and it's all down to finding the time to get it to a point where I am happy with.

I add in the buildpkg script the "command" listed some post ago for make the icon on the builded pkg, I place that command between
the name of pkg and the MD5 info.
Nice. I'll look at that when I'm near finishing my project.

NOTE: I see some problem if I add a lot of language.. can the text format inside the file cause random crash in builded package?
With only english the pkg builded is stable! Strange no?
I too saw this and more languages did make the package 'unstable'.. I haven't looked in to why that happened but if you find anything the please post :)
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #134 on: November 11, 2010, 02:19:37 PM »
I have the problem with many languages and random crash too.

I'll make some test, for now I think it's better to use only english on the package used to be tested on insanely