-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53665b4
commit d9ad1ae
Showing
12 changed files
with
170 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# .ansible-lint | ||
|
||
profile: shared # min, basic, moderate,safety, shared, production | ||
enable_list: | ||
- fqcn |
22 changes: 11 additions & 11 deletions
22
Resources/Ansible_Windows/base_scripts/configure_msys2_packages.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
--- | ||
- name: Check already installed packages file exists | ||
win_stat: | ||
path: '{{ drive }}:\msys64\packages.txt' | ||
ansible.windows.win_stat: | ||
path: "{{ drive }}:\\msys64\\packages.txt" | ||
register: packages_exist | ||
|
||
- name: Get pacman installed list | ||
win_shell: 'type {{ drive }}:\msys64\packages.txt' | ||
ansible.windows.win_shell: type {{ drive }}:\msys64\packages.txt | ||
register: installed_packages | ||
changed_when: false | ||
when: packages_exist.stat.exists | ||
|
||
- name: Compare expected to be installed with installed packages | ||
set_fact: | ||
should_setup_msys2: True | ||
ansible.builtin.set_fact: | ||
should_setup_msys2: true | ||
when: (not packages_exist.stat.exists) or (item not in installed_packages.stdout_lines) | ||
loop: "{{ msys2_packages }}" | ||
|
||
- name: Setup MSYS2 | ||
win_shell: | ||
'{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -c ''pacman -Syu | ||
--needed --noconfirm {{ msys2_packages | join('' '') }} && | ||
pacman -Qe | cut -d '''' '''' -f 1 > /{{ drive }}/msys64/packages.txt''' | ||
ansible.windows.win_shell: > | ||
{{ drive }}:\\msys64\\msys2_shell.cmd -mingw32 -defterm -no-start -c | ||
'pacman -Syu --needed --noconfirm {{ msys2_packages | join(' ') }} && | ||
pacman -Qe | cut -d '' '' -f 1 > /{{ drive }}/msys64/packages.txt' | ||
when: should_setup_msys2 is defined | ||
|
||
- name: Get pacman installed list | ||
win_shell: 'type {{ drive }}:\msys64\packages.txt' | ||
ansible.windows.win_shell: type {{ drive }}:\msys64\packages.txt | ||
changed_when: false | ||
register: installed_packages | ||
|
||
- name: Verify pacman result | ||
fail: | ||
ansible.builtin.fail: | ||
msg: "{{ item }} not installed" | ||
failed_when: item not in installed_packages.stdout_lines | ||
loop: "{{ msys2_packages }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
--- | ||
- name: Download Boost | ||
win_get_url: | ||
dest: '{{ drive }}:\{{ install_dir}}\boost.zip' | ||
url: 'https://boostorg.jfrog.io/artifactory/main/release/{{ boost_version }}/source/boost_{{ boost_version.split(".")[0] }}_{{ boost_version.split(".")[1] }}_{{ boost_version.split(".")[2] }}.zip' | ||
ansible.windows.win_get_url: | ||
dest: "{{ drive }}:\\{{ install_dir }}\\boost.zip" | ||
url: >- | ||
https://boostorg.jfrog.io/artifactory/main/release/{{ boost_version }}/source/ | ||
boost_{{ boost_version.split(".")[0] }}_{{ boost_version.split(".")[1] }}_{{ boost_version.split(".")[2] }}.zip | ||
register: boost_download_result | ||
|
||
- name: Unzip Boost | ||
win_unzip: | ||
delete_archive: yes | ||
src: '{{ drive }}:\{{ install_dir}}\boost.zip' | ||
dest: '{{ drive }}:\{{ install_dir}}' | ||
community.windows.win_unzip: | ||
delete_archive: true | ||
src: "{{ drive }}:\\{{ install_dir }}\\boost.zip" | ||
dest: "{{ drive }}:\\{{ install_dir }}" | ||
when: boost_download_result.msg is defined and boost_download_result.msg == "OK" | ||
|
||
- name: Rename Boost | ||
win_shell: "move boost* boost" | ||
ansible.windows.win_shell: move boost* boost | ||
args: | ||
chdir: '{{ drive }}:\{{ install_dir }}' | ||
chdir: "{{ drive }}:\\{{ install_dir }}" | ||
when: boost_download_result.msg is defined and boost_download_result.msg == "OK" | ||
|
||
- name: Build Boost | ||
win_shell: | ||
ansible.windows.win_shell: > | ||
'{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -here -c | ||
"cd tools/build && ./bootstrap.bat mingw && cp b2 ../.. && cd ../.. && | ||
./tools/build/b2.exe --build-type=minimal --toolset=gcc variant=release link=static runtime-link=static | ||
address-model=32 threading=multi --with-system --with-program_options stage"' | ||
./tools/build/b2.exe --build-type=minimal --toolset=gcc variant=release link=static | ||
runtime-link=static address-model=32 threading=multi --with-system --with-program_options stage"' | ||
args: | ||
chdir: '{{ drive }}:\{{ install_dir }}\boost' | ||
chdir: "{{ drive }}:\\{{ install_dir }}\\boost" | ||
register: boost_build_output | ||
when: boost_download_result.msg is defined and boost_download_result.msg == "OK" | ||
|
||
- name: Log output to file | ||
local_action: copy content={{ boost_build_output.stdout }} dest=./boost_output.log | ||
when: boost_build_output.stdout | ||
|
||
ansible.builtin.copy: | ||
content: "{{ boost_build_output.stdout }}" | ||
dest: ./boost_output.log | ||
mode: "0644" | ||
delegate_to: localhost | ||
when: boost_build_output.stdout | ||
|
||
- name: Log error output to file | ||
local_action: copy content={{ boost_build_output.stderr }} dest=./boost_error_output.log | ||
when: boost_build_output.stderr | ||
ansible.builtin.copy: | ||
content: "{{ boost_build_output.stderr }}" | ||
dest: ./boost_error_output.log | ||
mode: "0644" | ||
delegate_to: localhost | ||
when: boost_build_output.stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
--- | ||
- name: Install MSYS2, Due to github-actions being dumb this has to be on the root of the drive | ||
win_chocolatey: | ||
chocolatey.chocolatey.win_chocolatey: | ||
name: msys2 | ||
package_params: '/InstallDir="{{ drive }}:\msys64"' | ||
package_params: /InstallDir="{{ drive }}:\msys64" | ||
state: present | ||
|
||
- name: Configure packages | ||
import_tasks: configure_msys2_packages.yml | ||
ansible.builtin.import_tasks: configure_msys2_packages.yml |
40 changes: 23 additions & 17 deletions
40
Resources/Ansible_Windows/base_scripts/install_pdcurses.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
--- | ||
- name: Download PDCurses | ||
win_get_url: | ||
dest: '{{ drive }}:\{{ install_dir}}\pdcurses.zip' | ||
url: "https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v{{ pdcurses_version }}.zip" | ||
ansible.windows.win_get_url: | ||
dest: "{{ drive }}:\\{{ install_dir }}\\pdcurses.zip" | ||
url: https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v{{ pdcurses_version }}.zip | ||
register: pdcurses_download_result | ||
|
||
- name: Unzip PDCurses | ||
win_unzip: | ||
delete_archive: yes | ||
src: '{{ drive }}:\{{ install_dir}}\pdcurses.zip' | ||
dest: '{{ drive }}:\{{ install_dir}}' | ||
community.windows.win_unzip: | ||
delete_archive: true | ||
src: "{{ drive }}:\\{{ install_dir }}\\pdcurses.zip" | ||
dest: "{{ drive }}:\\{{ install_dir }}" | ||
when: pdcurses_download_result.msg is defined and pdcurses_download_result.msg == "OK" | ||
|
||
- name: Rename PDCurses | ||
win_shell: "move PDCurses* pdcurses" | ||
ansible.windows.win_shell: move PDCurses* pdcurses | ||
args: | ||
chdir: '{{ drive }}:\{{ install_dir }}' | ||
chdir: "{{ drive }}:\\{{ install_dir }}" | ||
when: pdcurses_download_result.msg is defined and pdcurses_download_result.msg == "OK" | ||
|
||
- name: Build PDCurses | ||
win_shell: | ||
'{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -here -c | ||
"mingw32-make WIDE=Y CHTYPE_32=Y -j4" ' | ||
ansible.windows.win_shell: '{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -here -c "mingw32-make WIDE=Y CHTYPE_32=Y -j4" ' | ||
args: | ||
chdir: '{{ drive }}:\{{ install_dir }}\pdcurses\wincon' | ||
chdir: "{{ drive }}:\\{{ install_dir }}\\pdcurses\\wincon" | ||
register: pdcurses_build_output | ||
when: pdcurses_download_result.msg is defined and pdcurses_download_result.msg == "OK" | ||
|
||
- name: Log output to file | ||
local_action: copy content={{ pdcurses_build_output.stdout }} dest=./pdcurses_output.log | ||
when: pdcurses_build_output.stdout | ||
ansible.builtin.copy: | ||
content: "{{ pdcurses_build_output.stdout }}" | ||
dest: ./pdcurses_output.log | ||
mode: "0644" | ||
delegate_to: localhost | ||
when: pdcurses_build_output.stdout | ||
|
||
- name: Log error output to file | ||
local_action: copy content={{ pdcurses_build_output.stderr }} dest=./pdcurses_error_output.log | ||
when: pdcurses_build_output.stderr | ||
ansible.builtin.copy: | ||
content: "{{ pdcurses_build_output.stderr }}" | ||
dest: ./pdcurses_error_output.log | ||
mode: "0644" | ||
delegate_to: localhost | ||
when: pdcurses_build_output.stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
--- | ||
- name: Installing XLink Handheld Assistant build environment | ||
hosts: win | ||
|
||
tasks: | ||
- name: Grab variables | ||
include_vars: | ||
- name: Grab variables | ||
ansible.builtin.include_vars: | ||
file: vars.yml | ||
|
||
- name: Install Base | ||
import_tasks: install_base.yml | ||
when: install_base == True | ||
ansible.builtin.import_tasks: install_base.yml | ||
when: install_base | ||
|
||
- name: Install Runner | ||
import_tasks: install_runner.yml | ||
when: install_runner == True | ||
|
||
- name: Install Development Environment | ||
import_tasks: install_devenv.yml | ||
when: install_devenv == True | ||
ansible.builtin.import_tasks: install_runner.yml | ||
when: install_runner | ||
|
||
- name: Install Development Environment | ||
ansible.builtin.import_tasks: install_devenv.yml | ||
when: install_devenv |
Oops, something went wrong.