Martin Vladic
2 years ago
11 changed files with 110 additions and 43 deletions
@ -1,11 +1,11 @@
|
||||
set SDL2DIR=..\..\SDL2-2.0.14 |
||||
set SDL2IMAGEDIR=..\..\SDL2_image-2.0.4 |
||||
set SDL2DIR=..\SDL2-2.0.14 |
||||
set SDL2IMAGEDIR=..\SDL2_image-2.0.4 |
||||
|
||||
if not exist "build" mkdir "build" |
||||
if not exist "build\win32" mkdir "build\win32" |
||||
|
||||
cd build\win32 |
||||
|
||||
cmake ..\.. |
||||
cmake -G "Visual Studio 15 2017" ..\.. |
||||
|
||||
cd ..\.. |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@ -0,0 +1,3 @@
|
||||
{ |
||||
"eez-project-path": "{{projectName}}.eez-project" |
||||
} |
@ -0,0 +1,50 @@
|
||||
/** |
||||
* @callback RenameFile |
||||
* @param {string} fileSrcRelativePath |
||||
* @param {string} fileDstRelativePath |
||||
* @returns {Promise<void>} |
||||
*/ |
||||
|
||||
/** |
||||
* @callback ReplaceInFile |
||||
* @param {string} fileRelativePath |
||||
* @param {string} searchValue |
||||
* @param {string} newValue |
||||
* @returns {Promise<void>} |
||||
*/ |
||||
|
||||
/** |
||||
* @typedef {Object} WizardContext |
||||
* @property {string} projectDirPath |
||||
* @property {string} projectName |
||||
* @property {RenameFile} renameFile |
||||
* @property {ReplaceInFile} replaceInFile |
||||
*/ |
||||
|
||||
/** |
||||
* @param {WizardContext} context |
||||
*/ |
||||
async function postProcessing(context) { |
||||
await context.replaceInFile("CMakeLists.txt", "eez-flow-template-sdl", context.projectName); |
||||
|
||||
await context.replaceInFile("README.md", "{{projectDirPath}}", context.projectDirPath); |
||||
await context.replaceInFile("README.md", "{{projectName}}", context.projectName); |
||||
|
||||
await context.replaceInFile("src/platform/simulator/win32/icon.rc", "{{projectName}}", context.projectName); |
||||
|
||||
await context.replaceInFile("src/platform/simulator/emscripten/index.html", "{{projectName}}", context.projectName); |
||||
|
||||
await context.replaceInFile("src/main.cpp", "eez-flow-template-sdl", context.projectName); |
||||
|
||||
await context.replaceInFile("src/gui/app_context.cpp", "eez-flow-template-sdl", context.projectName); |
||||
|
||||
await context.renameFile("app.eez-project", context.projectName + ".eez-project"); |
||||
await context.renameFile("gui.eez-project", context.projectName + "-gui.eez-project"); |
||||
|
||||
await context.replaceInFile(context.projectName + ".eez-project", "gui.eez-project", context.projectName + "-gui.eez-project"); |
||||
await context.replaceInFile(context.projectName + "-gui.eez-project", "app.eez-project", context.projectName + ".eez-project"); |
||||
|
||||
await context.replaceInFile("template/manifest.json", "{{projectName}}", context.projectName); |
||||
} |
||||
|
||||
module.exports = postProcessing; |
Loading…
Reference in new issue