yeet android
authorhgn <hgodden00@gmail.com>
Thu, 30 May 2024 19:26:45 +0000 (20:26 +0100)
committerhgn <hgodden00@gmail.com>
Thu, 30 May 2024 19:26:45 +0000 (20:26 +0100)
build.c

diff --git a/build.c b/build.c
index c8f0fac5fcf8f805b7d35aa7395a3f57b0ae3c6e..42a9ff790e4bcb54e0595661e88053ad563c87b3 100644 (file)
--- a/build.c
+++ b/build.c
@@ -33,10 +33,8 @@ void build_game_bin( struct vg_project *proj,
    }
 
    struct vg_compiler_conf conf = {0};
-   vg_str sources = {0};
-   vg_strcat( &sources, "marblecomp.c " );
 
-   vg_add_engine( proj, 
+   vg_make_app( proj, 
          &(struct vg_engine_config)
          {
             .fixed_update_hz = 60,
@@ -47,39 +45,34 @@ void build_game_bin( struct vg_project *proj,
             .custom_game_settings = 1,
             .custom_shaders = 1
          },
-         env, &conf, &sources );
-
-   vg_compiler_run( proj, env, &conf, sources.buffer, "fishladder",
-                    k_obj_type_exe );
+         env, &conf, "marblecomp.c", "fishladder" );
 }
 
 /*
  * Scripts
  * -------------------------------------------------------------------------- */
 
-#if 0
 void s_release_all(void)
 {
    vg_info( "running script: s_release_all(void)\n" );
 
    struct vg_project linux_proj, windows_proj;
+   struct vg_compiler_env env = vg_release_env;
 
-   struct vg_env env = vg_release_env;
    env.platform = k_platform_linux;
-   vg_project_init( &linux_proj, &env, "marblecomp" );
+   vg_project_init( &linux_proj, "bin", "marblecomp", 1 );
    build_game_content( &linux_proj );
-   build_game_bin( &linux_proj );
+   build_game_bin( &linux_proj, &env );
 
    env = vg_release_env;
    env.platform = k_platform_windows;
-   vg_project_init( &windows_proj, &env, "marblecomp" );
+   vg_project_init( &windows_proj, "bin", "marblecomp", 1 );
    build_game_content( &windows_proj );
-   build_game_bin( &windows_proj );
+   build_game_bin( &windows_proj, &env );
 
    vg_tarball_project( &linux_proj );
    vg_tarball_project( &windows_proj );
 }
-#endif
 
 void s_testing_build(void)
 {
@@ -87,26 +80,20 @@ void s_testing_build(void)
 
    struct vg_project proj;
    vg_project_init( &proj, "bin", "marblecomp-test", 0 );
-
    build_game_content( &proj );
    build_game_bin( &proj, &vg_test_env );
 }
 
-
 int main( int argc, char *argv[] ){
    char *arg;
    while( vg_argp( argc, argv ) )
    {
-#if 0
       if( vg_long_opt( "release-all" ) )
          s_release_all();
-#endif
 
       if( vg_long_opt( "testing-build" ) )
          s_testing_build();
 
-      if( vg_long_opt( "android-build" ) ) return 0;
-
       if( vg_opt('r') )
          vg_test_env.optimization = 3;
    }