Skip to content

Commit 4927c33

Browse files
committed
Merge branch 'menuconfig' into dev
2 parents 4585f3a + 603a966 commit 4927c33

File tree

6 files changed

+58
-14
lines changed

6 files changed

+58
-14
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+
menuconfig-script/channels_menuconfig-*

Makefile

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

31-
menuconfig:menuconfig/build/mconf menuconfig-script/kernel_choice
31+
menuconfig:menuconfig/build/mconf menuconfig-script/kernel_choice menuconfig-script/channel_choice
3232
@menuconfig/build/mconf menuconfig-script/rootconf
3333

3434
menuconfig-script/kernel_choice:system/kernel-x86_64 system/kernel-i686
3535
@${CURRENT_DIR}/tools/kernel-choice-conf-gen.sh
36+
menuconfig-script/channel_choice:
37+
@${CURRENT_DIR}/tools/channel-choice-conf-gen.sh
3638

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

docs/jp/BUILD.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ sudo pacman -S --needed curl dosfstools git libburn libisofs lz4 lzo make pyalpm
4242
make menuconfig
4343
```
4444

45+
設定が完了したら以下のコマンドでビルドできます
46+
47+
```bash
48+
sudo make build
49+
```
50+
4551
### GUIを使用する
4652
GUIで設定を行ってビルドできます。GUIには`python-gobject`が必須です。
4753

menuconfig-script/rootconf

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,26 @@ 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"
127-
endchoice
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
128128
config IMAGE_OWNER
129129
string "イメージファイルの所有者名"
130130
endmenu
131+
menu "その他ビルド設定"
132+
config USE_CUSTOM_WORK
133+
bool "カスタムワークディレクトリを使用する"
134+
if USE_CUSTOM_WORK
135+
config CUSTOM_WORKDIR
136+
string "ワークディレクトリ"
137+
endif
138+
endmenu

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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ 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_USE_CUSTOM_WORK .config`
62+
eval "${buf}"
63+
if [[ "${CONFIG_USE_CUSTOM_WORK}" = "y" ]]; then
64+
buf=`grep CONFIG_CUSTOM_WORKDIR .config | sed -e 's/CONFIG_CUSTOM_WORKDIR/workdir/g' `
65+
eval "${buf}"
66+
fi
67+
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'`
6268
eval "${buf,,}"
6369
if [[ $USE_CUSTOM_LANG = "true" ]]; then
6470
buf=`grep CONFIG_CUSTOM_LANGUAGE .config | sed -e 's/CONFIG_CUSTOM_LANGUAGE/language/g' `
@@ -74,6 +80,7 @@ echo build option :
7480
[[ -n "${username}" ]] && echo " Username : ${username}"
7581
[[ -n "${password}" ]] && echo " Password : ${password}"
7682
[[ -n "${channel}" ]] && echo " Channel : ${channel}"
83+
[[ -n "${workdir}" ]] && echo " Work : ${workdir}"
7784

7885
if [[ "${USE_CUSTOM_LANG}" = "true" ]]; then
7986
argument="${argument} -l ${language}"
@@ -96,5 +103,8 @@ fi
96103
if [[ -n "${out_dir}" ]]; then
97104
argument="${argument} -o '${out_dir}'"
98105
fi
106+
if [[ -n "${workdir}" ]]; then
107+
argument="${argument} -w '${workdir}'"
108+
fi
99109
argument="-a ${build_arch} --noconfirm ${argument} ${channel}"
100110
echo "${argument}" > "${1}"

0 commit comments

Comments
 (0)