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

0 Members and 1 Guest are viewing this topic.

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #60 on: September 21, 2010, 05:35:58 AM »
:) great progress! with cycle for the options :D

Quote
# build options packages

   outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
   choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
   ((xmlindent++))
   packagesidentity="org.chameleon.options"
   options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))
   for (( i = 0 ; i < ${#options
  • } ; i++))

   do
      packagesidentity="org.chameleon.flags"
      flagname=($( find "${options[$i]}" -type d -depth 1 -not -name '.svn' ))
      outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${options[$i]##*/}\">"
      choices[$((choicescount++))]="<choice\n\tid=\"${options[$i]##*/}\"\n\ttitle=\"${options[$i]##*/}\"\n\tdescription=\"${options[$i]##*/}_description\"\n>\n</choice>\n"
      ((xmlindent++))
      for (( j = 0 ; j < ${#flagname
  • } ; j++ ))

         do
            outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${options[$i]##*/}_${flagname[$j]##*/}\">"
            choices[$((choicescount++))]="<choice\n\tid=\"${options[$i]##*/}_${flagname[$j]##*/}\"\n\ttitle=\"${options[$i]##*/}_${flagname[$j]##*/}\"\n\tdescription=\"${options[$i]##*/}_${flagname[$j]##*/}_description\"\n>\n</choice>\n"
            ((xmlindent++))
                  mkdir -p "${1}/${flagname[$j]##*/}/Root"
                  mkdir -p "${1}/${flagname[$j]##*/}/Scripts"
                  ditto --noextattr --noqtn "${options[$i]}/${flagname[$j]##*/}/postinstall" "${1}/${options[$i]##*/}${flagname[$j]##*/}/Scripts/postinstall"
                  buildpackage "${1}/${options[$i]##*/}_${flagname[$j]##*/}" "/" "${coresize}" "start_selected=\"false\""
                  rm -R -f "${1}/${j##*/}"
            ((xmlindent--))
            outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
      done
      ((xmlindent--))
      outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
      echo "Building ${options[$i]##*/} package"
      buildpackage "${1}/${options[$i]##*/}" "/" "${coresize}" "start_selected=\"false\""
      rm -R -f "${1}/${i##*/}"
   done
   ((xmlindent--))
   outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build options packages

Now the script correctly generate the menu and his submenus for each options the name title and description too :)

Now still to get it "working"... copy the script in the package...
Fabio
« Last Edit: September 21, 2010, 06:00:28 AM 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 #61 on: September 21, 2010, 05:38:43 AM »
It go with no errors but I can't see any difference:

Code: [Select]
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall: fdisk: 1> Disk: /dev/disk1 geometry: 121601/255/63 [1953525168 sectors]
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall: Offset: 0 Signature: 0xAA55
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall:          Starting       Ending
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall:  #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall: ------------------------------------------------------------------------
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall:  1: EE 1023 254  63 - 1023 254  63 [         1 - 1953525167] GPT         
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall:  2: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall:  3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall:  4: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall: fdisk: 1> Partition 4 marked active.
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall: fdisk:*1> Device could not be accessed exclusively.
Sep 21 03:16:24 tomaremac installd[4557]: ./postinstall: A reboot will be needed for changes to take effect. OK? [n] Writing MBR at offset 0.

using this to check:

bash-3.2# fdisk440 -d /dev/rdisk1
1,1953525167,0xEE,-,1023,254,63,1023,254,63
0,0,0x00,-,0,0,0,0,0,0
0,0,0x00,-,0,0,0,0,0,0
0,0,0x00,-,0,0,0,0,0,0

or this from the scripts:

fdisk440 -d /dev/rdisk1 | grep -n "*" | awk -F: '{print $1}'

scrax

  • Member
  • Posts: 61
Re: Revisit Chameleon's package builder
« Reply #62 on: September 21, 2010, 05:53:31 AM »
I've made some corrections because copy paste don't works good
attached the correction
(modification on in bold) reverted back to the original
 choices[$((choicescount++))]="<choice\n\tid=\"${options[$i]##*/}\"\n\ttitle=\"${options[$i]##*/}_title\"\n\tdescription=\"${options[$i]##*/}_description\"\n>\n</choice>\n"

I have still the old folder structure:

/Options/arch/postinstall
 but it can compile not yet tested...
« Last Edit: September 21, 2010, 06:30:34 AM by scrax »

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #63 on: September 21, 2010, 06:05:03 AM »
..

I post my actual buildpkg...
edit: and my actual Options (script) folder...
need the options structure folder as my previus archive...
(la struttura della cartella options deve avere per ogni opzione una sottocartella con le differenti opzioni)

Es: /Options/arch/Yes/postinstall


Fabio
« Last Edit: September 21, 2010, 06:09:05 AM 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 #64 on: September 21, 2010, 06:22:56 AM »
I'm merging your package folder with mine.

Note: your 64bit script is setting i386
« Last Edit: September 21, 2010, 06:24:36 AM by scrax »

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #65 on: September 21, 2010, 08:15:59 AM »
With the installer made by iFabio is it working?
Hi Scrax, to answer your question. Yes, iFabio's installer sets the active flag for the selected partition of the standard install.

Anyway we can use default fdisk to make the partition active, fdisk440 is only needed to write boot0 (or boot0hfs) to MBR.
Yep that works oldnaplam.. :)
Scrax, you can change the /standard/postinstall script to read:

