Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions build_files/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ mkdir /home/arcade
chown arcade: /home/arcade
chmod o-rwx /home/arcade

chown -R arcade: /usr/share/arcade/home
chmod -R o-rwx /usr/share/arcade/home

### Install RetroArch

curl -O https://buildbot.libretro.com/nightly/linux/x86_64/RetroArch.7z
Expand All @@ -54,9 +57,15 @@ dnf5 remove -y 7zip

rm RetroArch.7z

mv /tmp/RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage /usr/share/arcade/RetroArch/RetroArch.AppImage
mv /tmp/RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home /usr/share/arcade/RetroArch/RetroArch.AppImage.home
rm -d /tmp/RetroArch/RetroArch-Linux-x86_64 /tmp/RetroArch
mv /tmp/RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage /usr/share/arcade/RetroArch.AppImage
mv /tmp/RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home/.config/retroarch /usr/share/arcade/home/.config/retroarch
rm -d \
/tmp/RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home/.config \
/tmp/RetroArch/RetroArch-Linux-x86_64/RetroArch-Linux-x86_64.AppImage.home \
/tmp/RetroArch/RetroArch-Linux-x86_64 \
/tmp/RetroArch

touch /usr/share/arcade/home/.config/retroarch/retroarch.cfg.overlay

### Prune packages

Expand Down
2 changes: 1 addition & 1 deletion system_files/usr/bin/arcade-render-retroarch-config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TMPL_PREFIX = os.getenv("RA_TMPL_PREFIX", "")
KIOSK = os.environ["RA_KIOSK"]

# Define the template
tpl = Template(Path(f"{TMPL_PREFIX}/usr/share/arcade/RetroArch/retroarch.cfg.tmpl").read_text(encoding="utf-8"))
tpl = Template(Path(f"{TMPL_PREFIX}/usr/share/arcade/RetroArch/retroarch.cfg.overlay.tmpl").read_text(encoding="utf-8"))

# Substitute values
result = tpl.substitute(kiosk=KIOSK)
Expand Down
1 change: 1 addition & 0 deletions system_files/usr/lib/systemd/system/home-arcade.mount
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=Volatile /home/arcade
After=home-arcade-overlayfs-dirs.service
Requires=home-arcade-overlayfs-dirs.service
Before=display-manager.target

[Mount]
What=overlay
Expand Down
15 changes: 15 additions & 0 deletions system_files/usr/lib/systemd/system/mnt-arcade-data.mount
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=/mnt/arcade-data
DefaultDependencies=no
Requires=local-fs.target
After=local-fs.target
Before=display-manager.target

[Mount]
What=/dev/disk/by-label/ARCADEDATA
Where=/mnt/arcade-data
Type=auto
Options=defaults,nosuid,nodev

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion system_files/usr/lib/systemd/user/arcade-home.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PartOf=graphical-session.target
After=graphical-session.target

