CCGO Video Tutorial Script¶
Complete video tutorial script for demonstrating CCGO's capabilities and workflows.
Video 1: Introduction to CCGO (5-7 minutes)¶
Scene 1: Opening (30 seconds)¶
[Screen: CCGO logo animation]
Narrator: "Welcome to CCGO - the modern C++ build system for cross-platform development. Whether you're building for mobile, desktop, or embedded systems, CCGO simplifies the entire process from development to distribution."
[Screen: Split screen showing different platforms - Android, iOS, macOS, Windows, Linux, OpenHarmony]
Scene 2: The Problem (1 minute)¶
[Screen: Traditional C++ development workflow with multiple tools]
Narrator: "Traditional C++ cross-platform development is complex. You need different build systems for each platform - Gradle for Android, Xcode for iOS, Visual Studio for Windows, CMake for Linux. Each has its own configuration format, build commands, and packaging methods."
[Screen: Show frustration - multiple terminal windows, config files, SDKs]
"Managing dependencies? Even more complicated. Installing SDKs? Hours of setup time. And don't get me started on publishing to different package managers."
Scene 3: The Solution (1 minute)¶
[Screen: CCGO workflow - single tool, multiple platforms]
Narrator: "CCGO changes everything. One tool, one configuration file, all platforms. Write your C++ code once, and CCGO handles the rest - building, packaging, and publishing to any platform."
[Screen: Show CCGO commands]
ccgo build android # Build for Android
ccgo build ios # Build for iOS
ccgo build macos # Build for macOS
ccgo build windows # Build for Windows
ccgo build linux # Build for Linux
Scene 4: Key Features (2 minutes)¶
[Screen: Feature highlights with icons]
Narrator: "Here's what makes CCGO special:"
[Icon 1: Multi-platform] "Universal Platform Support - Build for Android, iOS, macOS, Windows, Linux, and OpenHarmony from a single codebase."
[Icon 2: Docker] "Docker Integration - Build for any platform from any operating system. No need to own a Mac to build iOS libraries."
[Icon 3: Package managers] "Unified Publishing - Publish to Maven Central, CocoaPods, Swift Package Manager, OHPM, and Conan with consistent commands."
[Icon 4: CMake] "CMake Integration - Works with your existing CMake projects while adding platform-specific enhancements."
[Icon 5: Templates] "Project Templates - Generate production-ready project structures in seconds."
Scene 5: Call to Action (30 seconds)¶
[Screen: Installation command]
Narrator: "Ready to simplify your C++ workflow? Install CCGO today:"
[Screen: Documentation link]
"Visit our documentation at ccgo.dev for comprehensive guides, tutorials, and examples. Let's build something amazing together!"
[Screen: CCGO logo with tagline: "Build Once, Deploy Everywhere"]
Video 2: Quick Start Tutorial (8-10 minutes)¶
Scene 1: Installation (1 minute)¶
[Screen: Terminal]
Narrator: "Let's get started with CCGO. First, install it using pip:"
"That's it! CCGO is installed. Now let's create our first cross-platform C++ library."
Scene 2: Creating a New Project (2 minutes)¶
[Screen: Terminal]
Narrator:
"Use the ccgo new command to create a new project:"
[Screen: Interactive prompts]
"CCGO will ask you a few questions about your project:"
đĻ Project name: mylib
đ¤ Author: John Doe
đ§ Email: john@example.com
đ License: MIT
đ Description: My awesome C++ library
[Screen: Generated project structure]
"And just like that, you have a complete project structure:"
mylib/
âââ CCGO.toml # Project configuration
âââ CMakeLists.txt # Build configuration
âââ src/ # Source code
â âââ mylib.cpp
âââ include/ # Public headers
â âââ mylib/
â âââ mylib.h
âââ tests/ # Unit tests
â âââ test_mylib.cpp
âââ examples/ # Example applications
âââ example.cpp
Scene 3: Writing Code (1.5 minutes)¶
[Screen: Code editor showing include/mylib/mylib.h]
Narrator: "Let's add some functionality to our library. Open the header file:"
// include/mylib/mylib.h
#pragma once
#include <string>
namespace mylib {
class Calculator {
public:
int add(int a, int b);
int multiply(int a, int b);
std::string get_version();
};
} // namespace mylib
[Screen: Code editor showing src/mylib.cpp]
"Now the implementation:"
// src/mylib.cpp
#include "mylib/mylib.h"
namespace mylib {
int Calculator::add(int a, int b) {
return a + b;
}
int Calculator::multiply(int a, int b) {
return a * b;
}
std::string Calculator::get_version() {
return "1.0.0";
}
} // namespace mylib
Scene 4: Building for Multiple Platforms (3 minutes)¶
[Screen: Terminal]
Narrator: "Now comes the magic - building for multiple platforms. Let's start with Android:"
$ ccgo build android
Building for Android...
Architectures: armeabi-v7a, arm64-v8a, x86_64
â Build complete: target/android/mylib-android-1.0.0.aar
[Screen: Show generated AAR file]
"CCGO automatically builds for multiple Android architectures and packages everything into an AAR file."
[Screen: Terminal]
"Now iOS:"
$ ccgo build ios
Building for iOS...
â Framework: target/ios/MyLib.framework
â XCFramework: target/ios/MyLib.xcframework
[Screen: Show XCFramework structure]
"CCGO creates both traditional frameworks and modern XCFrameworks that work on devices and simulators."
[Screen: Terminal]
"What about Windows? Even if you're on macOS or Linux, CCGO has you covered with Docker:"
$ ccgo build windows --docker
Pulling Docker image...
Building for Windows...
â Static library: target/windows/lib/static/mylib.lib
â DLL: target/windows/lib/shared/mylib.dll
Scene 5: Testing (1 minute)¶
[Screen: Terminal]
Narrator: "Let's make sure everything works by running tests:"
$ ccgo test
Running tests...
[==========] Running 3 tests
[----------] 2 tests from Calculator
[ RUN ] Calculator.Add
[ OK ] Calculator.Add (0 ms)
[ RUN ] Calculator.Multiply
[ OK ] Calculator.Multiply (0 ms)
[==========] 3 tests ran. (1 ms total)
[ PASSED ] 3 tests.
Scene 6: Wrap Up (30 seconds)¶
[Screen: Summary of created files]
Narrator: "In just a few minutes, we've created a cross-platform C++ library, built it for Android, iOS, and Windows, and verified it works with tests. CCGO handles all the platform-specific details, letting you focus on writing great code."
Video 3: Advanced Features (10-12 minutes)¶
Scene 1: Dependency Management (2 minutes)¶
[Screen: CCGO.toml file]
Narrator: "CCGO makes dependency management simple. Just add dependencies to your CCGO.toml file:"
[dependencies]
spdlog = { git = "https://github.com/gabime/spdlog.git", tag = "v1.12.0" }
nlohmann_json = { git = "https://github.com/nlohmann/json.git", tag = "v3.11.2" }
[Screen: Terminal]
"CCGO automatically downloads and builds dependencies:"
$ ccgo build android
Fetching dependencies...
â spdlog v1.12.0
â nlohmann_json v3.11.2
Building for Android...
[Screen: Code using dependencies]
#include <spdlog/spdlog.h>
#include <nlohmann/json.hpp>
void log_config() {
nlohmann::json config = {
{"name", "mylib"},
{"version", "1.0.0"}
};
spdlog::info("Config: {}", config.dump());
}
Scene 2: Docker Builds (2.5 minutes)¶
[Screen: Diagram showing Docker workflow]
Narrator: "One of CCGO's most powerful features is Docker integration. Build for any platform from any operating system."
[Screen: macOS terminal]
"Running macOS but need to build for Linux?"
$ ccgo build linux --docker
Pulling ccgo-builder-linux image...
Building in Docker container...
â Build complete
[Screen: Windows terminal]
"On Windows but need iOS libraries?"
$ ccgo build ios --docker
Pulling ccgo-builder-apple image...
Building in Docker container...
â XCFramework created
[Screen: Show Docker advantages]
Narrator: "Docker builds are perfect for:" - "CI/CD pipelines - consistent builds everywhere" - "Team development - everyone uses the same toolchain" - "Cross-compilation - build any platform without installing SDKs"
Scene 3: Publishing (2.5 minutes)¶
[Screen: Publishing workflow diagram]
Narrator: "Once your library is built, publishing is just as easy. CCGO supports all major package managers with a unified interface."
[Screen: Terminal - Android/Maven]
"Publishing an Android library to Maven Central:"
$ ccgo publish android --registry official
Building AAR...
Signing with PGP...
Uploading to Maven Central...
â Published: com.example:mylib:1.0.0
[Screen: Terminal - iOS/CocoaPods]
"Publishing to CocoaPods:"
$ ccgo publish apple --manager cocoapods
Validating podspec...
Pushing to CocoaPods Trunk...
â Published: MyLib 1.0.0
[Screen: Terminal - Multiple platforms]
"Or publish to multiple platforms at once:"
$ ccgo publish android --registry official
$ ccgo publish apple --manager all --push
$ ccgo publish ohos --registry official
Scene 4: Configuration Deep Dive (2 minutes)¶
[Screen: CCGO.toml with annotations]
Narrator: "CCGO.toml is your project's control center. Let's explore the key sections:"
# Basic project metadata
[package]
name = "mylib"
version = "1.0.0"
description = "My awesome library"
# Library type
[library]
type = "both" # static, shared, or both
# Build settings
[build]
cpp_standard = "17"
cxxflags = ["-O3", "-Wall"]
# Platform-specific settings
[android]
min_sdk_version = 21
target_sdk_version = 33
[ios]
deployment_target = "12.0"
[windows]
runtime_library = "MD" # Dynamic CRT
[Screen: Highlight different sections]
"Each section controls specific aspects of your build, giving you fine-grained control while maintaining simplicity."
Scene 5: IDE Integration (1.5 minutes)¶
[Screen: Terminal]
Narrator: "CCGO can generate IDE projects for platform-specific development:"
[Screen: Android Studio project]
$ ccgo build android --ide-project
Generating Android Studio project...
â Project: cmake_build/android/
[Screen: Xcode project]
$ ccgo build ios --ide-project
Generating Xcode project...
â Project: cmake_build/ios/MyLib.xcodeproj
[Screen: Visual Studio project]
$ ccgo build windows --ide-project
Generating Visual Studio solution...
â Solution: cmake_build/windows/MyLib.sln
Scene 6: Wrap Up (30 seconds)¶
[Screen: Feature summary]
Narrator: "CCGO's advanced features - dependency management, Docker builds, unified publishing, and IDE integration - work together to create a seamless cross-platform development experience."
Video 4: Real-World Example (15-20 minutes)¶
Scene 1: Project Overview (2 minutes)¶
[Screen: Project visualization]
Narrator: "Let's build a real-world C++ library - a image processing library that works on mobile and desktop platforms."
[Screen: Feature list]
"Our library will:" - "Resize and crop images" - "Apply filters (grayscale, blur, sharpen)" - "Support multiple image formats" - "Provide both C++ and platform-native APIs"
Scene 2: Project Setup (2 minutes)¶
[Screen: Terminal]
[Screen: Add dependencies to CCGO.toml]
[Screen: Project structure]
imagelib/
âââ src/
â âââ image.cpp # Core image class
â âââ filters.cpp # Filter implementations
â âââ platform/ # Platform-specific code
â âââ android_jni.cpp
â âââ ios_objc.mm
â âââ windows_dll.cpp
âââ include/
â âââ imagelib/
â âââ image.h
â âââ filters.h
âââ tests/
âââ test_image.cpp
âââ test_filters.cpp
Scene 3: Implementation (4 minutes)¶
[Screen: Code editor - image.h]
Narrator: "Let's implement the core image class:"
// include/imagelib/image.h
#pragma once
#include <vector>
#include <string>
namespace imagelib {
class Image {
public:
Image(int width, int height);
~Image();
// Loading and saving
bool load(const std::string& path);
bool save(const std::string& path);
// Basic operations
void resize(int new_width, int new_height);
void crop(int x, int y, int width, int height);
// Getters
int width() const { return width_; }
int height() const { return height_; }
const unsigned char* data() const { return data_.data(); }
private:
int width_;
int height_;
std::vector<unsigned char> data_;
};
} // namespace imagelib
[Screen: Code editor - filters.h]
// include/imagelib/filters.h
#pragma once
#include "image.h"
namespace imagelib {
class Filters {
public:
static void grayscale(Image& image);
static void blur(Image& image, int radius);
static void sharpen(Image& image);
};
} // namespace imagelib
[Screen: Implementation walkthrough - showing key parts of image.cpp and filters.cpp]
Scene 4: Platform-Specific Bindings (4 minutes)¶
[Screen: Android JNI binding]
Narrator: "For Android, we create JNI bindings:"
// src/platform/android_jni.cpp
#include <jni.h>
#include "imagelib/image.h"
extern "C" {
JNIEXPORT jlong JNICALL
Java_com_example_imagelib_Image_nativeCreate(
JNIEnv* env, jclass clazz, jint width, jint height) {
auto* image = new imagelib::Image(width, height);
return reinterpret_cast<jlong>(image);
}
JNIEXPORT void JNICALL
Java_com_example_imagelib_Image_nativeResize(
JNIEnv* env, jclass clazz, jlong handle, jint width, jint height) {
auto* image = reinterpret_cast<imagelib::Image*>(handle);
image->resize(width, height);
}
} // extern "C"
[Screen: iOS Objective-C++ wrapper]
Narrator: "For iOS, we create an Objective-C++ wrapper for Swift interop:"
// src/platform/ios_objc.mm
#import "ImageLib.h"
#include "imagelib/image.h"
@implementation ImageLib {
std::unique_ptr<imagelib::Image> _image;
}
- (instancetype)initWithWidth:(NSInteger)width height:(NSInteger)height {
if (self = [super init]) {
_image = std::make_unique<imagelib::Image>(width, height);
}
return self;
}
- (void)resizeToWidth:(NSInteger)width height:(NSInteger)height {
_image->resize(width, height);
}
@end
[Screen: Windows DLL exports]
// src/platform/windows_dll.cpp
#ifdef _WIN32
#define IMAGELIB_API __declspec(dllexport)
#else
#define IMAGELIB_API
#endif
extern "C" {
IMAGELIB_API void* imagelib_create(int width, int height) {
return new imagelib::Image(width, height);
}
IMAGELIB_API void imagelib_resize(void* handle, int width, int height) {
auto* image = static_cast<imagelib::Image*>(handle);
image->resize(width, height);
}
} // extern "C"
Scene 5: Building and Testing (3 minutes)¶
[Screen: Terminal - building for all platforms]
Narrator: "Now let's build for all platforms:"
# Mobile platforms
$ ccgo build android
â AAR: imagelib-android-1.0.0.aar
$ ccgo build ios
â XCFramework: ImageLib.xcframework
# Desktop platforms
$ ccgo build macos
â Framework: ImageLib.framework
$ ccgo build windows --docker
â DLL: imagelib.dll
$ ccgo build linux --docker
â Shared library: libimagelib.so
[Screen: Running tests]
Scene 6: Publishing (2 minutes)¶
[Screen: Terminal - publishing]
Narrator: "Finally, let's publish our library:"
# Android - Maven Central
$ ccgo publish android --registry official
â Published to Maven Central
# iOS - CocoaPods and SPM
$ ccgo publish apple --manager all --push
â Published to CocoaPods
â Tagged for Swift Package Manager
# OpenHarmony - OHPM
$ ccgo publish ohos --registry official
â Published to OHPM
# Cross-platform - Conan
$ ccgo publish conan --registry official
â Published to Conan Center
Scene 7: Integration Examples (2 minutes)¶
[Screen: Android usage example]
Narrator: "Now developers can easily use our library. In Android:"
// build.gradle.kts
dependencies {
implementation("com.example:imagelib:1.0.0")
}
// Usage
val image = Image(800, 600)
image.load("/sdcard/photo.jpg")
Filters.grayscale(image)
image.save("/sdcard/photo_gray.jpg")
[Screen: iOS usage example]
"In iOS with Swift:"
// Package.swift
dependencies: [
.package(url: "https://github.com/example/imagelib", from: "1.0.0")
]
// Usage
let image = ImageLib(width: 800, height: 600)
image.load("photo.jpg")
image.grayscale()
image.save("photo_gray.jpg")
Scene 8: Wrap Up (1 minute)¶
[Screen: Summary screen]
Narrator: "In this tutorial, we built a complete cross-platform image processing library with CCGO. We:"
- "Created a full-featured C++ library"
- "Added platform-specific bindings for Android, iOS, and Windows"
- "Built for all platforms with a single tool"
- "Tested thoroughly"
- "Published to multiple package managers"
"CCGO handled all the platform complexities, letting us focus on building great software."
Video 5: Tips and Best Practices (8-10 minutes)¶
Scene 1: Project Organization (2 minutes)¶
[Screen: Well-organized project structure]
Narrator: "Let's talk about best practices. First, project organization:"
[Screen: Directory structure]
mylib/
âââ include/ # Public API only
â âââ mylib/
â âââ *.h
âââ src/ # Implementation
â âââ core/ # Core functionality
â âââ utils/ # Utilities
â âââ platform/ # Platform-specific code
âââ tests/ # Unit tests
âââ benches/ # Benchmarks
âââ examples/ # Usage examples
âââ docs/ # Documentation
"Keep your public API in include/, internal code in src/, and platform-specific code isolated."
Scene 2: Version Management (1.5 minutes)¶
[Screen: CCGO.toml version]
Narrator: "Always use semantic versioning:"
[Screen: Git workflow]
"Create tags for releases:"
Scene 3: CI/CD Integration (2 minutes)¶
[Screen: GitHub Actions workflow]
Narrator: "Automate your builds with CI/CD:"
# .github/workflows/build.yml
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
platform: [android, ios, macos, windows, linux]
steps:
- uses: actions/checkout@v3
- run: pip install ccgo
- run: ccgo build ${{ matrix.platform }} --docker
- run: ccgo test
"This builds and tests all platforms on every commit."
Scene 4: Docker Best Practices (1.5 minutes)¶
[Screen: Docker tips]
Narrator: "When using Docker builds:"
[Tip 1] "Cache images for faster builds - don't delete them between builds" [Tip 2] "Allocate enough resources - 4+ CPUs, 8GB+ RAM" [Tip 3] "Use Docker for CI/CD, native builds for local development" [Tip 4] "Update images monthly for latest toolchains"
Scene 5: Performance Optimization (1.5 minutes)¶
[Screen: Optimization techniques]
Narrator: "Optimize your builds:"
[build]
# Link-time optimization
cxxflags = ["-flto"]
ldflags = ["-flto"]
# Platform-specific optimizations
[android]
cxxflags = ["-O3", "-ffast-math"]
[ios]
cxxflags = ["-O3", "-fvectorize"]
[Screen: Build performance comparison]
"These optimizations can reduce binary size by 30% and improve performance by 20%."
Scene 6: Troubleshooting Common Issues (1.5 minutes)¶
[Screen: Common errors and solutions]
Narrator: "Common issues and solutions:"
[Issue 1: Dependency not found]
Error: Could not find dependency 'spdlog'
# Solution: Check git URL and tag
[dependencies]
spdlog = { git = "https://github.com/gabime/spdlog.git", tag = "v1.12.0" }
[Issue 2: Build failed]
Error: Build failed for arm64-v8a
# Solution: Check CMakeLists.txt and build logs
$ ccgo build android --verbose
[Issue 3: Docker permission denied]
Error: permission denied (Linux)
# Solution: Add user to docker group
$ sudo usermod -aG docker $USER
Scene 7: Wrap Up (30 seconds)¶
[Screen: Best practices checklist]
Narrator: "Follow these best practices for smooth cross-platform development with CCGO:"
- "â Organize code logically"
- "â Use semantic versioning"
- "â Automate with CI/CD"
- "â Leverage Docker for consistency"
- "â Optimize for performance"
- "â Test on all target platforms"
Closing¶
[Screen: CCGO logo]
Narrator: "Thank you for watching! CCGO simplifies cross-platform C++ development, letting you focus on building great software. Visit ccgo.dev for documentation, examples, and community support. Happy coding!"
[Screen: Links] - Documentation: ccgo.dev/docs - GitHub: github.com/ccgo-org/ccgo - Discord: discord.gg/ccgo - Twitter: @ccgodev
Production Notes¶
Video Style¶
- Tone: Professional but approachable
- Pace: Moderate - allow time for viewers to follow along
- Visuals: Mix of terminal recordings, code editors, and diagrams
- Music: Subtle background music, no lyrics
Screen Recording¶
- Resolution: 1920x1080 minimum
- Font size: Large enough for mobile viewing (16pt minimum in terminal)
- Cursor: Highlight cursor movements
- Typing speed: Moderate, with pauses after commands
Post-Production¶
- Captions: Add closed captions for accessibility
- Chapters: YouTube chapters for easy navigation
- Timestamps: In video description
- Code snippets: Include in video description
Supplementary Materials¶
- Sample code: GitHub repository with all examples
- Cheat sheet: PDF with common commands
- Practice exercises: Guided tutorials
- FAQ: Common questions and answers
Target Audience¶
- Primary: C++ developers new to cross-platform development
- Secondary: Mobile developers wanting to use C++ for performance-critical code
- Tertiary: Teams looking to streamline their cross-platform build process
Call to Action¶
Each video should end with: 1. Link to documentation 2. Encourage trying CCGO 3. Join community (Discord/GitHub) 4. Like/subscribe for more tutorials