PS Wiki

Живее всех живых

Инструменты пользователя

Инструменты сайта


nsw:dev:kefir_sh

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
Следующая версия
Предыдущая версия
nsw:dev:kefir_sh [2022.04.01 17:22:16] adminnsw:dev:kefir_sh [2022.04.13 03:47:36] (текущий) – [kefir.cpp] admin
Строка 1: Строка 1:
 ====== Kefir refreSH ====== ====== Kefir refreSH ======
 +===== kefir.sh =====
 <file bash kefir.sh> <file bash kefir.sh>
 #!/bin/sh #!/bin/sh
-#kver=123 +kver=123 
-#echo "Kefir Version:" +if [ -n "$1" ]; then 
-#read kver+  kver=$1 
 +else 
 +  echo "Please enter Kefir version: " 
 +  read kver 
 +fi
 user=Atmosphere-NX user=Atmosphere-NX
 repo=Atmosphere repo=Atmosphere
Строка 11: Строка 16:
   if ! [ -f ./$repo.zip ]; then   if ! [ -f ./$repo.zip ]; then
     git clone --recurse-submodules https://github.com/$user/$repo     git clone --recurse-submodules https://github.com/$user/$repo
-    zip -r ./$repo.zip ./$repo/*+#    zip -r ./$repo.zip ./$repo/*
   else   else
     unzip ./$repo.zip     unzip ./$repo.zip
Строка 36: Строка 41:
  
 #sed -i 's///g' ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp #sed -i 's///g' ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp
-mv ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cp_+# md5 for 1.3.0 release is fa0f38f14964ec619527832357ec617c 
 +# md5 for 1.3.1 release is 7d34d689829a6b5d95954b410519beec  
 +if ! [ $(md5sum ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp | awk '{print $1}') = 7d34d689829a6b5d95954b410519beec ]; then 
 +  echo "WARNING: md5sum is not same, replace the file and press enter" 
 +  read 
 +fi 
 +rm ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp
 cp ../setsys_mitm_service.kef ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp cp ../setsys_mitm_service.kef ./stratosphere/ams_mitm/source/set_mitm/setsys_mitm_service.cpp
  
Строка 52: Строка 63:
 sed -i 's/g_use_exfat = false/g_use_exfat = true/g' ./troposphere/daybreak/source/ui.cpp sed -i 's/g_use_exfat = false/g_use_exfat = true/g' ./troposphere/daybreak/source/ui.cpp
 sed -i 's/if (g_exfat_supported)/if (0)/g' ./troposphere/daybreak/source/ui.cpp sed -i 's/if (g_exfat_supported)/if (0)/g' ./troposphere/daybreak/source/ui.cpp
 +
 +#sed -i 's///g' ./stratosphere/fatal/source/fatal_task_error_report.cpp [unused]
 +#sed -i 's/\%u.\%u.\%u-\%s/\%u.\%u.\%u-\%s-KEF'$kver'/g' ./stratosphere/fatal/source/fatal_task_error_report.cpp
 +
 +#sed -i 's///g' ./stratosphere/fatal/source/fatal_task_screen.cpp [unused]
 +#sed -i 's/\%u.\%u.\%u-\%s/\%u.\%u.\%u-\%s-KEF'$kver'/g' ./stratosphere/fatal/source/fatal_task_screen.cpp
  
 #sed -i 's///g' ./libraries/libvapours/include/vapours/ams/ams_api_version.h [unused] #sed -i 's///g' ./libraries/libvapours/include/vapours/ams/ams_api_version.h [unused]
Строка 59: Строка 76:
 #  sed -i 's/KEFIR_RELEASE_VERSION [0-9][0-9][0-9]/KEFIR_RELEASE_VERSION '$kver'/g' ./libraries/libvapours/include/vapours/ams/ams_api_version.h #  sed -i 's/KEFIR_RELEASE_VERSION [0-9][0-9][0-9]/KEFIR_RELEASE_VERSION '$kver'/g' ./libraries/libvapours/include/vapours/ams/ams_api_version.h
 #fi #fi
 +
 +#sed -i 's///g' ./libraries/config/common.mk
 +sed -i 's/dirty/KEF'$kver'/g' ./libraries/config/common.mk
  
 make make
 </file> </file>
 +===== kefir.cpp =====
 <file cpp setsys_mitm_service.kef> <file cpp setsys_mitm_service.kef>
 /* /*
Строка 117: Строка 138:
                         R_ABORT_UNLESS(fs::GetFileSize(std::addressof(file_size), file));                         R_ABORT_UNLESS(fs::GetFileSize(std::addressof(file_size), file));
  
-                        /* Allocate cheat txt buffer. */+                        /* Allocate kver txt buffer. */
                         char *kef_txt = static_cast<char *>(std::malloc(file_size + 1));                         char *kef_txt = static_cast<char *>(std::malloc(file_size + 1));
                         ON_SCOPE_EXIT { std::free(kef_txt); };                         ON_SCOPE_EXIT { std::free(kef_txt); };
  
-                        /* Read cheats into buffer. */+                        /* Read kver into buffer. */
                         R_ABORT_UNLESS(fs::ReadFile(file, 0, kef_txt, file_size));                         R_ABORT_UNLESS(fs::ReadFile(file, 0, kef_txt, file_size));
                         kef_txt[file_size] = '\x00';                         kef_txt[file_size] = '\x00';
Строка 228: Строка 249:
 } }
 </file> </file>
- 
nsw/dev/kefir_sh.1648822936.txt.gz · Последнее изменение: 2022.04.01 17:22:16 — admin