Merge pull request #150 from daniel11420/pull-request

Build with AppVeyor CI & fix Linux builds not succeeding
This commit is contained in:
Kade M 2021-04-06 00:08:07 -07:00 committed by GitHub
commit 45b8770b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 132 additions and 23 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
export/ export/
.vscode/ .vscode/
APIStuff.hx

View File

@ -116,7 +116,7 @@
<haxelib name="newgrounds"/> <haxelib name="newgrounds"/>
<haxelib name="faxe" if='switch'/> <haxelib name="faxe" if='switch'/>
<haxelib name="polymod"/> <haxelib name="polymod"/>
<haxelib name="discord_rpc" if="desktop"/> <haxelib name="discord_rpc" if="windows"/>
<!-- <haxelib name="hxcpp-debug-server" if="desktop"/> --> <!-- <haxelib name="hxcpp-debug-server" if="desktop"/> -->
<!-- <haxelib name="markdown" /> --> <!-- <haxelib name="markdown" /> -->

View File

@ -15,12 +15,21 @@
This is the repository for Friday Night Funkin' Kade Engine, a game originally made for Ludum Dare 47 "Stuck In a Loop". And a completely reworked engine. This is the repository for Friday Night Funkin' Kade Engine, a game originally made for Ludum Dare 47 "Stuck In a Loop". And a completely reworked engine.
### Links to the original game
Play the Ludum Dare prototype here: https://ninja-muffin24.itch.io/friday-night-funkin Play the Ludum Dare prototype here: https://ninja-muffin24.itch.io/friday-night-funkin
Play the Newgrounds one here: https://www.newgrounds.com/portal/view/770371 Play the Newgrounds one here: https://www.newgrounds.com/portal/view/770371
Support the project on the itch.io page: https://ninja-muffin24.itch.io/funkin Support the project on the itch.io page: https://ninja-muffin24.itch.io/funkin
### Links to Kade Engine
Mod Page: https://gamebanana.com/gamefiles/16761 Mod Page: https://gamebanana.com/gamefiles/16761
Latest GitHub release: https://github.com/KadeDev/Kade-Engine/releases/latest
AppVeyor CI (Automatic builds of the latest commit):
- Windows: [AppVeyor Project](https://ci.appveyor.com/project/daniel11420/kade-engine-windows) | [Artifacts (downloads)](https://ci.appveyor.com/project/daniel11420/kade-engine-windows/build/artifacts)
- Linux: [AppVeyor Project](https://ci.appveyor.com/project/daniel11420/kade-engine-linux) | [Artifacts (downloads)](https://ci.appveyor.com/project/daniel11420/kade-engine-linux/build/artifacts)
## What is Kade Engine? ## What is Kade Engine?
Kade Engine is an engine rework of the OG games engine. Simply put, we give you some great new features while also giving you the latest GitHub features. Kade Engine is an engine rework of the OG games engine. Simply put, we give you some great new features while also giving you the latest GitHub features.

42
appveyor-linux.yml Normal file
View File

@ -0,0 +1,42 @@
version: '{build}'
image: Ubuntu2004
environment:
global:
HAXELIB_ROOT: /home/appveyor/haxelib
HAXE_INSTALLDIR: /home/appveyor/haxe
install:
- cd /home/appveyor
- sudo add-apt-repository ppa:haxe/releases -y
- sudo apt update
- sudo apt install neko tar -y
- wget https://github.com/HaxeFoundation/haxe/releases/download/4.1.5/haxe-4.1.5-linux64.tar.gz
- mkdir $HAXE_INSTALLDIR
- tar -xf haxe-4.1.5-linux64.tar.gz -C $HAXE_INSTALLDIR
- export PATH=$PATH:$HAXE_INSTALLDIR/haxe_20201231082044_5e33a78aa
- mkdir $HAXELIB_ROOT && haxelib setup $HAXELIB_ROOT
- haxelib install lime 7.9.0
- haxelib install openfl
- haxelib install flixel
- haxelib run lime setup flixel
- haxelib run lime setup
- haxelib install flixel-tools
- haxelib install flixel-addons
- haxelib install flixel-ui
- haxelib install hscript
- haxelib install newgrounds
- haxelib git faxe https://github.com/uhrobots/faxe
- haxelib git polymod https://github.com/larsiusprime/polymod.git
- haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
- haxelib list
- cd /home/appveyor/projects/kade-engine-linux
build_script:
- haxelib run lime build linux
after_build:
- tar -cvf funkin-ke.tar -C /home/appveyor/projects/kade-engine-linux/export/release/linux/bin .
artifacts:
- path: funkin-ke.tar
name: Linux build

45
appveyor-windows.yml Normal file
View File

@ -0,0 +1,45 @@
# Taken from https://github.com/andyli/HaxeCI/blob/master/appveyor.yml
version: "{build}"
environment:
global:
HAXELIB_ROOT: C:\projects\haxelib
install:
# http://help.appveyor.com/discussions/problems/5616-not-able-to-build-due-to-problem-in-chocolateyinstallps1
- ps: Set-Service wuauserv -StartupType Manual
# Install the neko chocolatey package (https://chocolatey.org/packages/neko)
- cinst neko --version 2.3.0 -y
# Install the haxe chocolatey package (https://chocolatey.org/packages/haxe)
- cinst haxe --version 4.1.5 -y
- RefreshEnv
# Setup haxelib
- mkdir "%HAXELIB_ROOT%"
- haxelib setup "%HAXELIB_ROOT%"
# Install project dependencies
- haxelib install lime 7.9.0
- haxelib install openfl
- haxelib install flixel
- haxelib run lime setup flixel
- haxelib run lime setup
- haxelib install flixel-tools
# haxelib run flixel-tools setup -y # Can't do this since it asks [y/n] even with -y argument! Stupid
- haxelib install flixel-addons
- haxelib install flixel-ui
- haxelib install hscript
- haxelib install newgrounds
- haxelib install flixel-addons
- haxelib git faxe https://github.com/uhrobots/faxe
- haxelib git polymod https://github.com/larsiusprime/polymod.git
- haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
- haxelib list
# No tests idk lol
build_script:
- haxelib run lime build windows
# haxelib run lime build linux
artifacts:
- path: export/release/windows/bin
name: Windows release
type: zip

7
source/APIStuff.hx Normal file
View File

@ -0,0 +1,7 @@
package;
class APIStuff
{
public static var API:String = "";
public static var EncKey:String = "";
}

View File

@ -1,5 +1,6 @@
package; package;
#if windows
import Sys.sleep; import Sys.sleep;
import discord_rpc.DiscordRpc; import discord_rpc.DiscordRpc;
@ -85,3 +86,4 @@ class DiscordClient
//trace('Discord RPC Updated. Arguments: $details, $state, $smallImageKey, $hasStartTimestamp, $endTimestamp'); //trace('Discord RPC Updated. Arguments: $details, $state, $smallImageKey, $hasStartTimestamp, $endTimestamp');
} }
} }
#end

