Skip to content

Commit 3c89275

Browse files
committed
Merge branch 'master' into asar_2_beta
2 parents dc94354 + b7a391c commit 3c89275

File tree

6 files changed

+40
-22
lines changed

6 files changed

+40
-22
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ jobs:
4040
# Windows MSVC tests
4141
- name: App Test
4242
# Run app test
43-
run: ${{github.workspace}}/build/asar-tests/${{env.BUILD_TYPE}}/asar-app-test.exe ${{github.workspace}}/build/asar/${{env.BUILD_TYPE}}/asar.exe "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
43+
run: ${{github.workspace}}/build/asar-tests/${{env.BUILD_TYPE}}/asar-app-test.exe ${{github.workspace}}/build/asar/bin/${{env.BUILD_TYPE}}/asar.exe "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
4444
if: ${{ contains(matrix.config, 'msvc') }}
4545

4646
- name: DLL Test
4747
# Run app test
48-
run: ${{github.workspace}}/build/asar-tests/${{env.BUILD_TYPE}}/asar-dll-test.exe ${{github.workspace}}/build/asar/${{env.BUILD_TYPE}}/asar.dll "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
48+
run: ${{github.workspace}}/build/asar-tests/${{env.BUILD_TYPE}}/asar-dll-test.exe ${{github.workspace}}/build/asar/lib/${{env.BUILD_TYPE}}/asar.dll "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
4949
if: ${{ contains(matrix.config, 'msvc') }}
5050

5151
# Tests for other platforms
5252
- name: App Test
5353
# Run app test
54-
run: ${{github.workspace}}/build/asar-tests/asar-app-test ${{github.workspace}}/build/asar/asar "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
54+
run: ${{github.workspace}}/build/asar-tests/asar-app-test ${{github.workspace}}/build/asar/bin/asar "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
5555
if: ${{ !contains(matrix.config, 'msvc') }}
5656

5757
- name: DLL Test
5858
# Run app test
59-
run: ${{github.workspace}}/build/asar-tests/asar-dll-test ${{github.workspace}}/build/asar/libasar.so "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
59+
run: ${{github.workspace}}/build/asar-tests/asar-dll-test ${{github.workspace}}/build/asar/lib/libasar.so "${{github.workspace}}/tests" "${{github.workspace}}/dummy_rom.sfc" ${{github.workspace}}/build/temp
6060
if: ${{ !contains(matrix.config, 'msvc') }}
6161

appveyor.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ build:
4242
verbosity: minimal
4343

4444
artifacts:
45-
- path: build\asar\**\asar.exe
46-
- path: build\asar\**\*asar.dll
45+
- path: build\asar\bin\**\asar.exe
46+
- path: build\asar\lib\**\*asar.dll
4747

4848
configuration: MinSizeRel
4949

5050
test_script:
5151
# We need to pass the DLL path as an absolute path because it is used to calculate the std defines location, which will throw a warning when it's a relative path
5252
- cmd: >-
53-
asar-tests\%CONFIGURATION%\asar-dll-test.exe %APPVEYOR_BUILD_FOLDER%\build\asar\%CONFIGURATION%\asar.dll %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_dll
53+
asar-tests\%CONFIGURATION%\asar-dll-test.exe %APPVEYOR_BUILD_FOLDER%\build\asar\lib\%CONFIGURATION%\asar.dll %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_dll
5454
55-
asar-tests\%CONFIGURATION%\asar-app-test.exe asar\%CONFIGURATION%\asar.exe %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_app
55+
asar-tests\%CONFIGURATION%\asar-app-test.exe asar\bin\%CONFIGURATION%\asar.exe %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_app
5656
5757
deploy:
5858
provider: FTP
@@ -79,6 +79,6 @@ for:
7979

8080
test_script:
8181
- cmd: >-
82-
asar-tests\asar-dll-test.exe %APPVEYOR_BUILD_FOLDER%\build\asar\libasar.dll %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_dll
82+
asar-tests\asar-dll-test.exe %APPVEYOR_BUILD_FOLDER%\build\asar\lib\libasar.dll %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_dll
8383
84-
asar-tests\asar-app-test.exe asar\asar.exe %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_app
84+
asar-tests\asar-app-test.exe asar\bin\asar.exe %APPVEYOR_BUILD_FOLDER%\tests ..\dummy_rom.sfc %APPVEYOR_BUILD_FOLDER%\tests_tmp_app

generate_release_zip.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
zipf = zipfile.ZipFile("asar"+sys.argv[1]+".zip", 'x', compression=zipfile.ZIP_DEFLATED)
1212

