Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add Tobias Waldekranz's awesome little AWK script
# Calculate network address from IP and prefix len # Tobias Waldekranz, 2017 # # $ echo "192.168.2.232/24" | awk -f ipcalc.awk # 192.168.2.0/24 # # $ echo "192.168.2.232.24" | awk -f ipcalc.awk # 192.168.2.0/24 # # $ echo "192.168.2.232 24" | awk -f ipcalc.awk # 192.168.2.0/24 # BEGIN { FS="[. /]" } { ip = lshift($1, 24) + lshift($2, 16) + lshift($3, 8) + $4; net = lshift(rshift(ip, 32 - $5), 32 - $5); printf("%d.%d.%d.%d/%d\n", and(rshift(net, 24), 0xff), and(rshift(net, 16), 0xff), and(rshift(net, 8), 0xff), and(net, 0xff), $5); }
Add an awk script used in one-vs-the-rest classification example.
BEGIN{ FS="\t"; OFS="\t"; } { possible_labels=$1; rowid=$2; label=$3; features=$4; label_count = split(possible_labels, label_array, ","); for(i = 1; i <= label_count; i++) { if (label_array[i] == label) print rowid, label, 1, features; else print rowid, label_array[i], -1, features; } } END{}
Add crosscheck of EPISODES with SEASONS
# WebScraper has problems getting incomplete data. # # Crosscheck the info in EPISODES with the info in SEASONS. Count up episodes # and compare with the number of episodes listed in the seasons file. # For now these seem more likely a problem in scraping SEASONS than EPISODES # so it could be these are false positives in generating spreadsheets. # Problems listed in BBox_anomalies files are more likely to be real. # INVOCATION # awk -f verifyBBoxInfoFrom-webscraper.awk BBox_episodeInfo-180421.123042.txt / movie / { title = $3 numEpisodes = $5 if (numEpisodes == 0) print } / show / { numShows += 1 showTitle[numShows] = $3 shouldHave[numShows] = $5 doesHave[numShows] = 0 if (numEpisodes == 0) print } /^ / { epis = NF-1 if ($epis !~ /^[[:digit:]]*$/) print "==> Bad input line " NR "\n" $0 else doesHave[numShows] += $epis } END { print "" for ( i = 1; i <= numShows; i++ ) { if (shouldHave[i] != doesHave[i]) { print "==> show "showTitle[i] " has " doesHave[i] " instead of " \ shouldHave[i] " episodes." } } }
Add parser for Z3's get-model output.
#!/usr/bin/gawk -f BEGIN{ bees=""; } /^[ ]+\(define-fun.*Int$/{ bees = $2; } /^[ ]+[0-9]+\)/{ match ($0, /^[ ]+([0-9]+)\)/, arr) print bees " " arr[1]; }
Add awk solution to problem 16
#!/usr/bin/awk -f { protein = "" flag = 0 # Get rid of line with label while (("curl -Ls http://www.uniprot.org/uniprot/"$1".fasta" | getline prot_line) > 0) { if (flag) # Append line to protein protein = protein prot_line else # We're on the first line - ignore label and set flag flag = 1 } first = 1 # Print label only once startidx = 1 do { where = match(substr(protein, startidx), /N[^P][ST][^P]/) if (where != 0) { if (first) { # Print label, start location string print $0 loc_string = where + startidx - 1 # Reset flag first = 0 } else { # Append to location string loc_string = loc_string " " where + startidx - 1 } # Update offset: start one after start of last match startidx += where } } while (where != 0) # Did we find something? if (loc_string) print loc_string }
Add a crosscheck for the SEASONS_SORTED_FILE
# Crosscheck the number of episodes of each show found by counting them (grep -c) # in EPISODES_SORTED_FILE versus the number added up from SEASONS_SORTED_FILE # Both numbers are found by processing a checkEpisodeInfo file # # For now these seem more likely a problem in scraping SEASONS_SORTED_FILE than EPISODES_SORTED_FILE # so it could be these are false positives in generating spreadsheets. The case is stronger for # problems listed in checkBBox_anomalies files. # INVOCATION: # awk -f crosscheckInfo.awk checkEpisodeInfo-180415.185805.txt / movie / { title = $3 numEpisodes = $5 if (numEpisodes == 0) print } / show / { numShows += 1 showTitle[numShows] = $3 shouldHave[numShows] = $5 doesHave[numShows] = 0 if (numEpisodes == 0) print } /^ / { epis = NF-1 if ($epis !~ /^[[:digit:]]*$/) print "==> Bad input line " NR "\n" $0 else doesHave[numShows] += $epis } END { for ( i = 1; i <= numShows; i++ ) { if (shouldHave[i] != doesHave[i]) { print "==> show "showTitle[i] " has " doesHave[i] " instead of " \ shouldHave[i] " episodes." } } }
Add AWK script to merge comma-terminated lines
#!/usr/bin/awk -f # # AWK script to join multiple lines if the preceeding line ends with a comma (,). # # For example: # # 1, # 2, # 3 # # Turns into: # # 1, 2, 3 # /,$/ { ORS="" print $0 do { getline print $0 } while ($0 ~ /,$/) ORS="\n" print "" }
Add Netflix specific link generator
# Helper for converting Netflix "viewing activity" into hyperlinks # # <a href="/title/80988960" data-reactid="68">Death in Paradise: Season 6: &quot;Man Overboard, Part 2&quot; # <a href="/title/80170369" data-reactid="124">Ugly Delicious: Season 1: &quot;Pizza&quot; # <a href="/title/80190361" data-reactid="100">Hinterland: Season 3: &quot;Episode 2&quot; # INVOCATION: # Browse to https://www.netflix.com/viewingactivity # Save as 'Page Source' # awk -f generateLinksFrom-NetflixActivityPage.awk ~/Downloads/Netflix.html BEGIN { RS="\<" # print 10 records unless overridden with "-v maxRecordsToPrint=<n>" if (maxRecordsToPrint == "") maxRecordsToPrint = 10 } /div class="col date nowrap"/ { split ($0,fld,">") date = fld[2] } /a href="\/title\// { split ($0,fld,">") title = fld[2] split ($0,fld,"\"") URL = fld[2] gsub (/&quot;/,"",title) printf ("=HYPERLINK(\"https://www.netflix.com/%s\";\"%s\")\t%s\tNetflix Streaming\n",\ URL,title,date) recordsPrinted += 1 if (recordsPrinted >= maxRecordsToPrint) exit }
Add AWK script to compute the corrected sample standard deviation
#!/usr/bin/env awk -f # # Computes the corrected sample standard deviation. # # Usage: stdev # # Input: # - a column of numbers # # Output: # - corrected sample standard deviation # # Notes: # - Uses [Welford's method][1]. # # [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm BEGIN { delta = 0 mean = 0 M2 = 0 N = 0 } { N += 1 delta = $1 - mean mean += delta / N M2 += delta * ($1 - mu) } END { if (N < 2) { print 0 } else { print sqrt(M2 / (N-1)) } }
Make script to process top level BritBox shows
BEGIN { FS="\t" print "Sortkey\tTitle\tSeasons\tDuration\tYear\tRating\tDescription" } # if needed for debugging record placment, replace "/nosuchrecord/" below /nosuchrecord/ { print "" print NR " - " $0 for ( i = 1; i <= NF; i++ ) { print "field " i " = " $i } } { for ( i = 1; i <= NF; i++ ) { if ($i == "null") $i = "" } } /\/us\/movie\/|\/us\/show\//{ URL = $3 showTitle = $4 Year = $5 NumSeasons = $6 Duration = $7 Rating = $8 Description = $9 sub (/ Season[s]/,"",NumSeasons) sub( / min/,"",Duration) # Convert duration from minutes to HMS secs = 0 mins = Duration % 60 hrs = int(Duration / 60) HMS = sprintf ("%02d:%02d:%02d", hrs, mins, secs) # Titles starting with "The" should not sort based on "The" if (match (showTitle, /^The /)) { showTitle = substr(showTitle, 5) ", The" } } /\/us\/movie\// { # Extract movie sortkey from URL nflds = split (URL,fld,"_") if (URL ~ /_[[:digit:]]*$/) { sortkey = sprintf ("M%05d", fld[nflds]) printf \ ("%s %s - mv\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t%s\t%s\t%s\t%s\n", \ showTitle, sortkey, URL, showTitle, sortkey, \ Title, HMS, Year, Rating, Description) } next } /\/us\/show\// { # Extract show sortkey from URL nflds = split (URL,fld,"_") if (URL ~ /_[[:digit:]]*$/) { sortkey = sprintf ("S%05d", fld[nflds]) printf \ ("%s %s - sh\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t%s\t%s\t%s\t%s\n", \ showTitle, sortkey, URL, showTitle, sortkey, \ Title, HMS, Year, Rating, Description) } next }
Create helper for Netflix activity
# Helper for converting Netflix "viewing activity" into hyperlinks # # Since there is no way to paste an embedded hyperlink into a text filei, # paste the link and the title on two consecutive lines, e.g. # # https://www.netflix.com/title/80174814 # Borderliner: Season 1: "Milla’s Future" # https://www.netflix.com/title/80203122 # Luxury Travel Show: Season 1: "Chiang Mai & Eze" # https://www.netflix.com/title/80217826 # Kavin Jay: Everybody Calm Down! /^https:/ { link = $0 if ((getline title) > 0) { gsub (/"/,"\"\"",title) printf ("=HYPERLINK(\"%s\";\"%s\")\n",link,title) } }
Add debugging tool which prints WebScraper field names
# Print field numbers and field names from a WebScraper csv file saved in tsv format # INVOCATION: # awk -f printFieldNamesFrom-webscraper.awk -v maxRecordsToPrint=5 BritBoxSeasons-test-tabs.csv BEGIN { FS="\t" # print 3 records unless overridden with "-v maxRecordsToPrint=<n>" if (maxRecordsToPrint == "") maxRecordsToPrint = 3 } NR <= maxRecordsToPrint { print "Record " NR for ( i = 1; i <= NF; i++ ) { print i " - " $i } print "" }
Add the unified pair generation script
#!/usr/bin/awk -f BEGIN{ FS = OFS = "\t"; } { split($3, words, ", "); for (i = 1; i <= length(words) - 1; i++) { for (j = i + 1; j <= length(words); j++) { print words[i], words[j]; print words[j], words[i]; } } }
Add only unique reads for paired end filter
BEGIN { OFS="\t"; lastid=""; id_counts=0; } { if ( $1 ~ /^@/ ) { # headers go straight through print $0; next; } if (lastid == "") { lastid=$1; r1["read"] = $0; r1["chr"] = $3; r1["tags"] = ""; for(i=12;i<NF;i++) { r1["tags"]=r1["tags"] $i " ";} r1["tags"]=r1["tags"] $i; next; } if ( lastid == $1 ) { id_counts++; if ( id_counts == 2 ) { r2["read"] = $0; r2["chr"] = $3; r2["tags"] = ""; for(i=12;i<NF;i++) { r2["tags"]=r2["tags"] $i " ";} r2["tags"]=r2["tags"] $i; } } else if ( lastid != $1 ) { if ( 2 == id_counts ) { # two matching ends of a pair, should we include them? if ( (r1["chr"] ~ /chr([[:digit:]]+|[XY]|MT)/) && (r2["chr"] ~ /chr([[:digit:]]+|[XY]|MT)/) && (r1["tags"] ~ /XT:A:U/) && (r2["tags"] ~ /XT:A:U/) ) { print r1["read"]; print r2["read"]; } } id_counts=1; lastid=$1; r1["read"] = $0; r1["chr"] = $3; r1["tags"]=""; for(i=12;i<NF;i++) { r1["tags"]=r1["tags"] $i " ";} r1["tags"]=r1["tags"] $i; } } END { if ( 2 == id_counts ) { # two matching ends of a pair, should we include them? if ( (r1["chr"] ~ /chr([[:digit:]]+|[XY]|MT)/) && (r2["chr"] ~ /chr([[:digit:]]+|[XY]|MT)/) && (r1["tags"] ~ /XT:A:U/) && (r2["tags"] ~ /XT:A:U/) ) { print r1["read"]; print r2["read"]; } } }
Add awk script to deobfuscate wasm stack traces.
# Usage: # awk -f deobfuscate_wasm_log.awk <wat_file> <log_file> # Process the log file which is the 2nd argument. FILENAME == ARGV[2] { match($0, /<anonymous>:wasm-function\[([0-9]+)\]/, groups) print $0, functions[groups[1]] } # Collects function declarations /^\(func/ { functions[last_function++] = $2 }
Add AWK script to compute the mid-range
#!/usr/bin/env awk -f # # Computes the mid-range. # # Usage: mid-range # # Input: # - a column of numbers # # Output: # - mid-range !i++ { # Only for the first record: max = $1 min = $1 } { if ($1 > max) { max = $1 } else if ($1 < min) { min = $1 } } END { print (max + min) / 2 }
Add a short program that rewrites the testdata/rsyncd.log timestamps to nowish.
BEGIN{ now = systime() format = "%Y/%m/%d %H:%M:%S" } { split($1, DATE, "/") split($2, TIME, ":") $1 = "" $2 = "" t = mktime(DATE[1] " " DATE[2] " " DATE[3] " " TIME[1] " " TIME[2] " " TIME[3]) if (delta == "") { delta = now - t } print strftime(format, t + delta) $0 }
Add an awk script for reading CVC's output.
#!/usr/bin/awk -f BEGIN{ outarr[0] = ""; outarr[1] = ""; outarr[2] = ""; outarr[3] = ""; idx = 0; } /.*sparticus.*/{ sub(/bv/, "", $12); outarr[idx] = $12; idx++; if (idx == 4) { print outarr[0] "|" outarr[1] "|" outarr[2] "|" outarr[3] idx = 0; } }
Improve Windows .bat launcher: waits for close, no console
@echo off start /min java -jar %~dp0SuperTMXMerge.jar %*
@echo off start /b /wait java -jar %~dp0SuperTMXMerge.jar %*
Comment out removing stuff for now.
SET PATH=C:\Qt\5.5\mingw492_32\bin;%PATH% SET PATH=C:\Qt\Tools\mingw492_32\bin;%PATH% qmake.exe -makefile -win32 FLViz.pro mingw32-make.exe clean mingw32-make.exe mocclean mingw32-make.exe mingw32-make.exe distclean
SET PATH=C:\Qt\5.5\mingw492_32\bin;%PATH% SET PATH=C:\Qt\Tools\mingw492_32\bin;%PATH% qmake.exe -makefile -win32 FLViz.pro mingw32-make.exe clean mingw32-make.exe mocclean mingw32-make.exe REM mingw32-make.exe distclean
Use the same arguments on Windows.
:: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `nmake`. bash -lc "make" if errorlevel 1 exit 1 bash -lc "make PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1
:: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `nmake`. bash -lc "make" if errorlevel 1 exit 1 bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1
Fix script path in win
python %RECIPE_DIR%\download-chromedriver if errorlevel 1 exit 1 7z x chromedriver.zip -ochromedriver if errorlevel 1 exit 1 REM Add chromedriver to PATH so chromedriver_binary install can find it set PATH=%PATH%:%CD%\chromedriver python -m pip install --no-deps --ignore-installed .
python %RECIPE_DIR%\download-chromedriver.py if errorlevel 1 exit 1 7z x chromedriver.zip -ochromedriver if errorlevel 1 exit 1 REM Add chromedriver to PATH so chromedriver_binary install can find it set PATH=%PATH%:%CD%\chromedriver python -m pip install --no-deps --ignore-installed .
Move to Ruby 2.0 on windows.
@ECHO OFF set GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%JRUBY_BASE%\bin;%PATH% set JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.invokedynamic=false -J-Djruby.compile.mode=OFF %JRUBY_OPTS%" %JRUBY_BASE%\bin\jruby.bat %*
@ECHO OFF set GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%JRUBY_BASE%\bin;%PATH% set JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compat.version=2.0 -J-Djruby.compile.invokedynamic=false -J-Djruby.compile.mode=OFF %JRUBY_OPTS%" %JRUBY_BASE%\bin\jruby.bat %*
Fix typo in bintray upload script
@echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="Spectaculum-Core" "Spectaculum-Camera" "Spectaculum-Image" "Spectaculum-MediaPlayer" "Spectaculum-MediaPlayerExtended" "Spectaculum-Effect-FloAwbs" "Spectaculum-Effect-Immersive" "Spectaculum-Effect-QrMarker" FOR %%m in (%modules%) DO ( gradlew %%~m:clean %%~m:build %%~m:bintrayUpload -PbintrayUser=%username% -PbintrayKey=%apikey% -PdryRun=false -Pskippasswordprompts )
@echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="Spectaculum-Core" "Spectaculum-Camera" "Spectaculum-Image" "Spectaculum-MediaPlayer" "Spectaculum-MediaPlayerExtended" "Spectaculum-Effect-FlowAbs" "Spectaculum-Effect-Immersive" "Spectaculum-Effect-QrMarker" FOR %%m in (%modules%) DO ( gradlew %%~m:clean %%~m:build %%~m:bintrayUpload -PbintrayUser=%username% -PbintrayKey=%apikey% -PdryRun=false -Pskippasswordprompts )
Set Java path for BMC
@set PATH="%PATH%;C:\Program Files\Java\jdk1.8.0_66\bin" @c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l
@set PATH="%PATH%;C:\Program Files\Java\jdk1.7.0_25\bin" @c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l
Add --run-e2e-tests option to the script ran by Jenkins
@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\c\build_all\windows call build.cmd if errorlevel 1 goto :eof cd %build-root%
@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\c\build_all\windows call build.cmd --run-e2e-tests if errorlevel 1 goto :eof cd %build-root%
Allow number to be passed in to distribution build
:start bin\nant\nant.exe -f:spark.build tools build package pause goto start
if "%1"=="" build-distribution 1 :start bin\nant\nant.exe -f:spark.build tools build package -D:build.number=%1 pause goto start
Update windows proto generation script to resemble the linux script more closely
@echo off set PROTODIR=D:\GitHub\SteamKit\Resources\Protobufs set PROTOBUFS=base_gcmessages gcsdk_gcmessages dota_gcmessages_client for %%X in ( %PROTOBUFS% ) do ( protoc --descriptor_set_out=%%X.desc --include_imports --proto_path=%PROTODIR% --proto_path=%PROTODIR%\dota --proto_path=%PROTODIR%\steamclient %PROTODIR%\dota\%%X.proto )
@echo off set PROTODIR=D:\GitHub\SteamKit\Resources\Protobufs set PROTOBUFS=base_gcmessages gcsdk_gcmessages cstrike15_gcmessages for %%X in ( %PROTOBUFS% ) do ( protoc --descriptor_set_out=%%X.desc --include_imports %%X.proto )
Make native tests fail the build
@echo off setlocal EnableDelayedExpansion echo Test discovery started... dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt echo Testing (Google Test)... set failures=0 FOR /F %%i IN (__tmp_gtest.txt) DO ( echo %%i %%i --gtest_output="xml:%%i.xml" powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName %%i.xml if errorlevel 1 ( set /A failures=%failures%+1 ) ) del __tmp_gtest.txt EXIT /B %failures%
@echo off setlocal EnableDelayedExpansion echo Test discovery started... dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt echo Testing (Google Test)... set failures=0 FOR /F %%i IN (__tmp_gtest.txt) DO ( echo %%i %%i --gtest_output="xml:%%i.xml" powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName %%i.xml IF %ERRORLEVEL% NEQ 0 ( set /A failures=%failures%+1 ) ) del __tmp_gtest.txt EXIT /B %failures%
Replace absolute path to python with \%PYTHONHOME\%.
@echo off REM Make sure to use 32 bit python for this so it runs on all machines C:\Utils\Python\Python32-34\python ./BuildPrjExeSetup.py py2exe C:\Utils\Python\Python32-34\python ./BuildEditorApiExeSetup.py py2exe C:\Utils\Python\Python32-34\python ./BuildReleaseManifesterUpdaterExeSetup.py py2exe C:\Utils\Python\Python32-34\python ./BuildOpenInVisualStudio.py py2exe
@echo off REM Make sure to use 32 bit python for this so it runs on all machines %PYTHONHOME%\python ./BuildPrjExeSetup.py py2exe %PYTHONHOME%\python ./BuildEditorApiExeSetup.py py2exe %PYTHONHOME%\python ./BuildReleaseManifesterUpdaterExeSetup.py py2exe %PYTHONHOME%\python ./BuildOpenInVisualStudio.py py2exe
Revert test code in buidpackpush.bat
SETLOCAL SET VERSION=%1 CALL Scripts\buildpack %VERSION% || exit /B 1 ECHO this should not happen exit /B 1 nuget push .\Artifacts\Mapsui.%VERSION%.nupkg -source nuget.org || exit /B 1 nuget push .\Artifacts\Mapsui.Forms.%VERSION%.nupkg -source nuget.org || exit /B 1 git commit -m %VERSION% -a || exit /B 1 git tag %VERSION% || exit /B 1 git push origin %VERSION% || exit /B 1 git push || exit /B 1
SETLOCAL SET VERSION=%1 CALL Scripts\buildpack %VERSION% || exit /B 1 nuget push .\Artifacts\Mapsui.%VERSION%.nupkg -source nuget.org || exit /B 1 nuget push .\Artifacts\Mapsui.Forms.%VERSION%.nupkg -source nuget.org || exit /B 1 git commit -m %VERSION% -a || exit /B 1 git tag %VERSION% || exit /B 1 git push origin %VERSION% || exit /B 1 git push || exit /B 1
Fix a build issue with Vista. Stop cp.exe from trying to emulate POSIX security on top of NTFS.
@echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > NUL bash -x create-config.sh %OUTDIR% %JSENG%
@echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files :: Fix cp.exe on vista: without this flag, the files that it creates are not accessible. set CYGWIN=nontsec set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > NUL bash -x create-config.sh %OUTDIR% %JSENG%
Add TITSEQ to overlay exporting.
rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN psylink /c /p /q /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN psylink /c /p /q /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN psylink /c /p /q /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN DEL2FAB /c+ GAME/SETUP
rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN rem slink /psx /c /p /rmips=GAME/TITSEQ.REL @GAME/TITSEQ.LNK,GAME/TITSEQ.BIN psylink /c /p /q /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN psylink /c /p /q /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN psylink /c /p /q /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN psylink /c /p /q /rmips=SPEC_PSX/TITSEQ.REL @SPEC_PSX/TITSEQ.LNK,SPEC_PSX/TITSEQ.BIN DEL2FAB /c+ GAME/SETUP
Add email composer plugin in .bat file
:: :: Create output (Cordova) directory :: mkdir www :: :: Install client libraries :: bower install :: :: Add target platform :: :: Comment out the platform(s) your system supports :: grunt platform:add:ios :: grunt platform:add:android :: :: Install cordova plugins :: There quickest option is to ask from Ionic :: to restore the state of the app. :: https://github.com/driftyco/ionic-cli::ionic-state-restore :: If this process fails comment this line and uncomment the :: "cordova plugin add ..." lines that follow. :: ionic state restore :: :: cordova plugin add cordova-plugin-device :: cordova plugin add cordova-plugin-console :: cordova plugin add com.ionic.keyboard :: cordova plugin add cordova-plugin-inappbrowser :: cordova plugin add cordova-plugin-geolocation :: cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git :: cordova plugin add cordova-plugin-network-information :: cordova plugin add cordova-plugin-whitelist :: cordova plugin add cordova-plugin-transport-security :: :: Build the project and generate the cordova directory (www) :: grunt build
:: :: Create output (Cordova) directory :: mkdir www :: :: Install client libraries :: bower install :: :: Add target platform :: :: Comment out the platform(s) your system supports :: grunt platform:add:ios :: grunt platform:add:android :: :: Install cordova plugins :: There quickest option is to ask from Ionic :: to restore the state of the app. :: https://github.com/driftyco/ionic-cli::ionic-state-restore :: If this process fails comment this line and uncomment the :: "cordova plugin add ..." lines that follow. :: ionic state restore :: :: cordova plugin add cordova-plugin-device :: cordova plugin add cordova-plugin-console :: cordova plugin add com.ionic.keyboard :: cordova plugin add cordova-plugin-inappbrowser :: cordova plugin add cordova-plugin-geolocation :: cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git :: cordova plugin add de.appplant.cordova.plugin.email-composer :: cordova plugin add cordova-plugin-network-information :: cordova plugin add cordova-plugin-whitelist :: cordova plugin add cordova-plugin-transport-security :: :: Build the project and generate the cordova directory (www) :: grunt build
Clean the release directory after doing a static build.
@rem Copyright 2015 Google Inc. All Rights Reserved. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem Modify the UIforETW project to be statically linked and build that version @rem so that it will run without any extra install requirements. @setlocal call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" sed "s/UseOfMfc>Dynamic/UseOfMfc>Static/" <UIforETW.vcxproj >UIforETWStatic.vcxproj sed "s/UIforETW.vcxproj/UIforETWStatic.vcxproj/" <UIforETW.sln >UIforETWStatic.sln rmdir Release /s/q devenv /rebuild "release|Win32" UIforETWStatic.sln del UIforETWStatic.vcxproj del UIforETWStatic.sln
@rem Copyright 2015 Google Inc. All Rights Reserved. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem Modify the UIforETW project to be statically linked and build that version @rem so that it will run without any extra install requirements. @setlocal call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" sed "s/UseOfMfc>Dynamic/UseOfMfc>Static/" <UIforETW.vcxproj >UIforETWStatic.vcxproj sed "s/UIforETW.vcxproj/UIforETWStatic.vcxproj/" <UIforETW.sln >UIforETWStatic.sln rmdir Release /s/q devenv /rebuild "release|Win32" UIforETWStatic.sln del UIforETWStatic.vcxproj del UIforETWStatic.sln @rem Clean up the build directory at the end to avoid subsequent build warnings. rmdir Release /s/q
Print out buildlog.txt to console
@echo off @echo ... @echo Running reference documentation Build Script, capturing output to buildlog.txt ... @echo Start Time: %time% ..\..\build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt @echo ... @echo ************************ @echo Build Complete! @echo ************************ @echo End Time: %time% @echo   
@echo off @echo ... @echo Running reference documentation Build Script, capturing output to buildlog.txt ... @echo Start Time: %time% ..\..\build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt type buildlog.txt @echo ... @echo ************************ @echo Build Complete! @echo ************************ @echo End Time: %time% @echo   
Add comment and delete temporary file after use.
@echo off py25 setup.py --long-description | py25 web\rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > ~pypi.html start ~pypi.html
@echo off REM REM Convert setup.py's long description to HTML and show it. REM py25 setup.py --long-description | py25 web\rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > ~pypi.html start ~pypi.html del ~pypi.html
Fix relative dir typo in xcopy pyparsing.py command
xcopy /y .\sourceforge\svn\trunk\src\pyparsing.py . c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py
xcopy /y ..\sourceforge\svn\trunk\src\pyparsing.py . c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py
Fix for release script error when there is space in directory path.
# Verify release SET CURRENT_DIRECTORY=%cd% call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 32 STATIC || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 32 SHARED || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 64 STATIC || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 64 SHARED || exit /b 1 exit 0
REM Verify release SET CURRENT_DIRECTORY=%cd% call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 32 STATIC || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 32 SHARED || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 64 STATIC || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 64 SHARED || exit /b 1 exit 0
Add vioinput to the top-level build script
cd VirtIO call buildall.bat cd .. cd NetKVM call buildall.bat cd .. cd viostor call buildall.bat cd .. cd vioscsi call buildall.bat cd .. cd Balloon call buildall.bat cd .. cd vioserial call buildall.bat cd .. cd viorng call buildall.bat cd .. cd pvpanic call buildall.bat cd ..
cd VirtIO call buildall.bat cd .. cd NetKVM call buildall.bat cd .. cd viostor call buildall.bat cd .. cd vioscsi call buildall.bat cd .. cd Balloon call buildall.bat cd .. cd vioserial call buildall.bat cd .. cd viorng call buildall.bat cd .. cd vioinput call buildall.bat cd .. cd pvpanic call buildall.bat cd ..
Use absolute path to setup.py-installed entry point
rem Won't be found because there are no shebang lines on Windows rem python test-script-setup.py rem if errorlevel 1 exit 1 rem python test-script-setup.py | grep "Test script setup\.py" rem if errorlevel 1 exit 1 test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point" if errorlevel 1 exit 1
rem We have to use the absolute path because there is no "shebang line" in Windows python "%PREFIX%\Scripts\test-script-setup.py" if errorlevel 1 exit 1 python "%PREFIX%\Scripts\test-script-setup.py" | grep "Test script setup\.py" if errorlevel 1 exit 1 test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point" if errorlevel 1 exit 1
Exclude README.md file from package
@echo off set zipcmd=%~dp0\tools\7z\7z.exe pushd %~dp0\..\.. %zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ blenderseed-x.x.x-yyyy.zip blenderseed popd move ..\..\blenderseed-x.x.x-yyyy.zip . pause
@echo off set zipcmd=%~dp0\tools\7z\7z.exe pushd %~dp0\..\.. %zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ -x!README.md blenderseed-x.x.x-yyyy.zip blenderseed popd move ..\..\blenderseed-x.x.x-yyyy.zip . pause
Add missing "if errorlevel 1 exit 1" lines
rem Won't be found because there are no shebang lines on Windows rem python test-script-setup.py rem if errorlevel 1 exit 1 rem python test-script-setup.py | grep "Test script setup\.py" test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point"
rem Won't be found because there are no shebang lines on Windows rem python test-script-setup.py rem if errorlevel 1 exit 1 rem python test-script-setup.py | grep "Test script setup\.py" rem if errorlevel 1 exit 1 test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point" if errorlevel 1 exit 1
Add batch script to remove a git submodule from a local workspace
@rem This is a simple batch script to remove a submodule reference from a @rem working directory @rem Call the script by @rem 1) cd path\to\your\workspace @rem 2) path\to\removeSubmodule.bat submoduleName @rem See https://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule for more details @echo Removing submodule %1 git submodule deinit %1 git rm %1 git rm --cached %1 rm -rf .git/modules/%1
Make sure DB exists and is aligned before running the server
@echo off setlocal set mypath=%~dp0 set PYTHONPATH=pkgs if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set common="%COMMONPROGRAMFILES%" ) else ( set common="%COMMONPROGRAMFILES(x86)%" ) REM Start the DbServer in background but within the same context start "OpenQuake DB server" /B %common%\Python\2.7\python.exe -m openquake.server.dbserver REM Make sure that the dbserver is up and running echo Please wait ... if exist C:\Windows\System32\timeout.exe ( timeout /t 10 /nobreak > NUL ) else ( REM Windows XP hack ping 192.0.2.2 -n 1 -w 10000 > NUL ) REM Start the WebUI using django %common%\Python\2.7\python.exe -m openquake.server.manage runserver %* endlocal
@echo off setlocal set mypath=%~dp0 set PYTHONPATH=pkgs if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set common="%COMMONPROGRAMFILES%" ) else ( set common="%COMMONPROGRAMFILES(x86)%" ) REM Start the DbServer in background but within the same context start "OpenQuake DB server" /B %common%\Python\2.7\python.exe -m openquake.server.dbserver REM Make sure that the dbserver is up and running echo Please wait ... if exist C:\Windows\System32\timeout.exe ( timeout /t 10 /nobreak > NUL ) else ( REM Windows XP hack ping 192.0.2.2 -n 1 -w 10000 > NUL ) REM Create the DB or update it %common%\Python\2.7\python.exe -m openquake.server.db.upgrade_manager REM Start the WebUI using django %common%\Python\2.7\python.exe -m openquake.server.manage runserver %* endlocal
Add Instructions on Downloading Mingw 64bit for Building memdb
@echo off set GOARCH=%1 IF "%1" == "" (set GOARCH=amd64) set ORG_PATH=github.com\hashicorp set REPO_PATH=%ORG_PATH%\consul set GOPATH=%cd%\gopath rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul mkdir %GOPATH%\src\%ORG_PATH% 2>nul mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul %GOROOT%\bin\go build -o bin\%GOARCH%\consul.exe %REPO_PATH%
@echo off REM Download Mingw 64 on Windows from http://win-builds.org/download.html set GOARCH=%1 IF "%1" == "" (set GOARCH=amd64) set ORG_PATH=github.com\hashicorp set REPO_PATH=%ORG_PATH%\consul set GOPATH=%cd%\gopath rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul mkdir %GOPATH%\src\%ORG_PATH% 2>nul go get .\... mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul %GOROOT%\bin\go build -o bin\%GOARCH%\consul.exe %REPO_PATH%
Use the correct path for makevars.
sed -i 's/gnu/msvc/' changeforest-r/src/Makevars.win sed -i '1s/^/export CXX_STD=CXX11\n/' Makevars.win sed -i '1s/^/export PKG_CXXFLAGS=$(CXX_VISIBILITY)\n/' Makevars.win "%R%" CMD INSTALL --build changeforest-r IF %ERRORLEVEL% NEQ 0 exit 1
sed -i 's/gnu/msvc/' changeforest-r/src/Makevars.win sed -i '1s/^/export CXX_STD=CXX11\n/' changeforest-r/src/Makevars.win sed -i '1s/^/export PKG_CXXFLAGS=$(CXX_VISIBILITY)\n/' changeforest-r/src/Makevars.win "%R%" CMD INSTALL --build changeforest-r IF %ERRORLEVEL% NEQ 0 exit 1
Use Windows CLASSPATH environment variable
@REM @REM Copyright 2010-2017 Boxfuse GmbH @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. @REM You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM @Echo off setlocal @REM Set the current directory to the installation directory set INSTALLDIR=%~dp0 if exist "%INSTALLDIR%\jre\bin\java.exe" ( set JAVA_CMD="%INSTALLDIR%\jre\bin\java.exe" ) else ( @REM Use JAVA_HOME if it is set if "%JAVA_HOME%"=="" ( set JAVA_CMD=java ) else ( set JAVA_CMD="%JAVA_HOME%\bin\java.exe" ) ) %JAVA_CMD% -cp "%INSTALLDIR%\lib\*;%INSTALLDIR%\drivers\*" org.flywaydb.commandline.Main %* @REM Exit using the same code returned from Java EXIT /B %ERRORLEVEL%
@REM @REM Copyright 2010-2017 Boxfuse GmbH @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. @REM You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM @Echo off setlocal @REM Set the current directory to the installation directory set INSTALLDIR=%~dp0 if exist "%INSTALLDIR%\jre\bin\java.exe" ( set JAVA_CMD="%INSTALLDIR%\jre\bin\java.exe" ) else ( @REM Use JAVA_HOME if it is set if "%JAVA_HOME%"=="" ( set JAVA_CMD=java ) else ( set JAVA_CMD="%JAVA_HOME%\bin\java.exe" ) ) SET CP= IF DEFINED CLASSPATH ( SET CP=%CLASSPATH%;) %JAVA_CMD% -cp "%CP%%INSTALLDIR%\lib\*;%INSTALLDIR%\drivers\*" org.flywaydb.commandline.Main %* @REM Exit using the same code returned from Java EXIT /B %ERRORLEVEL%
Add script to disable intel context menu
@echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=igfxcui reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f set key=igfxDTCM reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f
Add build script for installation
#!/bin/bash PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin EXEC_DIR="/usr/local/bin" # set to anywhere seen by $PATH CONF_DIR="/etc/distributed-motion-s3" # default location to store config files (*.toml) # build dms3 components # echo 'building dms3 components...' go build go_dms3client.go go build go_dms3server.go go build go_dms3mail.go # move components into /usr/local/bin # echo 'moving dms3 components to' ${EXEC_DIR} '(root permissions expected)...' mv go_dms3client ${EXEC_DIR} mv go_dms3server ${EXEC_DIR} mv go_dms3mail ${EXEC_DIR} # copy TOML files into /etc/distributed-motion-s3 # echo 'copying dms3 component config files to' ${CONF_DIR} '(root permissions expected)...' mkdir -p ${CONF_DIR} cp dms3client.toml ${CONF_DIR} cp dms3libs.toml ${CONF_DIR} cp dms3server.toml ${CONF_DIR} cp dms3mail.toml ${CONF_DIR}
Change the executable from main to firstify
@echo off if not "%1" == "" goto continue if not exist imaginary\obj mkdir imaginary\obj for %%i in (imaginary\*.yca) do call %0 %%~ni goto end :continue echo Processing %1 main imaginary\%1.yca -mshl -o imaginary\obj\%1 > imaginary\obj\%1.txt 2>&1 goto end :end
@echo off if not "%1" == "" goto continue if not exist imaginary\obj mkdir imaginary\obj for %%i in (imaginary\*.yca) do call %0 %%~ni goto end :continue echo Processing %1 firstify imaginary\%1.yca -mshl -o imaginary\obj\%1 > imaginary\obj\%1.txt 2>&1 goto end :end
Return error level from batch file.
@echo off pushd %~dp0 dotnet publish tools\Build\Build.csproj --output tools\bin\Build --nologo --verbosity quiet if %errorlevel% equ 0 dotnet tools\bin\Build\Build.dll %* popd
@echo off pushd %~dp0 dotnet publish tools\Build\Build.csproj --output tools\bin\Build --nologo --verbosity quiet if %errorlevel% equ 0 dotnet tools\bin\Build\Build.dll %* popd exit /b %errorlevel%
Update to visual studio 2015
@echo off if "%~1"=="" ( call :Usage goto :EOF ) call bootstrap.cmd pushd "%~dp0" setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION set ProgramFilesDir=%ProgramFiles% if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)% set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat if EXIST "%VisualStudioCmd%" call "%VisualStudioCmd%" set NUnitDir=Tools\NUnit.ConsoleRunner if EXIST "%NUnitDir%\tools" set NUnitBinDir=%NUnitDir%\tools if NOT EXIST "%NUnitBinDir%" echo Missing NUnit, expected in %NUnitDir% if NOT EXIST "%NUnitBinDir%" exit /b -1 set FrameworkVersion=v4.0.30319 set FrameworkDir=%SystemRoot%\Microsoft.NET\Framework PATH=%FrameworkDir%\%FrameworkVersion%;%NUnitDir%;%JAVA_HOME%\bin;%PATH% msbuild.exe Waffle.proj /t:%* if NOT %ERRORLEVEL%==0 exit /b %ERRORLEVEL% popd endlocal exit /b 0 goto :EOF :Usage echo Syntax: echo. echo build [target] /p:Configuration=[Debug (default),Release] echo. echo Target: echo. echo all : build everything echo. echo Examples: echo. echo build all echo build all /p:Configuration=Release goto :EOF
@echo off if "%~1"=="" ( call :Usage goto :EOF ) call bootstrap.cmd pushd "%~dp0" setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION set ProgramFilesDir=%ProgramFiles% if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)% set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat if EXIST "%VisualStudioCmd%" call "%VisualStudioCmd%" set NUnitDir=Tools\NUnit.ConsoleRunner if EXIST "%NUnitDir%\tools" set NUnitBinDir=%NUnitDir%\tools if NOT EXIST "%NUnitBinDir%" echo Missing NUnit, expected in %NUnitDir% if NOT EXIST "%NUnitBinDir%" exit /b -1 set FrameworkVersion=v4.0.30319 set FrameworkDir=%SystemRoot%\Microsoft.NET\Framework PATH=%FrameworkDir%\%FrameworkVersion%;%NUnitDir%;%JAVA_HOME%\bin;%PATH% msbuild.exe Waffle.proj /t:%* if NOT %ERRORLEVEL%==0 exit /b %ERRORLEVEL% popd endlocal exit /b 0 goto :EOF :Usage echo Syntax: echo. echo build [target] /p:Configuration=[Debug (default),Release] echo. echo Target: echo. echo all : build everything echo. echo Examples: echo. echo build all echo build all /p:Configuration=Release goto :EOF
Speed up NuGet binary download
@echo off cls SET BUILD_DIR=%~dp0\build SET TOOLS_DIR=%BUILD_DIR%\tools SET NUGET_PATH=%TOOLS_DIR%\nuget.exe IF NOT EXIST %TOOLS_DIR%\ ( mkdir %TOOLS_DIR% ) IF NOT EXIST %NUGET_PATH% ( echo Downloading NuGet.exe ... powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe -OutFile %NUGET_PATH%" ) IF NOT EXIST "%TOOLS_DIR%\FAKE.Core\tools\Fake.exe" ( %NUGET_PATH% install "FAKE.Core" -Version 4.63.2 -OutputDirectory %TOOLS_DIR% -ExcludeVersion ) IF NOT EXIST "%TOOLS_DIR%\NUnit.Runners.2.6.2\" ( %NUGET_PATH% install "NUnit.Runners" -Version 2.6.2 -OutputDirectory %TOOLS_DIR% ) echo Running FAKE Build... %TOOLS_DIR%\FAKE.Core\tools\Fake.exe build.fsx %* -BuildDir=%BUILD_DIR%
@echo off cls SET BUILD_DIR=%~dp0\build SET TOOLS_DIR=%BUILD_DIR%\tools SET NUGET_PATH=%TOOLS_DIR%\nuget.exe IF NOT EXIST %TOOLS_DIR%\ ( mkdir %TOOLS_DIR% ) IF NOT EXIST %NUGET_PATH% ( echo Downloading NuGet.exe ... powershell -Command "Start-BitsTransfer -Source https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe -Destination %NUGET_PATH%" ) IF NOT EXIST "%TOOLS_DIR%\FAKE.Core\tools\Fake.exe" ( %NUGET_PATH% install "FAKE.Core" -Version 4.63.2 -OutputDirectory %TOOLS_DIR% -ExcludeVersion ) IF NOT EXIST "%TOOLS_DIR%\NUnit.Runners.2.6.2\" ( %NUGET_PATH% install "NUnit.Runners" -Version 2.6.2 -OutputDirectory %TOOLS_DIR% ) echo Running FAKE Build... %TOOLS_DIR%\FAKE.Core\tools\Fake.exe build.fsx %* -BuildDir=%BUILD_DIR%
Use PFX certificate file when signing msi
@echo off set DIST_DIR=dist set CERTIFICATE_STORE=Root set CERTIFICATE_NAME="Nuxeo Drive SPC" set MSI_PROGRAM_NAME="Nuxeo Drive" set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll set SIGN_CMD=signtool sign /v /s %CERTIFICATE_STORE% /n %CERTIFICATE_NAME% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL% set VERIFY_CMD=signtool verify /v /pa FOR %%F IN (%DIST_DIR%\*.msi) DO ( echo --------------------------------------------- echo Signing %%F echo --------------------------------------------- echo %SIGN_CMD% %%F %SIGN_CMD% %%F echo --------------------------------------------- echo Verifying %%F echo --------------------------------------------- echo %VERIFY_CMD% %%F %VERIFY_CMD% %%F )
@echo off set DIST_DIR=dist set CERTIFICATE_PATH=%HOMEPATH%\certificates\nuxeo.com.pfx set MSI_PROGRAM_NAME="Nuxeo Drive" set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL% set VERIFY_CMD=signtool verify /v /pa FOR %%F IN (%DIST_DIR%\*.msi) DO ( echo --------------------------------------------- echo Signing %%F echo --------------------------------------------- echo %SIGN_CMD% %%F %SIGN_CMD% %%F echo --------------------------------------------- echo Verifying %%F echo --------------------------------------------- echo %VERIFY_CMD% %%F %VERIFY_CMD% %%F )
Fix SQL CLI on Windows
@echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/plugins/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal
@echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal
Remove dev symlinks before deleting Release and Debug dirs.
ECHO OFF REM - Check for OS. This script works in Vista or later. REM Running it on XP may delete the entire Brackets repo if 'Release\dev' is a junction point. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM Remove existing links rmdir Debug include lib libcef_dll Release REM Make new links mklink /j Debug deps\cef\Debug mklink /j include deps\cef\include mklink /j lib deps\cef\lib mklink /j libcef_dll deps\cef\libcef_dll mklink /j Release deps\cef\Release GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. Build brackets-shell on a newer computer and ECHO manually place the results in brackets-shell\Release. :Exit
ECHO OFF REM - Check for OS. This script works in Vista or later. REM Running it on XP may delete the entire Brackets repo if 'Release\dev' is a junction point. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM Remove existing links to dev folder rmdir Release\dev rmdir Debug\dev REM Remove existing links rmdir Debug include lib libcef_dll Release REM Make new links mklink /j Debug deps\cef\Debug mklink /j include deps\cef\include mklink /j lib deps\cef\lib mklink /j libcef_dll deps\cef\libcef_dll mklink /j Release deps\cef\Release GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. Build brackets-shell on a newer computer and ECHO manually place the results in brackets-shell\Release. :Exit
Add batch script to run SWMM5 from command line
@echo off REM Test SWMM5 simulation REM This is an example script to run SWMM5 from command line REM Syntax: REM [PATH TO swmm5.exe] [PATH TO SWMM5 INPUT FILE (*.inp)] [PATH TO SWMM5 OUTPUT SUMMARY FILE (*.rpt)] [(OPTIONAL) PATH TO SWMM5 OUTPUT BINARY FILE (*.out)] REM Save only the summary (text) output file (*.rpt) with given time series at the end of the file "../../../swmm/swmm5.exe" "../demo_catchment/out/SWMM_in/demo_catchment_adap.inp" "../demo_catchment/out/SWMM_out/demo_catchment_adap.rpt" REM Save the summary (text) output file (*.rpt) and the binary file (*.out) with detailed simulation results only in the binary file "../../../swmm/swmm5.exe" "../demo_catchment/out/SWMM_in/demo_catchment_rect.inp" "../demo_catchment/out/SWMM_out/demo_catchment_rect.rpt" "../demo_catchment/out/SWMM_out/demo_catchment_rect.out" REM Wait for user input before closing terminal pause
Add run script for Windows
SET "AIR_SDK=%USERPROFILE%\Documents\AdobeAIRSDK" set "STEAM_SDK=%USERPROFILE%\Documents\Steam\sdk" SET ANE_PATH=..\..\lib\bin set "PATH=%STEAM_SDK%\redistributable_bin;%PATH%" "%AIR_SDK%\bin\adl.exe" -extdir "%ANE_PATH%" FRESteamWorksTest-app.xml
Add comments (REM) to bat file.
echo off php pre.php %1 %2 %3
echo off rem To simplify using pre on multiple sites/directories, install this bat file in the Windows path. php pre.php %1 %2 %3
Disable MinGW test - currently we don't have Boost libs verified for it.
rem This script use MinGW to build the MDSP. rem But still we use certain CygWin utilities: SVN PATH=C:\mingw\bin\;c:\mingw\mingw32\bin\;c:\mingw\msys\1.0\bin;C:\MinGW\libexec\gcc\mingw32\4.5.0\;C:\cygwin\bin\;c:\buildbot\bin;%PATH% set HOME=/c/buildbot/ bash mdsp_test_suite.sh mail
rem This script use MinGW to build the MDSP. rem But still we use certain CygWin utilities: SVN rem Currently MingGW version is disabled - we don't have validated Boost libs version for it. exit PATH=C:\mingw\bin\;c:\mingw\mingw32\bin\;c:\mingw\msys\1.0\bin;C:\MinGW\libexec\gcc\mingw32\4.5.0\;C:\cygwin\bin\;c:\buildbot\bin;%PATH% set HOME=/c/buildbot/ bash mdsp_test_suite.sh mail
Add a Batch script for running tests on Windows
@echo off REM Run tests on Windows. REM REM To run these tests, you should set up your Windows machine with the same REM paths that are used in AppVeyor. set tests=test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*/*.vader REM Use the first argument for selecting tests to run. if not "%1"=="" set tests=%1 set VADER_OUTPUT_FILE=%~dp0\vader_output type nul > "%VADER_OUTPUT_FILE%" C:\vim\vim\vim80\vim.exe -u test/vimrc "+Vader! %tests%" type "%VADER_OUTPUT_FILE%" del "%VADER_OUTPUT_FILE%"
Add Canvas2D to the npm release script
xcopy /Y /F "../../dist/preview release/babylon.d.ts" . xcopy /Y /F "../../dist/preview release/babylon.js" . xcopy /Y /F "../../dist/preview release/babylon.max.js" . xcopy /Y /F "../../dist/preview release/babylon.noworker.js" . xcopy /Y /F "../../dist/preview release/babylon.core.js" . xcopy /Y /F "../../dist/preview release/oimo.js" . pause
xcopy /Y /F "../../dist/preview release/babylon.d.ts" . xcopy /Y /F "../../dist/preview release/babylon.js" . xcopy /Y /F "../../dist/preview release/babylon.max.js" . xcopy /Y /F "../../dist/preview release/babylon.noworker.js" . xcopy /Y /F "../../dist/preview release/babylon.core.js" . xcopy /Y /F "../../dist/preview release/canvas2D/babylon.canvas2d.js" . xcopy /Y /F "../../dist/preview release/oimo.js" . pause
Change symbols to var resolve for windows builds
curl -sSf https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe -o rust-nightly-%TARGET%.exe rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" set PATH=%PATH%;C:\Program Files (x86)\Rust\bin if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH% set CARGO_TARGET_DIR=%APPVEYOR_BUILD_FOLDER%\target rustc -V cargo -V git submodule update --init --recursive
curl -sSf https://static.rust-lang.org/dist/rust-nightly-%TARGET%.exe -o rust-nightly-%TARGET%.exe rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" set PATH=%PATH%;C:\Program Files (x86)\Rust\bin if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH% set CARGO_TARGET_DIR=%APPVEYOR_BUILD_FOLDER%\target rustc -V cargo -V git submodule update --init --recursive
Use a putty saved session instead of pageant
@echo off rem This script is in use by the Windows buildslaves to upload the package to openphdguiding.org set exitcode=1 for /F "usebackq" %%f in (`dir phd2-*-win32.exe /O-D /B` ) do ( if EXIST %%f ( ( echo cd upload echo put %%f echo quit ) | psftp phd2buildbot@openphdguiding.org set exitcode=%errorlevel% ) goto :end ) :end exit /B %exitcode%
@echo off rem This script is in use by the Windows buildslaves to upload the package to openphdguiding.org rem rem Before to run this script you need to install putty and add it to PATH. rem As we cannot use pageant from the buildbot service we need to create rem a saved session named phd2buildbot in putty using the same user as the service. rem Set the hostname, auto-login user name and private key in the session. set exitcode=1 for /F "usebackq" %%f in (`dir phd2-*-win32.exe /O-D /B` ) do ( if EXIST %%f ( ( echo cd upload echo put %%f echo quit ) | psftp phd2buildbot set exitcode=%errorlevel% ) goto :end ) :end exit /B %exitcode%
Update command file for publishing nuget.
@echo off echo Press any key to publish pause ".nuget\NuGet.exe" push Rssdp.3.5.0-beta.nupkg -Source https://www.nuget.org/api/v2/package pause
@echo off echo Press any key to publish pause ".nuget\NuGet.exe" push Rssdp.3.5.3.nupkg -Source https://www.nuget.org/api/v2/package pause
Revert "Don't do a BootDPRO but instead call the boot directly."
ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\Dolphin7.exe Dolphin copy ..\..\DolphinVM7.dll Dolphin copy ..\..\DolphinCR7.dll Dolphin copy ..\..\DolphinDR7.dll Dolphin copy ..\..\DolphinSureCrypto.dll Dolphin ECHO Boot and test image cd Dolphin Dolphin7 DBOOT.img7 DolphinProfessional CALL TestDPRO
ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\Dolphin7.exe Dolphin copy ..\..\DolphinVM7.dll Dolphin copy ..\..\DolphinCR7.dll Dolphin copy ..\..\DolphinDR7.dll Dolphin copy ..\..\DolphinSureCrypto.dll Dolphin ECHO Boot and test image cd Dolphin CALL BootDPRO CALL TestDPRO
Patch for version 0.73 update
@echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.72" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start
@echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.73" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start
Add script to conditionally start Bridge
echo off setlocal tasklist /FI "IMAGENAME eq Bridge.exe" 2>NUL | find /I /N "Bridge.exe">NUL if "%ERRORLEVEL%"=="0" ( echo The Bridge is already running. goto running ) pushd %~dp0 echo Building the Bridge... call BuildWCFTestService.cmd popd if '%BridgeResourceFolder%' == '' ( set _bridgeResourceFolder=..\..\Bridge\Resources ) else ( set _bridgeResourceFolder=%BridgeResourceFolder% ) pushd %~dp0..\..\..\..\bin\wcf\tools\Bridge echo Invoking Bridge.exe with arguments: /BridgeResourceFolder:%_bridgeResourceFolder% %* start /MIN Bridge.exe /BridgeResourceFolder:%_bridgeResourceFolder% %* popd :running exit /b
Update to use latest KuduScript
@echo off setlocal enabledelayedexpansion pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/66dd7e2a3966c06180df0eb66cc9400d4b961e5e IF %ERRORLEVEL% NEQ 0 goto error goto end :error if %counter% GEQ %attempts% goto :lastError goto retry :lastError popd echo An error has occured during npm install. exit /b 1 :end popd echo Finished successfully. exit /b 0
@echo off setlocal enabledelayedexpansion pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/254116790e41bc69bce809e46c9998f03addcfc4 IF %ERRORLEVEL% NEQ 0 goto error goto end :error if %counter% GEQ %attempts% goto :lastError goto retry :lastError popd echo An error has occured during npm install. exit /b 1 :end popd echo Finished successfully. exit /b 0
Add bat for building solution from CLI
SET PATH=C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%; CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" git pull --recurse-submodules git submodule update msbuild /p:Configuration=Normal gsutil cp Normal/engine/engine.exe gs://grit-engine/ gsutil cp Normal/launcher/launcher.exe gs://grit-engine/ gsutil cp Normal/extract/extract.exe gs://grit-engine/ gsutil cp Normal/GritXMLConverter/GritXMLConverter.exe gs://grit-engine/
Fix batch file unit tests
@echo on set config=%1 if "%config%" == "" ( set config=Release ) set version= if not "%PackageVersion%" == "" ( set version=-Version %PackageVersion% ) if "%NuGet%" == "" ( set NuGet=".nuget\nuget.exe" ) REM Package restore call %NuGet% restore PropertyCopier\packages.config -OutputDirectory %cd%\packages -NonInteractive REM Build %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild PropertyCopier.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false REM Unit tests %nunit% PropertyCopier.Tests\bin\%config%\PropertyCopier.Tests.dll if not "%errorlevel%"=="0" goto failure REM Package mkdir Build mkdir Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.dll Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.pdb Build\net40 call %NuGet% pack "PropertyCopier\PropertyCopier.csproj" -IncludeReferencedProjects -symbols -o Build\net40 -p Configuration=%config% %version% :success exit 0 :failure exit -1
@echo on set config=%1 if "%config%" == "" ( set config=Release ) set version= if not "%PackageVersion%" == "" ( set version=-Version %PackageVersion% ) if "%NuGet%" == "" ( set NuGet=".nuget\nuget.exe" ) REM Package restore call %NuGet% restore PropertyCopier\packages.config -OutputDirectory %cd%\packages -NonInteractive REM Build %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild PropertyCopier.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false REM Unit tests packages\NUnit.Runners.2.6.4\tools PropertyCopier.Tests\bin\%config%\PropertyCopier.Tests.dll if not "%errorlevel%"=="0" goto failure REM Package mkdir Build mkdir Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.dll Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.pdb Build\net40 call %NuGet% pack "PropertyCopier\PropertyCopier.csproj" -IncludeReferencedProjects -symbols -o Build\net40 -p Configuration=%config% %version% :success exit 0 :failure exit -1
Add bat file for creating project with MSVC12 toolchain
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 rmdir buildRelease /s /q rmdir buildDebug /s /q mkdir buildRelease mkdir buildDebug cd buildRelease cmake ../ -GNinja^ -DCMAKE_BUILD_TYPE=Release^ -DCMAKE_PREFIX_PATH=c:/Qt/Qt5.5.1/msvc2013_64/^ -DGTEST_ROOT=e:/Dev/Libs/external/ cd ..\buildDebug cmake ../ -GNinja^ -DCMAKE_BUILD_TYPE=Debug^ -DCMAKE_PREFIX_PATH=c:/Qt/Qt5.5.1/msvc2013_64/^ -DGTEST_ROOT=e:/Dev/Libs/external/ cd ..
Remove positional parameter from bat file
@echo off SETLOCAL enabledelayedexpansion TITLE Elasticsearch ${project.version} SET params='%*' :loop FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO ( SET current=%%A SET params='%%B' SET silent=N IF "!current!" == "-s" ( SET silent=Y ) IF "!current!" == "--silent" ( SET silent=Y ) IF "!silent!" == "Y" ( SET nopauseonerror=Y ) ELSE ( IF "x!newparams!" NEQ "x" ( SET newparams=!newparams! !current! ) ELSE ( SET newparams=!current! ) ) IF "x!params!" NEQ "x" ( GOTO loop ) ) SET HOSTNAME=%COMPUTERNAME% CALL "%~dp0elasticsearch.in.bat" IF ERRORLEVEL 1 ( IF NOT DEFINED nopauseonerror ( PAUSE ) EXIT /B %ERRORLEVEL% ) "%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" start !newparams! ENDLOCAL
@echo off SETLOCAL enabledelayedexpansion TITLE Elasticsearch ${project.version} SET params='%*' :loop FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO ( SET current=%%A SET params='%%B' SET silent=N IF "!current!" == "-s" ( SET silent=Y ) IF "!current!" == "--silent" ( SET silent=Y ) IF "!silent!" == "Y" ( SET nopauseonerror=Y ) ELSE ( IF "x!newparams!" NEQ "x" ( SET newparams=!newparams! !current! ) ELSE ( SET newparams=!current! ) ) IF "x!params!" NEQ "x" ( GOTO loop ) ) SET HOSTNAME=%COMPUTERNAME% CALL "%~dp0elasticsearch.in.bat" IF ERRORLEVEL 1 ( IF NOT DEFINED nopauseonerror ( PAUSE ) EXIT /B %ERRORLEVEL% ) "%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams! ENDLOCAL
Make sure to uninstall the old pip package and install the newly built one when running windows tests on TF CI.
:: This script assumes the standard setup on tensorflow Jenkins windows machines. :: It is NOT guaranteed to work on any other machine. Use at your own risk! :: :: REQUIREMENTS: :: * All installed in standard locations: :: - JDK8, and JAVA_HOME set. :: - Microsoft Visual Studio 2015 Community Edition :: - Msys2 :: - Anaconda3 :: - CMake :: Record the directory we are in. Script should be invoked from the root of the repository. SET REPO_ROOT=%cd% :: Make sure we have a clean directory to build things in. SET BUILD_DIR=cmake_build RMDIR %BUILD_DIR% /S /Q MKDIR %BUILD_DIR% CD %BUILD_DIR% :: Set which tests to build SET BUILD_CC_TESTS=OFF SET BUILD_PYTHON_TESTS=ON :: Run the CMAKE build to build the pip package. CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe" :: Uninstall tensorflow pip package, which might be a leftover from old runs. %PIP_EXE% uninstall tensorflow :: Install the pip package. %PIP_EXE% install %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl :: Run all python tests ctest -C Release --output-on-failure
:: This script assumes the standard setup on tensorflow Jenkins windows machines. :: It is NOT guaranteed to work on any other machine. Use at your own risk! :: :: REQUIREMENTS: :: * All installed in standard locations: :: - JDK8, and JAVA_HOME set. :: - Microsoft Visual Studio 2015 Community Edition :: - Msys2 :: - Anaconda3 :: - CMake :: Record the directory we are in. Script should be invoked from the root of the repository. SET REPO_ROOT=%cd% :: Make sure we have a clean directory to build things in. SET BUILD_DIR=cmake_build RMDIR %BUILD_DIR% /S /Q MKDIR %BUILD_DIR% CD %BUILD_DIR% :: Set which tests to build SET BUILD_CC_TESTS=OFF SET BUILD_PYTHON_TESTS=ON :: Run the CMAKE build to build the pip package. CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe" :: Uninstall tensorflow pip package, which might be a leftover from old runs. %PIP_EXE% uninstall -y tensorflow :: Install the pip package. %PIP_EXE% install --upgrade %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl :: Run all python tests ctest -C Release --output-on-failure
Create a user data directory on Windows.
@echo off call config.bat echo Installing PIP... %PYTHON% %BINDIR%\get-pip.py echo Installing KCAA Python server prerequisites... %PIP% install python-dateutil %PIP% install requests %PIP% install selenium pause
@echo off call config.bat echo Creating USERDATADIR: %USERDATADIR% mkdir %USERDATADIR% echo Installing PIP... %PYTHON% %BINDIR%\get-pip.py echo Installing KCAA Python server prerequisites... %PIP% install python-dateutil %PIP% install requests %PIP% install selenium pause
Test runner batch now takes optional command-line arguments.
@echo off ..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul @echo Deleting empty log files... for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %~zi==0 del %%i pause
@echo off ..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe %* del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul @rem Deleting empty log files... for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %%~zi==0 del %%i pause
ADd pymatgen-db to windwos build.
cd conda-skeletons conda install conda-build anaconda-client conda config --add channels matsci conda config --set anaconda_upload yes FOR %%A IN (latexcodec pybtex spglib pyhull pymatgen seekpath) DO conda build --user matsci %%A cd ..
cd conda-skeletons conda install conda-build anaconda-client conda config --add channels matsci conda config --set anaconda_upload yes FOR %%A IN (latexcodec pybtex spglib pyhull pymatgen pymatgen-db seekpath) DO conda build --user matsci %%A cd ..
Set environment variables for current process
@echo off set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: " setx /M NVM_HOME "%NVM_PATH%" setx /M NVM_SYMLINK "C:\Program Files\nodejs" setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%" if exist "%SYSTEMDRIVE%\Program Files (x86)\" ( set SYS_ARCH=64 ) else ( set SYS_ARCH=32 ) (echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt notepad %NVM_HOME%\settings.txt @echo on
@echo off set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: " set NVM_HOME=%NVM_PATH% set NVM_SYMLINK=C:\Program Files\nodejs setx /M NVM_HOME "%NVM_HOME%" setx /M NVM_SYMLINK "%NVM_SYMLINK%" setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%" if exist "%SYSTEMDRIVE%\Program Files (x86)\" ( set SYS_ARCH=64 ) else ( set SYS_ARCH=32 ) (echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt notepad %NVM_HOME%\settings.txt @echo on
Build script for Windows users
@echo off :: Requirements for building :: Download "Open Source Flex SDK" from http://www.adobe.com/devnet/flex/flex-sdk-download-all.html :: file similar to: flex_sdk_4.1.0.16076_mpl.zip :: :: create directory on disc e.g "C:\Program Files\FlexSdk" :: Copy and extract downloaded .zip to this location :: :: Go to Start>My Computer (right click)>Properties>Advanced System Settings>Environment Variables :: Edit System variable called "Path" :: Add ";C:\Program Files\FlexSdk\bin" (without quotes) at the end of its value echo ----- Generating new SWF ----- mxmlc Recorder.as -output recorder.swf echo ----- Copying SWF file to demo ----- xcopy /s/y "recorder.swf" "..\html\recorder.swf" exit
Fix SQL CLI on Windows
@echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/plugins/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal
@echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal
Update Windows python binary to use py
pip install --upgrade wxPython pip install -r requirements.txt pip install pywin32 pyinstaller -p bundledApps --onefile --windowed --clean --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py ::Windows shell (CMD.exe) move /Y ".\dist\WAIL.exe" ".\WAIL.exe" ::Unix shell (e.g., from Git Bash on Windows) ::mv "./dist/WAIL.exe" "./WAIL.exe"
py -m pip install --upgrade wxPython py -m pip install -r requirements.txt py -m pip install pywin32 pyinstaller -p bundledApps --onefile --windowed --clean --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py ::Windows shell (CMD.exe) move /Y ".\dist\WAIL.exe" ".\WAIL.exe" ::Unix shell (e.g., from Git Bash on Windows) ::mv "./dist/WAIL.exe" "./WAIL.exe"
Disable officescan context menu on drives
@echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=OfficeScan NT reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
@echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=OfficeScan NT reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f
Add Windows development environment creator
mkdir "C:\RestafariEnvironment" cd "C:\RestafariEnvironment" @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin choco install wget -y wget -c -O atom_setup.exe --no-check-certificate "https://atom.io/download/windows" atom_setup.exe /quiet "%APPDATA%\..\Local\atom\bin\apm.cmd" install script choco install git -y choco install python -y choco install easy.install -y easy_install.exe PyYAML colorclass anyjson pycurl git clone https://github.com/manoelhc/restafari.git @echo "%APPDATA%\..\Local\atom\bin\atom.cmd" restafari > C:\RestafariEnvironment\OpenInAtom.bat C:\RestafariEnviroment\OpenInAtom.bat
Add telnet connection to qemu monitor
"C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom "C:\solutions\os_c\build\os-x86_64.iso" -d int -no-shutdown -no-reboot -s
"C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom "C:\solutions\os_c\build\os-x86_64.iso" -d int -no-shutdown -no-reboot -s -monitor telnet:127.0.0.1:2222,server,nowait
Revert "add enable avx2 flag to windows build script"
@echo off setlocal set SCRIPTDIR=%~dp0 set PROJDIR=%SCRIPTDIR%..\..\ set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" cd %PROJDIR% @echo on set BUILDDIR=%PROJDIR%build_win32\ set OUTPUTDIR=%PROJDIR%output\win32\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015" -DBUILD_SHARED_LIBS=ON -DENABLE_TESTING=ON -DCMAKE_CONFIGURATION_TYPES=Release || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest -C Release . || EXIT /B 1 cd .. set BUILDDIR=%PROJDIR%build_win64\ set OUTPUTDIR=%PROJDIR%output\win64\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015 Win64" -DBUILD_SHARED_LIBS=ON -DENABLE_TESTING=ON -DENABLE_AVX2=ON -DCMAKE_CONFIGURATION_TYPES=Release || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest -C Release . || EXIT /B 1 cd ..
@echo off setlocal set SCRIPTDIR=%~dp0 set PROJDIR=%SCRIPTDIR%..\..\ set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" cd %PROJDIR% @echo on set BUILDDIR=%PROJDIR%build_win32\ set OUTPUTDIR=%PROJDIR%output\win32\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015" -DBUILD_SHARED_LIBS=ON -DCMAKE_CONFIGURATION_TYPES=Release %MSBUILDBIN% ALL_BUILD.vcxproj /property:Configuration=Release cd .. set BUILDDIR=%PROJDIR%build_win64\ set OUTPUTDIR=%PROJDIR%output\win64\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015 Win64" -DBUILD_SHARED_LIBS=ON -DCMAKE_CONFIGURATION_TYPES=Release %MSBUILDBIN% ALL_BUILD.vcxproj /property:Configuration=Release cd ..
Change '--version' command for release
@echo off setlocal if "%1" == "--help" ( echo Usage: rbenv --version echo. echo Displays the version number of this rbenv release, including the echo current revision from git, if available. echo. echo The format of the git revision is: echo ^<version^>-^<num_commits^>-^<git_sha^> echo where `num_commits` is the number of commits since `version` was echo tagged. echo. EXIT /B ) echo rbenv 0.0.0-01
@echo off setlocal if "%1" == "--help" ( echo Usage: rbenv --version echo. echo Displays the version number of this rbenv release, including the echo current revision from git, if available. echo. echo The format of the git revision is: echo ^<version^>-^<num_commits^>-^<git_sha^> echo where `num_commits` is the number of commits since `version` was echo tagged. echo. EXIT /B ) echo rbenv 0.0.1-02
Check if directory exists before trying to delete it.
@ECHO OFF REM - Use full path of this batch file to determine root directory set root_path=%~f0 set root_path=%root_path:~0,-27% REM - Check for parameter IF %1.==. GOTO Error REM - Check for OS. This script works in Vista or later. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM - Remove existing 'dev' directory (if present) rmdir %1\dev REM - Make symlink REM (doesn't work on XP - see instructions below) mklink /d %1\dev %root_path% GOTO Exit :Error ECHO Usage: setup_for_hacking.bat application_path ECHO Setup Brackets to use the HTML/CSS/JS files pulled from GitHub. ECHO Parameters: application_path - path that contains the Brackets application ECHO Example: setup_for_hacking.bat "c:\Program Files (x86)\Brackets Sprint 14" GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. ECHO To enable hacking, use the junction tool (http://technet.microsoft.com/en-us/sysinternals/bb896768) ECHO as follows: junction.exe %1\dev %root_path% ECHO (in the folder containing Brackets.exe) :Exit
@ECHO OFF REM - Use full path of this batch file to determine root directory set root_path=%~f0 set root_path=%root_path:~0,-27% REM - Check for parameter IF %1.==. GOTO Error REM - Check for OS. This script works in Vista or later. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM - Remove existing 'dev' directory (if present) if exist %1\dev rmdir %1\dev REM - Make symlink REM (doesn't work on XP - see instructions below) mklink /d %1\dev %root_path% GOTO Exit :Error ECHO Usage: setup_for_hacking.bat application_path ECHO Setup Brackets to use the HTML/CSS/JS files pulled from GitHub. ECHO Parameters: application_path - path that contains the Brackets application ECHO Example: setup_for_hacking.bat "c:\Program Files (x86)\Brackets Sprint 14" GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. ECHO To enable hacking, use the junction tool (http://technet.microsoft.com/en-us/sysinternals/bb896768) ECHO as follows: junction.exe %1\dev %root_path% ECHO (in the folder containing Brackets.exe) :Exit
Stop build when an error occurs. "Peter 'Luna' Runestig" <peter+openssl-dev@runestig.com>
set OPTS=no-asm perl Configure VC-WIN32 perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak nmake -f d32.mak nmake -f 32.mak nmake -f d32dll.mak nmake -f 32dll.mak
set OPTS=no-asm perl Configure VC-WIN32 perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak nmake -f d32.mak @if errorlevel 1 goto end nmake -f 32.mak @if errorlevel 1 goto end nmake -f d32dll.mak @if errorlevel 1 goto end nmake -f 32dll.mak :end
Add a comment explaining why this path is set
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%" if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM% if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% if %MSVS% == 2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% rem check compiler version cl git clone --depth 1 https://github.com/randombit/botan-ci-tools set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%;botan-ci-tools
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%" if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM% if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% if %MSVS% == 2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% rem check compiler version cl git clone --depth 1 https://github.com/randombit/botan-ci-tools rem include QtCreator bin dir to get jom set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%;botan-ci-tools
Fix error in version file
set MAJOR_PREVIOUS=1 set MINOR_PREVIOUS=5 set PATCH_PREVIOUS=12 set PRERELEASE_PREVIOUS=-developer set MAJOR=1 set MINOR=5 set PATCH=13 set PRERELEASE=-developer
set MAJOR_PREVIOUS=1 set MINOR_PREVIOUS=5 set PATCH_PREVIOUS=12 set PRERELEASE_PREVIOUS=-beta set MAJOR=1 set MINOR=5 set PATCH=13 set PRERELEASE=-developer
Fix for the MyGet packaging
@echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version=1.0.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) set nuget= if "%nuget%" == "" ( set nuget=nuget ) set nunit="tools\nunit\nunit-console.exe" %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Frankie.sln /p:Configuration=%config% /v:M %nunit% /noresult ^ src\Tests\bin\%config%\RDumont.Frankie.Tests.dll ^ src\Specs\bin\%config%\RDumont.Frankie.Specs.dll mkdir Build %nuget% pack src\Core\Core.csproj -verbosity detailed -o Build -Version %version% %nuget% pack src\CommandLine\CommandLine.csproj -IncludeReferencedProjects -verbosity detailed -o Build -Version %version%
@echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version=1.0.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) set nuget= if "%nuget%" == "" ( set nuget=nuget ) set nunit="tools\nunit\nunit-console.exe" %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Frankie.sln /p:Configuration=%config% /v:M %nunit% /noresult ^ src\Tests\bin\%config%\RDumont.Frankie.Tests.dll ^ src\Specs\bin\%config%\RDumont.Frankie.Specs.dll mkdir Build call %nuget% pack src\Core\Core.csproj -verbosity detailed -o Build -Version %version% call %nuget% pack src\CommandLine\CommandLine.csproj -IncludeReferencedProjects -verbosity detailed -o Build -Version %version%
Exclude ThScoreFileConverterTests from the coverage result
set CONFIGURATION=%1 set OUTPUT=%2 set OPENCOVER=".\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" set TARGET="%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" set TARGET_ARGS=".\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll" set FILTER="+[*]*" %OPENCOVER% ^ -register:user ^ -target:%TARGET% ^ -targetargs:%TARGET_ARGS% ^ -filter:%FILTER% ^ -output:%OUTPUT%
set CONFIGURATION=%1 set OUTPUT=%2 set OPENCOVER=".\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" set TARGET="%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" set TARGET_ARGS=".\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll" set FILTER="+[*]* -[ThScoreFileConverterTests]*" %OPENCOVER% ^ -register:user ^ -target:%TARGET% ^ -targetargs:%TARGET_ARGS% ^ -filter:%FILTER% ^ -output:%OUTPUT%
Add windows .bat for automatically building foreign dependencies
@echo off SET GENERATOR="Visual Studio 14 2015" SET GENERATOR64="Visual Studio 14 2015 Win64" rem SET GENERATOR"Visual Studio 15 2017" rem SET GENERATOR64="Visual Studio 15 2017 Win64" cd ../foreign/ cd SPIRV-Tools mkdir build cd build cmake -G%GENERATOR% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers .. cmake --build . cd .. mkdir build64 cd build64 cmake -G%GENERATOR64% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers .. cmake --build . cd .. cd .. cd SPIRV-Cross mkdir build cd build cmake -G%GENERATOR% .. cmake --build . cd .. mkdir build64 cd build64 cmake -G%GENERATOR64% .. cmake --build . cd .. cd .. cd ../windows
Use ^ as line continuation character
@echo off dotnet tool install --global AzureSignTool azuresigntool sign --description-url "https://starschema.com" \ --file-digest sha256 --azure-key-vault-url https://billiant-keyvault.vault.azure.net \ --azure-key-vault-client-id %AZURE_KEY_VAULT_CLIENT_ID% \ --azure-key-vault-client-secret %AZURE_KEY_VAULT_CLIENT_SECRET% \ --azure-key-vault-certificate StarschemaCodeSigning \ --timestamp-rfc3161 http://timestamp.digicert.com --timestamp-digest sha256 \ --no-page-hashing \ %*
@echo off dotnet tool install --global AzureSignTool azuresigntool sign --description-url "https://starschema.com" ^ --file-digest sha256 --azure-key-vault-url https://billiant-keyvault.vault.azure.net ^ --azure-key-vault-client-id %AZURE_KEY_VAULT_CLIENT_ID% ^ --azure-key-vault-client-secret %AZURE_KEY_VAULT_CLIENT_SECRET% ^ --azure-key-vault-certificate StarschemaCodeSigning ^ --timestamp-rfc3161 http://timestamp.digicert.com --timestamp-digest sha256 ^ --no-page-hashing ^ %*
Fix bat links on Windows
REM remove unneeded librar stubs rd /S /Q %SRC_DIR%\include rd /S /Q %SRC_DIR%\lib rd /S /Q %SRC_DIR%\share\man if errorlevel 1 exit 1 mkdir %SRC_DIR%\share\doc\graphviz move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz if errorlevel 1 exit 1 move %SRC_DIR%\bin %SRC_DIR%\graphviz if errorlevel 1 exit 1 xcopy /S %SRC_DIR% %LIBRARY_PREFIX% if errorlevel 1 exit 1 mkdir %LIBRARY_BIN% move %LIBRARY_PREFIX%\graphviz %LIBRARY_BIN%\graphviz if errorlevel 1 exit 1 del %LIBRARY_PREFIX%\bld.bat if errorlevel 1 exit 1 pushd %LIBRARY_BIN% for /r "%LIBRARY_BIN%\graphviz" %%f in (*.exe) do ( echo %%f %* > %%~nf.bat if errorlevel 1 exit 1 )
REM remove unneeded librar stubs rd /S /Q %SRC_DIR%\include rd /S /Q %SRC_DIR%\lib rd /S /Q %SRC_DIR%\share\man if errorlevel 1 exit 1 mkdir %SRC_DIR%\share\doc\graphviz move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz if errorlevel 1 exit 1 move %SRC_DIR%\bin %SRC_DIR%\graphviz if errorlevel 1 exit 1 xcopy /S %SRC_DIR% %LIBRARY_PREFIX% if errorlevel 1 exit 1 mkdir %LIBRARY_BIN% move %LIBRARY_PREFIX%\graphviz %LIBRARY_BIN%\graphviz if errorlevel 1 exit 1 del %LIBRARY_PREFIX%\bld.bat if errorlevel 1 exit 1 pushd %LIBRARY_BIN% for /r "%LIBRARY_BIN%\graphviz" %%f in (*.exe) do ( echo @echo off > %%~nf.bat echo %%~dp0.\graphviz\%%~nf.exe %%* >> %%~nf.bat if errorlevel 1 exit 1 )
Copy GLL to yc for Examples.
if exist yc ( rd /s /q yc ) mkdir yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRCommon\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRParser\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRGenerator\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Constraints\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Utils.SourceText\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.targets yc
if exist yc ( rd /s /q yc ) mkdir yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\GLLGenerator\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRCommon\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRParser\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRGenerator\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Constraints\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Utils.SourceText\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.targets yc
Fix handling of spaces in plugin script on Windows
@echo off SETLOCAL enabledelayedexpansion IF DEFINED JAVA_HOME ( set JAVA=%JAVA_HOME%\bin\java.exe ) ELSE ( FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I ) IF NOT EXIST "%JAVA%" ( ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2 EXIT /B 1 ) set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI TITLE Elasticsearch Plugin Manager ${project.version} SET path_props=-Des.path.home="%ES_HOME%" IF DEFINED CONF_DIR ( SET path_props=!path_props! -Des.path.conf="%CONF_DIR%" ) SET args=%* SET HOSTNAME=%COMPUTERNAME% "%JAVA%" %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args! ENDLOCAL
@echo off SETLOCAL enabledelayedexpansion IF DEFINED JAVA_HOME ( set JAVA="%JAVA_HOME%\bin\java.exe" ) ELSE ( FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I ) IF NOT EXIST %JAVA% ( ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2 EXIT /B 1 ) set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI TITLE Elasticsearch Plugin Manager ${project.version} SET path_props=-Des.path.home="%ES_HOME%" IF DEFINED CONF_DIR ( SET path_props=!path_props! -Des.path.conf="%CONF_DIR%" ) SET args=%* SET HOSTNAME=%COMPUTERNAME% %JAVA% %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args! ENDLOCAL
Update windows script so cmd-c works properly
@echo off set OLDDIR=%CD% cd %~dp0 cd .. set AGILE_HOME=%CD% set CMD_LINE_ARGS= :getArgs if %1x==x goto doneArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneArgs SET JAVA_EXE="%JAVA_HOME%\bin\java.exe" set JAVA_OPTS=-Xmx512m -Djava.awt.headless=true -Duser.timezone=UTC cd %AGILE_HOME% %JAVA_EXE% %JAVA_OPTS% -cp conf;bin\${project.artifactId}-${project.version}.jar org.headsupdev.agile.runtime.Main %CMD_LINE_ARGS% set CMD_LINE_ARGS= set JAVA_EXE= set JAVA_OPTS= cd %OLDDIR% set OLDDIR=
@echo off :: Try to get around "Terminate batch job?" - use start, which spawns a new window :: Establish if we were launched from the command line. :: If so, run a start /wait otherwise we want the original window to close set SCRIPT=%0 set DQUOTE=" @echo %SCRIPT:~0,1% | findstr /l %DQUOTE% > NUL if NOT %ERRORLEVEL% EQU 0 set START_PARAMS=/wait set OLDDIR=%CD% cd %~dp0 cd .. set AGILE_HOME=%CD% set CMD_LINE_ARGS= :getArgs if %1x==x goto doneArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneArgs SET JAVA_EXE="%JAVA_HOME%\bin\java.exe" set JAVA_OPTS=-Xmx512m -Djava.awt.headless=true -Duser.timezone=UTC cd %AGILE_HOME% @start %START_PARAMS% cmd /c %JAVA_EXE% %JAVA_OPTS% -cp conf;bin\${project.artifactId}-${project.version}.jar org.headsupdev.agile.runtime.Main %CMD_LINE_ARGS% set CMD_LINE_ARGS= set JAVA_EXE= set JAVA_OPTS= cd %OLDDIR% set OLDDIR=
Remove old .vsi file before creating new
..\Build\tools\7zip\7za.exe -r a CosmosBoot.zip ProjectTemplate ..\Build\tools\7zip\7za.exe a -tzip Cosmos.vsi Cosmos.vscontent CosmosBoot.zip del CosmosBoot.zip
del Cosmos.vsi ..\Build\tools\7zip\7za.exe -r a CosmosBoot.zip ProjectTemplate ..\Build\tools\7zip\7za.exe a -tzip Cosmos.vsi Cosmos.vscontent CosmosBoot.zip del CosmosBoot.zip