Skip to content

Commit

Permalink
Pre-Tag test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiker committed Dec 13, 2023
1 parent 8d5b744 commit 3674307
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 36 deletions.
2 changes: 1 addition & 1 deletion build.pro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ print, 'Project directory is: ', sProjDir

cd, sProjDir

if !version.os_family eq 'Windows' then make, vcvars=vcvars, vcpkg=vcpgk else make
if !version.os_family eq 'Windows' then make, vcvars=vcvars, vcpkg=vcpkg else make

; Add in the dlm
sDLM = string(sProjDir, sDirSep, sDirSep, format='%s%sdlm%sdas2c.dlm')
Expand Down
2 changes: 1 addition & 1 deletion deps/das2C
Submodule das2C updated 1 files
+4 −0 das2/dataset.c
39 changes: 24 additions & 15 deletions examples/ex01_juno_waves_survey.pro
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
; Plot four section Juno Waves electric Survey data
;
; Note:
; If you request newer data that have not been released to the PDS then
; the das2 server will ask for authenticiation. Authentication sessions
; do not work in IDLDE (since it's not a real terminal). To save your
; authentication so you don't have to enter it each time:
; If you request newer data that have not been released to the PDS
; the das2 server will ask for authenticiation. The following
; procedure can be used to save and load your credentials.
;
; 1. Start IDL in a terminal (or cmd.exe shell)
; 1. Run the following to set and save your access information:
;
; das2c_credset( $
; 'https://jupiter.physics.uiowa.edu/das/server', $
; 'Juno Magnetospheric Working Group', $
; !null, !null, 'A_USER_NAME', 'A_PASSWORD' $
; )
; das2c_credsave()
;
; 2. Run this procedure with a recent time range (you'll be prompted for
; a password)
; subsituting in a real username and password of course.
;
; 3. Run the following to save your password:
; das2c_credsave() ; Saves to $HOME/.das2_auth by default.
;
; Before reading data in a new session run:
; 2. Each time you re-start IDL, run the following once to load all
; your stored credentials and associated matching conditions.
;
; das2c_credload()
;
; to load your saved passwords to memory. Since you're not prompted for
; authentication, this procedure will work in IDLDE.
; 3. If you need to delete your credentials remove the file named
; '.das2_auth' from your $HOME (POSIX) or %USERPROFILE% (Windows)
; directory
;
; Das2DLM only hands out the cerdentials you specify when data
; requests match the server root and authentication realm you
; specified. That way random servers don't end up getting access
; to your passwords.
;
; For more detail, see the das2c_cred* functions in the API reference @
; https://github.com/das-developers/das2dlm/wiki
; For more detail, see the das2c_cred* functions in the API reference
; @ https://github.com/das-developers/das2dlm/wiki

pro ex01_juno_waves_survey, tmin=tmin, tmax=tmax, display=display
compile_opt idl2
Expand Down
32 changes: 16 additions & 16 deletions make.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ pro make, vcvars=vcvars, vcpkg=vcpkg
endelse
endelse

;Build das2C if needed
cd, 'deps/das2C'
spawn, 'make'
;Build das2C if needed
cd, 'deps/das2C'
spawn, 'make'
cd, '../../'

; Build the extension
sFmt = 'env I_IDL=%s%sexternal%sinclude make -f makefiles%s%s'
sCmd = string(!DIR, sSep, sSep, sSep, sMake, format=sFmt)
print, 'Running: ', sCmd
; Build the extension
sFmt = 'env I_IDL=%s%sexternal%sinclude make -f makefiles%s%s'
sCmd = string(!DIR, sSep, sSep, sSep, sMake, format=sFmt)
print, 'Running: ', sCmd
spawn, sCmd

endif else begin
if ~keyword_set(vcpkg) then begin
message, 'Windows builds require the location of the vcpkg repository'+$
' Run make again with vcpkg=\path\to\vcpkg'
' Run make again with vcpkg=\path\to\vcpkg'
endif
if ~keyword_set(vcvars) then begin
message, 'Windows builds require the location of the vcvars toolchain'+$
' setup script. Run make again with vcvars=\path\to\vcvars64'
if ~keyword_set(vcvars) then begin
message, 'Windows builds require the location of the vcvars toolchain'+$
' setup script. Run make again with vcvars=\path\to\vcvars64'
endif

sMakeCmd = 'nmake /f buildfiles\Windows.mak'
Expand All @@ -54,20 +54,20 @@ pro make, vcvars=vcvars, vcpkg=vcpkg
sInc = 'set "LIBRARY_INC='+vcpkg+'\'+sStatic+'\include"'
sFmtTest = '%s && %s && %s && %s && %s'
sFmt = '%s && %s && %s && %s'
;sCmd = string(vcvars, sLib, sInc, sMakeCmd, sTestCmd, format=sFmtTest)
sCmd = string(vcvars, sLib, sInc, sMakeCmd, format=sFmt)
sCmd = string(vcvars, sLib, sInc, sMakeCmd, sTestCmd, format=sFmtTest)
;sCmd = string(vcvars, sLib, sInc, sMakeCmd, format=sFmt)
print, sCmd
cd, 'deps\das2C'
spawn, sCmd, /log_output
cd, '..\..\'

; build the extension
sMakeCmd = 'nmake /f makefiles\Windows.mak'
sVcPkg = 'set "VCPKG_DIR='+vcpkg+'"'
sVcPkg = 'set "VCPKG_DIR='+vcpkg+'"'
sIdlDir = 'set "IDL_DIR='+!DIR+'"'
sFmt = '%s && %s && %s && %s'
sFmt = '%s && %s && %s && %s'
sCmd = string(vcvars, sVcPkg, sIdlDir, sMakeCmd, format=sFmt)
print, 'Running: ', sCmd
print, 'Running: ', sCmd
spawn, sCmd, /log_output

endelse
Expand Down
6 changes: 3 additions & 3 deletions makefiles/Windows.mak
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ VCPKG_DIR=$(USERPROFILE)\git\vcpkg
!ENDIF

!IFNDEF LIBRARY_INC
LIBRARY_INC=$(VCPGK_DIR)\installed\x64-windows-static\include
LIBRARY_INC=$(VCPKG_DIR)\installed\x64-windows-static\include
!ENDIF

!IFNDEF LIBRARY_LIB
LIBRARY_INC=$(VCPGK_DIR)\installed\x64-windows-static\lib
LIBRARY_LIB=$(VCPKG_DIR)\installed\x64-windows-static\lib
!ENDIF

# The directory containing idl_export.h
Expand Down Expand Up @@ -62,7 +62,7 @@ ALL_LIBS= $(STATIC_LIBS) Advapi32.lib User32.lib Crypt32.lib ws2_32.lib

SRCS=src\das2c.c src\das2c_message.c src\das2c_db.c src\das2c_results.c \
src\das2c_datasets.c src\das2c_dsinfo.c src\das2c_pdims.c src\das2c_vars.c \
src\das2c_data.c src\das2c_readhttp.c src\das2c_srclist.c
src\das2c_data.c src\das2c_readhttp.c src\das2c_srclist.c src\das2c_creds.c
#src\das2c_null_test.c src\das2c_GettmpNull.c

BD=build.windows
Expand Down

0 comments on commit 3674307

Please sign in to comment.