Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[demos] Update demos to v0.3.0 #680

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demos/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
assets/**
node_modules
.video_compositor
.live_compositor
20 changes: 10 additions & 10 deletions demos/utils/prepare_compositor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import fs from 'fs-extra';
import path from 'path';
import { downloadAsync, spawn } from './utils';

export const COMPOSITOR_DIR = path.join(__dirname, '../.video_compositor');
export const COMPOSITOR_DIR = path.join(__dirname, '../.live_compositor');

const VERSION = 'v0.2.0-rc.5';
const VERSION = 'v0.3.0';

const COMPOSITOR_X86_64_LINUX_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/video_compositor_linux_x86_64.tar.gz`;
const COMPOSITOR_ARM_LINUX_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/video_compositor_linux_aarch64.tar.gz`;
const COMPOSITOR_X86_64_MAC_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/video_compositor_darwin_x86_64.tar.gz`;
const COMPOSITOR_ARM_MAC_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/video_compositor_darwin_aarch64.tar.gz`;
const COMPOSITOR_X86_64_LINUX_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/live_compositor_linux_x86_64.tar.gz`;
const COMPOSITOR_ARM_LINUX_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/live_compositor_linux_aarch64.tar.gz`;
const COMPOSITOR_X86_64_MAC_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/live_compositor_darwin_x86_64.tar.gz`;
const COMPOSITOR_ARM_MAC_DOWNLOAD_URL = `https://github.com/software-mansion/live-compositor/releases/download/${VERSION}/live_compositor_darwin_aarch64.tar.gz`;

export async function ensureCompositorReadyAsync(): Promise<void> {
const versionFile = path.join(COMPOSITOR_DIR, '.version');
Expand All @@ -30,13 +30,13 @@ export async function ensureCompositorReadyAsync(): Promise<void> {
export async function prepareCompositorAsync() {
await fs.remove(COMPOSITOR_DIR);
await fs.mkdirp(COMPOSITOR_DIR);
console.log('Downloading video_compositor.');
console.log('Downloading live_compositor.');
await downloadAsync(
getCompositorDownloadUrl(),
path.join(COMPOSITOR_DIR, 'video_compositor.tar.gz')
path.join(COMPOSITOR_DIR, 'live_compositor.tar.gz')
);
console.log('Unpacking video_compositor.');
await spawn('tar', ['-xvf', 'video_compositor.tar.gz'], {
console.log('Unpacking live_compositor.');
await spawn('tar', ['-xvf', 'live_compositor.tar.gz'], {
displayOutput: true,
cwd: COMPOSITOR_DIR,
});
Expand Down
8 changes: 4 additions & 4 deletions demos/utils/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function logError(err: any): Promise<void> {
}
}

const COMPOSITOR_DIR = path.join(__dirname, '../.video_compositor');
const COMPOSITOR_DIR = path.join(__dirname, '../.live_compositor');

function getCompositorRunCmd(): {
command: string;
Expand All @@ -54,17 +54,17 @@ function getCompositorRunCmd(): {
if (process.env.LIVE_COMPOSITOR_SOURCE_DIR) {
return {
command: 'cargo',
args: ['run', '--release', '--bin', 'video_compositor'],
args: ['run', '--release', '--bin', 'live_compositor'],
cwd: process.env.LIVE_COMPOSITOR_SOURCE_DIR,
};
} else if (process.platform === 'linux') {
return {
command: path.join(COMPOSITOR_DIR, 'video_compositor/video_compositor'),
command: path.join(COMPOSITOR_DIR, 'live_compositor/live_compositor'),
args: [],
};
} else if (process.platform === 'darwin') {
return {
command: path.join(COMPOSITOR_DIR, 'video_compositor/video_compositor'),
command: path.join(COMPOSITOR_DIR, 'live_compositor/live_compositor'),
args: [],
};
}
Expand Down
Loading