Skip to content

Commit 532a964

Browse files
fixed menuconfig?
Signed-off-by: kokkiemouse <[email protected]>
1 parent 1e364e7 commit 532a964

File tree

5 files changed

+34
-13
lines changed

5 files changed

+34
-13
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ menuconfig-script/kernel_choice_*
2626
/out/
2727
out
2828
/pacman-*.conf
29+
.config
30+
system/channels_menuconfig-*

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ menuconfig/build/mconf::
2424
@mkdir -p menuconfig/build
2525
(cd menuconfig/build ; cmake -GNinja .. ; ninja -j4 )
2626

27-
menuconfig:menuconfig/build/mconf menuconfig-script/kernel_choice
27+
menuconfig:menuconfig/build/mconf menuconfig-script/kernel_choice menuconfig-script/channel_choice
2828
@menuconfig/build/mconf menuconfig-script/rootconf
2929

3030
menuconfig-script/kernel_choice:system/kernel-x86_64 system/kernel-i686
3131
@${CURRENT_DIR}/tools/kernel-choice-conf-gen.sh
32+
menuconfig-script/channel_choice:system/channels_menuconfig-x86_64 system/channels_menuconfig-i686
33+
@${CURRENT_DIR}/tools/channel-choice-conf-gen.sh
3234

3335
build_option:
3436
@if [ ! -f .config ]; then make menuconfig ; fi

menuconfig-script/rootconf

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,18 @@ menu "Live環境の設定"
113113
config CUSTOM_PASSWD
114114
string "パスワード"
115115
endif
116-
choice
117-
prompt "チャンネル"
118-
default CHANNEL_XFCE
119-
help
120-
"使用するチャンネルを選択します。"
121-
config CHANNEL_XFCE
122-
bool "Xfce"
123-
config CHANNEL_PLASMA
124-
bool "Kde Plasma"
125-
config CHANNEL_LXDE
126-
bool "lxde"
116+
if X64_BUILD
117+
choice
118+
prompt "チャンネル"
119+
source channels_menuconfig-x86_64
120+
endchoice
121+
endif
122+
if I686_BUILD
123+
choice
124+
prompt "チャンネル"
125+
source channels_menuconfig-i686
126+
endchoice
127+
endif
127128
endchoice
128129
config IMAGE_OWNER
129130
string "イメージファイルの所有者名"

tools/channel-choice-conf-gen.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && cd .. && pwd )"
4+
arch_list=(
5+
"x86_64"
6+
"i686"
7+
)
8+
9+
#cd "${script_path}"
10+
for arch in "${arch_list[@]}"; do
11+
rm -rf "${script_path}/menuconfig-script/channels_menuconfig-${arch}"
12+
for channel in $(bash "${script_path}/tools/channel.sh" -a "${arch}" show ); do
13+
echo "config CHANNEL_N_A_M_E_${channel}" >> "${script_path}/menuconfig-script/channels_menuconfig-${arch}"
14+
echo -e "\tbool ${channel}" >> "${script_path}/menuconfig-script/channels_menuconfig-${arch}"
15+
done
16+
done

tools/menuconf-to-alterconf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if [[ "${CONFIG_USE_CUSTOM_PASSWD}" = "y" ]]; then
5858
buf=`grep CONFIG_CUSTOM_PASSWD .config | sed -e 's/CONFIG_CUSTOM_PASSWD/password/g' `
5959
eval "${buf}"
6060
fi
61-
buf=`grep CONFIG_CHANNEL_ .config | sed -e 's/=y//g' | sed -e 's/CONFIG_CHANNEL_/channel=/g'`
61+
buf=`grep CONFIG_CHANNEL_N_A_M_E_ .config | sed -e 's/=y//g' | sed -e 's/CONFIG_CHANNEL_N_A_M_E_/channel=/g'`
6262
eval "${buf,,}"
6363
if [[ $USE_CUSTOM_LANG = "true" ]]; then
6464
buf=`grep CONFIG_CUSTOM_LANGUAGE .config | sed -e 's/CONFIG_CUSTOM_LANGUAGE/language/g' `

0 commit comments

Comments
 (0)