dotSwitcher icon indicating copy to clipboard operation
dotSwitcher copied to clipboard

build script

Open kurumpa opened this issue 10 years ago • 8 comments
trafficstars

to build the app without VS

kurumpa avatar Oct 29 '15 08:10 kurumpa

What do you mean? With other IDE's/Compilers?

ghost avatar Oct 29 '15 19:10 ghost

With MSBuild tool that is a part of .NET framework, see https://github.com/kurumpa/dotSwitcher/blob/master/build_someday.cmd

kurumpa avatar Oct 30 '15 07:10 kurumpa

Yes, it is possible just drag'n'drop your dotswitcher.sln to MSBuild.exe or you can create .bat file in the dotSwitcher project directory, copy-paste this:

@echo OFF
setlocal ENABLEEXTENSIONS
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions"
set MSBUILD_PATH=""

for /f "tokens=3,* delims= " %%a in ('REG QUERY %KEY_NAME% /s /F MSBuildToolsPath') do (
  if exist "%%a\MSBuild.exe" (
    set MSBUILD_PATH="%%a\MSBuild.exe"
  )
)

if %MSBUILD_PATH%=="" (
  echo Msbuild path not found in registry
  pause
  exit /b 1
)
echo %MSBUILD_PATH%
%MSBUILD_PATH% dotSwitcher.sln
pause

RUN and it will compile it...

ghost avatar Oct 30 '15 14:10 ghost

I still need to target any platform version ;) for now it is only .NET 4.5. Have to migrate also to .NET 2.0 or whatever version can be found in win7 by default

kurumpa avatar Oct 30 '15 14:10 kurumpa

This depends on program code, i tried to dran'n'drop dotSwitcher to .NET 3.5 it sends me an error: about LowLevelAdapter.cs & TrayIcon.cs are "Default parameter specifiers are not permitted" so you need first edit them, and change Targeted .NET in project Properties(In VS)

ghost avatar Oct 30 '15 14:10 ghost

That's exactly what i was talking about, and it's not just changing the target, but also changing lots of code ;) i'll try to deal with selection converting first

kurumpa avatar Oct 30 '15 14:10 kurumpa

I looked up on the source code and notice, that it requires System.Linq that become avaible from .NET 3.5 and System.Threading.Tasks that are become avaible just in .NET 4.0, so if you will change code you need to find functions similar to functions of the linked namespaces, from the one's avaible in older .NET versions namespaces(e.g. .NET 2.0,.NET 3.0 etc) I tried to compile it with .NET 4.0 and it works! Your newer functions selection convert & CAPS lock language change must be add links to new namespaces from .NET 4.5, so i don't know will it compile with them... My version of source code from releases(latest v0.45-alpha).

ghost avatar Oct 31 '15 12:10 ghost

Don't build with .Net 4.0 in my case. Microsoft (R) Build Engine версии 4.6.1055.0 [Microsoft .NET Framework версии 4.0.30319.42000] Error: ... not found "AxImp.exe" or .NET Framework SDK 1 not installed...

GremL1N avatar May 30 '16 03:05 GremL1N