Skip to content

Commit

Permalink
exclude Updater and PrefPane from compilation as obsolete
Browse files Browse the repository at this point in the history
Signed-off-by: Slice <[email protected]>
  • Loading branch information
SergeySlice committed Sep 9, 2024
1 parent 677fbb1 commit 7b08a61
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 67 deletions.
10 changes: 6 additions & 4 deletions CloverPackage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ slimpkg2:
slimpkg3:
@${SRCROOT}/makepkg --nothemes --norc --nolegacy

updatepo:
@${SRCROOT}/package/translate.sh --update-po
#updatepo:
# @${SRCROOT}/package/translate.sh --update-po

utils:
@make -C "${SRCROOT}"/utils all
Expand All @@ -32,6 +32,8 @@ install:
@make -C "${SRCROOT}"/utils install

clean:
rm -rf sym obj dst CloverPrefpane/build CloverUpdater/build
rm -rf sym obj dst
#CloverPrefpane/build CloverUpdater/build

.PHONY: clean image iso pkg installer utils

.PHONY: clean image iso pkg installer updatepo utils
2 changes: 1 addition & 1 deletion CloverPackage/makepkg
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ echo "${revision}" > revision
# Make the translation
echo ""
echo "========= Translating Resources ========"
./package/translate.sh || exit $?
#./package/translate.sh || exit $?