Code: [Select]
# If table is GPT make the first partition active (BadAxe compatibility).
[ "${partitiontable}" = "GPT" ] && bootslice=1
fdisk -e ${bootdisk} <<-MAKEACTIVE
print
flag ${bootslice}
write
y
quit
MAKEACTIVE

which just substitutes fdisk440 with fdisk.
« Last Edit: September 21, 2010, 09:02:22 AM 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 #66 on: September 22, 2010, 03:40:56 AM »
Maybe can be opened a branch for just the installer? I've never used svn before my chameleon experience but I learn quick :)
Yeah. I think maybe a new project for the package installer under the main forge projects?
Zef/Kabyl..  Can this be done? Scrax and iFabio are doing a good job with this but I feel we need to help give them a definite direction to aim for.

It would be much appreciated, it would be easier to work on the same project

I think we can make two options folder, one "basic" and one "advanced" or "expert" ?
If it's possible to do that it would help. Maybe "simple" and "advanced", with the simple one just installing the stage 0, 1 and 2 files like Dr. Hurt's old installers? The your mighty list of options can be under the advanced option?

I think a slightly different idea ... I put together a few things and i upload everything. :D
I agree with the "three" types of installation:
Basic
Standard
Advanced
----

scrax, you can upload your last folder "package"?

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 #67 on: September 22, 2010, 08:39:07 AM »
Hi iFabio
It would be much appreciated, it would be easier to work on the same project

I have PM'd Zef to see what can be done. I can't do it myself as I don't have admin privileges.

I think a slightly different idea ... I put together a few things and i upload everything. :D
I agree with the "three" types of installation:
Basic
Standard
Advanced

Interesting.. I can't comment until I see what you have in mind, but at first thoughts I ask does it need three options? maybe it does.. I'll wait and see :)
« Last Edit: September 22, 2010, 08:41:40 AM 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 #68 on: September 22, 2010, 04:00:05 PM »
Interesting.. I can't comment until I see what you have in mind, but at first thoughts I ask does it need three options? maybe it does.. I'll wait and see :)

ok the archive contains the "main" make (I add the call for two more "buildpkg") called Advanced and Basic
now... the "command" still the same for the standard so make pkg create a standard package
make basic build a basic package
make advanced build a advanced package.
I do a little edit in the Resources file ( a note version relate to the package used)

I think so...

Basic = just boot0 & boot0hfs
Standard = bootloader file + themes + kext (just a think...)
Advanced = bootloader + themes + kext + utility + ...more functions

The 3 script are just a think... for now don't do nothing... ( I mod just the Basic)

