Skip to content
Snippets Groups Projects
Verified Commit 542631b4 authored by Louis's avatar Louis :fire:
Browse files

Disable logs for prod build, don't assign craft to starting point

parent f6f10619
No related branches found
No related tags found
No related merge requests found
Pipeline #261 passed with stages
in 2 minutes and 33 seconds
...@@ -4,6 +4,7 @@ variables: ...@@ -4,6 +4,7 @@ variables:
BINARY_FOLDER: game_core BINARY_FOLDER: game_core
BINARY_NAME: trader_tales BINARY_NAME: trader_tales
OUTPUT_NAME: trader_tales OUTPUT_NAME: trader_tales
DISABLED_LOG: "true"
stages: stages:
- build - build
......
PROJECT_NAME=game_core PROJECT_NAME=trader_tales
CURRENT_DIRECTORY=$(shell pwd) CURRENT_DIRECTORY=$(shell pwd)
linux-deps: linux-deps:
...@@ -38,19 +38,19 @@ msdf: ...@@ -38,19 +38,19 @@ msdf:
@msdf-atlas-gen -font raw_assets/fonts/EquipmentPro.ttf -type msdf -minsize 32 -format png -imageout raw_assets/fonts/EquipmentPro.png -json raw_assets/fonts/EquipmentPro.kayak_font @msdf-atlas-gen -font raw_assets/fonts/EquipmentPro.ttf -type msdf -minsize 32 -format png -imageout raw_assets/fonts/EquipmentPro.png -json raw_assets/fonts/EquipmentPro.kayak_font
build-windows: clean_dist top_tail build-windows: clean_dist top_tail
docker run --rm --name "${PROJECT_NAME}-build-windows" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder \ docker run --rm --name "${PROJECT_NAME}-build-windows" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder:latest \
cargo build --release -p game_core --target x86_64-pc-windows-gnu cargo build --release -p game_core --target x86_64-pc-windows-gnu
mkdir -p dist mkdir -p dist
cp -r assets dist/assets cp -r assets dist/assets
cp target/x86_64-pc-windows-gnu/release/game_core.exe "dist/${PROJECT_NAME}.exe" cp target/x86_64-pc-windows-gnu/release/trader_tales.exe "dist/${PROJECT_NAME}.exe"
cd dist && zip -r "${PROJECT_NAME}-windows.zip" "./${PROJECT_NAME}.exe" ./assets cd dist && zip -r "${PROJECT_NAME}-windows.zip" "./${PROJECT_NAME}.exe" ./assets
build-linux: clean_dist top_tail build-linux: clean_dist top_tail
docker run --rm --name "${PROJECT_NAME}-build-linux" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder \ docker run --rm --name "${PROJECT_NAME}-build-linux" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder:latest \
cargo build --release -p game_core --target x86_64-unknown-linux-gnu cargo build --release -p game_core --target x86_64-unknown-linux-gnu
mkdir -p dist mkdir -p dist
cp -r assets dist/assets cp -r assets dist/assets
cp target/x86_64-unknown-linux-gnu/release/game_core "dist/${PROJECT_NAME}" cp target/x86_64-unknown-linux-gnu/release/trader_tales "dist/${PROJECT_NAME}"
cd dist && zip -r "${PROJECT_NAME}-linux.zip" "./${PROJECT_NAME}" ./assets cd dist && zip -r "${PROJECT_NAME}-linux.zip" "./${PROJECT_NAME}" ./assets
build-web: top_tail build-web: top_tail
......
#![windows_subsystem = "windows"]
use bevy::prelude::*; use bevy::prelude::*;
use game_core::assets::AssetHandles; use game_core::assets::AssetHandles;
use game_core::system::flow::AppState; use game_core::system::flow::AppState;
......
...@@ -14,6 +14,7 @@ impl Plugin for DefaultResourcesPlugin { ...@@ -14,6 +14,7 @@ impl Plugin for DefaultResourcesPlugin {
} }
pub fn configure_default_plugins() -> PluginGroupBuilder { pub fn configure_default_plugins() -> PluginGroupBuilder {
let (width, height) = initial_size(); let (width, height) = initial_size();
DefaultPlugins DefaultPlugins
.set(WindowPlugin { .set(WindowPlugin {
window: WindowDescriptor { window: WindowDescriptor {
...@@ -23,6 +24,7 @@ pub fn configure_default_plugins() -> PluginGroupBuilder { ...@@ -23,6 +24,7 @@ pub fn configure_default_plugins() -> PluginGroupBuilder {
mode: WindowMode::Windowed, mode: WindowMode::Windowed,
title: String::from("Trader Tales"), title: String::from("Trader Tales"),
present_mode: PresentMode::AutoNoVsync, present_mode: PresentMode::AutoNoVsync,
..Default::default() ..Default::default()
}, },
..Default::default() ..Default::default()
...@@ -32,11 +34,18 @@ pub fn configure_default_plugins() -> PluginGroupBuilder { ...@@ -32,11 +34,18 @@ pub fn configure_default_plugins() -> PluginGroupBuilder {
watch_for_changes: true, watch_for_changes: true,
}) })
.set(ImagePlugin::default_nearest()) .set(ImagePlugin::default_nearest())
.set(LogPlugin { .set(if option_env!("DISABLED_LOG").is_some() {
LogPlugin {
filter: String::from("error"),
level: Level::ERROR,
}
} else {
LogPlugin {
filter: String::from( filter: String::from(
"info,symphonia_core=warn,symphonia_bundle_mp3=warn,wgpu_core=warn,wgpu_hal=warn", "info,symphonia_core=warn,symphonia_bundle_mp3=warn,wgpu_core=warn,wgpu_hal=warn",
), ),
level: Level::DEBUG, level: Level::DEBUG,
}
}) })
} }
......
...@@ -372,7 +372,7 @@ pub fn populate_world( ...@@ -372,7 +372,7 @@ pub fn populate_world(
let ent = commands.spawn((bundle, VisibilityBundle::default())).id(); let ent = commands.spawn((bundle, VisibilityBundle::default())).id();
if let Some(spec) = maybe_spec { if let Some(spec) = maybe_spec {
commands.entity(ent).insert(spec); commands.entity(ent).insert(spec);
} else if is_royal_lampoon { } else if !is_royal_lampoon {
town_entities_a.push(ent); town_entities_a.push(ent);
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment