Open3
ポータブル開発環境 / 管理者権限なし
Cコンパイラ
↑エディタ「TeraPad」はインストールしない
無料版のC++ Compilerをダウンロード
USBメモリの好きな場所に解凍(おすすめはUSBドライブ直下に\tool
フォルダを作り解凍)
僕の場合は\Programming\
に解凍した
次のようなvbscriptを書いて保存
bcc102env
' BCC102 ポータブル設定
Option Explicit
Dim objWshShell,objFS,objEnv,objStream
Dim strDrv,strBccPath
Set objWshShell = WScript.CreateObject("WScript.Shell")
Set objFS = WScript.CreateObject("Scripting.FileSystemObject")
' カレントドライブのドライブレターを取得する
strDrv = objFS.GetDriveName(WScript.ScriptFullName)
' tool\BCC102 フォルダが存在するかをチェック
strBccPath = strDrv & "\tool\BCC102"
If objFS.FolderExists(strBccPath)=0 Then
WScript.Echo strBccPath & "が見つかりませんので終了します"
WScript.Quit 0
End If
' 環境変数PATHの先頭にbin,tool\BCC102\binを追加
Set objEnv = objWshShell.Environment("Process")
objEnv.Item("PATH") = strDrv & "\bin;" & strBccPath & "\bin;" & objEnv.Item("PATH")
' コマンドプロンプトウィンドウを開く
objWshShell.Run "%COMSPEC%"
コマンドプロンプトが起動する
フォルダが見つからない場合
さっき記述したvbsの10行目がBCC102のパスになってるか確認
僕の場合は\Programming\
に保存したので書き換える
テストのためにhelloworldプログラムを書いて保存
エディタ
学校のPCには標準でサクラエディタが入っているが嫌
代表的なエディタにVSCodeがあるが、以下のような問題点
- サイズが大きい
- フラッシュメモリだと起動が遅い(自分の環境では起動に2分)
そのため、比較的軽量なVimにする
Vimのインストール
Git
参考記事
というかほぼ丸パクリインストール
Git公式サイトから「Portable ("thumbdrive edition")」をダウンロード
ダウンロードしたファイルをダブルクリックするとどこにインストールするか聞かれる
G:\Programming\Git
に指定した(Gitの専用フォルダを作っておかないと10個程度のファイルが散乱してしまう)
binやcmdなどのフォルダと同階層にpost-install.bat
があるので起動(git-bashやgit-cmdがあるならこの工程は不要)
git-bashとgit-cmdが出現
git-bashはUNIXライクでgit-cmdはWinライク(ここではbashを使用)
動作確認
user@DESKTOP-J0AT4L5 MINGW64 /
$ git --version
git version 2.43.0.windows.1
環境を整える
$HOME変数の書き換え
user@DESKTOP-J0AT4L5 MINGW64 /
$ echo $HOME
/c/Users/user
このままではユーザー情報を毎回セットアップしないといけない
$HOME用のフォルダをGit/home
にする(フォルダは新規作成する)
etc/profile
に以下を追記
profile
# Set up home
HOME=home
git-bash等と同階層にあるので、相対パスでOK
user.nameとuser.email
user@DESKTOP-J0AT4L5 MINGW64 /
$ git config --global user.name
user@DESKTOP-J0AT4L5 MINGW64 /
$ git config --global user.name "Sorutrt"
user@DESKTOP-J0AT4L5 MINGW64 /
$ git config --global user.name
Sorutrt
user@DESKTOP-J0AT4L5 MINGW64 /
$ git config --global user.email "****@gmail.com"
user@DESKTOP-J0AT4L5 MINGW64 /
$ git config --global user.email
****@gmail.com
ssh鍵
user@DESKTOP-J0AT4L5 MINGW64 /
$ ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/user/.ssh/id_ed25519): home/.ssh/id_ed25519
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in home/.ssh/id_ed25519
Your public key has been saved in home/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:*********** user@DESKTOP-J0AT4L5
The key's randomart image is:
+--[ED25519 256]--+
(省略)
+----[SHA256]-----+