📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

 
(同じ利用者による、間の1版が非表示)
57行目: 57行目:
<br><br>
<br><br>


== AppImageファイルの作成 : .NETアプリケーション ==
==== .NETアプリケーションのパブリッシュ ====
.NETアプリケーションをビルドする。<br>
dotnet publish -c:Release                \
                -r:linux-x64              \
                -p:PublishReadyToRun=false \
                -p:PublishSingleFile=true  \
                --self-contained true
<br>
==== AppImageKitのダウンロード ====
まず、[https://github.com/AppImage/AppImageKit/ AppImageKitのGithub]にアクセスして、AppImageKitをダウンロードする。<br>
または、<code>wget</code>コマンド等を使用して、AppImageKitをダウンロードする。<br>
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
<br>
AppImageKitに実行権限を付加する。<br>
chmod u+x appimagetool-x86_64.AppImage
<br>
==== AppDirの構成 ====
次に、AppDirを構成する。<br>
mkdir <AppImageのルートディレクトリ>
mkdir -p /<AppImageのルートディレクトリ>/{usr/bin,usr/share/applications,usr/share/icon,usr/share/metainfo}
<br>
.NETアプリケーションをusr/binディレクトリにコピーする。<br>
cp <.NETアプリケーションのパス> /<AppImageのルートディレクトリ>/usr/bin
<br>
.NETアプリケーションのアイコンをAppImageのルートディレクトリに配置する。<br>
cp <アイコンファイルのパス> <AppImageのルートディレクトリ>
<br>
デスクトップエントリファイルを作成する。<br>
vi /<AppImageのルートディレクトリ>/<デスクトップエントリファイル名>.desktop
<br>
<syntaxhighlight lang="ini">
# /<AppImageのルートディレクトリ>/<デスクトップエントリファイル名>.desktopファイル
[Desktop Entry]
Type=Application
Name=<任意のアプリケーション名>
GenericName=<汎用的な任意のアプリケーション名>
Comment=<アプリケーションの説明>
Comment[ja_JP]=<アプリケーションの説明>
Exec=<実行ファイル名>
Icon=<アイコンファイル名>
Categories=<任意のカテゴリ  例: Utility>;
Terminal=false  # (オプション) GUIアプリケーションの場合はfalseを指定する
</syntaxhighlight>
<br>
.NETアプリケーションのAppImageを作成する場合は、エントリーポイントの設定が必要なため、AppRunファイルを作成する。<br>
vi /<AppImageのルートディレクトリ>/AppRun
<br>
<syntaxhighlight lang="sh">
# /<AppImageのルートディレクトリ>/AppRunファイル
#!/usr/bin/env sh
appname="<アプリケーションファイル名>"
# use -f to make the readlink path absolute
dirname="$(dirname -- "$(readlink -f -- "${0}")" )"
if [ "$dirname" = "." ]; then
    dirname="$PWD/$dirname"
fi
export DOTNET_ROOT="$dirname/usr/bin"
# Run Application binary
exec "$dirname/usr/bin/$appname" "$@"
</syntaxhighlight>
<br>
AppRunファイルに実行権限を付加する。<br>
chmod u+x /<AppImageのルートディレクトリ>/AppRun
<br>
==== AppImageファイルの生成 ====
AppImageファイルを生成する。<br>
./appimagetool-x86_64.AppImage <任意のディレクトリ名> <任意のAppImageファイル名>.AppImage
<br><br>
{{#seo:
|title={{PAGENAME}} : Exploring Electronics and SUSE Linux | MochiuWiki
|keywords=MochiuWiki,Mochiu,Wiki,Mochiu Wiki,Electric Circuit,Electric,pcb,Mathematics,AVR,TI,STMicro,AVR,ATmega,MSP430,STM,Arduino,Xilinx,FPGA,Verilog,HDL,PinePhone,Pine Phone,Raspberry,Raspberry Pi,C,C++,C#,Qt,Qml,MFC,Shell,Bash,Zsh,Fish,SUSE,SLE,Suse Enterprise,Suse Linux,openSUSE,open SUSE,Leap,Linux,uCLnux,Podman,電気回路,電子回路,基板,プリント基板
|description={{PAGENAME}} - 電子回路とSUSE Linuxに関する情報 | This page is {{PAGENAME}} in our wiki about electronic circuits and SUSE Linux
|image=/resources/assets/MochiuLogo_Single_Blue.png
}}


__FORCETOC__
__FORCETOC__
[[カテゴリ:RHEL]][[カテゴリ:SUSE]][[カテゴリ:Raspberry_Pi]][[カテゴリ:PinePhone]]
[[カテゴリ:RHEL]][[カテゴリ:SUSE]][[カテゴリ:Raspberry_Pi]][[カテゴリ:PinePhone]]