2015年4月30日木曜日

Qt Creatorでツールバーを作る

Qt Creatorでツールバーを作る

Qt Creatorでツールバーを追加するときに少しハマったので記載します。

ツールバーは画面左側にあるオブジェクトにはありません。
enter image description here

なので、追加する場合は、Mainwindowの下側で右クリックし、
ツールバーを追加を選択します。

enter image description here

※デフォルトだと画面上のほうはメニューバーや、ツールバーになっているので、このメニューがでてきません。

enter image description here

メニューバーとしておくことで以下のように移動可能です。

enter image description here

2015年4月26日日曜日

Qt Creatorでmainwindow.cppで追加した関数をmainwindow.hに追加する方法

Qt Creatorでmainwindow.cppで追加した関数をmainwindow.hに追加する方法

mainwindows.cppに以下のような関数を作った場合にはmainwindows.hに定義を追加する必要がありますが、
少しでも簡単に追加する方法がわかりましたのでメモっておきます。

void MainWindow::aaaaaaaaaaaa()
{

}

関数にカーソルをもってきて右クリック→Refactorで
  publicの宣言を追加 もしくは
  privateの宣言を追加
  にする。

スロットの場合もこれと同じような形で
  public slotの宣言を追加 もしくは
  protected slotの宣言を追加 もしくは
  private slotの宣言を追加
かな?

enter image description here

変数も同じような感じでヘッダファイルにかける方法はないのかなぁ。。。

そもそもC++のことがよくわかっていないのでその都度調べたいと思います。

基本的なことですが、protectedがよくわかってませんでした。

以下とのことです。
privete: クラス外部からと同様に、派生クラスからもアクセス不可。
protected: クラス外部からはアクセス不可だが、派生クラスからのみアクセス可能。
public: クラス外部からと同様に、派生クラスからもアクセス可能。

Qt CreatorでMainWindowのサイズに合わせてText Editも変わるようにする

Qt CreatorでMainWindowのサイズに合わせてText Editも変わるようにする

テキストエディタちっくなものをつくろうと思い、
mainwindow.uiをデザインで開いたときにText Editを何も考えず
配置しました。
デバックしたところmainwidowのサイズを変えてもText Editのサイズは変わりませんでした。 (まぁ当然と言えば当然)

よくみるとMainWindowにはcentralWidgetが配置されますが
禁止マークがついてます。
enter image description here

これを回避するにはMainWindowを選択した状態で右クリックすると
レイアウトというものがでてくるので、サイズ調整し、”水平に並べる”もしくは”垂直に並べる”を選択することでcentralWidgetの禁止マークがなくなり、デバックしてもMainWindowのサイズに合わせてText Editも変化してくれました。

めでたし。めでたし。

enter image description here

Qt Creatorでメニューを作る。

Qt Creatorでメニューを作る。

Qt CreatorでよくあるツールのGUIを作ってみます。

step1. リソースファイル(application.qrc)の作成とリソース(アイコン用画像)の追加

 1. プロジェクトを右クリックし、新しいファイルの追加でQt Resource Fileを選択し、xxxx.qrcファイルを作成する。

    enter image description here

 2. 作成したqrcファイルを選択し、右クリックし、プレフィックスの追加でPrefixに’/’を入れてOKをクリック。
 
    enter image description here

 3. 作成したPrefixにて右クリックをし、既存のファイルを追加を選択し、追加する。以下のように複数選択可能。
   ※Gitで管理しているためか他のフォルダから持ってくると追加できないとエラーがでるので、
    追加するファイルはあらかじめ、プロジェクトのフォルダにコピーしておいたほうがよさそう。

    enter image description here


step2. アクションを登録する

 1. *.uiファイルをダブルクリックし、Action Editorで新規をクリックし、
    enter image description here

   以下のような形でリソースを追加していく。
   ショートカットに関しては、実際にCtrl+Cを押すことで以下のように記載される。
    enter image description here

〜 2015/4/30に修正 〜

step3. メニューが押されたときの操作を追加