let me know if can useful
Sorry for my bad English.

Fabio
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 #69 on: September 23, 2010, 07:19:28 AM »
Here it is.
It's still without your options, I'm using the TEST files to merge your options but it is not yet working.

In all the three package, i think, also doc are needed, as bdmesg and fdisk440 of course.

zef

  • Administrator
  • Posts: 265
Re: Revisit Chameleon's package builder
« Reply #70 on: September 23, 2010, 09:47:20 PM »
I have PM'd Zef to see what can be done. I can't do it myself as I don't have admin privileges.

Hey guys!

Grats for the nice progress on the package builder :) Just created a separate folder for this project:

http://forge.voodooprojects.org/p/chameleonApplications/source/tree/HEAD/trunk/PackageBuilder

Added ifabio, scrax and blackosx for the project members group - let me know if other people need write access in this repo.

I'll be back on the weekend hopefully...

Take care and thanks for the great job!

Bye,
zef
ASUS P8Z68-V PRO/GEN3 | i5-2500k | 16GB RAM | GTX560 | Keyboard | Mouse | Devilsound DAC

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #71 on: September 23, 2010, 10:09:57 PM »
Nice one Zef. Thanks :)
Scrax, shall I add your package_r011 or shall I add iFabio's?

EDIT: Well I've tried adding Scrax's package and got everything there apart from the Kexts, Scripts and Resources folder.
Those give me the following warning:
svn: warning: 'Kexts' is already under version control
svn: warning: 'Scripts' is already under version control
svn: warning: 'Resources' is already under version control

See: http://forge.voodooprojects.org/p/chameleonApplications/source/tree/HEAD/trunk/PackageBuilder

Hopefully somebody else more knowledgable with SVN can overcome my failure? Azimuth, Meklort, Zef, Kabyl ?
So forgive me iFabio & scrax - you'll soon have your wish. And if I should have added iFabio's package instead then let me know   :P

EDIT: Done - Okay Scrax's package is now in the trunk of the ChameleonApplications.
« Last Edit: September 24, 2010, 04:03:36 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 #72 on: September 23, 2010, 11:54:49 PM »
I have a lot to learn about SVN.
Not possible to create a folder "brunches"?

maybe inside the PackageBuilder the 3 classic folder..
branches
tags
and the "final trunk" with the last scrax package...

My idea is starting from that package (in my branch and merge my mod)
then the rest of the "happy crow" can see the difference and if is that ok.... merge the changes in the trunk.


I try last night to enter in the SVN... (try Versions and Coverstone... but both give me permission problem)
To upload the files individually? (Relative to the package pkg).
Tips?

Fabio

Moderator Edit: Post edited and thread cleaned from my SVN posts etc.. Sorry about that
« Last Edit: September 24, 2010, 04:08:35 PM by Blackosx »
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 #73 on: September 24, 2010, 04:25:28 PM »
Hi iFabio

Now the trunk contains Scrax's package, I will try to add your branches next so you and Scrax can work on your great projects.

For help with SVN, I'll post here the details Zef sent me previously:

"Versions" is a very good and easy to use subversion client for OS X (http://versionsapp.com). To learn subversion's concepts, I found the stock pdf documentation very useful. Get it from here and chapters 1-2 explain the necessary knowledge for everyday use.

I guess I need to read if again myself  :P
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Revisit Chameleon's package builder
« Reply #74 on: September 24, 2010, 04:28:39 PM »
Hi guys,

Blackosx, i see you made progress :)
One thing.. you're adding just the contents of /package to the project; are you keeping in mind that it needs the rest of the booter structure to work?
About the branches for iFabio and Scrax, you guys can just create them under /branches, assuming you have write access on the Chameleon Applications project.

Well, i don't know what's your guys status, what kind of help do you need...
iFabio, you need the extra password to get write access to the repo... let me know if you need help with that... just pm me if you don't want to spam the topic with svn talk. This goes to Scrax too and anyone in need related to the project :)
« Last Edit: September 24, 2010, 05:10:32 PM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT