Skip to content

Commit 8c64893

Browse files
committed
Successful AppImage build
1 parent f2aa668 commit 8c64893

3 files changed

Lines changed: 80 additions & 58 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,5 +252,6 @@ gen/
252252
*.java
253253
*.class
254254

255-
# Snap builds:
255+
# builds:
256256
*.snap
257+
*.AppImage

.serena/project.yml

Lines changed: 63 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@ project_name: "tempren"
33

44

55
# list of languages for which language servers are started; choose from:
6-
# al bash clojure cpp csharp
7-
# csharp_omnisharp dart elixir elm erlang
8-
# fortran fsharp go groovy haskell
9-
# java julia kotlin lua markdown
10-
# matlab nix pascal perl php
11-
# php_phpactor powershell python python_jedi r
12-
# rego ruby ruby_solargraph rust scala
13-
# swift terraform toml typescript typescript_vts
14-
# vue yaml zig
6+
# al angular ansible bash clojure
7+
# cpp cpp_ccls crystal csharp csharp_omnisharp
8+
# dart elixir elm erlang fortran
9+
# fsharp go groovy haskell haxe
10+
# hlsl html java json julia
11+
# kotlin lean4 lua luau markdown
12+
# matlab msl nix ocaml pascal
13+
# perl php php_phpactor powershell python
14+
# python_jedi python_ty r rego ruby
15+
# ruby_solargraph rust scala scss solidity
16+
# svelte swift systemverilog terraform toml
17+
# typescript typescript_vts vue yaml zig
1518
# (This list may be outdated. For the current list, see values of Language enum here:
1619
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
1720
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
1821
# Note:
1922
# - For C, use cpp
2023
# - For JavaScript, use typescript
24+
# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root)
25+
# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm)
26+
# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three)
2127
# - For Free Pascal/Lazarus, use pascal
2228
# Special requirements:
2329
# Some languages require additional setup/installations.
@@ -53,52 +59,19 @@ ignored_paths: []
5359
# Added on 2025-04-18
5460
read_only: false
5561

56-
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
57-
# Below is the complete list of tools for convenience.
58-
# To make sure you have the latest list of tools, and to view their descriptions,
59-
# execute `uv run scripts/print_tool_overview.py`.
60-
#
61-
# * `activate_project`: Activates a project by name.
62-
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
63-
# * `create_text_file`: Creates/overwrites a file in the project directory.
64-
# * `delete_lines`: Deletes a range of lines within a file.
65-
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
66-
# * `execute_shell_command`: Executes a shell command.
67-
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
68-
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
69-
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
70-
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
71-
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
72-
# * `initial_instructions`: Gets the initial instructions for the current project.
73-
# Should only be used in settings where the system prompt cannot be set,
74-
# e.g. in clients you have no control over, like Claude Desktop.
75-
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
76-
# * `insert_at_line`: Inserts content at a given line in a file.
77-
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
78-
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
79-
# * `list_memories`: Lists memories in Serena's project-specific memory store.
80-
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
81-
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
82-
# * `read_file`: Reads a file within the project directory.
83-
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
84-
# * `remove_project`: Removes a project from the Serena configuration.
85-
# * `replace_lines`: Replaces a range of lines within a file with new content.
86-
# * `replace_symbol_body`: Replaces the full definition of a symbol.
87-
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
88-
# * `search_for_pattern`: Performs a search for a pattern in the project.
89-
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
90-
# * `switch_modes`: Activates modes by providing a list of their names
91-
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
92-
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
93-
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
94-
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
62+
# list of tool names to exclude.
63+
# This extends the existing exclusions (e.g. from the global configuration)
64+
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
9565
excluded_tools: []
9666

97-
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
67+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
68+
# This extends the existing inclusions (e.g. from the global configuration).
69+
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
9870
included_optional_tools: []
9971

10072
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
10173
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
74+
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
10275
fixed_tools: []
10376

10477
# list of mode names to that are always to be included in the set of active modes
@@ -109,11 +82,14 @@ fixed_tools: []
10982
# Set this to a list of mode names to always include the respective modes for this project.
11083
base_modes:
11184

112-
# list of mode names that are to be activated by default.
113-
# The full set of modes to be activated is base_modes + default_modes.
114-
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
85+
# list of mode names that are to be activated by default, overriding the setting in the global configuration.
86+
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
87+
# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply.
11588
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
89+
# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply
90+
# for this project.
11691
# This setting can, in turn, be overridden by CLI parameters (--mode).
92+
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
11793
default_modes:
11894