① Action Editorでアクションを追加したい項目で右クリックし、スロットへ移動をクリック。
enter image description here

② triggered()を選択してOK.
enter image description here

以下のようにmainwindow.hとmainwindow.cppにon_actionOpen_triggered()が自動で追加されます。

enter image description here

〜余談〜
mainToolBarにも追加したい場合は以下のようにAction EditorのアクションをDrag & Dropします。
enter image description here

以下のstep3、step4は取り消し

step3. メニューが押されたときの操作を追加

① 作成しているウインドウを選択した状態で右クリックし、シグナル/スロットを変更をクリック。
enter image description here

② ”+”を押してスロット(関数)を追加し、追加したスロットをダブルクリックし、名前を変更。

今回は、newFile(), openFile()を追加しました。

enter image description here

③ Signals & Slots Editorでアクションとスロットを接続していく。
enter image description here


step4. 実動作の実装

先ほど作成したスロットを以下のように追加する。

[mainwindow.h]

protected slots:
    void newFile();// File -> Newが押されたとき用
    void openFile();// FIle -> Openが押されたとき用

注意)ここで定義したものがmainwindows.cppにないとエラーがでました。当たり前?

[mainwindow.cpp]

void MainWindow::newFile()
{
    QMessageBox msgBox(this);
    msgBox.setText("New");
    msgBox.exec();
}

とりあえずメッセージボックスを表示した。
※mainwindows.hに#include <QMessageBox>
 を入れておくこと。

File -> Newを押したら、メッセージボックスが表示できました。
めでたし。めでたし。

 
参考:
http://see-ku.com/wiki/wiki.cgi?page=Qt%A4%CEGUI%A5%E1%A5%E2%A1%CA%B1%FE%CD%D1%CA%D4%A1%CB
http://memotiyou.blogspot.jp/2012/03/qt-c_2608.html
http://mf-atelier.sakura.ne.jp/mf-atelier/modules/tips/program/Qt/qt_mainwindow.html

2015年4月22日水曜日

Qt Creatorで日本語入力ができない

Qt Creatorで日本語入力ができない

Ubuntu 14.04にQt Creator 3.3.1を入れたのですが、日本語の入力ができませんでした。
結構時間がかかったので以下に整理しておきます。

Step1. ctrl + spaceで入力切り替えを無効にする。

 
ctrl + spaceはQt Creatorでは補完のショートカットキーとかぶってます。
いつもMOZCを使って日本語入力をしてますが日本語にする際はctrl + spaceを使っているのでこれが原因かと思って調べたところ、
恥ずかしながら半角/全角キーでもできるということを知りました。

ので、半角/全角キーが使えればいいので、以下のように入力メソッドの切り替えでctrl + spaceを空にしました。
空にするにはEscボタンでできました。
enter image description here

でもやっぱり日本語が入力できない。。

Step2. libfcitxplatforminputcontextplugin.soの作成

1 . ソースのチェックアウト

$git clone https://github.com/fcitx/fcitx-qt5.git
$cd fcitx-qt5
$git checkout 0.1.3

2 . ソースの編集

CMakeLists.txt の 5行目をコメントアウト

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

3 . ビルド

$cmake . -DCMAKE_PREFIX_PATH=/home/xxx/Qt5.4.1/5.4/gcc_64
$make

4.srcの下にできたlibfcitxplatforminputcontextplugin.soを以下の2つのフォルダにコピー

 $ sudo cp ~/fcitx-qt5/src/libfcitxplatforminputcontextplugin.so /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/.
 $ sudo cp ~/fcitx-qt5/src/libfcitxplatforminputcontextplugin.so ~/Qt5.4.1/Tools/QtCreator/bin/plugins/platforminputcontexts/.
 

5.設定の反映

$ export | grep IM

declare -x CLUTTER_IM_MODULE="xim"
declare -x GTK_IM_MODULE="fcitx"
declare -x IM_CONFIG_PHASE="1"
declare -x QT4_IM_MODULE="fcitx"
declare -x QT_IM_MODULE="xim"
declare -x XDG_RUNTIME_DIR="/run/user/1000"

