AsusFreak Posted September 17, 2016 Share Posted September 17, 2016 @Mickey1979- Thanks again for the script, all of us non-coders have been saved! I don't know who wrote the Clover preference screen: But adding a "Update Now" button using your script would be extremely cool... Thanks again. EDIT: In the installer, maybe the the option "Install Clover Preference Page" shouldn't be an option, it should just automatically be installed... 1 Link to comment Share on other sites More sharing options...
pico joe Posted September 17, 2016 Share Posted September 17, 2016 Hi Micky1979 just my opinion its possible to check automatic revision in header so we don't need to check manually? like this : =============================================================================== Build_Clover script v3.9 <---------------------------------------------------- =============================================================================== By Micky1979 based on Slice, Zenith432, STLVNUB, JrCs, cecekpawon, Needy, cvad, Rehabman, philip_petev Supported OSes:macOS X, Ubuntu 16.04 Online = Revision: 3757 Local = Revision: 3752 =============================================================================== <---------------------------------------------------- Please enter your choice: 1) update Clover only (no building) 2) update & build Clover 3) run my script on the source 4) build existing revision (no update, standard build) 5) build existing revision with FORCEREBUILD (no update, standard build) 6) build existing revision with custom macros enabled 7) info and limitations about this script 8) enter Developers mode Link to comment Share on other sites More sharing options...
Slice Posted September 17, 2016 Share Posted September 17, 2016 Hi Micky1979, I think that Version.h was not updated 0:100 0:000 Starting Clover revision: 3751 on American Megatrends EFI 0:100 0:000 Build with: [Args: --ia32 -D NO_GRUB_DRIVERS_EMBEDDED | -D NO_GRUB_DRIVERS_EMBEDDED -D USE_LOW_EBDA -a IA32 -b RELEASE -t XCODE5 -n 5 | OS: 10.12 | XCODE: 8.0] Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 @Mickey1979- Thanks again for the script, all of us non-coders have been saved! I don't know who wrote the Clover preference screen: Screen Shot 2016-09-16 at 10.16.29 PM.png But adding a "Update Now" button using your script would be extremely cool... Thanks again. EDIT: In the installer, maybe the the option "Install Clover Preference Page" shouldn't be an option, it should just automatically be installed... That is Slice depend.. Hi Micky1979 just my opinion its possible to check automatic revision in header so we don't need to check manually? like this : =============================================================================== Build_Clover script v3.9 <---------------------------------------------------- =============================================================================== By Micky1979 based on Slice, Zenith432, STLVNUB, JrCs, cecekpawon, Needy, cvad, Rehabman, philip_petev Supported OSes:macOS X, Ubuntu 16.04 Online = Revision: 3757 Local = Revision: 3752 =============================================================================== <---------------------------------------------------- Please enter your choice: 1) update Clover only (no building) 2) update & build Clover 3) run my script on the source 4) build existing revision (no update, standard build) 5) build existing revision with FORCEREBUILD (no update, standard build) 6) build existing revision with custom macros enabled 7) info and limitations about this script 8) enter Developers mode Should be done, but only a doubt if someone is offline and it print some error.. (can you try what happen with no internet connection?) Hi Micky1979, I think that Version.h was not updated 0:100 0:000 Starting Clover revision: 3751 on American Megatrends EFI 0:100 0:000 Build with: [Args: --ia32 -D NO_GRUB_DRIVERS_EMBEDDED | -D NO_GRUB_DRIVERS_EMBEDDED -D USE_LOW_EBDA -a IA32 -b RELEASE -t XCODE5 -n 5 | OS: 10.12 | XCODE: 8.0] Did you use -fr? The fact is that ebuild.sh is called multiple times to build boo3/6 and 7, so the string in Version.h get replaced with last argument used. Did you build always all 3 of them? ... maybe with some job, ebuild.sh can read what you are attempt to do from a file and create a good string always in one time. .. want to make a try.. ./ebuild.sh -boot3 -boot6 -boot7 in one time? Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 Here's a prototype, if anybody is interested I could finish it.Best regards. local_remote_rev_prototype_Build_Clover.command.zip 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 Here's a prototype, if anybody is interested I could finish it. Best regards. cool, but I get this in El Capitan: Last login: Sat Sep 17 10:50:07 on ttys004 Micky1979s-MBP:~ Micky1979$ svn info --show-item "revision" svn://svn.code.sf.net/p/cloverefiboot/code svn: invalid option: --show-item Type 'svn help' for usage. Micky1979s-MBP:~ Micky1979$ what's your svn version? EDIT Starting with Subversion 1.9 you can use option --show-item to get a value of one of fields of svn info command's output. This command will display revision number only: svn info --show-item=revision <URL-to-repository> Ok, we can use it based on the subversion-version You are in Sierra Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 cool, but I get this in El Capitan: Last login: Sat Sep 17 10:50:07 on ttys004 Micky1979s-MBP:~ Micky1979$ svn info --show-item "revision" svn://svn.code.sf.net/p/cloverefiboot/code svn: invalid option: --show-item Type 'svn help' for usage. Micky1979s-MBP:~ Micky1979$ what's your svn version? EDIT Starting with Subversion 1.9 you can use option --show-item to get a value of one of fields of svn info command's output. This command will display revision number only: svn info --show-item=revision <URL-to-repository> Ok, we can use it based on the subversion-version You are in Sierra Sorry, I forgot to check the availability of the commands. Sure, we could check for svn version and execute the appropriate command. svn, version 1.9.4 (r1740329) compiled Jun 30 2016, 13:49:35 on x86_64-apple-darwin15.0.0 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 Something went wrong while getting the remote revision, check your internet connection! Local revision: Ok in Sierra Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 Something went wrong while getting the remote revision, check your internet connection! Local revision: Ok in Sierra Shall we use an universal command? svn info | grep '^Revision:' | tr -cd [:digit:] Edit: Different command. local_remote_rev_prototype_Build_Clover.command.zip Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 If the subversion is old there are problems, so yes Link to comment Share on other sites More sharing options...
Slice Posted September 17, 2016 Share Posted September 17, 2016 Different revisions? iMac:Clover slice$ svn info --show-item "revision" svn://svn.code.sf.net/p/cloverefiboot/code 3758 iMac:Clover slice$ svn info | grep '^Revision:' | tr -cd [:digit:] 3757iMac:Clover slice$ That is Slice depend.. Should be done, but only a doubt if someone is offline and it print some error.. (can you try what happen with no internet connection?) Did you use -fr? The fact is that ebuild.sh is called multiple times to build boo3/6 and 7, so the string in Version.h get replaced with last argument used. Did you build always all 3 of them? ... maybe with some job, ebuild.sh can read what you are attempt to do from a file and create a good string always in one time. .. want to make a try.. ./ebuild.sh -boot3 -boot6 -boot7 in one time? I used simple script #!/bin/bash ./ebuild.sh --ia32 -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -D NO_GRUB_DRIVERS_EMBEDDED cd CloverPackage ./makepkg ./makeiso #make iso cd .. echo "done!" Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 Different revisions? iMac:Clover slice$ svn info --show-item "revision" svn://svn.code.sf.net/p/cloverefiboot/code 3758 iMac:Clover slice$ svn info | grep '^Revision:' | tr -cd [:digit:] 3757iMac:Clover slice$ I used simple script #!/bin/bash ./ebuild.sh --ia32 -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -D NO_GRUB_DRIVERS_EMBEDDED cd CloverPackage ./makepkg ./makeiso #make iso cd .. echo "done!" Run the following command in the same folder. svn info --show-item "revision" What's the output? Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 Slice, ./ebuild.sh --ia32 -D NO_GRUB_DRIVERS_EMBEDDED./ebuild.sh -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED./ebuild.sh -D NO_GRUB_DRIVERS_EMBEDDED each of it should replace the build string in Version.h only if you add -fr (like the old behavior). As told me by you here, and what I did, was to avoid Version.h to be overwritten again and again if the revision is the same. In fact if it is the same does not get updated. So you need to add -fr: ./ebuild.sh -fr --ia32 -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED You can make a secondary script and call it when you want build binaries to be shared with Version.h updated for all. Otherwise it behave as you told me to do (if we change it every time... it behave as before) Or use that: #!/bin/bash developing(){ ./ebuild.sh --ia32 -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -D NO_GRUB_DRIVERS_EMBEDDED cd CloverPackage ./makepkg ./makeiso #make iso cd .. echo "done!" } release(){ ./ebuild.sh -fr --ia32 -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED ./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED cd CloverPackage ./makepkg ./makeiso #make iso cd .. echo "done!" } if [ -z "${1}" ]; then developing; else release; fi when you call the script with no argumet it call "developing" (i.e. like you use now). instead if you call it with an argument (can be any, also one letter): ./yourScript blabla use release... -fr = update Version.h (and every module that use it get rebuilted, what you wanted to avoid during your daily development, but needed to share binaries) Different revisions?iMac:Clover slice$ svn info --show-item "revision" svn://svn.code.sf.net/p/cloverefiboot/code3758iMac:Clover slice$ svn info | grep '^Revision:' | tr -cd [:digit:]3757iMac:Clover slice$ committed but not synced? Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 Shall we use an universal command? svn info | grep '^Revision:' | tr -cd [:digit:] Edit: Different command. That work (sorry did not see your edit till now) Maybe a useful feature: Debug menu: Debugging/testing GUI/Clover ( UEFI and legacy ) using iso with either qemu or some other VM. Feel free to add.. Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 (edited) That work (sorry did not see your edit till now) Okay. Shall I finish the implementation? Furthermore, the REMOTE_REV and the LOCAL_REV can be used as global variables, therefore, variables like, local CLOVER_REV, local online, can be replaced with those. Edited September 17, 2016 by Needy 1 Link to comment Share on other sites More sharing options...
pico joe Posted September 17, 2016 Share Posted September 17, 2016 @Needy ... G & G ... GReat and Good 2 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 Please work on this:Build_Clover.command_v4.0beta.zip (I had to move your code ahead in the script becasue in Linux we must ensure subversion is installed before use svn command) 1 Link to comment Share on other sites More sharing options...
pico joe Posted September 17, 2016 Share Posted September 17, 2016 @Needy ... G & G ... GReat and Good 3 Link to comment Share on other sites More sharing options...
Fljagd Posted September 17, 2016 Share Posted September 17, 2016 @Needy ... G & G ... GReat and Good check revision.jpg Great, i like it 2 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 me too 2 Link to comment Share on other sites More sharing options...
PippoX0 Posted September 17, 2016 Share Posted September 17, 2016 Good tools ! I wanna give a try Sent from iPhone/iPad 2 Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 (edited) Please work on this: Build_Clover.command_v4.0beta.zip (I had to move your code ahead in the script becasue in Linux we must ensure subversion is installed before use svn command) I see. I will create a function then. Edit: Done. The script will display the svn errors when the user is offline. Shall we suppress those errors? @Micky1979, look at the clover() function, that's what I meant. Best regards. Build_Clover_Beta.command.zip Edited September 17, 2016 by Needy 2 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 Edit: Done. The script will display the svn errors when the user is offline. Shall we suppress those errors? @Micky1979, look at the clover() function, that's what I meant. no, the error should be showned... so I hope no one will try to update w/o internet connection (or the repository is not reachable). I had to revert the svn update part to simply 'svn update' that was causing problems in Linux. Attached final v4.0 with your modifications Build_Clover.command_v4.0.zip 2 Link to comment Share on other sites More sharing options...
Needy Posted September 17, 2016 Share Posted September 17, 2016 no, the error should be showned... so I hope no one will try to update w/o internet connection (or the repository is not reachable). I had to revert the svn update part to simply 'svn update' that was causing problems in Linux. Attached final v4.0 with your modifications By the way, the getRev() function can be used for the edk2() function as well. Best regards. 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 17, 2016 Author Share Posted September 17, 2016 By the way, the getRev() function can be used for the edk2() function as well. Best regards. Slice does not want .. we use the one that he uses Link to comment Share on other sites More sharing options...
Recommended Posts