View File

@ -11,7 +11,7 @@ import flixel.util.FlxColor;
import lime.utils.Assets; import lime.utils.Assets;
#if desktop #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end #end
@ -53,7 +53,7 @@ class FreeplayState extends MusicBeatState
} }
*/ */
#if desktop #if windows
// Updating Discord Rich Presence // Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null); DiscordClient.changePresence("In the Menus", null);
#end #end

View File

@ -2,7 +2,7 @@ import flixel.math.FlxMath;
import flixel.FlxCamera; import flixel.FlxCamera;
import flixel.math.FlxPoint; import flixel.math.FlxPoint;
import flixel.FlxObject; import flixel.FlxObject;
#if desktop #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
import sys.thread.Thread; import sys.thread.Thread;
#end #end
@ -33,7 +33,7 @@ class GameplayCustomizeState extends MusicBeatState
private var camHUD:FlxCamera; private var camHUD:FlxCamera;
public override function create() { public override function create() {
#if desktop #if windows
// Updating Discord Rich Presence // Updating Discord Rich Presence
DiscordClient.changePresence("Customizing Gameplay", null); DiscordClient.changePresence("Customizing Gameplay", null);
#end #end

View File

@ -14,7 +14,7 @@ import flixel.util.FlxColor;
import io.newgrounds.NG; import io.newgrounds.NG;
import lime.app.Application; import lime.app.Application;
#if desktop #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end #end
@ -46,7 +46,7 @@ class MainMenuState extends MusicBeatState
override function create() override function create()
{ {
#if desktop #if windows
// Updating Discord Rich Presence // Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null); DiscordClient.changePresence("In the Menus", null);
#end #end

View File

@ -1,6 +1,8 @@
package; package;
#if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end
import flixel.tweens.FlxTween; import flixel.tweens.FlxTween;
import flixel.util.FlxColor; import flixel.util.FlxColor;
import openfl.Lib; import openfl.Lib;

View File

@ -40,7 +40,7 @@ import openfl.display.BlendMode;
import openfl.display.StageQuality; import openfl.display.StageQuality;
import openfl.filters.ShaderFilter; import openfl.filters.ShaderFilter;
#if desktop #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end #end
@ -72,7 +72,7 @@ class PlayState extends MusicBeatState
var songLength:Float = 0; var songLength:Float = 0;
#if desktop #if windows
// Discord RPC variables // Discord RPC variables
var storyDifficultyText:String = ""; var storyDifficultyText:String = "";
var iconRPC:String = ""; var iconRPC:String = "";
@ -197,7 +197,7 @@ class PlayState extends MusicBeatState
repPresses = 0; repPresses = 0;
repReleases = 0; repReleases = 0;
#if desktop #if windows
// Making difficulty text for Discord Rich Presence. // Making difficulty text for Discord Rich Presence.
switch (storyDifficulty) switch (storyDifficulty)
{ {
@ -1192,7 +1192,7 @@ class PlayState extends MusicBeatState
default: allowedToHeadbang = false; default: allowedToHeadbang = false;
} }
#if desktop #if windows
// Updating Discord Rich Presence (with Time Left) // Updating Discord Rich Presence (with Time Left)
DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC); DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC);
#end #end
@ -1421,7 +1421,7 @@ class PlayState extends MusicBeatState
vocals.pause(); vocals.pause();
} }
#if desktop #if windows
DiscordClient.changePresence("PAUSED on " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "Acc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC); DiscordClient.changePresence("PAUSED on " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "Acc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC);
#end #end
if (!startTimer.finished) if (!startTimer.finished)
@ -1444,7 +1444,7 @@ class PlayState extends MusicBeatState
startTimer.active = true; startTimer.active = true;
paused = false; paused = false;
#if desktop #if windows
if (startTimer.finished) if (startTimer.finished)
{ {
DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses, iconRPC, true, songLength - Conductor.songPosition); DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses, iconRPC, true, songLength - Conductor.songPosition);
@ -1469,7 +1469,7 @@ class PlayState extends MusicBeatState
vocals.time = Conductor.songPosition; vocals.time = Conductor.songPosition;
vocals.play(); vocals.play();
#if desktop #if windows
DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC); DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC);
#end #end
} }
@ -1655,7 +1655,7 @@ class PlayState extends MusicBeatState
if (FlxG.keys.justPressed.SEVEN) if (FlxG.keys.justPressed.SEVEN)
{ {
#if desktop #if windows
DiscordClient.changePresence("Chart Editor", null, null, true); DiscordClient.changePresence("Chart Editor", null, null, true);
#end #end
FlxG.switchState(new ChartingState()); FlxG.switchState(new ChartingState());
@ -1940,7 +1940,7 @@ class PlayState extends MusicBeatState
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y)); openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
#if desktop #if windows
// Game Over doesn't get his own variable because it's only used here // Game Over doesn't get his own variable because it's only used here
DiscordClient.changePresence("GAME OVER -- " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(),"\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC); DiscordClient.changePresence("GAME OVER -- " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(),"\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC);
#end #end
@ -3111,7 +3111,7 @@ class PlayState extends MusicBeatState
// yes this updates every step. // yes this updates every step.
// yes this is bad // yes this is bad
// but i'm doing it to update misses and accuracy // but i'm doing it to update misses and accuracy
#if desktop #if windows
// Song duration in a float, useful for the time left feature // Song duration in a float, useful for the time left feature
songLength = FlxG.sound.music.length; songLength = FlxG.sound.music.length;

View File

@ -13,7 +13,7 @@ import flixel.util.FlxColor;
import flixel.util.FlxTimer; import flixel.util.FlxTimer;
import lime.net.curl.CURLCode; import lime.net.curl.CURLCode;
#if desktop #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end #end
@ -74,7 +74,7 @@ class StoryMenuState extends MusicBeatState
override function create() override function create()
{ {
#if desktop #if windows
// Updating Discord Rich Presence // Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null); DiscordClient.changePresence("In the Menus", null);
#end #end

View File

@ -24,8 +24,11 @@ import io.newgrounds.NG;
import lime.app.Application; import lime.app.Application;
import openfl.Assets; import openfl.Assets;
#if desktop #if windows
import Discord.DiscordClient; import Discord.DiscordClient;
#end
#if desktop
import sys.thread.Thread; import sys.thread.Thread;
#end #end
@ -59,7 +62,7 @@ class TitleState extends MusicBeatState
PlayerSettings.init(); PlayerSettings.init();
#if desktop #if windows
DiscordClient.initialize(); DiscordClient.initialize();
Application.current.onExit.add (function (exitCode) { Application.current.onExit.add (function (exitCode) {