QT_IM_MODULEがximになっているので、以下のように修正。

 $ export QT_IM_MODULE=fcitx
 $ export | grep IM
declare -x CLUTTER_IM_MODULE="xim"
declare -x GTK_IM_MODULE="fcitx"
declare -x IM_CONFIG_PHASE="1"
declare -x QT4_IM_MODULE="fcitx"
declare -x QT_IM_MODULE="fcitx"
declare -x XDG_RUNTIME_DIR="/run/user/1000"

6.Ubuntuを再起動し、Qt Creatorを起動。
 半角/全角を押すことで日本語入力が無事できました。。。

参考
https://www.falog.net/fcitx-qt5/
http://blog.pyyoshi.com/2015/03/04/fcitxhuan-jing-noqt5-4deri-ben-yu-ru-li-dekiruyounisuru/

2015年4月21日火曜日

Qt CreatorでGitを使う

Qt CreatorでGitを使う

【事前準備】
①Gitで管理するディレクトリの作成
例えば以下のようないくつかのプロジェクトを1つでバージョン管理したい場合は、ProjectAフォルダの直下に.gitフォルダができるように以下のようにする。
enter image description here 

$ mkdir /path/to/your/projectA
$ cd /path/to/your/projectA
$ git init
$ git remote add origin git@bitbucket.org:xxxxxxxx/qt.git

②Qt Creatorでプロジェクトを作成する場合のパスは
 /path/to/your/projectA
 とする。するとprojectAフォルダの下に名前で設定したフォルダができる。
 すでにprojectA自身がGitの管理下にあるので、バージョン管理システムに追加はNoneでOK。
 

1. Bitbucketのuser名と登録しているメールアドレスを以下で記載する。

$ git config --list
$ git config --global user.name "user"  
$ git config --global user.email mail.com

2. SSH Keyの登録

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/pi/.ssh/id_rsa):← Enter
Created directory '/home/pi/.ssh'. ← ~/.ssh がない場合、ディレクトリを作成します
Enter passphrase (empty for no passphrase): ← Enter
Enter same passphrase again: ← Enter
Your identification has been saved in /home/pi/.ssh/id_rsa.
Your public key has been saved in /home/pi/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:pi@raspberrypi
The key's randomart image is:

「./ssh/id_rsa.pub」の内容をBitbucketのアカウントの管理→SSHキーに登録する

【接続テスト】
以下のようにloggedがでれば接続OK

$ ssh -T git@bitbucket.org
The authenticity of host 'bitbucket.org (131.103.20.167)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org,131.103.20.167' (RSA) to the list of known hosts.
logged in as xxxxxxxx.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

3.クライアント側(Ubuntu)の設定

vi ~/.ssh/config
Host bitbucket.org
  HostName bitbucket.org
  IdentityFile ~/.ssh/id_rsa
  User xxxxxx
  TCPKeepAlive yes
  IdentitiesOnly yes

4. コミット
 Git→ローカルディレクトリ→コミット もしくは、左下のコマンドが打てるところでgitと入力すると
 コミットがでてくるのでそれを選択。
 enter image description here
 
 コミットの画面がでてきたら、すべてを選択にチェックし、説明を記載し、コミットボタンをクリック
enter image description here

5. Qt Creatorで
  ツール→Git→リモートリポジトリ→リモートの管理
  でBitbucketのリポジトリを追加。 ※最初のみでOK
  Pushしたいリモートディレクトリを選択してPush。

Qt CreatorでPushする場合は、最初の1回目は端末で以下を実行し、
2回目からはツール→Git→リモートリポジトリ→PushでOK。


$ cd /path/to/your/projectA
$ git push -u origin master

追記
【事前準備】の①を実行すると以下の追加は不要でした。
  
enter image description here

  HTTPSのほうは、パスワードを聞いてきたが、SSHはパスワードなしでPushできました。

ここでPushしたら以下のようなメッセージがでたので、