# Check that XCode is install properly
xcode_path=$(/usr/bin/xcode-select --print-path 2>/dev/null)
Expand Down
10 changes: 5 additions & 5 deletions CloverPackage/package/translate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ while [[ $# -gt 0 ]]; do
done

TEMPLATES_DIR="Resources/templates"
CLOVER_UPDATER_DIR="../CloverUpdater"
CLOVER_PREFPANE_DIR="../CloverPrefpane"
#CLOVER_UPDATER_DIR="../CloverUpdater"
#CLOVER_PREFPANE_DIR="../CloverPrefpane"
PODIR="po"

# Update CloverUpdater.strings
"$CLOVER_UPDATER_DIR"/translate_xib.sh --extract-only
#"$CLOVER_UPDATER_DIR"/translate_xib.sh --extract-only

# Update CloverPrefpane.strings
"$CLOVER_PREFPANE_DIR"/translate_xib.sh --extract-only
#"$CLOVER_PREFPANE_DIR"/translate_xib.sh --extract-only
# Update Localizable.strings
"$CLOVER_PREFPANE_DIR"/translate_source.sh --extract-only
#"$CLOVER_PREFPANE_DIR"/translate_source.sh --extract-only

# Check if pot and po files need to be updated
IFS=$'\n' # '
Expand Down
16 changes: 8 additions & 8 deletions ebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,14 @@ MainBuildScript() {

# Cleaning part of the script if we have told to do it
if [[ "$TARGETRULE" == cleanpkg ]]; then
if [[ "$SYSNAME" != Linux ]]; then
# Make some house cleaning
echo "Cleaning CloverUpdater files..."
make -C "$CLOVERROOT"/CloverPackage/CloverUpdater clean

echo "Cleaning CloverPrefpane files..."
make -C "$CLOVERROOT"/CloverPackage/CloverPrefpane clean
fi
# if [[ "$SYSNAME" != Linux ]]; then
# # Make some house cleaning
# echo "Cleaning CloverUpdater files..."
# make -C "$CLOVERROOT"/CloverPackage/CloverUpdater clean
#
# echo "Cleaning CloverPrefpane files..."
# make -C "$CLOVERROOT"/CloverPackage/CloverPrefpane clean
# fi

echo "Cleaning bootsector files..."
local BOOTHFS="$CLOVERROOT"/BootHFS
Expand Down
16 changes: 8 additions & 8 deletions hebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,14 @@ MainBuildScript() {

# Cleaning part of the script if we have told to do it
if [[ "$TARGETRULE" == cleanpkg ]]; then
if [[ "$SYSNAME" != Linux ]]; then
# Make some house cleaning
echo "Cleaning CloverUpdater files..."
make -C "$CLOVERROOT"/CloverPackage/CloverUpdater clean

echo "Cleaning CloverPrefpane files..."
make -C "$CLOVERROOT"/CloverPackage/CloverPrefpane clean
fi
# if [[ "$SYSNAME" != Linux ]]; then
# # Make some house cleaning
# echo "Cleaning CloverUpdater files..."
# make -C "$CLOVERROOT"/CloverPackage/CloverUpdater clean
#
# echo "Cleaning CloverPrefpane files..."
# make -C "$CLOVERROOT"/CloverPackage/CloverPrefpane clean
# fi

echo "Cleaning bootsector files..."
local BOOTHFS="$CLOVERROOT"/BootHFS
Expand Down
21 changes: 18 additions & 3 deletions rEFIt_UEFI/entry_scan/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1470,9 +1470,12 @@ STATIC void LinuxScan(REFIT_VOLUME *Volume, UINT8 KernelScan, UINT8 Type, XStrin
continue;
}
XStringW File = SWPrintf("EFI\\%ls\\grubx64.efi", DirEntry->FileName);
XStringW FileS = SWPrintf("EFI\\%ls\\shimx64.efi", DirEntry->FileName);
XStringW OSName = XStringW().takeValueFrom(DirEntry->FileName); // this is folder name, for example "ubuntu"
OSName.lowerAscii(); // lowercase for icon name and title (first letter in title will be capitalized later)
if (FileExists(Volume->RootDir, File)) {
XBool F1 = FileExists(Volume->RootDir, File);
XBool F2 = FileExists(Volume->RootDir, FileS);
if (F1 || F2) {
// check if nonstandard icon mapping is needed
for (Index = 0; Index < LinuxIconMappingCount; ++Index) {
if (StrCmp(OSName.wc_str(),LinuxIconMapping[Index].DirectoryName) == 0) {
Expand All @@ -1485,7 +1488,8 @@ STATIC void LinuxScan(REFIT_VOLUME *Volume, UINT8 KernelScan, UINT8 Type, XStrin
}
XStringW LoaderTitle = OSName.subString(0,1); // capitalize first letter for title
LoaderTitle.upperAscii();
LoaderTitle += OSName.subString(1, OSName.length()) + L" Linux"_XSW;
XStringW LoaderTitle1 = LoaderTitle + OSName.subString(1, OSName.length()) + L" Linux"_XSW;
XStringW LoaderTitle2 = LoaderTitle + OSName.subString(1, OSName.length()) + L" Secure"_XSW;
// Very few linux icons exist in IconNames, but these few may be preloaded, so check that first
XIcon ImageX = ThemeX->GetIcon(L"os_"_XSW + OSName); //will the image be destroyed or rewritten by next image after the cycle end?
if (ImageX.isEmpty()) {
Expand All @@ -1500,9 +1504,20 @@ STATIC void LinuxScan(REFIT_VOLUME *Volume, UINT8 KernelScan, UINT8 Type, XStrin
DirIterClose(&DirIter);
return;
}
AddLoaderEntry(File, NullXString8Array, L""_XSW, LoaderTitle, Volume,
if (F1) {
AddLoaderEntry(File, NullXString8Array, L""_XSW, LoaderTitle1, Volume,
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
}
if (F2) {
AddLoaderEntry(FileS, NullXString8Array, L""_XSW, LoaderTitle2, Volume,
(ImageX.isEmpty() ? NULL : &ImageX), OSTYPE_LIN, OSFLAG_NODEFAULTARGS);
}
} //anyway continue search other entries
// for secure boot?

if (FileExists(Volume->RootDir, File)) {

}
}
DirIterClose(&DirIter);

Expand Down
42 changes: 4 additions & 38 deletions rEFIt_UEFI/libeg/FloatLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ float FloorF(float X)

float ModF(float X, float Y)
{
if (Y == 0.0f) return 0.0f;
INT32 I = (INT32)(X / Y);
return (X - (float)I * Y);
}
Expand Down Expand Up @@ -219,15 +220,7 @@ float Atan2F(float Y, float X) //result -pi..+pi
return sign * (res - PP);
}

/*
RETURN_STATUS
EFIAPI
AsciiStrDecimalToUintnS (
IN CONST CHAR8 *String,
OUT CHAR8 **EndPointer, OPTIONAL
OUT UINTN *Data
);
*/

RETURN_STATUS
AsciiStrToFloat(IN CONST CHAR8 *String,
OUT CHAR8 **EndPointer, OPTIONAL
Expand Down Expand Up @@ -334,36 +327,9 @@ void QuickSort(void* Array, INTN Low, INTN High, INTN Size, INTN (*compare)(CONS
if (j > Low) QuickSort(Array, Low, j, Size, compare);
if (High > i) QuickSort(Array, i, High, Size, compare);
}
//
////S must be allocated before use
//void AsciiSPrintFloat(CHAR8* S, INTN N, CHAR8* F, float X)
//{
// INTN I, Fract;
// float D;
// if (!S) {
// return;
// }
//
// I = (INTN)X;
// D = (float)I;
// Fract = fabsf((X - D) * 1000000.0f);
// snprintf(S, N, "%D.%06D", I, (INTN)Fract);
//}

#endif
//
//CHAR16* P__oolPrintFloat(float X)
//{
// INTN I, Fract;
// CHAR8 S = ' ';
// float D;
// I = (INTN)X;
// D = (float)I;
// if (I == 0 && X < 0) {
// S = '-';
// }
// Fract = (INTN)fabsf((X - D) * 1000000.0f);
// return P__oolPrint(L"%c%d.%06d", S, I, Fract);
//}


static UINT32 seed = 12345;
float rndf() //expected 0..1
Expand Down

0 comments on commit 7b08a61

Please sign in to comment.