mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:04:16 +01:00
Update my_first_rpl sample to use new rpl importing functionality.
This commit is contained in:
parent
191200b5cb
commit
ff25fe18d0
@ -2,11 +2,15 @@ cmake_minimum_required(VERSION 3.2)
|
|||||||
project(my_first_rpl C)
|
project(my_first_rpl C)
|
||||||
include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED)
|
include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED)
|
||||||
|
|
||||||
add_executable(my_first_rpl
|
add_executable(my_first_rpl my_first_rpl.c)
|
||||||
my_first_rpl.c)
|
|
||||||
|
|
||||||
wut_add_exports(my_first_rpl exports.def)
|
wut_add_exports(my_first_rpl exports.def)
|
||||||
wut_create_rpl(my_first_rpl)
|
wut_create_rpl(my_first_rpl)
|
||||||
|
|
||||||
|
add_executable(my_first_rpx my_first_rpx.c)
|
||||||
|
wut_link_rpl(my_first_rpx my_first_rpl)
|
||||||
|
wut_create_rpx(my_first_rpx)
|
||||||
|
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/my_first_rpx.rpx"
|
||||||
|
DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/my_first_rpl.rpl"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/my_first_rpl.rpl"
|
||||||
DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
:NAME my_first_rpl
|
||||||
|
|
||||||
:TEXT
|
:TEXT
|
||||||
my_first_export
|
my_first_export
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
#include "my_first_rpl.h"
|
||||||
|
|
||||||
#include <coreinit/dynload.h>
|
#include <coreinit/dynload.h>
|
||||||
|
|
||||||
int
|
const char *
|
||||||
my_first_export()
|
my_first_export()
|
||||||
{
|
{
|
||||||
return 1;
|
return "Hello from my_first_rpl!";
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
6
samples/cmake/my_first_rpl/my_first_rpl.h
Normal file
6
samples/cmake/my_first_rpl/my_first_rpl.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef MY_FIRST_RPL_H
|
||||||
|
#define MY_FIRST_RPL_H
|
||||||
|
|
||||||
|
const char *my_first_export();
|
||||||
|
|
||||||
|
#endif // MY_FIRST_RPL_H
|
25
samples/cmake/my_first_rpl/my_first_rpx.c
Normal file
25
samples/cmake/my_first_rpl/my_first_rpx.c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "my_first_rpl.h"
|
||||||
|
|
||||||
|
#include <coreinit/thread.h>
|
||||||
|
#include <coreinit/time.h>
|
||||||
|
|
||||||
|
#include <whb/proc.h>
|
||||||
|
#include <whb/log.h>
|
||||||
|
#include <whb/log_console.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
WHBProcInit();
|
||||||
|
WHBLogConsoleInit();
|
||||||
|
WHBLogPrintf(my_first_export());
|
||||||
|
|
||||||
|
while(WHBProcIsRunning()) {
|
||||||
|
WHBLogConsoleDraw();
|
||||||
|
OSSleepTicks(OSMillisecondsToTicks(30));
|
||||||
|
}
|
||||||
|
|
||||||
|
WHBLogConsoleFree();
|
||||||
|
WHBProcShutdown();
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user