$ git config –global push.default matching
を追加

warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

これにより、上記のエラーはでなくなったのですが、Pushすると
まだ以下のエラーが残ってました。

No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
Everything up-to-date

このエラーは
リモートリポジトリ上にまだmasterブランチが作成されていないためとのこと。
push時の引数が省略された場合、デフォルトではリモートリポジトリとローカルリポジトリの双方に存在するブランチが対象となるため、リモートリポジトリに存在しないブランチをpushする場合は、リポジトリとブランチを明示的に指定する必要があるとのことです。

参考:
http://blog.mizoshiri.com/archives/1327
https://www.atlassian.com/ja/git/tutorial/remote-repositories#!remote
http://www.backlog.jp/git-guide/reference/trouble-shooting.html

2015年4月20日月曜日

Qt CreatorにてGit Cloneを実行する

Qt CreatorにてGit Cloneを実行する

別のパソコンからBitbucketへcommitしたリポジトリをQc Creatorに
クローンする方法を調べたので備忘録として記載します。

1. ファイル→ファイル/プロジェクトの新規作成→プロジェクトのインポートでGit Repository Cloneを選択
enter image description here

2. リポジトリのURL(以下のようなやつ)をコピーしてクローンURLにコピー
enter image description here

3. ブランチを選択するために以下の赤マルをクリック。

enter image description here

4. パスを指定して次へ
5. Bitbucketのpasswordを入力

2015年4月19日日曜日

Raspberry piにVNCで接続してみる。(Ubuntu編)

Raspberry piにVNCで接続してみる。(Ubuntu編)

以前はVNCサーバーを立ち上げたRaspberry PiにWindows
からUltra VNCを使って接続にいきましたが、
今度はUbuntuから接続に行ってみました。

リモートデスクトップクライアントのRemminaで以下の設定
で接続できました。

ただし、以前Raspberry Pi側のIPアドレスを固定したはずなのに別のアドレスになっていたのが解せないですが。。。

enter image description here

IPアドレスを固定したつもりでしたが、
/etc/network/interfacesを見ると固定したのはeth0だけでしたので、
以下のようにwlan0もIPアドレスを固定しました。

auto lo

iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.xx.xx
netmask 255.255.255.0
gateway 192.168.xx.1

allow-hotplug wlan0
iface wlan0 inet manual
#iface wlan0 inet static
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
iface default inet static
address 192.168.xx.xx
netmask 255.255.255.0
gateway 192.168.xx.1

Raspberry Piに接続できたのでファイル転送もRemminaクライアントデスクトップで以下とすることでファイル転送できました。
接続後のSSHのパスワードはraspberryで接続できました。

enter image description here

Raspberry PiでVNCサーバーを立ち上げるのは以下を
参考にしました。

Raspberry Piで遊ぼう No.5:VNC接続をしよう

2015年4月18日土曜日

VirtualboxにインストールしたWindowsで音がでない

VirtualboxにインストールしたWindowsで音がでない

VirtualboxにWindowsをインストールしたのですが、Windows側で音楽を再生しても音がでません。

1. VirtualBoxの「設定」から「オーディオ」を選択し、以下のように設定してからWidowsを起動

enter image description here
 
2.起動したWindows上で以下のRealtekのHPからAC97 Audio Driverをダウンロードしてインストールしたら音がでるようになりました。

http://www.realtek.com/default.aspx

2015年4月17日金曜日

linuxにscratchを入れてみる

linuxにscratchを入れてみる

ここからAdobe AIRとScratch Offline Editorをダウンロード

以下でできるとここに書いてあったけどAdobeAIRInstallerが起動しない。。。

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0
% sudo chmod +x AdobeAIRInstaller.bin
% ./AdobeAIRInstaller.bin

なので、WINEを使ってインストールする。

1.Windows版のAdobe AIRとScratch Offline Editorをダウンロード。
Adobe AIRはここからダウンロードし、
別のコンピュータにインストールするにはクリックし、Adobe AIR 15.0 for Win32をダウンロード。
enter image description here

