mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 23:43:25 +03:00
include psrc scenarios in releases
This commit is contained in:
parent
44cedeefab
commit
d6f5c60713
@ -6,6 +6,8 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
abstutil = { path = "../abstutil" }
|
||||
geom = { path = "../geom" }
|
||||
map_model = { path = "../map_model" }
|
||||
popdat = { path = "../popdat" }
|
||||
structopt = "0.2.15"
|
||||
synthetic = { path = "../synthetic" }
|
||||
|
@ -1,5 +1,7 @@
|
||||
use abstutil::Timer;
|
||||
use geom::Duration;
|
||||
use map_model::Map;
|
||||
use popdat::trips_to_scenario;
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[derive(StructOpt)]
|
||||
@ -8,6 +10,9 @@ struct Flags {
|
||||
/// Map
|
||||
#[structopt(name = "load")]
|
||||
load: String,
|
||||
|
||||
#[structopt(name = "disable_psrc_scenarios")]
|
||||
disable_psrc_scenarios: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
@ -26,4 +31,8 @@ fn main() {
|
||||
timer.start("save map");
|
||||
map.save();
|
||||
timer.stop("save map");
|
||||
|
||||
if !flags.disable_psrc_scenarios {
|
||||
trips_to_scenario(&map, Duration::ZERO, Duration::END_OF_DAY, &mut timer).save();
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ cp color_scheme.json docs/INSTRUCTIONS.md release/play_abstreet.sh $OUT
|
||||
mkdir -p $OUT/data/maps
|
||||
for map in 23rd ballard caphill downtown montlake; do
|
||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
||||
mkdir -p $OUT/data/scenarios/$map
|
||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
||||
done
|
||||
|
||||
mkdir -p $OUT/data/shapes
|
||||
|
@ -12,6 +12,8 @@ cp color_scheme.json docs/INSTRUCTIONS.md release/play_abstreet.bat $OUT
|
||||
mkdir -p $OUT/data/maps
|
||||
for map in 23rd ballard caphill downtown montlake; do
|
||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
||||
mkdir -p $OUT/data/scenarios/$map
|
||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
||||
done
|
||||
|
||||
mkdir -p $OUT/data/shapes
|
||||
|
Loading…
Reference in New Issue
Block a user