Compare commits
No commits in common. "master" and "ios" have entirely different histories.
|
@ -1,171 +0,0 @@
|
|||
name: Build apps
|
||||
|
||||
on:
|
||||
[push, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
buildandroid:
|
||||
name: Build Android app
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get repository code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: android
|
||||
|
||||
- name: Build Android app
|
||||
run: chmod +x gradlew && ./gradlew assembleWebview
|
||||
|
||||
- name: Upload Android build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-android.apk
|
||||
path: app/build/outputs/apk/webview/release/app-webview-release-unsigned.apk
|
||||
|
||||
buildios:
|
||||
name: Build iOS app
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Get repository code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ios
|
||||
|
||||
- name: Install Cordova
|
||||
run: npm install cordova -g
|
||||
|
||||
- name: Add iOS platform
|
||||
run: cordova platform add ios && npm install cordova-icon
|
||||
|
||||
- name: Build iOS app
|
||||
run: cordova build ios --target iPhone-8
|
||||
|
||||
- name: Make .ipa Archive
|
||||
run: cd platforms/ios/build/emulator && mkdir Payload && mv Kitsune.app Payload && zip -r kitsune-ios.ipa Payload
|
||||
|
||||
- name: Upload iOS app
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: kitsune-ios.ipa
|
||||
path: platforms/ios/build/emulator/kitsune-ios.ipa
|
||||
|
||||
buildnw:
|
||||
name: Build NW.js apps
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get repository code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Create build directory
|
||||
run: mkdir build
|
||||
|
||||
- name: Download Windows x64 NW.js
|
||||
run: wget https://dl.nwjs.io/v0.66.1/nwjs-v0.66.1-win-x64.zip
|
||||
|
||||
- name: Download Windows ia32 NW.js
|
||||
run: wget https://dl.nwjs.io/v0.66.1/nwjs-v0.66.1-win-ia32.zip
|
||||
|
||||
- name: Download Linux x64 NW.js
|
||||
run: wget https://dl.nwjs.io/v0.66.1/nwjs-v0.66.1-linux-x64.tar.gz
|
||||
|
||||
- name: Download Linux ia32 NW.js
|
||||
run: wget https://dl.nwjs.io/v0.66.1/nwjs-v0.66.1-linux-ia32.tar.gz
|
||||
|
||||
- name: Download MacOS NW.js
|
||||
run: wget https://dl.nwjs.io/v0.66.1/nwjs-v0.66.1-osx-x64.zip
|
||||
|
||||
- name: Extract Windows x64 NW.js
|
||||
run: unzip nwjs-v0.66.1-win-x64.zip
|
||||
|
||||
- name: Extract Windows ia32 NW.js
|
||||
run: unzip nwjs-v0.66.1-win-ia32.zip
|
||||
|
||||
- name: Extract Linux x64 NW.js
|
||||
run: tar -xvf nwjs-v0.66.1-linux-x64.tar.gz
|
||||
|
||||
- name: Extract Linux ia32 NW.js
|
||||
run: tar -xvf nwjs-v0.66.1-linux-ia32.tar.gz
|
||||
|
||||
- name: Extract MacOS NW.js
|
||||
run: unzip nwjs-v0.66.1-osx-x64.zip
|
||||
|
||||
- name: Delete archives
|
||||
run: rm nwjs-v0.66.1-linux-x64.tar.gz nwjs-v0.66.1-win-x64.zip nwjs-v0.66.1-linux-ia32.tar.gz nwjs-v0.66.1-win-ia32.zip nwjs-v0.66.1-osx-x64.zip
|
||||
|
||||
- name: Rename and move NW.js directories
|
||||
run: mv nwjs-v0.66.1-linux-x64 build/KitsuneOffline-linux-x64 && mv nwjs-v0.66.1-win-x64 build/KitsuneOffline-win-x64 && mv nwjs-v0.66.1-linux-ia32 build/KitsuneOffline-linux-ia32 && mv nwjs-v0.66.1-win-ia32 build/KitsuneOffline-win-ia32 && mv nwjs-v0.66.1-osx-x64/nwjs.app build/Kitsune.app
|
||||
|
||||
- name: Create package.nw directories
|
||||
run: mkdir build/KitsuneOffline-linux-x64/package.nw && mkdir build/KitsuneOffline-win-x64/package.nw && mkdir build/KitsuneOffline-linux-ia32/package.nw && mkdir build/KitsuneOffline-win-ia32/package.nw && mkdir build/Kitsune.app/Contents/Resources/app.nw
|
||||
|
||||
- name: Copy NW.js directories
|
||||
run: cp -r logos build/KitsuneOffline-linux-x64/package.nw && cp -r logos build/KitsuneOffline-win-x64/package.nw && cp -r logos build/KitsuneOffline-linux-ia32/package.nw && cp -r logos build/KitsuneOffline-win-ia32/package.nw && cp -r logos build/Kitsune.app/Contents/Resources/app.nw && cp -r gstatic build/KitsuneOffline-linux-x64/package.nw && cp -r gstatic build/KitsuneOffline-win-x64/package.nw && cp -r gstatic build/KitsuneOffline-linux-ia32/package.nw && cp -r gstatic build/KitsuneOffline-win-ia32/package.nw && cp -r gstatic build/Kitsune.app/Contents/Resources/app.nw && cp -r silica build/KitsuneOffline-linux-x64/package.nw && cp -r silica build/KitsuneOffline-win-x64/package.nw && cp -r silica build/KitsuneOffline-linux-ia32/package.nw && cp -r silica build/KitsuneOffline-win-ia32/package.nw && cp -r silica build/Kitsune.app/Contents/Resources/app.nw
|
||||
|
||||
- name: Copy package.json to NW.js directories
|
||||
run: cp package.json build/KitsuneOffline-linux-x64/package.nw && cp package.json build/KitsuneOffline-win-x64/package.nw && cp package.json build/KitsuneOffline-linux-ia32/package.nw && cp package.json build/KitsuneOffline-win-ia32/package.nw && cp package.json build/Kitsune.app/Contents/Resources/app.nw
|
||||
|
||||
- name: Rename executables
|
||||
run: mv build/KitsuneOffline-linux-x64/nw build/KitsuneOffline-linux-x64/kitsune && mv build/KitsuneOffline-linux-ia32/nw build/KitsuneOffline-linux-ia32/kitsune && mv build/KitsuneOffline-win-x64/nw.exe build/KitsuneOffline-win-x64/kitsune.exe && mv build/KitsuneOffline-win-ia32/nw.exe build/KitsuneOffline-win-ia32/kitsune.exe
|
||||
|
||||
- name: Create Debian installer file structure
|
||||
run: mkdir build/KitsuneOffline-debian-x64 && mkdir build/KitsuneOffline-debian-x64/usr && mkdir mkdir build/KitsuneOffline-debian-x64/DEBIAN && mkdir build/KitsuneOffline-debian-x64/usr/bin && mkdir build/KitsuneOffline-debian-x64/usr/lib && mkdir build/KitsuneOffline-debian-x64/usr/share && mkdir build/KitsuneOffline-debian-x64/usr/share/applications
|
||||
|
||||
- name: Copy Linux build to Debian installer
|
||||
run: cp -r build/KitsuneOffline-linux-x64 build/KitsuneOffline-debian-x64/usr/lib
|
||||
|
||||
- name: Create Symlink to command
|
||||
run: cd build/KitsuneOffline-debian-x64/usr/bin && ln -s ../lib/KitsuneOffline-linux-x64/kitsune
|
||||
|
||||
- name: Copy control file
|
||||
run: cp DEBIAN/control build/KitsuneOffline-debian-x64/DEBIAN
|
||||
|
||||
- name: Copy desktop file
|
||||
run: cp kitsune.desktop build/KitsuneOffline-debian-x64/usr/share/applications
|
||||
|
||||
- name: Create Debian installer
|
||||
run: cd build && dpkg-deb --build KitsuneOffline-debian-x64
|
||||
|
||||
- name: Create Windows archives
|
||||
run: cd build && zip -r KitsuneOffline-win-x64.zip KitsuneOffline-win-x64 && zip -r KitsuneOffline-win-ia32.zip KitsuneOffline-win-ia32
|
||||
|
||||
- name: Create Linux archives
|
||||
run: cd build && tar -czvf KitsuneOffline-linux-x64.tar.gz KitsuneOffline-linux-x64 && tar -czvf KitsuneOffline-linux-ia32.tar.gz KitsuneOffline-linux-ia32
|
||||
|
||||
- name: Create MacOS archive
|
||||
run: cd build && zip -r KitsuneOffline-osx.zip Kitsune.app
|
||||
|
||||
- name: Upload Windows x64 build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-win-x64.zip
|
||||
path: build/KitsuneOffline-win-x64.zip
|
||||
|
||||
- name: Upload Linux x64 build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-linux-x64.tar.gz
|
||||
path: build/KitsuneOffline-linux-x64.tar.gz
|
||||
|
||||
- name: Upload Windows ia32 build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-win-ia32.zip
|
||||
path: build/KitsuneOffline-win-ia32.zip
|
||||
|
||||
- name: Upload Linux ia32 build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-linux-ia32.tar.gz
|
||||
path: build/KitsuneOffline-linux-ia32.tar.gz
|
||||
|
||||
- name: Upload Debian installer build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-debian-x64.deb
|
||||
path: build/KitsuneOffline-debian-x64.deb
|
||||
|
||||
- name: Upload MacOS build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: KitsuneOffline-osx.zip
|
||||
path: build/KitsuneOffline-osx.zip
|
|
@ -1 +1,9 @@
|
|||
build/*
|
||||
.DS_Store
|
||||
|
||||
# Generated by package manager
|
||||
node_modules/
|
||||
package-lock.json
|
||||
|
||||
# Generated by Cordova
|
||||
/plugins/
|
||||
/platforms/
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/KitsuneOffline.iml" filepath="$PROJECT_DIR$/.idea/KitsuneOffline.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
Package: kitsune
|
||||
Version: 1.0
|
||||
Section: custom
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Maintainer: Lennon McLean
|
||||
Description: An offline version of Google's Kitsune doodle game.
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="tk.lennonswebsite.KitsuneOffline" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>Kitsune</name>
|
||||
<description>
|
||||
Google's Kitsune doodle, but offline and mobile.
|
||||
</description>
|
||||
<author email="lmmclean08@gmail.com" href="https://lennons-website.herokuapp.com">
|
||||
Lennon McLean
|
||||
</author>
|
||||
<content src="logos/run.html" />
|
||||
<access origin="*" />
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<allow-intent href="tel:*" />
|
||||
<allow-intent href="sms:*" />
|
||||
<allow-intent href="mailto:*" />
|
||||
<allow-intent href="geo:*" />
|
||||
<platform name="android">
|
||||
<allow-intent href="market:*" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<allow-intent href="itms:*" />
|
||||
<allow-intent href="itms-apps:*" />
|
||||
</platform>
|
||||
</widget>
|
|
@ -1,9 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Kitsune
|
||||
Comment=An offline version of Google's Kitsune doodle game.
|
||||
Exec=kitsune
|
||||
Icon=/usr/lib/kitsune-linux-x64/package.nw/logos/favicon.ico
|
||||
Terminal=false
|
||||
Categories=Game;
|
30
package.json
|
@ -1,10 +1,24 @@
|
|||
{
|
||||
"name": "Kitsune",
|
||||
"main": "silica/run.html",
|
||||
"window": {
|
||||
"title": "Kitsune",
|
||||
"width": 960,
|
||||
"height": 544,
|
||||
"icon":"silica/icon.png"
|
||||
}
|
||||
"name": "tk.lennonswebsite.kitsuneoffline",
|
||||
"displayName": "Kitsune",
|
||||
"version": "1.0.0",
|
||||
"description": "A sample Apache Cordova application that responds to the deviceready event.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [
|
||||
"ecosystem:cordova"
|
||||
],
|
||||
"author": "Apache Cordova Team",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"cordova-plugin-whitelist": "^1.3.4"
|
||||
},
|
||||
"cordova": {
|
||||
"plugins": {
|
||||
"cordova-plugin-whitelist": {}
|
||||
},
|
||||
"platforms": []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,249 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Kitsune Configurator</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
<h1>Kitsune Configurator</h1>
|
||||
<hr>
|
||||
<b>VERSION:</b><br>
|
||||
<select id="version">
|
||||
</select><br>
|
||||
<button onclick="downloadNewVersion()">Download a new version</button>
|
||||
<div id="downloadInfo">
|
||||
</div>
|
||||
<hr>
|
||||
<b>LANGUAGE:</b><br>
|
||||
<select id="language">
|
||||
<option value="af">Afrikaans</option>
|
||||
<option value="am">Amharic</option>
|
||||
<option value="ar">Arabic</option>
|
||||
<option value="az">Azerbaijani</option>
|
||||
<option value="be">Belarusian</option>
|
||||
<option value="bg">Bulgarian</option>
|
||||
<option value="bn">Bengali</option>
|
||||
<option value="bs">Bosnian</option>
|
||||
<option value="ca">Catalan; Valencian</option>
|
||||
<option value="cs">Czech</option>
|
||||
<option value="da">Danish</option>
|
||||
<option value="de">German</option>
|
||||
<option value="el">Greek, Modern</option>
|
||||
<option value="en-GB">English (UK)</option>
|
||||
<option value="en" selected>English (US)</option>
|
||||
<option value="es">Spanish; Castilian</option>
|
||||
<option value="et">Estonian</option>
|
||||
<option value="eu">Basque</option>
|
||||
<option value="fa">Persian</option>
|
||||
<option value="fi">Finnish</option>
|
||||
<option value="fr">French</option>
|
||||
<option value="gl">Galician</option>
|
||||
<option value="gu">Gujarati</option>
|
||||
<option value="hi">Hindi</option>
|
||||
<option value="hr">Croatian</option>
|
||||
<option value="hu">Hungarian</option>
|
||||
<option value="hy">Armenian</option>
|
||||
<option value="id">Indonesian</option>
|
||||
<option value="is">Icelandic</option>
|
||||
<option value="it">Italian</option>
|
||||
<option value="iw">Hebrew</option>
|
||||
<option value="ja">Japanese</option>
|
||||
<option value="ka">Georgian</option>
|
||||
<option value="kk">Kazakh</option>
|
||||
<option value="km">Khmer</option>
|
||||
<option value="kn">Kannada</option>
|
||||
<option value="ko">Korean</option>
|
||||
<option value="ky">Kirghiz, Kyrgyz</option>
|
||||
<option value="lo">Lao</option>
|
||||
<option value="lt">Lithuanian</option>
|
||||
<option value="lv">Latvian</option>
|
||||
<option value="mk">Macedonian</option>
|
||||
<option value="ml">Malayalam</option>
|
||||
<option value="mn">Mongolian</option>
|
||||
<option value="mr">Marathi (Marāṭhī)</option>
|
||||
<option value="ms">Malay</option>
|
||||
<option value="my">Burmese</option>
|
||||
<option value="ne">Nepali</option>
|
||||
<option value="nl">Dutch</option>
|
||||
<option value="no">Norwegian</option>
|
||||
<option value="pa">Panjabi, Punjabi</option>
|
||||
<option value="pl">Polish</option>
|
||||
<option value="pt-BR">Portuguese (Brazil)</option>
|
||||
<option value="pt-PT">Portuguese (Europe)</option>
|
||||
<option value="ro">Romanian, Moldavan</option>
|
||||
<option value="ru">Russian</option>
|
||||
<option value="si">Sinhala, Sinhalese</option>
|
||||
<option value="sk">Slovak</option>
|
||||
<option value="sl">Slovene</option>
|
||||
<option value="sq">Albanian</option>
|
||||
<option value="sr">Serbian</option>
|
||||
<option value="sv">Swedish</option>
|
||||
<option value="sw">Swahili</option>
|
||||
<option value="ta">Tamil</option>
|
||||
<option value="te">Telugu</option>
|
||||
<option value="th">Thai</option>
|
||||
<option value="tr">Turkish</option>
|
||||
<option value="uk">Ukrainian</option>
|
||||
<option value="ur">Urdu</option>
|
||||
<option value="uz">Uzbek</option>
|
||||
<option value="vi">Vietnamese</option>
|
||||
<option value="zh-CN">Chinese (Simplified)</option>
|
||||
<option value="zh-HK">Chinese (Traditional, Hong Kong)</option>
|
||||
<option value="zh-TW">Chinese (Traditional)</option>
|
||||
<option value="zu">Zulu</option>
|
||||
</select>
|
||||
<br>
|
||||
<hr>
|
||||
<b>SAVEDATA:</b><br>
|
||||
<button onclick="exportSave()">Export Savefile</button>
|
||||
<button onclick="importSave()">Import Savefile</button>
|
||||
<hr>
|
||||
<br>
|
||||
<button onclick="save()" id="startButton">Start Game</button>
|
||||
<br>
|
||||
<h2>Press F10 to return to this config menu</h2>
|
||||
</center>
|
||||
|
||||
<script>
|
||||
const allGameFiles = ["kitsune20.html", "messages.kn.nocache.json" ,"rugby-sprite.png" ,"overworld.ogg" ,"messages.iw.nocache.json" ,"cta.png" ,"cta_play.png" ,"rock.mp3" ,"messages.it.nocache.json" ,"CTA-Archery-174787996-174787824.png" ,"messages.th.nocache.json" ,"CTA-Opening-144867217-174787752-174787825-192413481.png" ,"messages.da.nocache.json" ,"messages.tr.nocache.json" ,"messages.ca.nocache.json" ,"pingpongintro.mp4" ,"messages.fi.nocache.json" ,"messages.ar.nocache.json" ,"messages.pl.nocache.json" ,"climbingoutro.mp4" ,"swim-sprite.png" ,"messages.pt-BR.nocache.json" ,"messages.sq.nocache.json" ,"messages.mn.nocache.json" ,"messages.sv.nocache.json" ,"skate.ogg" ,"messages.gl.nocache.json" ,"ballad.ogg" ,"ballad.mp3" ,"messages.ne.nocache.json" ,"swimoutro.mp4" ,"messages.ms.nocache.json" ,"messages.af.nocache.json" ,"climbing-sprite.png" ,"preload-sprite.png" ,"messages.ja.nocache.json" ,"messages.ml.nocache.json" ,"kitsune20.js" ,"messages.lo.nocache.json" ,"shared.ogg" , "swimintro.mp4" ,"messages.zh-CN.nocache.json" ,"messages.mr.nocache.json" ,"messages.en.nocache.json" ,"messages.no.nocache.json" ,"messages.km.nocache.json" ,"messages.de.nocache.json" ,"pingpongoutro.mp4" ,"messages.es-419.nocache.json" ,"CTA-Closing-174787829-192414335.png" ,"messages.am.nocache.json" ,"CTA-CenteredPlayButtonFrame2.png" ,"climbing.ogg" ,"CTA-Marathon-174788017-174787794.png" ,"ddr.ogg" ,"disco.mp3" ,"archeryoutro.mp4" ,"messages.hy.nocache.json" ,"messages.eu.nocache.json" ,"pingpong.ogg" ,"archeryintro.mp4" ,"cutscene-sprite.png" ,"video-sprite.png" ,"messages.is.nocache.json" ,"archery.mp3" ,"messages.be.nocache.json" ,"messages.bs.nocache.json" ,"disco.ogg" ,"ddr.mp3" ,"skateoutro.mp4" ,"pingpong.mp3" ,"messages.el.nocache.json" ,"marathon-sprite.png" ,"messages.zu.nocache.json" ,"rugbyoutro.mp4" ,"outro.mp4" ,"messages.pa.nocache.json" ,"climbing.mp3" ,"messages.hr.nocache.json" ,"messages.bn.nocache.json" ,"messages.sw.nocache.json" ,"archery.ogg" ,"overworld-sprite.png" ,"messages.ur.nocache.json" ,"messages.mk.nocache.json" ,"marathonintro.mp4" ,"messages.sk.nocache.json" ,"rock.ogg" ,"marathonoutro.mp4" ,"messages.et.nocache.json" ,"messages.pt-PT.nocache.json" ,"messages.zh-TW.nocache.json" ,"messages.uk.nocache.json" ,"messages.fa.nocache.json" ,"messages.si.nocache.json" ,"messages.es.nocache.json" ,"pingpong-sprite.png" ,"messages.ky.nocache.json" ,"CTA-OffsetPlayButtonFrame1.png" ,"messages.cs.nocache.json" ,"CTA-OffsetPlayButtonFrame2.png" ,"shared.mp3" ,"marathon.mp3" ,"intro.mp4" ,"messages.uz.nocache.json" ,"messages.hi.nocache.json" ,"messages.nl.nocache.json" ,"CTA-Skateboarding-174787927.png" ,"marathon.ogg" ,"overworld.mp3" ,"archery-sprite.png" ,"messages.lt.nocache.json" ,"messages.kk.nocache.json" ,"kitsune_compiled_deferred_module.js" ,"skate.mp3" ,"messages.en-GB.nocache.json" ,"messages.bg.nocache.json" ,"CTA-Swimming-174787828-174787766.png" ,"messages.my.nocache.json" ,"messages.hu.nocache.json" ,"messages.ru.nocache.json" ,"skate-sprite.png" ,"CTA-CenteredPlayButtonFrame1.png" ,"messages.te.nocache.json" ,"messages.zh-HK.nocache.json" ,"messages.lv.nocache.json" ,"rugbyintro.mp4" ,"messages.ko.nocache.json" ,"rugby.mp3" ,"CTA_Climbing-174787997.png" ,"messages.ro.nocache.json" ,"shared-sprite.png" ,"messages.ta.nocache.json" ,"messages.vi.nocache.json" ,"messages.sl.nocache.json" ,"messages.ka.nocache.json" ,"messages.fr.nocache.json" ,"climbingintro.mp4" ,"CTA-Rugby-174787947-174787773.png" ,"skateintro.mp4" ,"messages.gu.nocache.json" ,"messages.id.nocache.json" ,"rugby.ogg" ,"CTA-TableTennis-174787827-174787820.png" ,"messages.az.nocache.json" ,"messages.sr.nocache.json"];
|
||||
const fs = require('fs');
|
||||
const http = require('https');
|
||||
var totalDownloaded = 0;
|
||||
|
||||
exportSave = function(){
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(btoa(JSON.stringify(localStorage))));
|
||||
element.setAttribute('download', "kitsune.ksav");
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
element.click();
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
importSave = function(){
|
||||
|
||||
var element = document.createElement('input');
|
||||
element.setAttribute('type', "file");
|
||||
element.setAttribute('accept', ".ksav");
|
||||
element.setAttribute('id', "saveImportFile");
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
element.addEventListener('change', function() {
|
||||
var fr=new FileReader();
|
||||
fr.onload=function(){
|
||||
try {
|
||||
storage = JSON.parse(atob(fr.result))
|
||||
localStorage.clear();
|
||||
Object.keys(storage).forEach(function (k) {
|
||||
localStorage.setItem(k, storage[k]);
|
||||
});
|
||||
alert("Savedata was imported successfully!");
|
||||
} catch (e) {
|
||||
alert("Savedata was invalid!");
|
||||
}
|
||||
}
|
||||
fr.readAsText(this.files[0]);
|
||||
})
|
||||
element.click();
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
|
||||
redirect = function(){
|
||||
location = "/silica/run.html";
|
||||
}
|
||||
|
||||
populate = function(){
|
||||
files = fs.readdirSync("logos/2020/kitsune");
|
||||
files.forEach(file => {
|
||||
opt = document.createElement("option");
|
||||
opt.value = file;
|
||||
opt.innerText = file;
|
||||
if(file == localStorage["CONFIG_VERSION"])
|
||||
opt.selected = true;
|
||||
|
||||
document.getElementById("version").add(opt);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
save = function(){
|
||||
localStorage["CONFIG_LANGUAGE"] = document.getElementById("language").value;
|
||||
localStorage["CONFIG_VERSION"] = document.getElementById("version").value;
|
||||
redirect();
|
||||
}
|
||||
|
||||
downloadFile = function(url, dest, cb){
|
||||
|
||||
const file = fs.createWriteStream(dest);
|
||||
|
||||
const request = http.get(url, (response) => {
|
||||
if (response.statusCode !== 200) {
|
||||
fs.unlink(dest, function() { cb(url+' status was ' + response.statusCode) });
|
||||
}
|
||||
|
||||
|
||||
response.pipe(file);
|
||||
});
|
||||
|
||||
file.on('finish', function() { file.close(cb) });
|
||||
|
||||
request.on('error', (err) => {
|
||||
fs.unlink(dest, function() { downloadFile(url, dest, cb) });
|
||||
});
|
||||
|
||||
file.on('error', (err) => {
|
||||
fs.unlink(dest, function() { downloadFile(url, dest, cb) });
|
||||
});
|
||||
};
|
||||
|
||||
downloadNewVersion = function(){
|
||||
var downloadVersion = prompt("What version to DL? (known versions are: rc1-rc7, dev1-dev9", "rc7");
|
||||
|
||||
|
||||
var outputDirectory = "logos/2020/kitsune/"+downloadVersion+"/";
|
||||
var fromSite = "https://www.google.com/logos/2020/kitsune/"+downloadVersion+"/";
|
||||
|
||||
const request = http.get(fromSite+allGameFiles[0], (response) => {
|
||||
if (response.statusCode !== 200) {
|
||||
alert("Version does not exist on google's servers: got status "+response.statusCode);
|
||||
return;
|
||||
}
|
||||
else{
|
||||
document.getElementById("startButton").disabled = true;
|
||||
|
||||
if (!fs.existsSync(outputDirectory)){
|
||||
fs.mkdirSync(outputDirectory);
|
||||
}
|
||||
|
||||
totalDownloaded = 0;
|
||||
allGameFiles.forEach(fileToDownload => {
|
||||
|
||||
downloadFile(fromSite+fileToDownload, outputDirectory+fileToDownload, function(cb){
|
||||
totalDownloaded++;
|
||||
document.getElementById("downloadInfo").innerText = "Downloading: "+totalDownloaded+"/"+allGameFiles.length + " ("+Math.round((totalDownloaded/allGameFiles.length)*100)+"%)";
|
||||
|
||||
if(totalDownloaded == allGameFiles.length){
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
request.on('error', (err) => {
|
||||
alert("Failed to connect: "+err.message);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
loadSettings = function(){
|
||||
if(localStorage["CONFIG_LANGUAGE"] != undefined)
|
||||
document.getElementById("language").value = localStorage["CONFIG_LANGUAGE"];
|
||||
}
|
||||
|
||||
populate();
|
||||
loadSettings();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,46 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
html,body,header {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
|
||||
if(localStorage["CONFIG_LANGUAGE"] == undefined || localStorage["CONFIG_VERSION"] == undefined)
|
||||
{
|
||||
location = "/silica/config.html";
|
||||
}
|
||||
|
||||
handler = function(event){
|
||||
if(event.keyCode == 121){
|
||||
location = "/silica/config.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
window.removeEventListener("keydown");
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("keydown", handler);
|
||||
|
||||
url = '/logos/2020/kitsune/'+localStorage["CONFIG_VERSION"]+'/kitsune20.html?hl='+localStorage["CONFIG_LANGUAGE"];
|
||||
history.replaceState(null, null, url)
|
||||
// Change URL
|
||||
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", url, false);
|
||||
xhr.send();
|
||||
// Get html contents
|
||||
|
||||
document.clear();
|
||||
document.write(xhr.response.replaceAll("https://www.gstatic.com/", "/gstatic/"));
|
||||
// Replace gstatic.com for /gstatic/
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
document.write(document.location);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +1,8 @@
|
|||
# KitsuneOffline
|
||||
|
||||
![CI/CD Badge](https://github.com/KuromeSan/KitsuneOffline/actions/workflows/buildnw.yml/badge.svg)
|
||||
|
||||
Local Offline version of Kitsune Google Doodle, (Doodle Champion Island Games)
|
||||
useful if you want to play without internet (or just want to mod the game)
|
||||
|
||||
*rc7 version files located in logos/ folder*
|
||||
*rc6 version files located in logos/ folder*
|
||||
|
||||
How to play: (for noobs)
|
||||
Goto the releases page, download the zip and open kitsune.exe, there your done!
|
||||
|
@ -21,5 +18,3 @@ then download the latest release of https://github.com/iteufel/nwjs-ffmpeg-prebu
|
|||
|
||||
finally copy package.json and logos/ from this repository into the NWJS folder. start nw.exe and your done
|
||||
|
||||
If you like living on the edge:
|
||||
You can download the releases from Github Actions directly. NOTE: THESE BUILDS ARE CREATED AFTER EVERY COMMIT!!! That means that if a game-breaking bug gets accidentally introduced, then the build will be broken and not work. This is in contrast to the releases page where builds are tested before release.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 383 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |