diff --git a/VSCode-aarch64.AppImage b/VSCode-aarch64.AppImage new file mode 100644 index 0000000000000000000000000000000000000000..a398b7ed9d93046126f2bc424f686347067999fc Binary files /dev/null and b/VSCode-aarch64.AppImage differ diff --git a/VSCode-x86_64.AppImage b/VSCode-x86_64.AppImage new file mode 100644 index 0000000000000000000000000000000000000000..265c4f99a6efea383c45a0a056e4202c5a2ff9cd Binary files /dev/null and b/VSCode-x86_64.AppImage differ diff --git a/VSCode.desktop b/VSCode.desktop new file mode 100644 index 0000000000000000000000000000000000000000..3e552f27693e21ca7593c6f367430c7fe8c9ac0a --- /dev/null +++ b/VSCode.desktop @@ -0,0 +1,19 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=VSCode +GenericName=VSCode +Comment=Code Editing. Redefined. +Exec=VSCode --unity-launch %F +Icon=VSCode +Categories=Development;IDE; +StartupWMClass=VSCode +StartupNotify=true +Keywords=vscode;Visual Studio Code;VSCode; +MimeType=text/plain;inode/directory;application/x-code-workspace; +Actions=new-empty-window; + +[Desktop Action new-empty-window] +Name=New Empty Window +Exec=VSCode --new-window %F +Icon=VSCode diff --git a/VSCode.png b/VSCode.png new file mode 100644 index 0000000000000000000000000000000000000000..3693e906e27140ec1b46b4e1d2f779e2c2988135 Binary files /dev/null and b/VSCode.png differ diff --git a/vscode.spec b/vscode.spec new file mode 100644 index 0000000000000000000000000000000000000000..352cd93b894c5337a325b9fe85651782cc917be1 --- /dev/null +++ b/vscode.spec @@ -0,0 +1,51 @@ +# use appimage from https://github.com/valicm/VSCode-AppImage/releases/tag/latest + +%define __os_install_post %{nil} + +Name: VSCode +Version: 1.82.1 +Release: 1 +License: GPLv3 +Group: Development/Tools +Summary: Code editing. Redefined. +Url: https://github.com/valicm/VSCode-AppImage/releases/tag/latest +Source1: %{name}.desktop +Source2: %{name}.png +Source3: VSCode-aarch64.AppImage +Source4: VSCode-x86_64.AppImage +AutoReqProv: no + +%description +Visual Studio Code, also commonly referred to as VS Code, is a source-code editor +made by Microsoft with the Electron Framework, for Windows, Linux and macOS. +Features include support for debugging, syntax highlighting, intelligent code completion, +snippets, code refactoring, and embedded Git. + +%prep + +%build + +%install + +install -Dm 0755 %{_sourcedir}/VSCode-$(arch).AppImage %{buildroot}/opt/appimage/%{name}-%{version}-linux-$(arch).AppImage +install -Dm 0644 %SOURCE1 %{buildroot}%{_datadir}applications/%{name}.desktop +install -Dm 0644 %SOURCE2 %{buildroot}%{_datadir}pixmaps/%{name}.png + +pushd %{buildroot} +find usr/ -type f -printf "/%h/%f\n" >> filelist.lst +find opt/ -type f -printf "/%h/%f\n" >> filelist.lst +popd + +mv %{buildroot}/filelist.lst . + +%files -f filelist.lst + +%post +ln -s /opt/appimage/VSCode-*AppImage /usr/bin/code + +%postun +rm -f /usr/bin/code + +%changelog +* Thu Sep 26 2024 WangKui - 1.82.1-1 +- init