2.ダウンロードしたAdobeAIRInstaller.exeを右クリックし、WINE Windowsプログラムローダーで開くを選択。

以下のように文字化けしているが一旦そのまま”同意する”をクリック。
enter image description here

3.Scratchも同様にWindows版の.exeをダウンロードし、
 ダウンロードしたファイルを右クリックし、WINE Windowsプログラムローダーで開くを選択。

インストールするとアイコンが2つできるのでScratch 2. Ink を消す。
enter image description here

2015/4/17 更新
Adobe Airは以下でインストールできました。

$ wget -O adobe-air.sh http://drive.noobslab.com/data/apps/AdobeAir/adobe-air.sh
$ chmod +x adobe-air.sh;sudo ./adobe-air.sh

2015年4月16日木曜日

VirtualboxでSystem program problem detectedがでる

VirtualboxでSystem program problem detectedがでる

UbuntuにUbuntuソフトセンターからVirtualboxを入れてWindowsを動かそうと思い、設定して起動しようと思った“System program problem detected”とでて先に進みませんでした。

1. /etc/apt/sources.list に以下を追加

deb http://download.virtualbox.org/virtualbox/debian trusty contrib

2. https://www.virtualbox.org/download/oracle_vbox.ascから Oracle public key をダウンロードし、以下のコマンドで Oracle public key を追加。

$ sudo apt-key add oracle_vbox.asc
$ sudo apt-get update
$ sudo apt-get install virtualbox-4.3

3. エラーがでたので以下を実行し、無事起動しました。

$ sudo /etc/init.d/vboxdrv setup

4. VirtualBox Extension Packのインストール
 とりあえず以下のままインストールしてもVirtualboxを起動したらアップデートを促してくるので大丈夫です。

$ sudo VBoxManage list extpacks
$ sudo wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpackhttp://www.itzgeek.com/how-tos/mini-howtos/how-to-install-virtualbox-extension.html#axzz3XOGfp9qz
$ 

参考
http://nkenbou.hatenablog.com/entry/2014/12/03/192835
http://pc.casey.jp/archives/153900537
http://www.itzgeek.com/how-tos/mini-howtos/how-to-install-virtualbox-extension.html#axzz3XOGfp9qz

2015年4月15日水曜日

VirtualboxでSystem program problem detectedがでる

VirtualboxでSystem program problem detectedがでる

UbuntuにUbuntuソフトセンターからVirtualboxを入れてWindowsを動かそうと思い、設定して起動しようと思った“System program problem detected”とでて先に進みませんでした。

1. /etc/apt/sources.list に以下を追加

deb http://download.virtualbox.org/virtualbox/debian trusty contrib

2. https://www.virtualbox.org/download/oracle_vbox.ascから Oracle public key をダウンロードし、以下のコマンドで Oracle public key を追加。

$ sudo apt-key add oracle_vbox.asc
$ sudo apt-get update
$ sudo apt-get install virtualbox-4.3

3. エラーがでたので以下を実行し、無事起動しました。

$ sudo /etc/init.d/vboxdrv setup

参考
http://nkenbou.hatenablog.com/entry/2014/12/03/192835
http://pc.casey.jp/archives/153900537

2015年4月14日火曜日

Lenovo E450でUbuntuをUSBから起動すると無線LANがでてこない

Lenovo E450でUbuntuをUSBから起動すると無線LANがでてこない

Lenovo E450でubuntuを動かそうと思い、USBメモリを起動ディスク化して起動したが無線LANが表示されませんでした。

iwconfigで確認するとwlan0がでておりませんでした。

$ lspci | grep RTL8723BE

いろいろ調べたところ一旦、有線LANに接続し、以下を実施することで接続できました。

$ git clone https://github.com/lwfinger/rtlwifi_new/tree/master/rtl8723be
$ cd rtl8723be
$ make
$ sudo make install
$ sudo reboot
$ vi /etc/NetworkManager/NetworkManager.conf


[ifupdown]
managed=false
をtrueに変更する。
 
