is there a way to set the output path of the Build Folder?
i have the project on a mobile hd and want the release output in C:…
(something without hardcoding the buildname and project name)
is there a way to set the output path of the Build Folder?
i have the project on a mobile hd and want the release output in C:…
(something without hardcoding the buildname and project name)
I don’t think so exactly, but you can use IDE scripting to accomplish this. Either add a post-build script that does the copy, or create a Scripts folder (next to your xojo project file) and write a “Release to C drive” script in .rbs format that does it for you. There are IDE script variables for the current project path and name, so you can do it without having to hard-code any strings.
Build scripts also have the option to run the for Debug or Release builds, so you can easily create a script which runs only when doing a Build, but not when doing Debug/Run.
See https://documentation.xojo.com/topics/build_automation/ide_scripting/introduction.html and https://documentation.xojo.com/topics/build_automation/introduction.html
IDE script does not copy because umlauts
DoCommand "BuildApp"
Speak("Build Complete")
Var result As String
Var command As String
Var resultCode As Integer
command = "XCOPY " + ChrB(34) + "E:\MR_Xojo\Markus Büro\Builds - Markus Büro\Windows 64 bit\Markus Büro" + ChrB(34) + " " + ChrB(34) + "C:\XojoDienste\Markus Büro" + ChrB(34) + " /E /I /Y"
result = DoShellCommand(command, 10000, resultCode)
Print(resultCode.ToString + Chr(13) + Chr(10) + result)
cmd copy works
XCOPY "E:\MR_Xojo\Markus Büro\Builds - Markus Büro\Windows 64 bit\Markus Büro" "C:\XojoDienste\Markus Büro" /E /I /Y
Cough. Use “print command”?
ok print works
how can DoShellCommand use umlauts^^ ???
Do you need to encode the spaces in a Windows shell command?
Edit: don’t use umlauts.
“” around a path works, seems its just this stupid umlauts problem again …
don’t use umlauts.
LOL, so true 2021
maybe XCopy can not handle it …
ahh great it need a command for old code page before the call of xcopy
chcp 1252
ohh does not work with xojo script
xcopy still have a problem
it need a batch file saved in ansi …
this works, it runs cmd as admin because stop/start services.
AdminBuildMove.bat
REM RUN AS ADMIN
CHCP 1252
SC STOP XojoMarkusBüro
XCOPY “E:\MR_Xojo\Markus Büro\Builds - Markus Büro\Windows 64 bit\Markus Büro” “C:\XojoDienste\Markus Büro” /E /I /Y
SC START XojoMarkusBüro
PAUSE
i used the CopyFile Build Step to put the Batch beside the Exe.
after build the build folder opens and i just start the batch to update the windows service.
some notes to register a service in windows:
sc create XojoMarkusBüro type= own start= auto binpath= “C:\XojoDienste\Markus Büro\Markus Büro.exe”
sc stop XojoMarkusBüro
sc start XojoMarkusBüro
sc delete XojoMarkusBüro