[Service]
ExecStart=%h/Apps/RetroArch/RetroArch.AppImage
ExecStart=/usr/share/arcade/RetroArch.AppImage --config /usr/share/arcade/RetroArch/retroarch.cfg.base --appendconfig %h/.config/retroarch/retroarch.cfg.overlay
Restart=always
RestartSec=0
KillSignal=SIGKILL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,21 @@ cloud_sync_sync_saves = "true"
cloud_sync_sync_system = "false"
cloud_sync_sync_thumbs = "false"
config_save_minimal = "false"
config_save_on_exit = "true"
config_save_on_exit = "false"
confirm_close = "true"
confirm_quit = "true"
confirm_reset = "true"
content_database_path = "~/.config/retroarch/database/rdb"
content_favorites_directory = "default"
content_favorites_path = "~/.config/retroarch/playlists/builtin/content_favorites.lpl"
content_favorites_path = "/mnt/arcade-data/retroarch/playlists/builtin/content_favorites.lpl"
content_favorites_size = "200"
content_history_directory = "default"
content_history_path = "~/.config/retroarch/playlists/builtin/content_history.lpl"
content_history_size = "200"
content_history_path = "/dev/null"
content_history_size = "0"
content_image_history_directory = "default"
content_image_history_path = "~/.config/retroarch/playlists/builtin/content_image_history.lpl"
content_image_history_path = "/dev/null"
content_music_history_directory = "default"
content_music_history_path = "~/.config/retroarch/playlists/builtin/content_music_history.lpl"
content_music_history_path = "/dev/null"
content_runtime_log = "true"
content_runtime_log_aggregate = "false"
content_show_add_entry = "1"
Expand All @@ -135,7 +135,7 @@ content_show_playlist_tabs = "true"
content_show_playlists = "false"
content_show_settings = "true"
content_video_directory = "default"
content_video_history_path = "~/.config/retroarch/playlists/builtin/content_video_history.lpl"
content_video_history_path = "/dev/null"
core_assets_directory = "~/.config/retroarch/downloads"
core_info_cache_enable = "false"
core_info_savestate_bypass = "false"
Expand Down Expand Up @@ -2861,7 +2861,7 @@ input_recording_toggle_btn = "nul"
input_recording_toggle_mbtn = "nul"
input_remap_binds_enable = "true"
input_remap_sort_by_controller_enable = "false"
input_remapping_directory = "~/.config/retroarch/config/remaps"
input_remapping_directory = "~/.config/retroarch/remaps"
input_replay_slot_decrease = "nul"
input_replay_slot_decrease_axis = "nul"
input_replay_slot_decrease_btn = "nul"
Expand Down Expand Up @@ -2972,10 +2972,10 @@ input_volume_up = "add"
input_volume_up_axis = "nul"
input_volume_up_btn = "nul"
input_volume_up_mbtn = "nul"
joypad_autoconfig_dir = "~/.config/retroarch/autoconfig"
joypad_autoconfig_dir = "~/.config/retroarch/joypads"
keyboard_gamepad_enable = "true"
keyboard_gamepad_mapping_type = "1"
kiosk_mode_enable = "$kiosk"
kiosk_mode_enable = "true"
led_driver = "null"
libretro_directory = "~/.config/retroarch/cores"
libretro_info_path = "~/.config/retroarch/cores"
Expand Down Expand Up @@ -3211,7 +3211,7 @@ pause_on_disconnect = "false"
perfcnt_enable = "false"
playlist_allow_non_png = "false"
playlist_compression = "false"
playlist_directory = "~/.config/retroarch/playlists"
playlist_directory = "/mnt/arcade-data/retroarch/playlists"
playlist_entry_remove_enable = "1"
playlist_entry_rename = "true"
playlist_fuzzy_archive_match = "false"
Expand Down Expand Up @@ -3269,8 +3269,8 @@ rgui_aspect_ratio_lock = "0"
rgui_background_filler_thickness_enable = "true"
rgui_border_filler_enable = "true"
rgui_border_filler_thickness_enable = "true"
rgui_browser_directory = "/home/arcade/Documents/roms"
rgui_config_directory = "~/.config/retroarch/config"
rgui_browser_directory = "/mnt/arcade-data/roms"
rgui_config_directory = "~/.config/retroarch/rgui"
rgui_extended_ascii = "false"
rgui_inline_thumbnails = "false"
rgui_internal_upscale_level = "0"
Expand All @@ -3292,13 +3292,13 @@ run_ahead_secondary_instance = "true"
runtime_log_directory = "default"
save_compression_codec = "1"
save_file_compression = "false"
savefile_directory = "~/.config/retroarch/saves"
savefile_directory = "/mnt/arcade-data/savefiles"
savefiles_in_content_dir = "false"
savestate_auto_index = "false"
savestate_auto_load = "false"
savestate_auto_save = "false"
savestate_automatic_interval = "0"
savestate_directory = "~/.config/retroarch/states"
savestate_directory = "/mnt/arcade-data/savestates"
savestate_file_compression = "true"
savestate_max_keep = "0"
savestate_thumbnail_enable = "true"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kiosk_mode_enable = "$kiosk"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
f0 = "DragonRise Inc. Generic USB Joystick .cfg"
s0 = "1370"
i0_0 = "121 6 DragonRise Inc. Generic USB Joystick "
__version = "2"
__file_count = "1"
__dir_count = "1"
__total_size = "1370"
__newest_mtime = "1789492964"
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
input_driver = "udev"
input_device = "DragonRise Inc. Generic USB Joystick "
input_device_display_name = "DragonRise N64"
input_vendor_id = "121"
input_product_id = "6"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_b_btn = "3"
input_y_btn = "2"
input_start_btn = "7"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_l_y_minus_axis = "-1"
input_l_y_plus_axis = "+1"
input_l_x_minus_axis = "-0"
input_l_x_plus_axis = "+0"
input_r_y_minus_btn = "0"
input_r_y_plus_btn = "2"
input_r_x_minus_btn = "3"
input_r_x_plus_btn = "1"
input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"
input_b_btn_label = "A"
input_y_btn_label = "B"
input_start_btn_label = "Start"
input_l_btn_label = "L"
input_r_btn_label = "R"
input_l2_btn_label = "Z"
input_l_y_minus_axis_label = "Joystick Down"
input_l_y_plus_axis_label = "Joystick Up"
input_l_x_minus_axis_label = "Joystick Left"
input_l_x_plus_axis_label = "Joystick Right"
input_r_y_minus_btn_label = "C Down"
input_r_y_plus_btn_label = "C Up"
input_r_x_minus_btn_label = "C Left"
input_r_x_plus_btn_label = "C Right"
input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"
input_a_btn = "1"
input_x_btn = "0"
input_select_btn = "11"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
input_libretro_device_p1 = "1"
input_libretro_device_p2 = "1"
input_player1_analog_dpad_mode = "1"
input_player1_btn_a = "9"
input_player1_btn_b = "8"
input_player1_btn_l2 = "11"
input_player1_btn_r = "-1"
input_player1_btn_x = "1"
input_player1_btn_y = "0"
input_player2_analog_dpad_mode = "1"
input_player2_btn_a = "9"
input_player2_btn_b = "8"
input_player2_btn_l2 = "11"
input_player2_btn_r = "-1"
input_player2_btn_x = "1"
input_player2_btn_y = "0"
input_remap_port_p1 = "0"
input_remap_port_p2 = "1"
input_turbo_allow_dpad = "false"
input_turbo_bind = "-1"
input_turbo_button = "0"
input_turbo_duty_cycle = "0"
input_turbo_enable = "true"
input_turbo_mode = "0"
input_turbo_period = "6"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
input_libretro_device_p1 = "1"
input_libretro_device_p2 = "1"
input_player1_analog_dpad_mode = "1"
input_player1_btn_a = "11"
input_player1_btn_l = "2"
input_player1_btn_r = "13"
input_player1_btn_x = "10"
input_player1_stk_r_x+ = "-1"
input_player1_stk_r_x- = "-1"
input_player1_stk_r_y+ = "-1"
input_player1_stk_r_y- = "-1"
input_player2_analog_dpad_mode = "1"
input_player2_stk_r_x+ = "-1"
input_player2_stk_r_x- = "-1"
input_player2_stk_r_y+ = "-1"
input_player2_stk_r_y- = "-1"
input_remap_port_p1 = "0"
input_remap_port_p2 = "1"
input_turbo_allow_dpad = "false"
input_turbo_bind = "-1"
input_turbo_button = "0"
input_turbo_duty_cycle = "0"
input_turbo_enable = "true"
input_turbo_mode = "0"
input_turbo_period = "6"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#
# PLUGINS OPTIONS
#
hiscore 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-- license:BSD-3-Clause
-- copyright-holders:Miodrag Milanovic
require('lfs')

_G._ = emu.lang_translate
_G._p = emu.lang_translate
_G.N_ = function (message) return message end
_G.N_p = function (context, message) return message end
_G.emu.plugin = {} -- table to contain plugin interfaces
-- substitute environment variables in the plugins path from options
local dirs = manager.options.entries.pluginspath:value()

-- and split the paths apart and make them suitable for package.path
package.path = ""
for dir in string.gmatch(dirs, "([^;]+)") do
if (package.path ~= "") then
package.path = package.path .. ";"
end
package.path = package.path .. dir .. "/?.lua;" .. dir .. "/?/init.lua"
end

for _,entry in pairs(manager.plugins) do
if (entry.type == "plugin" and entry.start) then
emu.print_verbose("Starting plugin " .. entry.name .. "...")
plugin = require(entry.name)
if plugin.set_folder~=nil then plugin.set_folder(entry.directory) end
plugin.startplugin();
end
end
Loading