〜 4/14 追記〜
Ubuntuのインストール時に有線LANにつないでインストール後にソフトウエアの更新後に以下の手順で実施したらkernel panicはなくなり、問題なく動きました。

$ sudo apt-get update
$ sudo apt-get upgrade
$ git clone http://github.com/lwfinger/rtlwifi_new.git/
$ cd rtlwifi_new
$ make
$ sudo make install

$ sudo reboot
$ sudo vi /etc/NetworkManager/NetworkManager.conf

以下のように修正
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=true

これでもダメなので以下も追加

sudo vi /etc/pm/power.d/wireless

以下のように修正

#! /bin/sh
/sbin/iwconfig wlan0 power off

これでもうまくいきませんでした。
一度、切断してから再度接続するとOKっぽい。

参考
http://masaoo.blogspot.jp/2015/01/hp-stream-11-ubuntu-1404-lts-64bit.html
http://qiita.com/Hiroshi-Ito/items/77610be6e49de62a5b48

2015年4月12日日曜日

bitbucketを使ってみた

bitbucketを使ってみた <

bitbucketのアカウントをとったので、使ってみました。

  1. リポジトリを作成する
  2. 管理したいフォルダに移動し、コマンドを実行
     例えばsample/picture/Aとなっていてsampleの下にフォルダを追加する予定がある場合は、sampleフォルダに移動し、以下を実行
$ git init
$ git remote add origin https://xxxxxx@bitbucket.org/xxxxxx/repository
$ git add .
$ git commit -m "Initial Commit"
$ git push -u origin master

2015年4月11日土曜日

qt creatorのサンプルをビルドしたらエラーが発生

qt creatorのサンプルをビルドしたらエラーが発生 <

Qt Creatorを初めてみようと思い、サンプルをビルドしてみたら
cannot find -lGL
というエラーがでてビルドに失敗しました。

ググってみたところ以下をインストールことでちゃんとビルドできました。
サンプルをいじって勉強したいと思います。

$ sudo apt-get install libglu1-mesa-dev

Lenovo E450でUbuntuをUSBから起動すると無線LANがでてこない

Lenovo E450でUbuntuをUSBから起動すると無線LANがでてこない <

Lenovo E450でubuntuを動かそうと思い、USBメモリを起動ディスク化して起動したが無線LANが表示されませんでした。

iwconfigで確認するとwlan0がでておりませんでした。

$ lspci | grep RTL8723BE

いろいろ調べたところ一旦、有線LANに接続し、以下を実施することで接続できました。

$ git clone https://github.com/lwfinger/rtlwifi_new/tree/master/rtl8723be
$ cd rtl8723be
$ make
$ sudo make install
$ sudo reboot
$ vi /etc/NetworkManager/NetworkManager.conf


[ifupdown]
managed=false
をtrueに変更する。

ubuntuにaacgainを入れる

ubuntuにaacgainを入れる <

UbuntuソフトウエアセンターでeasyMP3Gainをインストールしたのですが、aacファイルをDrag & Dropしたら
Cannot start aacgain
とでてできませんでした。

以下からaacgain_1.9-1~trusty+1_amd64.debをダウンロードし、
ダウンロードしたファイルを右クリックし、Ubuntuソフトウエアセンターで
開き、インストールします。

https://launchpad.net/~stefanobalocco/+archive/ubuntu/ppa/+build/6059353

インストール後にeasyMP3Gainを再起動したら解決しました。

2015年4月9日木曜日

Windows8が入ったパソコンでUSBメモリからブートする

Windows8が入ったパソコンでUSBメモリからブートする

Windows8が入ったパソコンでUSBメモリから起動するには以下をやる必要がありました。
少しはまったのでメモしておきます。

1.コントロール パネル\ハードウェアとサウンド\電源オプション\システム設定
  で”高速スタートアップを有効にする”をOFF
2.BIOS(UEFI?)画面にてセキュアブートをOFF
3.BIOS(UEFI?)画面にてブートをUEFIだけでなくLegacyのBothにする。