1313
branch_name = subprocess.run("git rev-parse --abbrev-ref HEAD", shell=True, stdout=subprocess.PIPE).stdout.decode().strip()
14-
build_server_prefix = "https://random.muncher.se/ftp/asar/windows/"+branch_name+"/win32/build/asar/MinSizeRel/"
15-
with urllib.request.urlopen(build_server_prefix + "asar.exe") as resp:
14+
build_server_prefix = lambda f, n: f"https://random.muncher.se/ftp/asar/windows/"+branch_name+"/win32/build/asar/{f}/MinSizeRel/{n}"
15+
with urllib.request.urlopen(build_server_prefix("bin", "asar.exe")) as resp:
1616
exe_data = resp.read()
17-
with urllib.request.urlopen(build_server_prefix + "asar.dll") as resp:
17+
with urllib.request.urlopen(build_server_prefix("lib", "asar.dll")) as resp:
1818
dll_data = resp.read()
1919

2020
zipf.writestr("asar.exe", exe_data)

run_tests.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ set ABS=%~dp0
22
set ABS=%ABS:~0,-1%
33
set CONFIG=Release
44
mkdir tests_tmp_dll tests_tmp_app
5-
%ABS%\asar-tests\%CONFIG%\asar-dll-test.exe %ABS%\asar\%CONFIG%\asar.dll %ABS%\tests %ABS%\dummy_rom.sfc %ABS%\tests_tmp_dll
6-
%ABS%\asar-tests\%CONFIG%\asar-app-test.exe %ABS%\asar\%CONFIG%\asar.exe %ABS%\tests %ABS%\dummy_rom.sfc %ABS%\tests_tmp_app
5+
%ABS%\asar-tests\%CONFIG%\asar-dll-test.exe %ABS%\asar\lib\%CONFIG%\asar.dll %ABS%\tests %ABS%\dummy_rom.sfc %ABS%\tests_tmp_dll
6+
%ABS%\asar-tests\%CONFIG%\asar-app-test.exe %ABS%\asar\bin\%CONFIG%\asar.exe %ABS%\tests %ABS%\dummy_rom.sfc %ABS%\tests_tmp_app
77
@pause

run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
ABS=$(pwd)
22
mkdir tests_tmp_dll tests_tmp_app
3-
$ABS/asar-tests/asar-dll-test $ABS/asar/libasar.so $ABS/tests $ABS/dummy_rom.sfc $ABS/tests_tmp_dll
4-
$ABS/asar-tests/asar-app-test $ABS/asar/asar $ABS/tests $ABS/dummy_rom.sfc $ABS/tests_tmp_app
3+
$ABS/asar-tests/asar-dll-test $ABS/asar/lib/libasar.so $ABS/tests $ABS/dummy_rom.sfc $ABS/tests_tmp_dll
4+
$ABS/asar-tests/asar-app-test $ABS/asar/bin/asar $ABS/tests $ABS/dummy_rom.sfc $ABS/tests_tmp_app

src/asar/CMakeLists.txt

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,17 @@ if(ASAR_GEN_EXE)
259259
target_compile_options(asar-standalone PRIVATE -fprofile-arcs -ftest-coverage)
260260
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov --coverage -fprofile-arcs")
261261
endif()
262-
263-
set_target_properties(asar-standalone PROPERTIES OUTPUT_NAME "asar")
264-
set_target_properties(asar-standalone PROPERTIES PDB_NAME "asar.exe")
262+
263+
set_target_properties(asar-standalone
264+
PROPERTIES
265+
OUTPUT_NAME "asar"
266+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
267+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
268+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
269+
)
265270

266271
install(TARGETS asar-standalone)
272+
267273
endif(ASAR_GEN_EXE)
268274

269275

@@ -285,9 +291,15 @@ if(ASAR_GEN_DLL)
285291
target_compile_definitions(asar PRIVATE "ASAR_SHARED")
286292
set_asar_shared_properties(asar "T" TRUE)
287293

288-
set_target_properties(asar PROPERTIES PDB_NAME "asar.dll")
294+
set_target_properties(asar
295+
PROPERTIES
296+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib"
297+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib"
298+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib"
299+
)
289300

290301
install(TARGETS asar)
302+
291303
endif(ASAR_GEN_DLL)
292304

293305

@@ -307,7 +319,13 @@ if (ASAR_GEN_LIB)
307319
target_compile_definitions(asar-static PRIVATE "ASAR_STATIC")
308320
set_asar_shared_properties(asar-static "D" FALSE)
309321

322+
set_target_properties(asar-static
323+
PROPERTIES
324+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib"
325+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib"
326+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib"
327+
)
328+
310329
install(TARGETS asar-static)
311330

312-
# there's no need to set the PDB name since static libraries don't produce PDBs
313331
endif()

0 commit comments

Comments
 (0)