11995
# initial prompt for the project. It will always be given to the LLM upon activating the project
@@ -129,3 +105,38 @@ symbol_info_budget:
129105
# list of regex patterns which, when matched, mark a memory entry as read‑only.
130106
# Extends the list from the global configuration, merging the two lists.
131107
read_only_memory_patterns: []
108+
109+
# list of mode names to be activated additionally for this project, e.g. ["query-projects"]
110+
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
111+
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
112+
added_modes:
113+
114+
# line ending convention to use when writing source files.
115+
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
116+
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
117+
line_ending:
118+
119+
# list of regex patterns for memories to completely ignore.
120+
# Matching memories will not appear in list_memories or activate_project output
121+
# and cannot be accessed via read_memory or write_memory.
122+
# To access ignored memory files, use the read_file tool on the raw file path.
123+
# Extends the list from the global configuration, merging the two lists.
124+
# Example: ["_archive/.*", "_episodes/.*"]
125+
ignored_memory_patterns: []
126+
127+
# advanced configuration option allowing to configure language server-specific options.
128+
# Maps the language key to the options.
129+
# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available.
130+
# No documentation on options means no options are available.
131+
ls_specific_settings: {}
132+
133+
# list of additional workspace folder paths for cross-package reference support (e.g. in monorepos).
134+
# Paths can be absolute or relative to the project root.
135+
# Each folder is registered as an LSP workspace folder, enabling language servers to discover
136+
# symbols and references across package boundaries.
137+
# Currently supported for: TypeScript.
138+
# Example:
139+
# additional_workspace_folders:
140+
# - ../sibling-package
141+
# - ../shared-lib
142+
additional_workspace_folders: []

packaging/appimage/build-appimage.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,30 @@ python -m python_appimage build app \
2020
--python-version "${PYTHON_VERSION}" \
2121
packaging/appimage/entrypoint.py
2222

23-
# Find the generated AppDir (python-appimage names it based on the script)
24-
APPDIR="$(ls -d *.AppDir 2>/dev/null | head -1)"
25-
[ -z "${APPDIR}" ] && { echo "AppDir not found"; exit 1; }
23+
# python-appimage names the AppDir {script_name}-{ARCH} when --no-packaging is used
24+
APPDIR="entrypoint.py-${ARCH}"
25+
[ -d "${APPDIR}" ] || { echo "AppDir not found: ${APPDIR}"; exit 1; }
2626

2727
# Install tempren (with video extras) into the AppDir's Python
2828
"${APPDIR}/usr/bin/python${PYTHON_VERSION}" -m pip install --quiet \
2929
"tempren[video]==${VERSION}"
3030

31+
# Patch AppRun to invoke tempren instead of starting a bare Python interpreter
32+
sed -i 's|"$APPDIR/opt/python'"${PYTHON_VERSION}"'/bin/python'"${PYTHON_VERSION}"'" "$@"|"$APPDIR/opt/python'"${PYTHON_VERSION}"'/bin/python'"${PYTHON_VERSION}"'" "$APPDIR/opt/python'"${PYTHON_VERSION}"'/bin/tempren" "$@"|' \
33+
"${APPDIR}/AppRun"
34+
35+
# Replace generic Python desktop entry and icon with tempren's own
36+
cp packaging/appimage/tempren.desktop "${APPDIR}/tempren.desktop"
37+
rm -f "${APPDIR}"/python*.desktop
38+
cp packaging/appimage/tempren.svg "${APPDIR}/tempren.svg"
39+
ln -sf tempren.svg "${APPDIR}/.DirIcon"
40+
3141
# Bundle native shared libraries into AppDir/usr/lib so ctypes can find them
3242
APPDIR_LIB="${APPDIR}/usr/lib"
3343
mkdir -p "${APPDIR_LIB}"
3444

3545
for lib in libmagic.so.1 libmediainfo.so.0 libzen.so.0; do
36-
LIBPATH=$(ldconfig -p | grep " ${lib}" | awk '{print $NF}' | head -1)
46+
LIBPATH=$(ldconfig -p | grep "[[:space:]]${lib}" | awk '{print $NF}' | head -1)
3747
[ -n "${LIBPATH}" ] && cp -v "${LIBPATH}" "${APPDIR_LIB}/"
3848
done
3949

@@ -50,6 +60,6 @@ sed -i '2i export LD_LIBRARY_PATH="${APPDIR}/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBR
5060
wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage" \
5161
-O appimagetool
5262
chmod +x appimagetool
53-
APPIMAGE_EXTRACT_AND_RUN=1 ARCH="${ARCH}" ./appimagetool "${APPDIR}" "tempren-${VERSION}-${ARCH}.AppImage"
63+
APPIMAGE_EXTRACT_AND_RUN=1 ARCH="${ARCH}" ./appimagetool --no-appstream "${APPDIR}" "tempren-${VERSION}-${ARCH}.AppImage"
5464

5565
echo "Built: tempren-${VERSION}-${ARCH}.AppImage"

0 commit comments

Comments
 (0)