├── ilist.txt ├── requirements.txt ├── README.md ├── .github └── workflows │ ├── update-ilist.yml │ ├── read_binary.yml │ └── release.yml ├── LICENSE ├── binary_reader.cs ├── make_custom.py └── .gitignore /ilist.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | tqdm 2 | aiohttp 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CrossCore Custom 🚀 2 | 3 | [![Release](https://github.com/wu-vincent/crosscore-custom/actions/workflows/release.yml/badge.svg)][releases] 4 | [![Downloads](https://img.shields.io/github/downloads/wu-vincent/crosscore-custom/total)][releases] 5 | 6 | Welcome! This repository is dedicated to the automated generation of the latest [`custom.zip`][releases] for both Android and iOS 7 | 🔥. 8 | 9 | 欢迎!本仓库包含自动生成的适用于 Android 和 iOS 的最新 [`custom.zip`][releases] 🔥。 10 | 11 | ## Credits 🏆 12 | 13 | - [CrossCore-Internationalizer](https://github.com/AXiX-official/CrossCore-Internationalizer) 14 | 15 | [releases]: https://github.com/wu-vincent/crosscore-custom/releases/latest 16 | -------------------------------------------------------------------------------- /.github/workflows/update-ilist.yml: -------------------------------------------------------------------------------- 1 | name: Update ilist.txt 2 | 3 | on: 4 | schedule: 5 | # Runs at the start of every hour 6 | - cron: '0 * * * *' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | update: 11 | runs-on: ubuntu-latest 12 | 13 | permissions: 14 | contents: write 15 | 16 | steps: 17 | - name: Checkout Code 18 | uses: actions/checkout@v4 19 | with: 20 | token: ${{ secrets.PRIVATE_TOKEN }} 21 | 22 | - name: Download ilist.txt 23 | run: | 24 | curl -o ilist.txt https://cdn.megagamelog.com/cross/release/ilist.txt 25 | 26 | - name: Commit changes 27 | uses: stefanzweifel/git-auto-commit-action@v5 28 | with: 29 | commit_message: Update ilist.txt 30 | -------------------------------------------------------------------------------- /.github/workflows/read_binary.yml: -------------------------------------------------------------------------------- 1 | name: Read Binary 2 | 3 | on: [ workflow_dispatch ] 4 | 5 | jobs: 6 | read-binary: 7 | runs-on: ubuntu-latest 8 | container: 9 | image: mcr.microsoft.com/dotnet/sdk:3.1 10 | strategy: 11 | matrix: 12 | url: [ 13 | 'https://cdn.megagamelog.com/cross/release/android/curr/ver.bytes', 14 | 'https://cdn.megagamelog.com/cross/release/android/curr_1/ver.bytes', 15 | 'https://cdn.megagamelog.com/cross/release/ios/curr_new/ver.bytes', 16 | 'https://cdn.megagamelog.com/cross/release/ios/curr_new_1/ver.bytes', 17 | ] 18 | steps: 19 | - uses: actions/checkout@v4 20 | 21 | - name: Build and Run Application 22 | run: | 23 | run: | 24 | dotnet new console -n BinaryReader --force 25 | cp binary_reader.cs BinaryReader/Program.cs 26 | cd BinaryReader 27 | dotnet run -- "${{ matrix.url }}" 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Vincent (Zhengyu) Wu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /binary_reader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using System.Runtime.Serialization.Formatters.Binary; 5 | using System.IO; 6 | using System.Text.Json; 7 | 8 | namespace BinaryReader 9 | { 10 | class Program 11 | { 12 | static async Task Main(string[] args) 13 | { 14 | if (args.Length > 0) 15 | { 16 | string url = args[0]; 17 | await ReadFromUrl(url); 18 | } 19 | else 20 | { 21 | Console.WriteLine("No URL provided."); 22 | } 23 | } 24 | 25 | private static async Task ReadFromUrl(string url) 26 | { 27 | var httpClient = new HttpClient(); 28 | 29 | try 30 | { 31 | var response = await httpClient.GetStreamAsync(url); 32 | var formatter = new BinaryFormatter(); 33 | var obj = formatter.Deserialize(response); 34 | 35 | string jsonString = JsonSerializer.Serialize(obj, new JsonSerializerOptions { WriteIndented = true }); 36 | Console.WriteLine(jsonString); 37 | } 38 | catch (Exception ex) 39 | { 40 | Console.WriteLine($"Error: {ex.Message}"); 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'ilist.txt' 7 | - '.github/workflows/release.yml' 8 | workflow_dispatch: 9 | 10 | jobs: 11 | make-custom: 12 | runs-on: ubuntu-latest 13 | name: Make custom for ${{ matrix.platform }} 14 | 15 | strategy: 16 | matrix: 17 | platform: [ ios, android ] 18 | 19 | steps: 20 | - name: Checkout Code 21 | uses: actions/checkout@v4 22 | 23 | - name: Set up Python 24 | uses: actions/setup-python@v5 25 | with: 26 | python-version: '3.11' 27 | 28 | - name: Install Dependencies 29 | run: | 30 | python -m pip install --upgrade pip 31 | pip install -r requirements.txt 32 | 33 | - name: Run Python script 34 | run: python make_custom.py ${{ matrix.platform }} 35 | 36 | - name: Upload Artifacts 37 | uses: actions/upload-artifact@v3 38 | with: 39 | name: custom 40 | path: custom-*.zip 41 | 42 | release: 43 | name: Release 44 | needs: make-custom 45 | runs-on: ubuntu-latest 46 | permissions: 47 | contents: write 48 | 49 | steps: 50 | - name: Get Current Date 51 | id: date 52 | run: | 53 | echo "DATE=$(python -c 'from datetime import date; print(date.today().isoformat())')" >> $GITHUB_ENV 54 | 55 | - name: Download Artifacts 56 | uses: actions/download-artifact@v3 57 | with: 58 | name: custom 59 | path: . 60 | 61 | - name: Generate Checksums 62 | uses: jmgilman/actions-generate-checksum@v1 63 | with: 64 | patterns: custom-*.zip 65 | 66 | - name: Create Release 67 | uses: softprops/action-gh-release@v1 68 | with: 69 | name: ${{ env.DATE }} 70 | tag_name: ${{ env.DATE }} 71 | files: | 72 | custom-*.zip 73 | checksum.txt -------------------------------------------------------------------------------- /make_custom.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import asyncio 3 | import logging 4 | import os 5 | import shutil 6 | import tempfile 7 | 8 | import aiohttp 9 | import tqdm.asyncio 10 | import tqdm.contrib.logging 11 | 12 | base_urls = { 13 | "android": "https://cdn.megagamelog.com/cross/release/android/curr_1/Custom/", 14 | "ios": "https://cdn.megagamelog.com/cross/release/ios/curr_new_1/Custom/", 15 | } 16 | logger = logging.getLogger(__name__) 17 | 18 | 19 | async def download_file(session, url, path): 20 | async with session.get(url) as response: 21 | if response.status == 200: # Check if the response is OK 22 | with open(path, 'wb') as f: 23 | f.write(await response.read()) 24 | else: 25 | logger.warning(f"Skipping {url}, received status code: {response.status}") 26 | 27 | 28 | async def main(platform: str): 29 | assert platform in base_urls.keys() 30 | 31 | with open("ilist.txt", "r", encoding='utf-8-sig') as file: 32 | items = file.read().split(',') 33 | 34 | with tempfile.TemporaryDirectory() as temp_dir: 35 | with tqdm.contrib.logging.logging_redirect_tqdm(): 36 | custom_dir = os.path.join(temp_dir, 'Custom') 37 | os.makedirs(custom_dir, exist_ok=True) 38 | 39 | async with aiohttp.ClientSession() as session: 40 | tasks = [] 41 | for item in items: 42 | url = base_urls[platform] + item 43 | path = os.path.join(custom_dir, item) 44 | tasks.append(download_file(session, url, path)) 45 | 46 | for f in tqdm.asyncio.tqdm.as_completed(tasks): 47 | await f 48 | 49 | shutil.make_archive(f'custom-{platform}', 'zip', temp_dir, 'Custom') 50 | 51 | 52 | if __name__ == "__main__": 53 | parser = argparse.ArgumentParser() 54 | parser.add_argument("platform", help="Specify the platform (android or ios)") 55 | args = parser.parse_args() 56 | 57 | asyncio.run(main(args.platform)) 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | .idea/ 161 | 162 | # Custom files 163 | custom-*.zip 164 | --------------------------------------------------------------------------------