spacedrive/CONTRIBUTING.md

175 lines
10 KiB
Markdown
Raw Permalink Normal View History

# Welcome to the Spacedrive Contributing Guide
Thank you for investing your time in contributing to our project!
Please read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable.
This guide will provide an overview of the contribution workflow, including opening an issue, creating a pull request (PR), and the review and merge process.
## New Contributor Guide
To familiarize yourself with the project, please read the [README](README.md). Here are some resources to help you get started with open-source contributions:
- [Finding ways to contribute to open-source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
- [Setting up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
- [Getting started with Tauri](https://tauri.app/v1/guides/getting-started/prerequisites)
- [pnpm CLI](https://pnpm.io/pnpm-cli)
## Getting Started
### Issues
#### Creating a New Issue
If you come across an issue or have a feature request for Spacedrive, please [search if a related issue has already been reported](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If no relevant issue exists, you can open a new issue using the appropriate [issue form](https://github.com/spacedriveapp/spacedrive/issues/new/choose).
#### Solving an Issue
To find an issue that interests you, you can browse through our [existing issues](https://github.com/spacedriveapp/spacedrive/issues) and use the available `labels` to narrow down your search (See [Labels](https://github.com/spacedriveapp/spacedrive/labels) for more information). As a general rule, if you find an issue you want to work on, you are welcome to open a PR with a fix.
### Making Changes
#### Making Changes Locally
This project uses [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) and [pnpm](https://pnpm.io/installation). Make sure you have them installed before proceeding.
To make changes locally, follow these steps:
2022-04-29 01:56:31 +00:00
1. Clone the repository: `git clone https://github.com/spacedriveapp/spacedrive`
2. Navigate to the project directory: `cd spacedrive`
3. Configure your system environment for Spacedrive development
1. For Linux users, run: `./scripts/setup.sh`
> This [script](https://github.com/spacedriveapp/spacedrive/blob/main/scripts/setup.sh#L133) will check if Rust and pnpm are installed then proceed to install Clang, NASM, LLVM, libvips, Gstreamer's Plugins, FFmpeg, Perl, [Tauri essentials](https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux) and any other required dependencies for Spacedrive to build.
2. For macOS users, run: `./scripts/setup.sh`
> This [script](https://github.com/spacedriveapp/spacedrive/blob/main/scripts/setup.sh#L108) will check if Rust, pnpm and Xcode are installed and proceed to use Homebrew to install NASM, [Tauri essentials](https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-macos) and install any other required dependencies for Spacedrive to build.
3. For Windows users, run in PowerShell: `.\scripts\setup.ps1`
> This [script](https://github.com/spacedriveapp/spacedrive/blob/main/scripts/setup.ps1#L81) will install pnpm, LLVM, FFmpeg, C++ build tools, NASM, Rust + Cargo, Rust tools, Edge Webview 2, Strawberry Perl, [Tauri essentials](https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-windows) and any other required dependencies for Spacedrive to build.
4. Install dependencies: `pnpm i`
5. Prepare the build: `pnpm prep` (This will run all necessary codegen and build required dependencies)
To quickly run only the desktop app after `prep`, you can use:
- `pnpm tauri dev`
If necessary, the [webview devtools](https://tauri.app/v1/guides/debugging/application/#webview-console) can be opened by pressing `Ctrl + Shift + I` (Linux and Windows) or `Command + Option + I` (macOS) in the desktop app.
[ENG-1054] libheif for Linux (plus fixes) + Webp update (#1405) * Move postinstall script to a preprep script - Fix libheif crate failing to build with our libheif - Rework CI due to postinstall to preprep changes * Linux heif build script + Update webp * Fix ctrl+c/ctrl+v bug * Improve libheif linux script - Add support for linux aarch64 - Add CI workflow to build libheif for linux - Some other misc fixes * Fix libheif CI requires sudo * Fix wrong path for libheif build.rs override in Windows * Fix wrong path manipulations in libheif build script * 🤦 * Use ubuntu-latest in libheif action - Specify glib version in target triple to support old distros - Fix libheif artifact publishing * Fix artifact upload path again * Add musl support for libheif - Remove unused files from libheif artifact - Add setup logic for libheif in postinstall script * Build libheif for linux as a shared lib * Fix meson not building the correct arch - Add logic to get git branch from githubs CI env vars * libheif finnaly works on linux - Make spacedrive binary rpath point to where appimage and deb expects our libs to be - Add some logic to tauri.js to convince tauri to bundle our shared libs - Work-around appimage bundling step breaking sometimes - Add logic to handle sigint in tauri.js to ensure we clean up after ourselves - Rename postinstall.mjs to setup.mjs - Add logic to setup.mjs to point our dev build to our shared libs in linux * Fix windows dekstop dev - Rename setup.mjs to preprep.mjs * test cache-factory * Fix preprep script not parsing the cross compilation target triple and always using the host info to download dependencies - Fix action env vars not being correctly passed - Remove possibility to pass multiple targests to rust action * Don't compile mobile crates on desktop targets * Remove cache-factory pull_request trigger * remove patched tauri cli * Use git plumbing command to get remote branch name - Fallback to reading .git/HEAD if remote name was not retrieved * fix type --------- Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-10-03 17:31:33 +00:00
Also, the react-devtools can be launched using `pnpm dlx react-devtools`.
However, it must be executed before starting the desktop app for it to connect.
You can download a bundle with sample files to test the app by running:
- `pnpm test-data`
Only for Linux and macOS (Requires curl and tar).
The test files will be located in a directory called `test-data` in the root of the spacedrive repo.
To run the web app:
- `pnpm dev:web`
This will start both the server and web interface.
You can launch these individually if you'd prefer:
- `cargo run -p sd-server` (server)
- `pnpm web dev` (web interface)
To run the e2e tests for the web app:
- `pnpm web test:e2e`
If you are developing a new test, you can execute Cypress in interactive mode with:
- `pnpm web test:interactive`
To run the landing page:
- `pnpm landing dev`
If you encounter any issues, ensure that you are using the following versions of Rust, Node and Pnpm:
Mobile app (#352) * Mobile app: Initial Commit! * Fix monorepo issues and add tailwind. Fix & Test tailwind. working ball app Fix workspace module import * Mobile app cleanup and structure * App Icons, Splash screen and eslint config * More cleanup * Use SVGs directly in React Native * Add placeholder files for project structrate * Cleanup all svg icons and modify metro config to use icons from interface package (temporary) * Potentially fix types for react & update some packages. * Onboarding screen + add reanimated & moti * Finishing touches on Onboarding screen * Persist onboarding, Button comp and Nav. flow. * Add mobile info to Contributing.md * Add .prettierignore for disabling auto import ordering for some files. * Introducing the new navigation flow * Change package name * use the new @sd/assets package * Add a temp. folder for @sd/assets organization * Drawer nav bar looks good now. * Hacky method to get the active route on drawer * Fix react native types & update few packages. * Drawer animation * Add counter * Collapsible Tags / Locations * rename Counter and add saveState prop * Sync counter with desktop version * Move some screens to BottomTab Nav. * Add Overview Stats * [WIP] - Device component * Upgrade to Expo 46 and fix types. * Add @sd/core to mobile * Fix eslint stuff * placeholder and some notes * Show folder icons on overview screen * Fixed android build, style and some screen tweaks * Add bottom sheet package * Fix bundler issues and rename landing package.json * Rename landing package.json * update all packages to latest React * Eject expo app * fix pnpm & expo & monorepo * monorepo debugging * cleanup dependencies & static link to shared packages * cleanup, switch to hermes, pollyfill intl for ios * Cleanup monorepo * Fix: Style for FileItem * Above average app icons * cleanup ios * update msrv * update codeowners for mobile * fix typecheck * update lockfile * fix ffmpeg install * rename UI to 'SpacedriveInterface' for clarity * Update codeowners * Fix eslint config mobile. * Refactor navigation flow, move types to navigators Co-authored-by: Utku <74243531+utkubkr@users.noreply.github.com> Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2022-08-09 03:29:14 +00:00
Media metadata extraction & Thumbnailer rework (#2285) * initial ffprobe commit * Working slim down version ffprobe * Auto format ffprobe and deps source * Remove show_pixel_formats logic - Fix do_bitexact incorrect check in main after last changes - Fix some clangd warning * Remove show_* and print_format options and their respective logic * Rework ffprobe into simple_ffprobe - Simplify ffprobe logic into a simple program that gather and print a media file metadata * Reduce the amount of ffmpeg log messages while generating thumbnails * Fix completly wrong comments * mend * Start modeling ffmpeg extracted metadata on schema - Start porting ffprobe code to rust - Rename some references to media_data to exif_data * Finish modeling media info data - Add MediaProgram, MediaStream, MediaCodec, MediaVideoProps, MediaAudioProps, MediaSubtitleProps to Schema - Fix simple_ffproble to use its custom print_codec, instead of ffmpeg's impl * Add relation between MediaInfo and FilePath - Remove shared properties from MediaInfo and related structs - Implement Iterator for FFmpegDict * Fix and update schema * Data models and start populating MediaInfo in rust * Finish populating media info, chapters and program * Improve FFmpegFormatContext data raw pointer access - Implement stream data gathering * Impl FFmpegCodecContext, retrieve codec information - Improve some unsafe pointer uses - Impl from FFmpegFormatContext to MediaInfo conversion * Fix FFmpegDict Drop * Fix some crago warnings * Impl retrieval of video props - Fix C char* to Rust String convertion * Impl retrieval of audio and subtitle props - Fill props for MediaCodec * Remove simple_ffprobe now that the Rust impl is done * Fix schema to match actually retrieved media info - Fix import some FFmpeg constants instead of directly using values * Rework movie_decoder - Re-implement create_scale_string and add support anamorphic video - Improve C pointer access for FFmpegFormatContext and FFmpegCodecContext - Use newer FFmpeg abstractions in movie_decoder * Fix incorrect props when initializing MovieDecoder * Remove unecessary lifetimes * Added more native wrappers for some FFmpeg native objects used in movie_decoder * Remove FFmpegPacket - Some more improvements to movie_decoder * WIP * Some small fixes * More fixes Rename movie_decoder to frame_decoder Remove more references to film_strips * fmt * Fix duplicate migration for job error changes * fix rebase * Solving segfaults, fuck C lang Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com> * Update rust to version 1.77 - Pin rust version with rust-toolchain.toml - Change from dtolnay/rust-toolchain to IronCoreLabs/rust-toolchain for rust-toolchain support - Remove unused function and imports - Replace most CString uses with new c literal string * More segfault solving and other minor fixes Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com> * Fix ffmpeg rotation filter breaking portrait video thumbnails #2150 - Plus some other misc fixes * Auto format * Retrieve video/audio metadata on frontend * Auto format * First draft on ffmpeg data save on db Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com> * Fix some incorrect changes to prisma schema * Some fixes for the FFmpegData schema - Expand logic to save FFmpegData to db * A ton of things Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com> * Integrating ffmpeg media data in jobs and API * Rspc can't BigInt * 🙄 * Add initial ffmpeg metadata entries to Inspector - Fix ephemeral metadata api to match the files metadata api call * Fix Inspector not showing ffmpeg metadata * Add bitrate, start time and chapters video metadata to Inspector - Fix backend BigInt conversion incorrectly using i32 instead of u32 - Change FFmpegFormatContext/FFmpegMetaData bit_rate to i64 - Rename byteSize to humanizeSize - Expand humanizeSize logic to allow handling bits and Binary units - Move capitalize to @sd/client utils * Solving some issues * Fix ffmpeg probe getting incorrect stream id and breaking database unique constraint - Fix humanizeSize breaking when receiving floating numbers - Fix incorrect equality in StatCard - Fix unhandled error in Dialog when trying to remove an unknown dialog * fmt * small improvements - Remove some unecessary recursion_limit directive - Remove unused app_image releated functions - Fix metadata query enabled flag * Add migration for ffmpeg media data * Fix cypress test * Requested changes * Implement feedback - Update locale keys for all languages - Add pnpm command to update all language keys * Fix thumb reactivity in non indexed locations --------- Co-authored-by: Ericson Soares <ericson.ds999@gmail.com> Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com>
2024-05-09 02:20:28 +00:00
- Rust version: **1.78**
- Node version: **18.18**
- Pnpm version: **9.1.1**
Mobile app (#352) * Mobile app: Initial Commit! * Fix monorepo issues and add tailwind. Fix & Test tailwind. working ball app Fix workspace module import * Mobile app cleanup and structure * App Icons, Splash screen and eslint config * More cleanup * Use SVGs directly in React Native * Add placeholder files for project structrate * Cleanup all svg icons and modify metro config to use icons from interface package (temporary) * Potentially fix types for react & update some packages. * Onboarding screen + add reanimated & moti * Finishing touches on Onboarding screen * Persist onboarding, Button comp and Nav. flow. * Add mobile info to Contributing.md * Add .prettierignore for disabling auto import ordering for some files. * Introducing the new navigation flow * Change package name * use the new @sd/assets package * Add a temp. folder for @sd/assets organization * Drawer nav bar looks good now. * Hacky method to get the active route on drawer * Fix react native types & update few packages. * Drawer animation * Add counter * Collapsible Tags / Locations * rename Counter and add saveState prop * Sync counter with desktop version * Move some screens to BottomTab Nav. * Add Overview Stats * [WIP] - Device component * Upgrade to Expo 46 and fix types. * Add @sd/core to mobile * Fix eslint stuff * placeholder and some notes * Show folder icons on overview screen * Fixed android build, style and some screen tweaks * Add bottom sheet package * Fix bundler issues and rename landing package.json * Rename landing package.json * update all packages to latest React * Eject expo app * fix pnpm & expo & monorepo * monorepo debugging * cleanup dependencies & static link to shared packages * cleanup, switch to hermes, pollyfill intl for ios * Cleanup monorepo * Fix: Style for FileItem * Above average app icons * cleanup ios * update msrv * update codeowners for mobile * fix typecheck * update lockfile * fix ffmpeg install * rename UI to 'SpacedriveInterface' for clarity * Update codeowners * Fix eslint config mobile. * Refactor navigation flow, move types to navigators Co-authored-by: Utku <74243531+utkubkr@users.noreply.github.com> Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2022-08-09 03:29:14 +00:00
After cleaning out your build artifacts using `pnpm clean`, `git clean`, or `cargo clean`, it is necessary to re-run the `setup-system` script.
[ENG-270, ENG-213] Stabilize release pipeline (#768) * Attempt at building our own ffmpeg dylibs for macOS - Create dockerfile to setup osxcross and required host dependencies for cross-compiling ffmpeg for macOS - Create script to setup required macOS dependencies and build ffmpeg for both x86_64 and aarch64 * Improve dockerfile to better use docker's cache - Attempt at fixing arm64 build (still not there yet) * ARM64 sucessfully compiles \o/ - Use clang for everything (e.g. linker, assembler, ...) - Remove -lc++ because it is now handled internally thanks to a patch - Apply 3 open PRs to osxcross as external patches to solve some of our problems - PR 180 reduces the macports dependencies size by prefering non universal libs for x88 - PR 314 adds the -lc++ flag for macOS SDKs >= 11.1 - PR 379 fix macports pulling incorrects deps for SDK11 and adds support for SDK13 (future proofing, as it does nothing for us rigth now) * Fix relink and copy logic in ffmpeg build script - Ensure ffmpeg and dependencies dylibs are correctly relinked and copied over to the output directory - Copy includes from ffmpeg and dependencies to allow for dev building against these dylibs - Set up symlinks for all dylibs to the common `lib` directory - Remove superfluous linker and compiler options - Add `-headerpad_max_install_names` linker option to accommodate the required relink changes - Remove `--disable-fft` for the arm64 build, as it doesn't seem to be required nowadays - Allow `swresample` and `avdevices` to be compiled as they seem to be expected to exist by `ffmpeg-sys-next` - Disable ffmpeg program compilation - Fix dylibs id to match their new expected location - Fix ffmpeg dylibs inter-linkage not being updated - Add custom patch for osxcross macports to load already downloaded files from cache - Remove the requirement for specifying the darwin version in the Dockerfile - Enable docker cache for macports - Move arm min macOS version ARG to the top * Attempt at building ffmpeg with github actions - Split osxcross setup into it's own Dockerfile to allow exporting it as a image to Dockerhub - Create a github action to build ffmpeg - Add osxcross patch for PR 372 for future proofing (Add support for macOS SDK 13.1) * Remove incompatible step name * Change FFMPEG_VERSION to string to avoid yaml weird type casting * Start to use our ffmpeg build in the macOS - Adjust the macOS setup script to download our ffmpeg build, also replace installing protobuf compiler from brew with grabbing it from it's own repository - Some misc improvement to the *nix setup script - Fix ffmpeg build script not copying static libs (for when we may want to statically link ffmpeg) - Fix ffmpeg build script not taking into acount possible libraries that are multiple paths deep in /lib - Update CI to actions/checkout@v3, v2 is deprecated - Update ffmpeg build CI to not xz the artifacts, as github already zips it anyway * Fix macOS setup not finding the ffmpeg artifact due to a jq script mistake - Comment out embeeding static libs in ffmpeg artifact for now, as they take too much space - Remove incorrect dockerfile settings from editorconfig * Fix protobuf download in macOS - Fix Framework directory creation not following script's dir but cwd - Improve download logic to avoid being rate limited on failures - Return to using xz for ffmpeg build, as it saves quite a bit of space * Replace `OSTYPE` with `$(uname)` for a more standardized way to check which os is running - Fix mobile check using `==` instead of `=` in test command * Fix syntax error in bash 3.x (which is the default in macOS) - Fix jq not downloading all deps and being placed in the incorrect directory * Fix incorrect install_name_tool arguments - Remove leading './' when referencing ffmpeg libs during build * Fix protoc not being executable - Fix some error messages * jq throw input when it is invalid - Enable debug log in setup script when running in CI * Add a dev.js build script for desktop app - Remove dll copy from setup-system.ps1, now done by dev.js - Minor rework to build.js to improve signals and stdio handling * Configure cargo to use FFMPEG_DIR and PROTOC envvars on macOS * Pass GITHUB_TOKEN to macOS setup script in CI * Replace simple curl with gh_curl in github request * Fix some ctrl+c/ctrl+v typos * Add missing ffmpeg deps - Fix missing symlinks for ffmpeg libs in the output_dir/libs - Change arm64 minimum macOS target to 11.2 due to libbrotli only being available precompiled to this version - Add more options to ffmpeg configure in an attempt to reduce its size + improve performance * Rework ffmpeg build script to create a FFMpeg.framework instead of loose dylibs - Disable unused postproc and enabled missing required protocols in ffmpeg configuration - Adjust Dockerfile and setup-script to handle the new FFMpeg.framework * Fix setup script incorrect linking logic for FFMpeg.framework * Forgot to remote the leading path in the lib/header linking logic for FFMpeg.framework * Enable size optimization for ffmpeg - Remove Frameworks directory before setting it up in setup-system.sh * Revert lib id to use `@executable_path/../Frameworks/` instead of `@rpath` - `@rpath` breaks dev builds - Add logic to create less versioned versions of dylibs in setup-system script, due to it being required for compiling ffmpeg-sys-next (not required during runtime, just for compilation) - Add scripts/deps to gitignore * Fix ffmpeg build script not copying unversioned symlinks to FFMpeg.framework - Remove unecessary unversioned symlink logic from setup-system - Add new build scripts for dev and prod that setup the environment and tauri to correctly point to FFMpeg.framework - Rework windows setup-system script to follow the same logic as in macOS setup-system * Attempt at fixing windows setup script - Add powershell editorconfig * Attempt to fix Windows CI * Fix some mistakes in the build scripts - Replace toml lib with something more used and maybe better? - Attempt to fix Windows CI * Fix some more problems with the build script * Another attempt at fixing windows CI * Some more fixes for the windows setup script * Add build.js step to release CI - Implement patch only mode for build.js when running under CI - Implement appeding extra env in cargo config in env.js - Only run windows dlls copy in dev in env.js - Another attempt at fixing windows CI * Maybe this will make the windows CI happy? * Windows CI why dont you work, whyyy? * Try to apease the Windows CI Gods - Disable updater build in macOS, due to tauri-apps/tauri#3933 * Fix build.js extra env vars - Uncomment parts of setup-system.ps1 to check if it keeps working * Uncomment another section and see if windows CI will complain * uncomment some more of setup-system.ps1 * Use Start-Process for robocopy instead of executing it directly - Only raise an error if robocopy exists with a status code >=8 - Revert build.js macOS specific bundles change - Disable updater for now * Remove updater from cargo.toml * Add -PassThru to Start-Process to ensure we get and Process obj back * Comment out more of updater * Improve documentation for both of the docker containers - Fix a harcoded install_name_tool call in the ffmpeg-build-macos.sh script * Configure tauri to copy ffmpeg dlls to windows prod version - Fix windows dlls copy on dev - Stop replacing tauri.conf.json, except on CI, for prod builds and use a tauri.conf.patch.json for any required changes - Don't unset macOSPrivateApi on prod build, we need it for the transparent background - Fix dev.js not exiting when the spawned command was over * Fix windows not find protoc - Fix missing import in env.js * Fix Windows Dlls copy logic for prod build - Fix dev script failing due to missing env - Implement error handler to spawned process * Format + Fix pnpm-lock * Fix video thumb generation failing on Windows due to bad path to CString conversion logic * Fix mobile build - Greatly improve windows setup-script error handling - Install LLVM with winget instead of downloading exe from github * Improve CI a bit - Fix mobile CI not using github token to avoid being rate limited * Fix pnpm not accesible to actions/setup-node * Skip pnpm check on CI * Fix pnpm skip not working - Fix pnpm cache check missing a step * Only lock action to major versions * CI really doesn't like running robocopy directly * Attempt to build our own patched tauri bundler * Trigger new workflow * Fix attempt for patched tauri action tests - Disable cache for patched tauri action - Enable package publishing for patched tauri action * Attempt fix patched tauri publish * Remove commented code from patched tauri workflow - Replace deprecated `actions-rs/toolchain` with `dtolnay/rust-toolchain` * Fix url patching logic for publishing step of patched tauri package * Fix prepublishOnly command for patched tauri package * Adjust patched tauri package package.json * Also patch the specific os/arch sub packages * Instruct napi to stop doing github releases * Patch package.json befor build * Re-enable updater - Patch tauri cli to workaround a tauri bug that prevented use from bundling frameworks in the updater - Update tauri/api to 1.3 and tauri/cli 1.3.1 - Add target triple in the release artifacts name - Use ubuntu-20.04 instead of ubuntu-latest - Configure release workflow to build to all supported platforms - Replace `tauri-apps/tauri-action` with simply calling `pnpm desktop build` - Simplify tauri-patched-cli-js to only build the required macOS binaries - Unify build.js and dev.js in a tauri.js build script, which now acts as an all around wrapper for the tauri/cli * Restore incorrectly removed step from `tauri-patched-cli-js` * Disable auto-run of tauri-patched-cli-js - Update setup-system.sh with the latest tauri-patched-cli-js artifacts * Forgot to mkdir bin * Fix pnpm-lock.yaml not being up to date - Remove pnpm deps caching * Fix variable name conflict * Enable the updater build conditionally - Enable release workflow to test it * Fix artifacts not being published - Change macOS on arm64 minimumSystemVersion to 11.2 - Commented out rust cache to check if this is the culprit to the low memory problem on windows runner - Add some debug log to tauri.js * Fix release workflow artifact uploading * Specify which bundles to build on each platform - Attempt fix apple arm build - Don't include internal deb archives in linux updater artifact * Attempt to fix apple arm build - Fix dmg background not applying * Fix incorrect semver usage * Patch swift-rs to see if that fix apple arm64 release build * Update swift-rs submodule - Remove unused deps lodash.merge * Configure so only release workflow runs without cache - Improve tauri.js logs * Ignore `crates/swift-rs` * Revert "Ignore `crates/swift-rs`" - Remove `crates/swift-rs` before running `cargo fmt` This reverts commit 851bd84373fd7263f0efe4876a864cff0b2af75b. * Github CI input/output are always string - Attempt to fix Windows Clippy * Fix CI syntax error * Fix mobile CI - Disable pnpm deps caching - Disable rust targets caching on Windows - Configure cache factory to run for all targets * Remove `crates/swift-rs` * Attempt fix Mobile CI - Enable cache factory run in pull_request to test it - Specific more path for the CI run to ignore - Specify path that will trigger the cache factory run - Some cleanup in the setup-pnpm action * Remove restore-cache options - Add prefix key to cache-factory - Fix LLVM cache-hit check - Add libheif to FFMpeg.framework * Remove submodule clone from actions * Add fake deps to ffmpeg build dockerfile - Fake install deps that aren't really necessary to build ffmpeg - Fail ffmpeg build script if it can't find a macports deps - Copy libheif headers to Framework * Remove automatic trigger for relase and pull request trigger for cache-factory actions * Remove pnpm setup from Cache factory - Cache factory is exclusivly for rust deps caching, no need to setup Node and pnpm with it * Re-enabled fail-fast in Github CI
2023-05-15 18:02:56 +00:00
Make sure to read the [guidelines](https://spacedrive.com/docs/developers/prerequisites/guidelines) to ensure that your code follows a similar style to ours.
##### Mobile App
Mobile app (#352) * Mobile app: Initial Commit! * Fix monorepo issues and add tailwind. Fix & Test tailwind. working ball app Fix workspace module import * Mobile app cleanup and structure * App Icons, Splash screen and eslint config * More cleanup * Use SVGs directly in React Native * Add placeholder files for project structrate * Cleanup all svg icons and modify metro config to use icons from interface package (temporary) * Potentially fix types for react & update some packages. * Onboarding screen + add reanimated & moti * Finishing touches on Onboarding screen * Persist onboarding, Button comp and Nav. flow. * Add mobile info to Contributing.md * Add .prettierignore for disabling auto import ordering for some files. * Introducing the new navigation flow * Change package name * use the new @sd/assets package * Add a temp. folder for @sd/assets organization * Drawer nav bar looks good now. * Hacky method to get the active route on drawer * Fix react native types & update few packages. * Drawer animation * Add counter * Collapsible Tags / Locations * rename Counter and add saveState prop * Sync counter with desktop version * Move some screens to BottomTab Nav. * Add Overview Stats * [WIP] - Device component * Upgrade to Expo 46 and fix types. * Add @sd/core to mobile * Fix eslint stuff * placeholder and some notes * Show folder icons on overview screen * Fixed android build, style and some screen tweaks * Add bottom sheet package * Fix bundler issues and rename landing package.json * Rename landing package.json * update all packages to latest React * Eject expo app * fix pnpm & expo & monorepo * monorepo debugging * cleanup dependencies & static link to shared packages * cleanup, switch to hermes, pollyfill intl for ios * Cleanup monorepo * Fix: Style for FileItem * Above average app icons * cleanup ios * update msrv * update codeowners for mobile * fix typecheck * update lockfile * fix ffmpeg install * rename UI to 'SpacedriveInterface' for clarity * Update codeowners * Fix eslint config mobile. * Refactor navigation flow, move types to navigators Co-authored-by: Utku <74243531+utkubkr@users.noreply.github.com> Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2022-08-09 03:29:14 +00:00
To run the mobile app:
- Install Java JDK <= 17 for Android
- Java 21 is not compatible: https://github.com/react-native-async-storage/async-storage/issues/1057#issuecomment-1925963956
- Install [Android Studio](https://developer.android.com/studio) for Android and [Xcode](https://apps.apple.com/au/app/xcode/id497799835) for iOS development.
- Run `./scripts/setup.sh mobile`
- This will set up most of the dependencies required to build the mobile app.
- Make sure you have [NDK 26.1.10909125 and CMake](https://developer.android.com/studio/projects/install-ndk#default-version) installed in Android Studio.
- Run the following commands:
- `pnpm mobile android` (runs on Android Emulator)
- In order to have locations working on Android, you must run the following command once the application has been installed for the first time. Otherwise, locations will not work.
- `adb shell appops set --uid com.spacedrive.app MANAGE_EXTERNAL_STORAGE allow`
- Run the following commands to access the logs from `sd-core`.
- `adb shell`
- Then `run-as com.spacedrive.app` to access the app's directory on device.
- Run `cd files/logs` and then select the logs with the timestamp of when you ran the app. Ex: `sd.log.2023-11-28`.
- You can view the logs using `tail -f [log-name]`. Ex: `tail -f sd.log.2023-11-28`.
- `pnpm mobile ios` (runs on iOS Emulator)
- `xcrun simctl launch --console booted com.spacedrive.app` allows you to view the console output of the iOS app from `tracing`. However, the application must be built in `debug` mode for this.
- `pnpm mobile start` (runs the metro bundler only)
### Pull Request
Once you have finished making your changes, create a pull request (PR) to submit them.
- Fill out the "Ready for review" template to help reviewers understand your changes and the purpose of your PR.
- If you are addressing an existing issue, don't forget to [link your PR to the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so that the branch can be updated for merging.
- Once you submit your PR, a team member will review your proposal. They may ask questions or request additional information.
- You may be asked to make changes before the PR can be merged, either through [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. For other changes, you can make them in your fork and commit them to your branch.
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
- If you run into any merge issues, refer to this [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) to help you resolve merge conflicts and other issues.
### Your PR is Merged!
Congratulations! 🎉🎉 The Spacedrive team thanks you for your contribution! ✨
Once your PR is merged, your changes will be included in the next release of the application.
2022-07-31 20:27:16 +00:00
### Common Errors
#### `xcrun: error: unable to find utility "xctest", not a developer tool or in PATH`
This error occurs when Xcode is not installed or when the Xcode command line tools are not in your `PATH`.
To resolve this issue:
2022-07-31 20:27:16 +00:00
- Install Xcode from the macOS App Store or directly from [here](https://xcodereleases.com/) (requires Apple Account).
2022-07-31 20:27:16 +00:00
- Run `xcode-select -s /Applications/Xcode.app/Contents/Developer`.
This command will use Xcode's developer tools instead of macOS's default tools.
2022-07-31 20:27:16 +00:00
#### `unable to lookup item 'PlatformPath'`
If you run into this issue, or similar:
```
error: terminated(1): /us/bin/xcrun --sdk macos --show-sdk-platform-path output :
xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer /CommandLineTools/SDKs/MacOSX.sdk'
```
Port AppImage build to use appimage-builder (#1785) * Initial port to appimage-builder * Almost * Fix appimage build on arm64 * Custom patch for external binaries run under appimage - Disable bubblewrap sandbox when running under appimage - Change cwd to APPDIR when running under appimage * AppImage Works (for the first lunch, then it crashes with Stack Smash 😭) * Fix stack smashing, now AppImage almos fully works \o/ (gstreamer is still broken) - Temporarily disable the volume watcher when running under appimage (Workaround for the stack smash error) - Wrap gnu lic version check for appimage under conditional compile for glibc targets - Add error handling for the justUpdatedCheck - Fix VITE_LANDING_ORIGIN being undefined * On non glibc systems default to runtime/compat * Use glibc version 2.8 instead of 0 for non-gnu systems * Fix video playback not working due to broken GstRegistry * Build and publish new AppImage release artifact - Fix model location when building deb - Improve model path resolution logic - Remove patchelf dependency from setup script - Fix incorrectly ignore gstreamer dependency in AppImage recipe * Fix clippy complaining about `get_path_relative_to_exe` - Read GLIBC_FAKE_VERSION or use 2.8 for musl in appimage (while the code is there, this is not really supported for now) * Remove appimage tauri target from release CI * Remove setup-buildx-action, not relly needed * typo fix * Fix git describe command running on cwd instead of the repo root dir * Attempt fix weird git permissions errors in CI+docker * Pass CI env to docker appimage * Only use git after installing it * Pass target to appimage build script * Fix permission after creating appimage * -_- * Swap envvar with github ci var * Format * Add instruction on how to manually build an AppImage * Fix typos * docs: add note about running podman with `--privileged` if there's a permission denied error * docs: fix typo and link directly to appimage-building `README.md` * refactor: streamline code and make it a bit cleaner --------- Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2024-01-22 10:52:26 +00:00
Ensure that macOS is fully updated, and that you have Xcode installed (via the app store).
Once that has completed, run `xcode-select --install` in the terminal to install the command line tools. If they are already installed, ensure that you update macOS to the latest version available.
Also ensure that Rosetta is installed, as a few of our dependencies require it. You can install Rosetta with `softwareupdate --install-rosetta --agree-to-license`.
### Translations
Check out the [i18n README](interface/locales/README.md) for more information on how to contribute to translations.
### Credits
This CONTRIBUTING.md file was inspired by the [github/docs CONTRIBUTING.md](https://github.com/github/docs/blob/main/CONTRIBUTING.md) file, and we extend our gratitude to the original author.