-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a005429
Showing
473 changed files
with
38,120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Normalize EOL for all files that Git considers text files. | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script ensures proper POSIX text file formatting and a few other things. | ||
|
||
set -uo pipefail | ||
IFS=$'\n\t' | ||
|
||
# Loops through all text files tracked by Git. | ||
git grep -zIl '' | | ||
while IFS= read -rd '' f; do | ||
# Exclude some types of files. | ||
if [[ "$f" == *"svg" ]]; then | ||
continue | ||
fi | ||
# Ensure that files are UTF-8 formatted. | ||
recode UTF-8 "$f" 2> /dev/null | ||
# Ensure that files have LF line endings and do not contain a BOM. | ||
dos2unix "$f" 2> /dev/null | ||
# Remove trailing space characters and ensure that files end | ||
# with newline characters. -l option handles newlines conveniently. | ||
perl -i -ple 's/ *$//g' "$f" | ||
# Remove the character sequence "== true" if it has a leading space. | ||
perl -i -pe 's/\x20== true//g' "$f" | ||
# We don't want to change lines around braces in godot/tscn files. | ||
if [[ "$f" == *"godot" ]]; then | ||
continue | ||
elif [[ "$f" == *"tscn" ]]; then | ||
continue | ||
fi | ||
# Disallow empty lines after the opening brace. | ||
sed -z -i 's/\x7B\x0A\x0A/\x7B\x0A/g' "$f" | ||
# Disallow some empty lines before the closing brace. | ||
sed -z -i 's/\x0A\x0A\x7D/\x0A\x7D/g' "$f" | ||
done | ||
|
||
git diff > patch.patch | ||
FILESIZE="$(stat -c%s patch.patch)" | ||
MAXSIZE=5 | ||
|
||
# If no patch has been generated all is OK, clean up, and exit. | ||
if (( FILESIZE < MAXSIZE )); then | ||
printf "Files in this commit comply with the formatting rules.\n" | ||
rm -f patch.patch | ||
exit 0 | ||
fi | ||
|
||
# A patch has been created, notify the user, clean up, and exit. | ||
printf "\n*** The following differences were found between the code " | ||
printf "and the formatting rules:\n\n" | ||
cat patch.patch | ||
printf "\n*** Aborting, please fix the formatting issue(s).'\n" | ||
rm -f patch.patch | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
name: build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
# Which godot version to use for exporting. | ||
GODOT_VERSION: 4.3 | ||
# Which godot release to use for exporting. (stable/rc/beta/alpha) | ||
GODOT_RELEASE: stable | ||
# Used in the editor config file name. Do not change this for patch releases. | ||
GODOT_FEATURE_VERSION: 4.3 | ||
# Commit hash | ||
GODOT_COMMIT_HASH: 77dcf97 | ||
PROJECT_NAME: GodSVG | ||
GODOT_REPO: https://github.com/godotengine/godot.git | ||
BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes | ||
|
||
jobs: | ||
format: | ||
name: File formatting (file_format.sh) | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update -qq && sudo apt-get install -yq --no-install-recommends dos2unix recode | ||
|
||
- name: File formatting checks (file_format.sh) | ||
run: bash ./.github/file_format.sh | ||
|
||
build-android: | ||
name: Export for Android | ||
runs-on: ubuntu-latest | ||
env: | ||
PLATFORM: "Android" | ||
steps: | ||
- name: Cache Template | ||
id: cache-template | ||
uses: actions/cache@v3 | ||
with: | ||
key: template-${{ env.PLATFORM }}-${{ env.GODOT_VERSION }}-${{ env.GODOT_RELEASE }}-${{ env.BUILD_OPTIONS }} | ||
path: | | ||
~/.local/share/godot/export_templates/ | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
|
||
- name: Set up Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Check Installed Android SDK Packages | ||
run: | | ||
echo "Checking installed Android SDK packages..." | ||
/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --list_installed | ||
- name: Set up Godot Editor | ||
run: | | ||
mkdir -p ~/godot-editor | ||
cd ~/godot-editor | ||
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip | ||
unzip Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip | ||
mv ./Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64 ~/godot-editor/godot | ||
echo "~/godot-editor" >> $GITHUB_PATH | ||
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | ||
name: Install dependencies | ||
run: sudo apt-get install -y scons python3 | ||
|
||
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | ||
name: Clone Godot repository | ||
run: git clone $GODOT_REPO godot | ||
|
||
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | ||
name: Checkout specific commit | ||
run: | | ||
cd godot | ||
git fetch | ||
git checkout $GODOT_COMMIT_HASH | ||
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | ||
name: Build Godot template for Android | ||
run: | | ||
cd godot | ||
scons p=android arch=arm64 generate_apk=yes ${BUILD_OPTIONS} target=template_debug | ||
mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/ | ||
mv ./bin/android_debug.apk ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_debug.apk | ||
mv ./bin/android_source.zip ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_source.zip | ||
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' && github.event_name == 'workflow_dispatch' }} | ||
name: Build Godot release template for Android | ||
run: | | ||
cd godot | ||
scons p=android arch=arm64 generate_apk=yes ${BUILD_OPTIONS} target=template_release | ||
mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/ | ||
mv ./bin/android_debug.apk ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_release.apk | ||
mv ./bin/android_source.zip ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_source.zip | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: godsvg | ||
|
||
- name: Export debug project | ||
env: | ||
GODOT_ANDROID_KEYSTORE_DEBUG_PATH: "./godot_only/debug.keystore" | ||
GODOT_ANDROID_KEYSTORE_DEBUG_USER: "androiddebugkey" | ||
GODOT_ANDROID_KEYSTORE_DEBUG_PASSWORD: "android" | ||
run: | | ||
cd godsvg | ||
mkdir -p build/android | ||
godot --headless --export-debug "Android" build/android/GodSVG-debug.apk | ||
- name: Export release project | ||
if: github.event_name == 'workflow_dispatch' | ||
env: | ||
GODOT_ANDROID_KEYSTORE_RELEASE_PATH: "/tmp/release.keystore" | ||
GODOT_ANDROID_KEYSTORE_RELEASE_USER: ${{ secrets.KEY_ALIAS }} | ||
GODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | ||
run: | | ||
cd godsvg | ||
mkdir -p build/android | ||
echo "${{ secrets.KEYSTORE }}" | base64 -d > /tmp/release.keystore | ||
godot --headless --export-release "Android" build/android/GodSVG.apk | ||
- name: Upload debug artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.PROJECT_NAME }}.debug.Android | ||
path: godsvg/build/android/GodSVG-debug.apk | ||
if-no-files-found: error | ||
retention-days: 28 | ||
|
||
- name: Upload release artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.PROJECT_NAME }}.release.Android | ||
path: godsvg/build/android/GodSVG.apk | ||
if-no-files-found: ignore | ||
retention-days: 28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Godot 4+ specific ignores | ||
.godot/ | ||
.DS_Store | ||
|
||
# Imported translations (automatically generated from CSV files) | ||
*.translation | ||
.~lock.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## Governance | ||
|
||
Your contribution is always appreciated! | ||
|
||
Contributions don't need to be perfect, but they must move GodSVG in the right direction. If you are planning to implement a feature or overhaul a system, it's important to write a proposal and discuss your ideas. I will try to quickly accept or decline them. Please do understand that PRs with a large maintenance cost may be under high scrutiny because of their long-term responsibility, even in the absence of the original contributor. | ||
|
||
## Setup | ||
|
||
GodSVG is made in Godot using its GDScript language. Refer to the [README](https://github.com/MewPurPur/GodSVG?tab=readme-ov-file#how-to-get-it) on how to get GodSVG running. | ||
|
||
Git must be configured, then you can clone the repository to your local machine: `git clone [email protected]:MewPurPur/GodSVG.git` | ||
|
||
The documentation won't go into detail about how to use Git. Refer to outside resources if you are unfamiliar with it. | ||
|
||
## PR workflow | ||
|
||
Look through the list of issues to see if your contribution would resolve any of them. If said issue is not assigned to anyone and you don't want anyone else to work on it, ask to be assigned to the issue. If an issue doesn't exist and you want to fix a bug, then it's a good practice, but not required, to make an issue for it. | ||
|
||
1. Fork the repository. | ||
2. Create a new branch: `git checkout -b implement-gradients` | ||
3. Make your modifications, add them with `git add .` | ||
4. Commit your changes: `git commit -m "Implement linear gradients"` | ||
5. Push to the branch: `git push origin implement-gradients` | ||
6. Create a new pull request with a clear and informative title and describe your changes. | ||
|
||
This is the preferred workflow, but tidiness is not as important as work being done, so feel free to do something different you may be comfortable with. | ||
|
||
After submitting your pull request, I (MewPurPur) will review your changes and may provide feedback or request modifications. Be responsive to any comments or suggestions. Once your pull request is approved, it will be merged. Afterward, you can delete your branch from your fork. | ||
|
||
## Translation | ||
|
||
Editing translations is explained [here](translations/README.md) | ||
|
||
## Code guidelines | ||
|
||
To document some quirks of our code that we've decided on: | ||
|
||
- StringNames are avoided when possible. We do this because it makes the codebase simpler, although if something is actually shown to be performance-critical, it can be reconsidered. | ||
- Nodes may only be exported if their runtime structure isn't known. | ||
- Translating is done via `TranslationServer.translate()` rather than `tr()`. We've decided to stick to this everywhere because `tr()` doesn't work in static contexts. | ||
|
||
## Code style | ||
|
||
For scripts, only GDScript code is allowed. Follow the [GDScript style guide](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html). Most of its rules are enforced here. Additionally: | ||
|
||
- Static typing is predominantly used. | ||
- Comments are normally written like sentences with punctuation. | ||
- Two spaces are used to separate code and inline comments. | ||
- For empty lines in the middle of indented blocks, the scope's indentation is kept. | ||
- Class names use `class_name X extends Y` syntax. | ||
|
||
Don't make pull requests for code style changes without discussing them first (unless it's for corrections to abide by the ones described here). Pull requests may also get production tweaks to fix their style before being merged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# GodSVG Contributors | ||
|
||
This project is made possible by the contributions of the following individuals: | ||
|
||
### Original Author | ||
- **MewPurPur** - Project Founder and Manager | ||
|
||
### Contributors | ||
- Aaron Franke (aaronfranke) | ||
- ajreckof | ||
- aladvs | ||
- Alex2782 | ||
- DevPoodle | ||
- ilikefrogs101 | ||
- itycodes | ||
- Kiisu-Master | ||
- MewPurPur | ||
- Qainguin | ||
- Serem Titus (SeremTitus) | ||
- Swarkin | ||
- thiagola92 | ||
- Tom Blackwell (Volts-s) | ||
- WeaverSong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
MIT License | ||
|
||
Copyright (c) 2025 Anish Mishra | ||
Copyright (c) 2023 MewPurPur | ||
Copyright (c) 2023-present GodSVG contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# GodSVG Mobile | ||
|
||
<p align="center"> | ||
<img src="godot_only/source_assets/splash.svg" width="480" alt="GodSVG logo"> | ||
</p> | ||
|
||
**GodSVG Mobile** brings the power of the **GodSVG** to your Android device, allowing you to edit Scalable Vector Graphics (SVG) files directly on mobile. This version is optimized for touch-based interaction, providing an intuitive and mobile-friendly interface for editing SVG files. | ||
|
||
For the desktop version of GodSVG, please visit the [GodSVG repository](https://github.com/MewPurPur/GodSVG). | ||
|
||
>[!IMPORTANT] | ||
>This is still in development and may have bugs. Your feedback is appreciated! | ||
## Installation | ||
|
||
Download the latest release of the Android version from the [releases](https://github.com/syntaxerror247/GodSVG-Mobile/releases). | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"project_founder_and_manager": [], | ||
"authors": [], | ||
"donors": [], | ||
"anonymous_donors": 0, | ||
"golden_donors": [], | ||
"anonymous_golden_donors": 0, | ||
"diamond_donors": [], | ||
"anonymous_diamond_donors": 0, | ||
"past_donors": [], | ||
"past_anonymous_donors": 0, | ||
"past_golden_donors": [], | ||
"past_anonymous_golden_donors": 0, | ||
"past_diamond_donors": [], | ||
"past_anonymous_diamond_donors": 0 | ||
} |
Oops, something went wrong.